Skip to content

On an aged store, "SessionEnd has never fired" still outranks a PostToolUse arm that has already named a more specific cause #404

Closed

Description

@fdaviddpt

Found by the round-two release audit of v0.22.0..HEAD before tagging 0.23.0. Carry-forward under the two-round cap: non-blocking, ranked misreports. Graded read, not exercised -- the audit did not build the fixture, so the mechanism below is traced rather than reproduced.

Symptom

/remember:doctor reports "SessionEnd has never fired" as its verdict on a store where the actionable diagnosis -- already printed higher in the same report -- is that PostToolUse is wired, running, and exiting early.

Location

scripts/doctor.sh:778, against :784 and :787.

scripts/doctor.sh:274-277 prints WARN PostToolUse is wired and running, but has not serviced a session -- it is exiting early. The cause is above and leaves _POST_TOOL_FIRED=0.

Mechanism

#392/#400 fixed the fresh install half of this displacement by excluding transcripts older than the install baseline. It did not move the ladder: _SESSION_END_STATE = "not-fired" still sits above both PostToolUse arms.

So on an aged store the displacement survives. $_SESSION_DIR exists, transcripts post-date the baseline and go quiet, _SESSION_END_STATE becomes not-fired, and :778 wins -- while the specific cause is the PostToolUse line above it.

The ladder's own stated rule at scripts/doctor.sh:751 is "specific causes before the general one", and here the general one is on top.

Checked and not a defect: the slug-mismatch arm at :782-783 is not displaceable, because it requires [ ! -d "$_SESSION_DIR" ] while the SessionEnd arm at :385 requires [ -d "$_SESSION_DIR" ]. The two are mutually exclusive by construction.

Note this file has now taken three changes in one release delta -- 49c1647 reordered the ladder, 206e151 added this arm, 811e280 gated its evidence -- each written against the ladder as it stood before the others landed.

What would settle it

Whether "SessionEnd never fired" should rank above a PostToolUse arm that has already named a more specific cause. If it should not, the arm moves below both; if it should, the ladder's stated rule at :751 needs the exception written down.

The test is a fixture with an aged store, PostToolUse wired-but-exiting-early, and quiet post-baseline transcripts -- asserting which verdict line wins. Pair it with the case where no PostToolUse arm has fired, so the SessionEnd verdict is still reachable.

Activity

  1. added
    priority:low
    cohort-2
    on Aug 28, 2026
  2. self-assigned this
    on Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cohort-2priority:low

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions