Skip to content

Say a decision was lost only when one was (#710) - #711

Merged
MongLong0214 merged 1 commit into
mainfrom
fix-710-pending-prose
Aug 16, 2026
Merged

Say a decision was lost only when one was (#710)#711
MongLong0214 merged 1 commit into
mainfrom
fix-710-pending-prose

Conversation

@MongLong0214

Copy link
Copy Markdown
Owner

Closes #710.

doctor told this repository four decisions were never written to the history. The four captures it meant hold zero records and never reached staging — nothing was drafted, so nothing was dropped.

NONCE     PHASE     RECORDS  FLAGS
ba54a69c  prepared  0        stale
bd065cf2  prepared  0        stale
464b4c13  prepared  0        stale
e8eb71c6  prepared  0        stale

The count was never wrong. lost has separated staged losses from earlier drafts since #458; the explanation appended after it was written for the staged branch and emitted for both.

The guard that should have caught it

warns without claiming a record was lost when nothing reached staged — the test is named for exactly this property and asserted the absence of the other branch's wording:

expect(result.detail).not.toMatch(/expired before reaching a commit/);   // the count's wording
// never asserted:            /never written to the history/             // the loss claim

The consumed case two tests below already uses never written to the history as the loss claim, so the string was established as the thing to check. This case just did not check it. That assertion is now what the name promises, and it fails against the unfixed source:

AssertionError: nothing staged means nothing was dropped:
  expected '1 capture(s) can no longer apply — th…' not to match /never written to the history/

What the non-staged branch says now

None reached staging, so no record was dropped — the commit each was prepared for either never happened or happened without it

That is the file's own existing explanation of staleness, from the comment above stranded.

Not changed

The severity. An abandoned draft still warns — #584 showed that going quiet on a path that looks healthy is how this check loses its meaning, and that judgement is separate from the wording.

Verified

  • the new assertion fails before the fix, passes after
  • npx tsc --noEmit clean
  • 29 cases pass across doctor-pending-backlog, pending-command, capture-pipeline-e2e
  • npm run build:canonical then npm run artifact:verifyde9222c7187eb818ab20cfea63fa3e918e56f7eca1dc9fff654cae4bf39c0daf

The stale-pending warning appended its explanation to both branches. A draft that never reached staging holds no record, so a repository with four empty prepared captures was told four decisions were never written to the history — and `pending ls`, the fix offered beside it, then shows RECORDS 0 and nothing to recover.

The count was already right. `lost` has distinguished staged losses from earlier drafts since #458; only the sentence explaining the count was borrowed from the branch above it.

The guard for this existed and did not assert it. `warns without claiming a record was lost when nothing reached staged` checked for the absence of the *other* branch's wording and let the stronger claim through, while the neighbouring consumed case already used `never written to the history` as the loss claim. That assertion is now the one the test's name promises.

Limit: the wording is checked, not the severity — an abandoned draft still warns
Ruled-out: drop the warning for the non-staged case | a stale draft is still worth surfacing, and #584 already showed that going quiet on a healthy-looking path is how this check loses its meaning
Blast: module
Undo: easy
Certainty: firm
Record-Id: r-pend710
Provenance: authored
Verified: the new assertion fails against the unfixed source (expected '1 capture(s) can no longer apply — th…' not to match /never written to the history/) and passes after; npx tsc --noEmit clean; 29 cases pass across doctor-pending-backlog, pending-command and capture-pipeline-e2e; npm run build:canonical then artifact:verify -> de9222c7187eb818ab20cfea63fa3e918e56f7eca1dc9fff654cae4bf39c0daf
CommitLore-Version: 2.0.0
@github-actions

Copy link
Copy Markdown

CommitLore — record lint

Trailers: clean — 1 commit in origin/main..b452535f7c19bc87c7e5d6a7a37bbbcd6796698c
Active constraints: not read — commitlore: git log --follow accepts exactly one pathspec, so renames are not followed for 6 paths; query one path at a time to follow its rename chain (6 changed paths)

Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR.

@MongLong0214
MongLong0214 merged commit 87b7c74 into main Aug 16, 2026
12 checks passed
@MongLong0214
MongLong0214 deleted the fix-710-pending-prose branch August 16, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor reports lost decisions for pending captures that never held one

1 participant