Skip to content

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

Closed

Description

@fdaviddpt

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

Candidates, none confirmed

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

  1. added
    bug
    priority:low
    lane-capture
    on Sep 16, 2026
  2. self-assigned this
    on Sep 16, 2026
  3. added a commit that references this issue on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buglane-capturepriority:low

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions