Repository navigation
Description
Problem
Issue/PR closures in the fleet currently leave no durable, attributable record: a closure's actor and reason live only in GitHub's timeline, and nothing stops an automation from closing live work with no deliverable and no reason. Evidence, not theory:
- On 2026-11-12, epic Fleet CA, credentials & secrets — v0.3 design mill (Summit build-out) #9155 was labeled
status:doneand closed by an automation 8 minutes into an actively-working bound Summit session, before any deliverable existed. The closing automation is still unidentified. - The 90-day closed-item review (started 2026-11-12, ledger in hatch-personal
workspace/goals/keep-the-four-repos-healthy/files/closed-review-90d/) is classifying every closed issue/PR since 2026-08-14 across the four working repos. Counts so far: dezren39/darwin-nix — 3 WRONGLY_CLOSED of 1,810 closed items reviewed (issues Phase 3: sync, blob gate, and relays #181, id(web): every .txt open→save drops the final newline (and rewrites CRLF to LF) — Plain mode is not byte-faithful unlike Raw #1307, design(mcpx): resume upstream HTTP sessions after a cold restart — persist the resumable session state #1414; reopen recommendations recorded, repo frozen); developing-today/code checkpoint 1 — 0 of the first 56, with 7,724 closed items in scope, so the full count is still coming. Every one of these has to be reconstructed by hand because the closure itself recorded nothing.
Ask
-
Automatic closure recording. Every issue/PR close performed through
fleet gh(and, where detectable, observed by the fleet's sync machinery) is recorded into the backed-up fleet transaction record: item, actor/run ID, timestamp, close reason (taxonomy + free text), and the session/task binding when one exists. This builds directly on the attribution proposal in fleet queue: resume-by-session, claim-any-task, and manual-only items #9178 §(e) (fleet-init run IDs stamped into GitHub operations) and the decision-record convention in fleet decision records: document queue and attribution decisions durably #9180 — closures are decisions and should be recorded like them. The record must be queryable ("who closed X, why, from which run") and backed up with the rest of the fleet transaction log (Atlas-injectable per fleet queue: resume-by-session, claim-any-task, and manual-only items #9178 §(e)). -
Reason-required closes.
fleet gh issue closeandfleet gh pr closewithout--reasonfail with an error:Please give a reason. This is required by policy.The reason uses the review's taxonomy —implemented/superseded(requires a successor reference) /cancelled/started-incorrectly— plus optional free text. The flag is written into the close comment and the transaction record from (1). Reopens should likewise record a reason (the 90-day review's reopens cite the review + evidence; that should be the tool's shape, not a convention).
Acceptance
- Closing an issue or PR via
fleet ghwithout--reasonexits non-zero with the policy error above; no close is performed. - Closing with
--reason <taxonomy>(+ optional successor ref forsuperseded, + free text) performs the close, posts the reason in the close comment, and appends the full closure record (item, actor/run ID, timestamp, reason, binding) to the transaction record. - The transaction record is included in the fleet backup set and is queryable by item number.
- Tests cover: missing reason refusal, each taxonomy value, superseded-without-successor refusal, and record contents.
Cross-links: #9178 (attribution proposal §e; FDR-0005), #9180 (decision records), #9155 (the incident), the 90-day closed-item review (this issue is its Part 4).
Activity
developing-today commentedon Nov 13, 2026
CODE-2905
dezren39 commentedon Nov 17, 2026
Agent note — triaged, task 18923 for issue #9221 (lane any-e)
issue close/pr closein the fleet gh domain and refuse without --reason (policy error verbatim from the issue) before any passthrough happens; then the record append.13 remaining items
developing-today-fleet commentedon Nov 28, 2026
🤖 Agent progress note · lane oc-code-07 (queue task 25233, triage)
Verdict: code fully landed on main; one external confirmation left, then close as implemented.
Re-verified firsthand against origin/main (2026-11-28):
pkgs/fleet/crates/fleet/src/gh_closure.rspresent (latest touch fleet gh pr close: any --successor flag yields POLICY_ERROR, superseded closes impossible #16150).--reasonrefused with the policy text; taxonomy (implemented / superseded / cancelled / started-incorrectly) enforced; superseded-without-successor refused; reason posted into the close comment;fleet-closure/v1records written toclosure-records.jsonland queryable viafleet gh closures.close_without_reason_is_refused_with_policy_text,each_taxonomy_value_is_accepted,unknown_reason_is_refused,superseded_without_successor_is_refused,reason_becomes_the_close_comment,record_carries_item_reason_time_and_binding).No repo files modified. Parking the triage task with resume condition: recheck after #9093 closes; at that point confirm the backup-set inclusion and close this issue.
developing-today-fleet commentedon Nov 28, 2026
🤖 Agent progress note · lane code-f (queue task 25233, triage)
Verdict: code fully landed on origin/main; one external confirmation left, then close as implemented.
Re-verified firsthand against origin/main (83e6b04):
pkgs/fleet/crates/fleet/src/gh_closure.rspresent; close without--reasonrefused with the policy text (POLICY_ERROR); taxonomy implemented / superseded / cancelled / started-incorrectly enforced; superseded-without-successor refused; reason posted into the close comment;fleet-closure/v1records written toclosure-records.jsonlin the fleet state dir and queryable viafleet gh closures.close_without_reason_is_refused_with_policy_text,each_taxonomy_value_is_accepted,unknown_reason_is_refused,superseded_without_successor_is_refused,reason_becomes_the_close_comment,record_carries_item_reason_time_and_binding).No repo files modified. Triage task parked with resume condition: recheck after #9093 movement; at that point confirm backup-set inclusion and close this issue.
developing-today-fleet commentedon Nov 28, 2026
🤖 Agent progress note · lane oc-code-07 (queue task 25233, triage)
Verdict: code fully landed on origin/main; one external confirmation left, then close as implemented.
Re-verified firsthand against origin/main (709a713, 2026-11-28):
pkgs/fleet/crates/fleet/src/gh_closure.rspresent; close without--reasonrefused with the policy text (POLICY_ERROR= "Please give a reason. This is required by policy."); taxonomy implemented / superseded / cancelled / started-incorrectly enforced; superseded-without-successor refused; reason posted into the close comment;fleet-closure/v1records written toclosure-records.jsonlin the fleet state dir and queryable viafleet gh closures.close_without_reason_is_refused_with_policy_text,each_taxonomy_value_is_accepted,unknown_reason_is_refused,superseded_without_successor_is_refused,reason_becomes_the_close_comment,record_carries_item_reason_time_and_binding).No repo files modified. Triage task parked with resume condition: recheck after #9093 movement; at that point confirm backup-set inclusion and close this issue.
dezren39 commentedon Nov 29, 2026
🤖 Census note · lane CEN-C07, 2026-11-29 full issue census (firsthand recheck)
Verdict: blocked on one external confirmation — the implementation is fully landed and test-verified on main; what remains is not code.
Verified state (three independent firsthand checks against origin/main, 2026-11-28, re-verified here):
pkgs/fleet/crates/fleet/src/gh_closure.rspresent on main; every referencing PR merged (fleet gh: reason-required issue/pr close and closure records (#9221) #11440).--reasonrefused with the exact policy text ("Please give a reason. This is required by policy."); taxonomy implemented/superseded/cancelled/started-incorrectly enforced; superseded-without-successor refused; reason posted into the close comment;fleet-closure/v1records appended toclosure-records.jsonland queryable viafleet gh closures; all six named tests present, 12/12 in the gh_closure suite passing.The one open item: acceptance box 3's backup half — that the fleet state dir is actually inside the laptop backup set. The backup path list lives outside this repo, so it cannot be confirmed from here; it is tied to #9093 (backup mesh — itself blocked on its own owner-provisioning gates, see its census note). Triage task 25233 is parked with the right resume condition: recheck after #9093 moves; then confirm backup-set inclusion and close this issue as implemented.
Census actions: removed
status:in-progress(no work is in progress; the item is parked awaiting an external confirmation). Keptpriority/normal,user/review,status/triaged,meta/protocol-gap.developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): full recheck of this issue — body, all 10 comments, labels, and native blocked_by edges read firsthand; blocker states verified live today.
STRENGTHS
pkgs/fleet/crates/fleet/src/gh_closure.rsrefuses a close without--reasonwith the policy text, and the closure taxonomy is implemented..GAPS
FIXES I APPLIED
REMAINS
dezren39 commentedon Nov 30, 2026
Claim — xaltha lane 0212-O (2026-11-30).
Taking the one open remainder of #9221: every prior done-check (latest: census CEN-C07, 2026-11-29) confirms boxes 1, 2 and 4 on main (
pkgs/fleet/crates/fleet/src/gh_closure.rs), leaving box 3 — "the transaction record is included in the fleet backup set" — unconfirmed: the closure log lives at~/.local/state/fleet/closure-records.jsonl(fleet-configConfig::state_dir()), and no repo-defined backup set captures that path (pkgs/fleet/book/operations/backup-inventory.mdhas no entry for it;infra/laptop-db-backupcovers only SQLite DBs).Slice: add the closure log to the
pkgs/agent-backup/backup.shcandidate set (its stated scope is the small, irreplaceable per-seat set), extend its test, and record the path in the backup inventory so the book's "(backed up with it)" claim is true in the tree. PR will carryCloses #9221if the full done-check passes.agent-backup: snapshot the fleet closure record (#9221)
agent-backup: cover the closure-record snapshot (#9221)
book: record closure-records.jsonl in the backup inventory (#9221)
Merge pull request #17132 from developing-today/xaltha/9221-closure-b…