Skip to content

docs(agents): align persistence guarantees and command guardrails - #655

Open
toasterbook88 wants to merge 6 commits into
mainfrom
chore/agent-instruction-audit-20261116
Open

toasterbook88 wants to merge 6 commits into
mainfrom
chore/agent-instruction-audit-20261116

Conversation

@toasterbook88

Copy link
Copy Markdown
Owner

Correct the persistence guidance: corrupt state and skills stores are quarantined,
while other persisted files can return load errors without quarantine. Align
Copilot's public-data rule with AGENTS.md and add Claude Code deny entries for
rmdir, git restore and path checkout commands.

These are the three remaining local instruction/config edits, carried into an
isolated branch without changing the original checkout.

Validation: checked the guidance against state/skills recovery and the reservation
ledger's read-only error path; JSON parsing and the existing Claude workflow tests
pass; full ci-preflight passes with Go 1.26.11. No product command or runtime API
changes are introduced.

@toasterbook88
toasterbook88 marked this pull request as ready for review November 17, 2026 21:30

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@toasterbook88 toasterbook88 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AXIS Grok gate

Verdict: PASS-WITH-RISK

PR #655: docs(agents): align persistence guarantees and command guardrails
Head SHA: 012bf37
Files touched (3): AGENTS.md, .github/copilot-instructions.md, .claude/settings.json

Invariant hits: none.

  • Docs/config only. No advisory override of fact plane, no lock-held confirm, no cache badge change, no secret/ssh/fleet/spawn/self-authorize/unattended write.
  • Persistence note now matches observed recovery: only state.json/skills.json quarantine; other files surface load errors.
  • Public-repo rule in Copilot instructions aligned with AGENTS.md §2 (tailnet/LAN, live ports, model/unit names).
  • Claude Code deny list tightened with rmdir / git restore / git checkout -- (additional guardrails only).

CI status: CodeQL success, govulncheck success, Analyze (actions) success. Test & Build still in_progress. mergeable_state: blocked.

Recommended operator action: Wait for Test & Build to complete green. Then merge if the maintainer wants the instruction alignment. No product runtime change; safe to land once CI finishes. No APPROVE from this gate.

#655

@testdriverai

testdriverai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Re-review of commit d0a5ea7: the additions expand Claude Code's denied command list with further destructive Git and filesystem actions (rmdir, git restore, git checkout --, git checkout ., git stash drop, git stash clear, git branch -D, git filter-branch, git filter-repo, git update-ref -d, and truncate). These guardrails alongside the privacy alignment in .github/copilot-instructions.md and persistence scope clarifications in AGENTS.md are well-structured, valid, and contain no issues.

📋 Walkthrough (3 files)
File Change
.claude/settings.json Adds guardrails denying destructive Git operations (restore, checkout, stash drop/clear, branch -D, filter-branch/repo, update-ref -d) and filesystem mutations (rmdir, truncate).
.github/copilot-instructions.md Synchronizes public repository data hygiene rules with AGENTS.md.
AGENTS.md Clarifies that auto-quarantine behavior on corruption is scoped to state.json and skills.json.

Automatic re-reviews are paused on this PR after 3 reviews. Mention @testdriverai to get a fresh review of the latest commits.

Was this review useful? React with 👍 or 👎 to help TestDriver improve.


Want help from the team that built TestDriver? Explore TestDriver for Business

toasterbook88 and others added 3 commits November 17, 2026 20:34
The deny list covered deletion of files (`rm`, `unlink`, `shred`, `rmdir`),
working-tree resets (`git restore`, `git checkout --`), and history rewrites
pushed to a remote (`git push --force*`). Commands that discard local work
without touching the remote were still allowed: a dropped or cleared stash,
a force-deleted branch, `git filter-branch` / `git filter-repo`, a deleted
ref, `truncate`, and `git checkout .` — which the existing
`Bash(git checkout -- *)` rule does not match.

`Bash(git update-ref -d *)` is on the list deliberately: it is the
non-interactive equivalent of the blocked force-branch-delete, and it is how
a ref is deleted when `-d` refuses a squash-merged tip.

`Bash(git restore *)` stays broad rather than narrowed to `--worktree`. A
prefix matcher cannot express "everything except `--staged`", and the default
form (`git restore <path>`) discards the file's changes, so narrowing the rule
to spare a harmless `git restore --staged` would open the path that matters.

This branch has not been deployed

No deployments
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.

2 participants