Skip to content

fix(#707): dump the full session-start payload when the #346 positive control fails - #710

Merged
fdaviddpt merged 2 commits into
mainfrom
fix/707
Sep 16, 2026
Merged

fdaviddpt merged 2 commits into
mainfrom
fix/707

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

Closes #707

Widens all four assertions in tests/test_unbounded_memory_write_346.py::test_session_start_names_an_oversized_memory_file_instead_of_injecting_it so each failure message appends the hook's full stdout payload instead of pytest's default truncated diff. Test-diagnostics only: no production or hook code changed, and all four assertion conditions are byte-identical to before. Verified with a standalone probe that the new message format actually surfaces the full JSON payload on failure rather than a truncated string.

The flake this issue was filed to instrument (a healthy now.md intermittently missing from a session-start payload) has never been reproduced -- not by the original report, not by this lane. This change is the issue's own stated minimal ask ("widen that assertion's message to dump the whole payload"), so the next occurrence carries its own evidence instead of needing a reproduction that has not happened yet. The three candidate mechanisms named in the issue body (batched wc -c fail-closed, start-context cache #668 interleaving, MEMORY_FILES assembly) were not investigated or ruled in/out -- out of scope for this minimal, diagnostics-only change.

#660 is not touched by this pull request and stays open. Recon and an independent full read of its 11-comment thread (2026-09-11 through 2026-09-16) confirm the foreground-path work the issue asked for already shipped in v0.33.0, measured at CI (49 -> 29 foreground subprocesses per session start). What remains open is a measurement dispute between the maintainer and an external reporter over an enabled-vs-disabled timing gap on a quiet machine -- "a number we do not have", in the maintainer's own words -- not a code change. No code site was identified as needing work, so none was made, and this pull request does not claim to close it.

Action needed from the maintainer: apply the no-changelog label to this pull request. A changelog.d/707.fixed.md fragment was drafted and then removed after self-review correctly flagged it as miscategorizing a test-only, no-user-visible-effect change as a Keep-a-Changelog "Fixed" entry (per changelog.d/README.md's own policy, such changes are marked via the PR label instead of a fragment). The no-changelog label exists on this repo already but cannot be applied by this lane -- labeling a PR is a forge-side action outside the developer role's remit. Without it, CI's changelog gate may need this labeling step before it passes.

[AI-generated]

… control fails

The assertion that a healthy now.md is still injected is the positive
control for the #346 oversized-file refusal: it is what stops that
mechanism from being satisfied by injecting nothing at all. Seen once as
a flake with no reproduction in hand, and pytest's default truncated
diff elided exactly the evidence the next occurrence would need. All
four assertions in the test now print the hook's full stdout (a few
kilobytes) on failure instead of a truncated default message.

Co-Authored-By: Max <noreply>
…only change

Self-review (Explore reviewer) flagged that changelog.d/707.fixed.md
mischaracterized a test-assertion-message widening as a user-facing
"Fixed" entry: no production code or behavior changed, only what a
failing pytest assertion prints. changelog.d/README.md's own escape
hatch for changes invisible to users is the `no-changelog` label,
which already exists on this repo -- the maintainer should apply it
to this pull request rather than have this land in CHANGELOG.md as a
fix nobody will observe.

Co-Authored-By: Max <noreply>
@fdaviddpt fdaviddpt added the no-changelog Change is invisible to users label Sep 16, 2026
@fdaviddpt
fdaviddpt merged commit 9fe64c6 into main Sep 16, 2026
16 of 17 checks passed
@fdaviddpt
fdaviddpt deleted the fix/707 branch September 16, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Change is invisible to users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flake, seen once: the #346 positive control failed -- a healthy now.md was not injected while the rest of the session-start payload was

1 participant