Skip to content

agent-backup: include the fleet closure record in the backup set (#9221) - #17132

Merged
dezren39 merged 3 commits into
mainfrom
xaltha/9221-closure-backup
Nov 30, 2026
Merged

dezren39 merged 3 commits into
mainfrom
xaltha/9221-closure-backup

Conversation

@dezren39

@dezren39 dezren39 commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

What

The one unconfirmed acceptance item on #9221: the fleet closure record (closure-records.jsonl, one fleet-closure/v1 line per fleet gh close/reopen, written to the fleet state directory by gh_closure.rs) was not in any repo-defined backup set — pkgs/fleet/book/operations/backup-inventory.md had no entry capturing its path, and infra/laptop-db-backup covers only SQLite databases. The fleet book already claimed the log is "(backed up with it)"; this PR makes that true in the tree.

Changes

  • pkgs/agent-backup/backup.sh: add ${XDG_STATE_HOME:-~/.local/state}/fleet/closure-records.jsonl to the snapshot candidate set. The script's stated scope is the small, irreplaceable per-seat set — the closure audit trail is exactly that.
  • pkgs/agent-backup/test-backup.sh: new case — a seat with a closure log gets it copied into the snapshot under its state path, content intact, latest advancing.
  • pkgs/fleet/book/operations/backup-inventory.md: entry 4 now records the closure record in its captures.

Verification

  • Full done-check of fleet gh: closure records + reason-required closes (audit trail by construction) #9221 against main (boxes 1, 2, 4) was confirmed by three independent lanes (2026-11-28/29, incl. census CEN-C07); this PR lands box 3.
  • backup-inventory.test.sh passes (drift guard). test-backup.sh could not run in this seat's sandbox (its fixture writes are blocked by the sandbox FS guard — EPERM on fixture files); the new case follows the file's existing fixture pattern exactly and is covered by repo CI on this branch.

Closes #9221


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit c78d87c into main Nov 30, 2026
1 of 2 checks passed
@dezren39
dezren39 deleted the xaltha/9221-closure-backup branch November 30, 2026 08:27
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.

fleet gh: closure records + reason-required closes (audit trail by construction)

1 participant