Repository navigation
feat(permissions): a consent holds in every stage role (#500) - #502
Conversation
…roles # Conflicts: # docs/ROADMAP_V2.md
…roles # Conflicts: # tests/test_compose_consent.py
[CCR-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · schema:2CHANGES_REQUESTED for head The change does what #500 asks: matching ignores the role, old entries still match, revocation removes every copy, the question text says so, and the docs and parity audit are updated. One boundary the PR says it keeps is not kept on the resume-answer path.
Security audit ran (authorization code changed). CI: 7 of 7 checks pass. Review detail, security triage, verification, CI, residual risk[REV-001] · medium · open · - · blocks:yes — A resume
|
[CCT-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · triaged:5f6ae087ddcb08a8ecef4be4683aa24aa00966ea · schema:2RESOLVED at
Round history, verification, security, CI[REV-001] · medium · resolved · valid · blocks:yes — A resume
|
[CCR-20261117-002] · manual · unknown/gpt-6.1-sol→? · low · schema:2CHANGES_REQUESTED for
Security audit completed. CI: 6 passed, 1 failed; the failing synchronization test passes locally in a Git clone. Its relation to this PR is unproven. Finding history, reproduction, verification, security and CIReviewed the complete accumulated merge-base diff against Historical run lines: [CCR-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · schema:2[CCT-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · triaged:5f6ae087ddcb08a8ecef4be4683aa24aa00966ea · schema:2[REV-001] · medium · resolved · valid · blocks:yes — A resume
|
…ole (#500) REV-003: matching_answer returned the first matching entry, so an older allow stored under another role overrode an explicit denial. A denial now wins whatever the order of the entries, and a later answer replaces an opposite decision of another role in the store, keeping an audit record.
[CCR-20261117-003] · manual · unknown/gpt-6.1-sol→? · low · schema:2CHANGES_REQUESTED for
Security audit completed. No new finding IDs. See verification and exact-head CI details below. Review history, partial fix, reproduction, verification and securityReviewed the complete accumulated diff against the merge base of Historical run lines: [CCR-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · schema:2[CCT-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · triaged:5f6ae087ddcb08a8ecef4be4683aa24aa00966ea · schema:2[CCR-20261117-002] · manual · unknown/gpt-6.1-sol→? · low · schema:2[CCT-20261117-002] · manual · anthropic/claude-sonnet-5-5→? · unknown · triaged:41763a1ac8e8adbb1f34e5fd73fc469a215202fe · schema:2[REV-001] · medium · resolved · valid · blocks:yes — A resume
|
| Earlier decision | Later answer | Review result |
|---|---|---|
| repository deny under resolve | cycle allow under resolve | allowed |
| repository deny under resolve | cycle allow under review | denied |
The second case also reproduces through the actual resume-answer path: restore the review grant into operations, supply answers={grant.id: 'cycle'} and the matching previously asked fingerprint, call prepare_answers('claude', 'review'), then generate the command policy and call stage_permissions.check.
Observed effective entries: [('review', 'allow'), ('resolve', 'deny')]; the check remains denied. The assertion that the explicit cycle approval should authorize the same operation exits 1. The same-role control returns only resolve: allow and succeeds.
Locations: scripts/grants.py:998–1002 saves the cycle decision separately; command_entries at :799–814 emits the other-role repository denial too. scripts/stage_permissions.py:3940–3941 then applies deny-wins across decisions whose scope precedence has not been reconciled. _drop_equivalent handles entries within one store scope and cannot establish precedence across those role-specific IDs.
Resolve effective decisions by operation identity and scope before handing them to the policy evaluator. Preserve the repository denial for subsequent cycles while honoring the explicit authorization for the current cycle, exactly as the same-role path does. Add mixed-scope allow/deny tests through resume and a same-broker cache test. Do not reinstate role binding, erase the permanent denial, or introduce a new toolkit-only veto.
Also executed the cache variant: run-only deny under resolve, then persistent allow under review for the same operation. The existing broker still denies; a fresh broker allows. Store supersession alone does not reconcile _cycle_answers belonging to an equivalent other-role ID.
Historical stage receipts, carried verbatim from the provider history (no new attempt or approval is asserted by this review):
Verification — agent-reported
Executed in a separate Git clone at this exact head. No product files, source checkout, branches or shared consent data were changed.
python3 -m unittest tests.test_compose_consent.AllRolesConsentTests: 14 tests, exit 0.python3 -m unittest tests.test_compose_consent tests.test_grants tests.test_consent_variants tests.test_stage_permissions tests.test_command_permissions tests.test_host_permissions tests.test_permission_lifecycle tests.test_permission_view tests.test_cycle tests.test_ci_policy: 513 tests, exit 0.python3 /tmp/cct-rereview-502/consent-conflict.py: original REV-003 reproduction, exit 0; review now denied as expected.python3 /tmp/cct-rereview-502/mixed-scope.py: same-role baseline allowed; cross-role cycle authorization denied, exit 1.python3 scripts/validate-package.py: exit 0; 16 skills valid.- REV-002 source assertion and compilation: exit 0.
Environment recovery: the initial configured full-suite attempt hit the sandbox's socket-creation restriction in installed-runtime tests. The same installation test failed at the previous reviewed head; rerunning it outside the sandbox passed (1 test, exit 0). The initial full-suite attempt was interrupted at its ten-minute limit (child exit -2), without a final test count; it is not reported as a completed test run or a product regression. The configured command was then rerun outside the sandbox.
python3 -m unittest discover -s tests completed outside the sandbox: 2637 tests in 641.379 seconds, OK (skipped=1), exit 0. The omitted test is not counted as executed evidence (2636 executed). The completed rerun took longer than the skill's default ten-minute budget; its observed successful result is reported rather than imposing a toolkit-only veto on an executable project check, following this repository's agent-capability-parity rule. The explicit mixed-scope reproduction is a separate check and still fails; the full suite does not cover it.
Exact-head CI snapshot
At the provider read for 28383d375fdf0f9d13afceb3085e9a5fa1db100d: Classify the change passed; Skills, manifests, and Bash installer and Windows test shards windows-1 through windows-4 were in progress (1 passed, 0 failed, 5 pending). PowerShell installer had not yet been reported. This snapshot is kept separate from local verification and was not polled for completion. No pending or absent check is claimed as passed. CI results from the previous head do not satisfy checks for this head.
Verification contract version 2
Agent-reported. Criterion labels retain the previous review mapping: AC-1 cross-role decisions, AC-2 denial/decision integrity, AC-3 global-review exclusion, AC-4 documentation/package coherence. No runtime-frozen plan was injected. Prior results remain in provider history and are not reused for this head.
{
"head_sha": "28383d375fdf0f9d13afceb3085e9a5fa1db100d",
"tests": {
"version": 2,
"conclusion": "failed",
"checks": [
{
"id": "permission-ci-tests",
"command": "python3 -m unittest tests.test_compose_consent tests.test_grants tests.test_consent_variants tests.test_stage_permissions tests.test_command_permissions tests.test_host_permissions tests.test_permission_lifecycle tests.test_permission_view tests.test_cycle tests.test_ci_policy",
"executor": "codex",
"profile": "manual",
"context": "project",
"required": true,
"criteria": [
"AC-1",
"AC-2",
"AC-3"
],
"level": "test",
"provenance": "review",
"reason": "Expanded authorization and cycle regressions",
"head_sha": "28383d375fdf0f9d13afceb3085e9a5fa1db100d",
"result": "pass",
"evidence": [
{
"exit_code": 0,
"executed": 513
}
],
"cause": "",
"attempts": []
},
{
"id": "contradictory-consent-boundary",
"command": "python3 /tmp/cct-rereview-502/consent-conflict.py",
"executor": "codex",
"profile": "manual",
"context": "project",
"required": true,
"criteria": [
"AC-2"
],
"level": "boundary",
"provenance": "review",
"reason": "Explicit denial must survive cross-role matching",
"head_sha": "28383d375fdf0f9d13afceb3085e9a5fa1db100d",
"result": "pass",
"evidence": [
{
"exit_code": 0,
"executed": 1
}
],
"cause": "",
"attempts": []
},
{
"id": "mixed-scope-consent-boundary",
"command": "python3 /tmp/cct-rereview-502/mixed-scope.py",
"executor": "codex",
"profile": "manual",
"context": "project",
"required": true,
"criteria": [
"AC-1",
"AC-2"
],
"level": "boundary",
"provenance": "review",
"reason": "Same-role and cross-role scope precedence must agree",
"head_sha": "28383d375fdf0f9d13afceb3085e9a5fa1db100d",
"result": "fail",
"evidence": [
{
"exit_code": 1,
"executed": 2
}
],
"cause": "An older repository denial under another role masks explicit later cycle authorization",
"attempts": []
},
{
"id": "package-validation",
"command": "python3 scripts/validate-package.py",
"executor": "codex",
"profile": "manual",
"context": "project",
"required": true,
"criteria": [
"AC-4"
],
"level": "static",
"provenance": "project",
"reason": "Repository package validation",
"head_sha": "28383d375fdf0f9d13afceb3085e9a5fa1db100d",
"result": "pass",
"evidence": [
{
"exit_code": 0,
"executed": null
}
],
"cause": "",
"attempts": []
},
{
"id": "configured-test",
"command": "python3 -m unittest discover -s tests",
"executor": "codex",
"profile": "manual",
"context": "project",
"required": true,
"criteria": [],
"level": "test",
"provenance": "project",
"reason": "configured test command",
"head_sha": "28383d375fdf0f9d13afceb3085e9a5fa1db100d",
"result": "pass",
"evidence": [
{
"exit_code": 0,
"executed": 2636,
"skipped": 1,
"total": 2637
}
],
"cause": "",
"attempts": [
{
"result": "unverified",
"cause": "Initial sandbox run hit socket restrictions and was interrupted at its ten-minute limit",
"exit_code": -2
},
{
"result": "pass",
"cause": "Rerun outside the sandbox completed",
"exit_code": 0
}
]
}
]
}
}Security
The deterministic minimum matches no changed CI, secrets/key or agent-configuration path. Reviewer judgement activates the authorization audit. The delegated review/security pass and parent boundary verification completed for this head. The former unauthorized-allow path is corrected; the remaining REV-003 issue concerns honoring the user's later scoped approval. Global-review exclusions, concrete command guards, persistence boundaries, revocation and audit preservation were inspected; no additional confirmed vulnerability was found. Persistent and cycle decisions intentionally reach all roles under #500. No new approval or merge authority is inferred from local checks.
… later answer replaces a run-only one (#500)
[CCR-20261117-004] · manual · unknown/gpt-6.1-sol→? · low · schema:2APPROVED for
No new findings. Security audit completed. CI: all 7 checks passed. Review history, findings, verification, security and CIReviewed the complete accumulated merge-base diff against fetched main: 10 files, +388/-50, 716 raw diff lines. Also reviewed the five-file fix delta from Historical runs[CCR-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · schema:2[CCT-20261117-001] · manual · anthropic/claude-sonnet-5-5→? · unknown · triaged:5f6ae087ddcb08a8ecef4be4683aa24aa00966ea · schema:2[CCR-20261117-002] · manual · unknown/gpt-6.1-sol→? · low · schema:2[CCR-20261117-003] · manual · unknown/gpt-6.1-sol→? · low · schema:2[CCT-20261117-002] · manual · anthropic/claude-sonnet-5-5→? · unknown · triaged:41763a1ac8e8adbb1f34e5fd73fc469a215202fe · schema:2[CCT-20261117-003] · manual · anthropic/claude-sonnet-5-5→? · unknown · triaged:28383d375fdf0f9d13afceb3085e9a5fa1db100d · schema:2Findings[REV-001] · medium · resolved · valid · blocks:yes — A resume
|
Closes #500
A consent was stored with the role of the stage that asked, so the same declared check was asked again in each role (up to three times per cycle). Owner decision: once approved, it holds for every role.
Change
implement,resolve,review,rereviewandverify. Matching compares the operation, working directory, Compose digest and check identity, never the role (same_operation,matching_answer,ConsentBroker.command_entries).forever) grant never reachesrevieworrereview(load(allow_global=False)for those stages). The Git,gh, publication, credential, redirect and shell-syntax guards run on every command whatever the grant.Documentation:
docs/host-permissions.md,docs/configuration.md,docs/verification.md, the PA-14 rows ofdocs/capability-parity-audit.md,CHANGELOG.mdand the M1 row ofdocs/ROADMAP_V2.md.Verification
test_compose_consent.py: cross-role allow (review, resolve, implement), cycle scope, denial across roles, changed command or configuration still asks, global grant not reaching reviewers, pre-existing entry, pattern grant, revocation (also a copy under another role) and the question text.Note: the M1 row of the roadmap is one line that #498 also edits; whichever merges second needs that line rebased.
Out of scope: the
forever-for-review exclusion.