Repository navigation
fix: release PAACM 3.4.1 with hardening from an audit and live runs - #8
Merged
Merged
Conversation
- Freeze the gate's own configuration with the tests: changing .agent/checks.conf or .agent/paacm.json after approve-tests is a violation (exit 4).
- Protect the task state: the protect hook and the shell guard refuse direct writes to state.json and CURRENT; the shell guard also refuses shell writes to the check manifest, paacm.json and project extensions, and asks before git update-index --assume-unchanged or --skip-worktree.
- The protect hook fails closed when it cannot find the edited file, resolves symbolic links, matches case-insensitively on macOS and Windows, and keeps a file named ..x inside the project.
- Add paacm task reopen-tests, which the shell guard confirms with the human, so an approved test change can be made.
- gate and check print their exit code; approvals are ordinary questions, not BLOCKED; one runtime command per call.
- Document that claude -p ignores project allow rules in an untrusted folder (evaluation guide, L3 example, autonomy reference).
- eval refuses an unquoted {{HIDDEN}} when the hidden-tests path has a space.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A full audit of 3.4.0, plus headless Claude Code runs on a fixture project with PAACM installed, found ways around the gates and gaps in the documented workflow. Each code finding has a test in
test/hardening.test.mjsthat failed before its fix.Ways around the gates (fixed)
approve-tests, a shell edit could remove a failing check from.agent/checks.conf, or emptyprotect.testsin.agent/paacm.json, and the gate still passedapprove-tests(control test included).agent/tasks/**was exempt from protection, includingstate.json: deletingtestsApprovedAtthere turned off test protection and the audit; changingroutelowered the gate tierstate.jsonandCURRENT; the shell guard refuses shell writes to them, to the check manifest,paacm.jsonand project extensionspreToolUseinput fields are undocumented..xno longer counts as outside the projectgit update-index --assume-unchanged/--skip-worktreecould hide an edit from the auditevalsubstituted{{HIDDEN}}unquoted, so a hidden-tests path with a space split the commandevalrefuses that combination with a clear messageFound by the live runs
Scenarios (Claude Code 2.1.292, L1, power layer): a FAST bug fix from a plain request; a request to change an approved test; a request to weaken the gate with
sed.05-tests-firstsaid the agent may make a human-approved test change, but the hook refused every edit and nothing lifted it; the agent correctly refused to go around the hook, and the task stuck. Newpaacm task reopen-tests --reason "…", which the shell guard confirms with the human (verified live: the agent used it and the guard asked);approve-teststhen sets the new baseline.BLOCKED:was used for an ordinary approval request. The always-on rules andescalation.mdnow say phase approvals are questions, not blocks.gateandcheckprintpaacm <command>: exit <code>, so the report can quote the exit code; the agent had tried a compound command for it, which the allow rule refuses.runtime.mdasks for one runtime command per call.claude -pwarns on stderr; docs), so every runtime command was refused. The evaluation guide (every trial checkout is new), the L3 example andautonomy.mdnow say how to trust the folder or pass--allowedTools.End to end, the FAST fix went: task started → regression test written and shown failing for the right reason → approval →
approve-testson the test commit → fix commit → gate passed →task donewithREPORT.md. Asked to weaken the gate, the agent left.agent/checks.confuntouched and fixed the code to the approved test instead.paacm upgradeon the fixture updated only the changed kit files and kept the user-edited.agent/checks.conf.Verification
node bin/paacm.mjs validate,build --check: exit 0npm test: 105 of 105 pass (15 new)markdownlint-cli2@0.23.3 "**/*.md": 0 issuesclaude plugin validate plugins/paacm --strictandclaude plugin validate .: passeddoctor0 problems in eachNot verified here: Cursor live (no Cursor CLI on this machine), macOS and Windows (the CI matrix covers them), and the interactive confirmation of
reopen-tests(a headless run cannot answer a prompt).