Repository navigation
Description
Seen once, on main at 7014551, in a full local pytest run on macOS (arm64, Python 3.13). Not reproduced: the same test passed alone immediately afterwards, and two subsequent full-suite runs were clean. Filing it because the next sighting should not be the first record.
What failed
tests/test_unbounded_memory_write_346.py::test_session_start_names_an_oversized_memory_file_instead_of_injecting_it, on its first assertion:
assert "NOW-BODY-346" in out, "healthy memory files must still be injected"
E AssertionError: healthy memory files must still be injected
E assert 'NOW-BODY-346' in '{\n "hookSpecificOutput": {\n "hookEventName": "SessionStart",
"additionalContext": "=== REMEMBER ===\\nHist... (elided) ...stargazers (off: features.plugin_promos)"\n}\n'
So the hook exited 0 and emitted a session-start payload — with the REMEMBER section and the promo present — but the tiny now.md this test writes was not in it. The test's other three assertions (the oversized recent.md is named, not injected, and its size reported) were never reached.
Why it matters more than an ordinary flake
This assertion is the positive control for the #346 mechanism. The test's real subject is that an oversized file is refused; "a healthy file is still injected" is what stops that refusal from being satisfied by injecting nothing at all. A path that intermittently drops a healthy memory file is, for a user, the plugin silently forgetting — the failure mode this repo treats as the worst one, and it would look identical to having nothing to say.
Conditions, stated exactly
- Full-suite run,
-p no:randomly(so file order was the declared one, not a random seed). - Passing in isolation and in two later full runs means the trigger is cross-test state or timing, not the test's own logic.
- The run was NOT under the plugin's own SessionStart hook averages ~12.5s on Windows (Git Bash) — measured over 36 session starts on v0.29.1 #660 deferred phase being disabled; default config throughout.
Candidates, none confirmed
- The batched
wc -cin_remember_render_memory_sectionfailing or returning partially under load, leaving files unmeasured. safe_eval drops every bridge variable containing 'I' under tr_TR locale — no save ever completes #695's round-1 audit already established that an unmeasured size must fail open (inject), so if this is the cause, something in that path is failing closed instead. - The
$REMEMBER_DIR/tmp/start-context.cachehit path (SessionStart: cache the injected context, the flattened config and the tool verdicts across starts, validated by mtime (Part of #660) #668) serving a render from a state wherenow.mdwas not yet present. The cache is per-store and this store is per-test, so this requires the publish and the read to interleave within the one run. - Something in
MEMORY_FILESassembly losing an entry — the least likely, and the easiest to rule out.
What would settle it
The hook's full stdout at the moment of failure, which the assertion currently elides. A first step is to widen that assertion's message to dump the whole payload (it is kilobytes), so the next occurrence carries its own evidence instead of needing a reproduction that has not happened yet.
[AI-generated]
Activity
fix(#707): dump the full session-start payload when the #346 positive…