Repository navigation
Conversation
…bing A worker may drop brief scope, but the drop must be a keyed descoped: status event that stays open until resolved. The no-mistakes PR privacy scrub now redacts local details in place and must not delete sections.
Confidence Score: 4/5The PR should not merge until terminal fleet snapshots preserve unresolved descoped decisions. The shared fold now makes descopes durable across completion, but a reachable captain-facing snapshot path still erases them solely because the worker is terminal. Files Needing Attention: bin/fm-classify-lib.sh, bin/fm-fleet-snapshot.sh
|
Intent
Two fleet-contract fixes in firstmate's shared tracked material, both born from the same captain incident: a worker delivered HALF of a morning-planned brief, said so only in PR prose, reported done:, and the dropped half silently vanished until rediscovered by accident at night. The captain's ruling: a worker may descope, but never silently; and the PR privacy scrub must delete details, never sections.
Change 1: descopes are keyed, durable, and cannot die in prose.
descoped [key=descope-<slug>]: {what was dropped and why}for each dropped item, BEFORE its done: line. A done: that silently omits brief scope without a matching descoped: event is a named contract violation.Change 2: PR privacy scrub deletes details, never sections.
Acceptance: scaffold a fresh ship brief and assert the generated contract wording; a descoped: ... [key=descope-x] line surfaces in the drain's open-events fold and stays open across a simulated restart until a resolved line with the same key lands; existing scaffold, classify, and drain tests stay green; PR body uses product language with no local paths.
Deliberate decisions while implementing:
descoped [key=descope-<slug>]: {what}) rather than trailing after the note. The existing fold treats a mid-note or trailing [key=...] as prose, so a trailing example would silently fail to open the decision and recreate the incident.What Changed
descoped [key=descope-<slug>]: {what was dropped and why}status event beforedone:whenever task-section requirements are dropped, deferred, or narrowed, folding into the existing open-keyed-event machinery so descopes surface in the drain's OPEN DECISIONS and stay open until a matching resolved/captain-held line closes them.Risk Assessment
✅ Low: The change is well-bounded and mostly additive (new keyed verb, contract wording, doc updates) with one targeted, correctly-scoped behavior fix that honors the documented fold invariant without disturbing the existing suppress-on-done semantics for needs-decision/blocked, and it is covered by behavior-level tests.
Testing
I exercised the keyed-descope contract end-to-end: scaffolded a real ship brief (no-mistakes mode) to confirm the generated States list and keyed descoped: contract wording plus the details-only/keep-sections PR scrub, then drove the real wake drain over a
descoped [key=descope-x]followed bydone:to confirm it surfaces in OPEN DECISIONS, survives a simulated restart, and disappears once aresolved [key=descope-x]line lands. The five targeted behavior suites (classify fold, drain, triage verb classification, brief scaffold, captain-hold inventory routing) all pass, and the diff introduces no local machine paths. No issues found.Evidence: Generated ship brief (no-mistakes mode) showing the descoped States list, keyed descoped: contract, and keep-sections PR scrub
Source: Generated ship brief (no-mistakes mode) showing the descoped States list, keyed descoped: contract, and keep-sections PR scrub
Evidence: Drain end-to-end: descoped decision surfaces, survives restart, and closes on resolved
Source: Drain end-to-end: descoped decision surfaces, survives restart, and closes on resolved
descoped [key=descope-x]: dropped the follow-up because it was out of scope done: shipped the remaining half OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line): task-descope [key=descope-x] descoped: dropped the follow-up because it was out of scope OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>' (same OPEN DECISIONS line re-presented on the simulated-restart drain) (after 'resolved [key=descope-x]: routed to a follow-up task' -> no OPEN DECISIONS line printed)Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
bin/fm-captain-hold.sh:296- origin_open_decisions() returns empty whenever a ship worker's last status line is done: or failed: (case 'done|failed) return 0' at line 296), on the assumption that finishing the run supersedes any still-open decision. The new descoped invariant is precisely that done: does NOT close a descoped decision (bin/fm-classify-lib.sh:349 keeps it open across done:, and the drain test asserts it survives a done: line). So a worker that appends 'descoped [key=descope-x]: ...' then 'done: ...' leaves the descoped decision open in status_open_decisions but invisible to fm-captain-hold.sh: command_complete's --none attestation (line 809-811 uses the suppressedopen) succeeds with no warning, and command_verify (line 860) sees nothing untransferred, so the descope cannot be routed into the captain-held inventory through this path (only closed via fm-send --resolve-key). The transfer loop itself uses the unsuppressed raw_open (line 808/826), so routing WITH keys still works; the concrete gap is the --none attestation and verify treating a done worker's open descope as already-superseded while the drain still surfaces it as open. Recommended fix at the shared boundary: in origin_open_decisions, do not suppress decisions whose opening verb is descoped when the last line is done/failed (i.e. stop re-deriving 'done supersedes all' here and honor the fold's verb-specific semantics).bin/fm-fleet-snapshot.sh:504- The fleet snapshot's captain-decision derivation does not recognize the new descoped verb: hints.pending_decision (line 504) tests only .verb == 'needs-decision', hints.blocked_event (line 505) only 'blocked', the secondmate home-summary state (line 764) classifies 'captain_decision' only for 'needs-decision'/'captain-hold', and the secondmate decision matching (line ~1112) yields 'inconclusive' for any other verb. The full open set (hints.open_decisions / decisions_open, derived from status_open_decisions) DOES include descoped, so the raw data is present; but the derived booleans, the state label, fm-crew-state.sh map_log_state (descoped -> 'unknown'), and fm_voice_records.py STATE_VERBS (descoped not allowed, reported as 'note') do not treat descoped as captain-actionable. Consequence: on surfaces other than the drain (bearings board, secondmate summaries, voice), a descoped decision may be labeled no_active_work/unknown/note instead of a pending captain decision. Informational: the drain is the authoritative re-presentation surface the intent names, and it is correct and tested; these are adjacent-surface completeness gaps, not a correctness failure of the change's own scope.bin/fm-brief.sh:463- The generated ship brief's canonical 'States:' enumeration (line 463) still lists 'working, needs-decision, blocked, paused, done, failed' without descoped, while the very next line (466) added descoped to the 'would act on' list and rule 4 (line 474) mandates the descoped event. Minor inconsistency in the generated contract wording: a worker reading the enumeration literally might not realize descoped is a valid status verb even though rule 4 explicitly instructs it. Add descoped to the States: list for consistency with the adjacent 'would act on' list.🔧 Fix: Honor descoped decisions through done and ship briefs
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-classify-decision-key.test.sh— descoped [key=X] opens like blocked, stays open across working:/done:, closes on matching resolved (both key positions)bash tests/fm-wake-drain-open-decisions.test.sh— keyed descoped surfaces in the OPEN DECISIONS fold, survives a simulated restart, closes on resolvedbash tests/fm-watch-triage.test.sh— descoped is captain-relevant but non-terminal (not a terminal wait verb)bash tests/fm-brief.test.sh— ship States list includes descoped, keyed descoped + PR-scrub contract render; scout/secondmate and non-no-mistakes modes excludedbash tests/fm-captain-hold-lifecycle.test.sh— a descoped decision survives done: and routes into the captain-held inventory via complete/hold/verifyManual scaffold:FM_HOME=<tmp> bash bin/fm-brief.sh demo-ship-descope sample-repo --mode no-mistakes, then inspected the generated brief.md (States list, descoped contract, keep-sections scrub)Manual drain demo: drovebin/fm-wake-drain.shoverdescoped [key=descope-x]+done:(surface), re-ran for restart (re-present), thenresolved [key=descope-x](no longer open)git diff base..target | grep -E '/Users/|/home/'confirmed no local machine paths introduced; commit messages are product language✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.