Close the loop: pctr learn, and nine responses instead of two - #55
Merged
Merged
Conversation
Two gaps between what the doctrine claims and what the code did. 1. Nothing learned. The only thing any run read from a previous one was priorReceiptHash, for chaining. Run 100 knew exactly what run 1 knew, while the whole premise is that the system gets more useful the longer it runs. pctr learn reads the accumulated receipts and timelines and reports what they say to change: actions that executed but were never declared, consequences declared smaller than they turned out to be, agents whose evidence is chronically stale, wildcard authority nobody uses, approvals always granted (a rubber stamp) or never granted (a wall), protected actions with no admissible route, and denials that keep repeating. Findings are proposals, never silent edits; --apply is a separate act and each finding carries its evidence. The compounding is verifiable: after applying, previewing payments.transfer with no arguments returns CRITICAL where it returned HIGH, because the system now knows the action moves $18,000 rather than the $1,800 someone typed. 2. The decision vocabulary was allow/deny. The doctrine specifies nine responses to a trust change, and denying everything that wobbles is as wrong as allowing it — the useful answer is usually narrower than no: reroute around the stale agent, cap the batch, ask a human, slow it down. KEEP, REROUTE, CONSTRAIN, STEP_UP, ESCALATE, THROTTLE, SUSPEND, DENY, REVOKE, checked most-restrictive first so a revoked credential is never answered with a reroute. reconcile() refuses to answer a change with a weaker response than it warranted. Also classifies export/download/dump/backup as data read rather than shrugging at it — a bulk export is data leaving the building. Mirrored in the Python bridge; the parity gate holds at 52 checks. 156 tests (18 new). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Two places where the code was thinner than the doctrine it claims.
1. Nothing learned
The only thing any run read from a previous one was
priorReceiptHash, for chaining. Run #100 knew exactly what run #1 knew — while the whole premise is that the system becomes more useful the longer it runs.pctr learnreads the accumulated receipts and timelines and reports what they say to change:It finds undeclared actions that executed anyway, understated consequences, chronically stale attestations, unused wildcard authority, approvals always granted (a rubber stamp) or never granted (a wall), unreachable protected actions, and repeated denials.
Findings are proposals, never silent edits.
--applyis a separate act, and each finding carries the evidence it came from.The compounding is verifiable, not asserted: after
pctr learn --apply, runningpctr preview payments.transferwith no arguments returnsCRITICALwhere it previously returnedHIGH— because the system now knows that action moves $18,000, not the $1,800 someone typed into the manifest. There's a test that pins exactly this.2. The decision vocabulary was allow/deny
The doctrine specifies nine responses to a trust change. Denying everything that wobbles is as wrong as allowing it — the useful answer is usually narrower than "no": reroute around the stale agent, cap the batch, ask a human, slow it down.
KEEPREROUTECONSTRAINTHROTTLESTEP_UPESCALATESUSPENDDENYREVOKEChecks run most-restrictive first, so a revoked credential is never answered with a reroute.
reconcile()refuses to answer a change with a weaker response than it warranted — that is how authority expands by accident.Also
export/download/dump/backupnow classify as data read rather than "no protected consequence" — a bulk export is data leaving the building. Mirrored in the Python bridge; the parity gate holds at 52 checks.156 tests (18 new), Python 19, parity green.
🤖 Generated with Claude Code