Skip to content

fix: align decision-key resolution and reserved-key handling - #10

Open
cisrd wants to merge 6 commits into
mainfrom
fm/fm-lot-decision-fold-consistency
Open

cisrd wants to merge 6 commits into
mainfrom
fm/fm-lot-decision-fold-consistency

Conversation

@cisrd

@cisrd cisrd commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Intent

Le capitaine demande d enchaîner encore deux lots regroupés et précise : « là tu utilises gpt 5.6 ».

Ce lot regroupe trois défauts de la même famille :

  • fm-send --resolve-key refuse des clés que le repli reconnaît pourtant sur des lignes blocked: ;
  • une ligne documentée resolved [key=...]: ... peut laisser la clé ouverte après un repli complet ;
  • les clés réservées comme pending-reply-* ignorent silencieusement certaines résolutions manuelles pourtant explicites.

Ce brief est en français, ta livraison ne l est pas.

What Changed

  • Share decision-key validation and reserved-key close-note generation across status folding, fm-send --resolve-key, and captain-held transfers.
  • Surface rejected reserved-key closes as reconciliation-required events routed to the main session and included in unread status.
  • Update lifecycle documentation and regression coverage for reserved closes, transfers, exact-key resolution, and reopening.

Risk Assessment

✅ Low: The changes are bounded, preserve reserved-key guards, and implement the accepted resolution, transfer, and reconciliation-routing decisions without additional substantiated defects.

Testing

Classifier, send, drain, transfer, and routing checks passed, with CLI evidence and a baseline regression reproduction. Broader lifecycle runs hit execution deadlines; focused affected selectors completed successfully. No source changes were needed.

Evidence: CLI decision closure, delivery, full replay, and rejected-resolution reconciliation

Source: CLI decision closure, delivery, full replay, and rejected-resolution reconciliation

CLI demonstration: real fm-send and fm-wake-drain, isolated home; tmux transport stubbed.

$ fm-wake-drain (before answer)
OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
t1 [key=secret-abc] blocked: secret-held: choose deployment window
OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'

$ fm-send t1 --resolve-key secret-abc "deploy Saturday"

Persisted status ledger:
blocked: [key=secret-abc] secret-held: choose deployment window
resolved [key=secret-abc]: secret-resolved: answered: deploy Saturday

Delivered inbox body:
deploy Saturday
$ fm-wake-drain (after answer)
UNREAD STATUS (new since last drain, not re-printed after this presentation):
t1 resolved [key=secret-abc]: secret-resolved: answered: deploy Saturday

Full replay of persisted status ledger:
(no open decisions)

$ fm-wake-drain (after unofficial reserved-key resolution)
UNREAD STATUS (new since last drain, not re-printed after this presentation):
t1 resolved [key=pending-reply-abcdef0123456789]: manually dismissed
OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
t1 [key=pending-reply-abcdef0123456789] blocked: pending-reply-missed: task=t1 request=ship it
OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'

Classification of only the rejected close (previous opener already read):
event=292	strong:65028:12103148:2026-09-08 18:51:37.270500600 +0200	reconciliation-required: resolved [key=pending-reply-abcdef0123456789]: manually dismissed
needs-decision=1

$ fm-send t1 --resolve-key pending-reply-abcdef0123456789 "confirmed dismissal"

$ fm-wake-drain (after official reserved-key resolution)
UNREAD STATUS (new since last drain, not re-printed after this presentation):
t1 resolved [key=pending-reply-abcdef0123456789]: pending-reply-resolved: answered: confirmed dismissal

Full replay:
(no open decisions)
Evidence: Rejected reserved close: baseline versus target behavior

Source: Rejected reserved close: baseline versus target behavior


base: classification of a rejected manual reserved-key resolution
actionable exit=1; decision-owned=0
event=150	strong:65028:12103132:2026-09-08 18:52:56.607686186 +0200

target: classification of a rejected manual reserved-key resolution
actionable exit=0; decision-owned=1
event=150	strong:65028:12103132:2026-09-08 18:52:56.607686186 +0200	reconciliation-required: resolved [key=pending-reply-abcdef0123456789]: manually dismissed

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-classify-decision-key.test.sh
  • bash tests/fm-classify-corr-token.test.sh
  • bash tests/fm-send-resolve-key.test.sh
  • bash tests/fm-wake-drain-open-decisions.test.sh
  • Selected captain-hold lifecycle tests: completion attestation, reserved-key transfer, and answer recording.
  • Seven selected watcher tests covering span closure, decision-owned routing, rejected transfers/resolutions, and ordinary blocker routing.
  • Ran the captain-hold lifecycle suite twice; execution deadlines interrupted broader cases. Re-ran the three change-relevant selectors successfully.
  • Executed real fm-send and fm-wake-drain against an isolated fixture with stubbed terminal transport; captured inbox delivery, persisted resolution records, full replay, and loud rejection of unofficial reserved-key closes.
  • Compared rejected-close classification at base d42016a and target: reproduced silent baseline behavior and verified actionable, decision-owned target behavior.
  • Removed temporary fixtures and confirmed git status --short was clean.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@cisrd cisrd changed the title fix(bin): close reserved decision keys through one shared decision-key grammar fix: align decision-key resolution and reserved-key handling Sep 8, 2026
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.

1 participant