Skip to content

fix(consent): persist resume grants before dispatch - #527

Merged
datacas merged 2 commits into
mainfrom
fix/issue-522-grant-resume
Nov 24, 2026
Merged

datacas merged 2 commits into
mainfrom
fix/issue-522-grant-resume

Conversation

@datacas

@datacas datacas commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Diagnosis

On resume, a --grant answer for a pending command could be forgotten when the resumed stage stopped on a different refusal first. The supplied issue reproduction from 2026-11-23 matches the code path: ConsentBroker.prepare_answers could only resolve built-in, stored, or in-memory operation definitions, while the previous permission request existed only in the decisions record. Since the first operation was not reached, its answer was never applied to consents.json.

The fix restores this invariant: an answer applies only to an operation and effective scope that the same work item previously showed the user, and it is processed before dispatch. Preflight reconstructs and validates the operation from the latest matching decisions record. Persistent answers are saved at the repository scope, cycle answers use the existing cycle lineage, and an unknown ID still gets an actionable note. A repeated Compose question now names both configuration hashes when that is the only change.

The issue is an isolated defect; the cause matches the issue. Related issues #323, #441, #483, #486, and #500 were checked in the issue context, along with the local consent implementation and tests. This change does not claim to resolve those items. docs/host-permissions.md now documents resume persistence.

Work units

Unit Behaviour Files Tests Verification Rollback
WU-1 Rehydrate a resume grant from the latest permission record for its work item, validate its exact operation and scope, persist unused answers before dispatch, and explain Compose hash drift scripts/grants.py, scripts/cycle_cli.py, scripts/run_cycle.py, tests/test_compose_consent.py, scripts/fast-path-tests.json, docs/host-permissions.md AC-1 through AC-4 regressions and docs assertion python3 -m unittest discover -s tests; python3 scripts/validate-package.py; basedpyright independent

Verification

  • python3 -m unittest discover -s tests: 2,758 tests passed, 1 skipped.
  • Focused Compose consent suite: 76 tests passed.
  • python3 scripts/validate-package.py: passed.
  • basedpyright: passed with 0 errors, 0 warnings, 0 notes.
  • python3 -m unittest: exited 0 but discovered 0 tests.
  • Security review ran; no confirmed vulnerability was found in the changed surface.

The local suite used the installed Python and test dependencies. Compose behavior is emulated by the repository tests; no Docker daemon or user-global Git identity was needed. The pushed head's CI checks are reported separately in the stage summary.

@datacas

datacas commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

Implementation summary

Issue #522 is implemented on fix/issue-522-grant-resume. Resume preflight now rebuilds the exact grant operation and scope from the latest permission decision for the same work item, applies it before dispatch, and preserves the persistent or cycle answer even when a different refusal stops that stage. IDs not found in that work item's latest permission record keep an actionable preflight note. Compose questions identify both hashes when only config_sha256 changed. The consent and resume behavior is documented in docs/host-permissions.md.

Diagnosis: isolated defect; the issue's recorded cause matches the implementation path. One work unit, independently reversible.

Agent-reported verification (schema 2)

{
  "version": 2,
  "checks": [
    {
      "id": "configured-test",
      "command": "python3 -m unittest discover -s tests",
      "executor": "claude",
      "profile": "cheap_coder",
      "context": "project",
      "required": true,
      "criteria": ["AC-1", "AC-2", "AC-3", "AC-4", "AC-5"],
      "level": "test",
      "provenance": "project",
      "reason": "configured test command",
      "head_sha": "8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6",
      "result": "pass",
      "evidence": {"exit_code": 0, "executed": 2758},
      "attempts": [
        {"head_sha": "4e6e62754b71f6777532fe4235ca8cb51ffbf90d", "result": "fail", "evidence": {"exit_code": 1, "executed": 2808}, "cause": "The first run exposed the immutable asked-scope update bug, inherited regression tests, and missing fast-path test registration; those were corrected before rerunning."},
        {"head_sha": "4e6e62754b71f6777532fe4235ca8cb51ffbf90d", "result": "pass", "evidence": {"exit_code": 0, "executed": 2758}, "cause": "Passed before the final scope-record validation refinement; rerun on the final head is the result above."}
      ]
    },
    {
      "id": "acceptance-regressions",
      "command": "python3 -m unittest discover -s tests -p test_compose_consent.py",
      "executor": "claude",
      "profile": "cheap_coder",
      "context": "project",
      "required": true,
      "criteria": ["AC-1", "AC-2", "AC-3", "AC-4", "AC-5"],
      "level": "test",
      "provenance": "agent",
      "reason": "regressions for the runtime acceptance criteria",
      "head_sha": "8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6",
      "result": "pass",
      "evidence": {"exit_code": 0, "executed": 76},
      "attempts": []
    },
    {
      "id": "package-validator",
      "command": "python3 scripts/validate-package.py",
      "executor": "claude",
      "profile": "cheap_coder",
      "context": "project",
      "required": true,
      "criteria": [],
      "level": "static",
      "provenance": "project",
      "reason": "configured verification command",
      "head_sha": "8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6",
      "result": "pass",
      "evidence": {"exit_code": 0, "executed": null},
      "attempts": [
        {"head_sha": "4e6e62754b71f6777532fe4235ca8cb51ffbf90d", "result": "fail", "evidence": {"exit_code": 1, "executed": null}, "cause": "The first run reported five type errors in Compose hash comparison; the types were narrowed and checked again."},
        {"head_sha": "4e6e62754b71f6777532fe4235ca8cb51ffbf90d", "result": "pass", "evidence": {"exit_code": 0, "executed": null}, "cause": "Passed before the final scope-record validation refinement; rerun on the final head is the result above."}
      ]
    },
    {
      "id": "basedpyright",
      "command": "basedpyright",
      "executor": "claude",
      "profile": "cheap_coder",
      "context": "project",
      "required": true,
      "criteria": ["AC-1", "AC-2", "AC-3", "AC-4"],
      "level": "static",
      "provenance": "project",
      "reason": "Python type check after source changes",
      "head_sha": "8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6",
      "result": "pass",
      "evidence": {"exit_code": 0, "executed": null},
      "attempts": []
    },
    {
      "id": "configured-unittest-alias",
      "command": "python3 -m unittest",
      "executor": "claude",
      "profile": "cheap_coder",
      "context": "project",
      "required": false,
      "criteria": [],
      "level": "test",
      "provenance": "project",
      "reason": "supplemental configured command; it discovers zero tests",
      "head_sha": "8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6",
      "result": "unverified",
      "evidence": {"exit_code": 0, "executed": 0},
      "cause": "command exited 0 but discovered 0 tests",
      "attempts": []
    },
    {
      "id": "cli-boundary",
      "command": "rtk python3 scripts/run_cycle.py --repo datacas/code-cycle-toolkit --task 522 --dry-run --json --no-config",
      "executor": "claude",
      "profile": "cheap_coder",
      "context": "project",
      "required": true,
      "criteria": [],
      "level": "boundary",
      "provenance": "agent",
      "reason": "real CLI entry-point boundary check; dry-run prevents a stage dispatch",
      "head_sha": "8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6",
      "result": "pass",
      "evidence": {"exit_code": 0, "executed": null},
      "attempts": []
    }
  ],
  "conclusion": "verified_with_reservations",
  "boundary": "required"
}

Security review: ran (security_audit_ran=true); no confirmed vulnerability was found in the changed surface.

Checks of pushed head 8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6: GitHub reported no checks at the time of this read (statusCheckRollup was empty). No hosted check is claimed as passed.

@datacas

datacas commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261124-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2

Verdict: CHANGES_REQUESTED for 8b50f26 (full diff from 4e6e627, 329 lines, 6 files). Findings: 3 (1 blocking). This replaces the APPROVED verdict of CCR-20261124-001 on the same head.

Security audit ran: no confirmed vulnerability. CI: 7/7 passed. Local: 2,758 tests OK.

Findings, evidence, verification, CI and history

Findings

[REV-001] · medium · open · - · blocks:yes — An earlier permission request is hidden by a newer non-permission record

scripts/grants.py:664-685 (load_resume_requests), used by scripts/cycle_cli.py:274-276.

The function stops at the newest decisions-*.json matching repo and task. When that record has no permissions list, it returns (); this is the case for the readiness record written at scripts/run_cycle.py:1029-1036. A newer permission record lists only the requests of its own run.

Failure scenario: stop A asks for X and Y. The resume answers Y only and stops on Z before reaching X, or stops at an issue-review readiness gate. A later resume with --grant X=persistent again prints "X: resume grant cannot apply; no matching grant is registered", and X is not saved.

This contradicts #522's expected behaviour ("never reports 'no matching grant is registered' for an id the cycle itself asked about"). It also contradicts the new docs/host-permissions.md text, which reserves that note for an ID "that was not asked for this work item".

Why it now blocks: CCR-20261124-001 recorded this finding as blocks:no. This pass disagrees: the defect reproduces the symptom class the work item exists to remove, and the fix is local. Severity and title are kept as first recorded.

Fix: iterate the matching records newest-first, skip those without a permissions list, and return (or merge, newest wins) the requests for the answered ID. Test: an older record with X, a newer record with Y and a newer readiness record; --grant X=persistent persists X with no "no matching grant" note.

Evidence: code inspection. An inline reproduction (python3 -c …) was refused by the review-stage policy (sensitive_consent), so this finding is not execution-verified.

[REV-002] · low · open · - · blocks:no — The AC-3 "no note for X" assertion is vacuous

tests/test_compose_consent.py:277-280. later = self.broker(resume_requests=requests) has no answers and never calls prepare_answers, so later.notes cannot contain X. Assert on resumed.notes after resumed.prepare_answers(...) instead. Confirmed again by inspection in this pass.

[REV-003] · low · open · - · blocks:no — The Compose drift note truncates the consent question's risk disclosure

scripts/grants.py:1185-1191 (_with_compose_drift).

The prefix "Compose configuration changed: previous config_sha256 <64>; current config_sha256 <64>. " is 208 characters. It is prepended to a refusal_question prompt that is already about 600 characters because of its fixed text (scripts/grants.py:441-450), and the result is cut back to [:600]. The cut removes Outside table: …, Risk: …, Pro:/Con: extra access persists for the selected scope and Protected commands receive no pattern authorization. Warnings stay at the front and survive.

Fix: abbreviate the hashes in the prompt (the full ones are in the permission record's pattern), or reserve the prefix in the prompt budget. Test: extend test_compose_hash_drift_names_both_configuration_hashes to assert Risk: stays in the prompt.

Evidence: code inspection.

Acceptance criteria (tests.version=2)

AC Check Result
AC-1 ResumeGrantPersistenceTests.test_resume_persists_an_earlier_grant_before_a_different_refusal passed
AC-2 ResumeGrantPersistenceTests.test_cycle_answer_is_available_after_a_resume passed
AC-3 test_unasked_resume_id_keeps_an_actionable_preflight_note passed; the no-note half is vacuous (REV-002), and resolution from an older record fails (REV-001) open
AC-4 ResumeGrantPersistenceTests.test_compose_hash_drift_names_both_configuration_hashes passed
AC-5 regression tests above plus test_docs_describe_resume_answer_persistence; docs/host-permissions.md updated passed

Verification (executed on 8b50f26)

Command Result
python3 -m unittest discover -s tests exit 0, Ran 2758 tests in 752.167s, OK (skipped=1). The host moved it to the background at 600 s; it ran to completion and its exit status was observed.
python3 -m unittest discover -s tests -p test_compose_consent.py exit 0, 76 tests OK
python3 scripts/validate-package.py exit 0: VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned
python3 -m unittest exit 0, 0 tests discovered (no tests at the repository root)
basedpyright exit 0: 0 errors, 0 warnings, 0 notes

Security

Triage: the deterministic rule did not fire. .code-cycle.yml declares no security_review.always_when, and no changed path matches the mandatory minimum. The audit ran because the runtime plan requires it (security_required) and because reviewer judgement also requires it: the change touches consent, authorization and persisted grants.

Result: cc-security-review ran for 8b50f26 and found no confirmed vulnerability. The new trust input, decisions-*.json, is guarded as follows:

  • it is filtered by repo and task and capped at 1 MB;
  • it goes through strict from_entry validation;
  • the rebuilt grant ID must equal the ID the user typed;
  • effective scope, risks and isolation are recomputed and must match.

Potential risk: anyone who can write ~/.config/code-cycle-toolkit/decisions can mark a scope as asked, so a user-typed answer persists. Stage sandboxes do not include that directory as writable.

CI (policy: parallel, read once)

Validate package on 8b50f26: all 7 checks are COMPLETED/SUCCESS (Classify the change; Skills, manifests, and Bash installer; Windows test shard windows-1..4; PowerShell installer).

Residual risk

  • REV-001 was not reproduced by execution, because the reproduction command was refused by the stage policy.
  • Real Docker Compose drift is only emulated by the tests.
  • The cycle_cli.py wiring of load_resume_requests has no end-to-end test.

History

[CCR-20261124-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2

The earlier attempt on the same head returned APPROVED, with REV-001 and REV-002 open and blocks:no.

@datacas

datacas commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

[CCT-20261124-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6 · schema:2

Triage before edits: all findings are valid against 8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6.

[REV-001] · medium · open · valid · blocks:yes — An earlier permission request is hidden by a newer non-permission record

The loader can hide older requests behind newer records. I’ll scan newest-first and test X behind Y and readiness records.

[REV-002] · low · open · valid · blocks:no — The AC-3 “no note for X” assertion is vacuous

The assertion checks a broker with no answers. I’ll assert after prepare_answers on the resumed broker.

[REV-003] · low · open · valid · blocks:no — The Compose drift note truncates the consent question’s risk disclosure

The full hash prefix uses the question’s 600-character budget. I’ll retain both hashes and test that Risk: remains.

@datacas

datacas commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

[CCT-20261124-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6 · schema:2

Resolved all 3 valid findings on 4084fce. REV-001 now finds X behind newer Y/readiness records; REV-002 checks processed resume notes; REV-003 keeps both hashes and the risk disclosure. Security audit ran with no confirmed vulnerability. Required local checks passed; 2 GitHub checks are pending on the pushed head.

Findings, verification, CI and stage history

[REV-001] · medium · resolved · valid · blocks:yes — An earlier permission request is hidden by a newer non-permission record

load_resume_requests now scans matching records newest-first, skips readiness records, and keeps the newest request per grant ID. Regression coverage puts X behind a valid Y record and a newer readiness record, then confirms X is persisted without a refusal note.

[REV-002] · low · resolved · valid · blocks:no — The AC-3 “no note for X” assertion is vacuous

The AC-3 regression now asserts the resumed broker’s notes after prepare_answers processes X.

[REV-003] · low · resolved · valid · blocks:no — The Compose drift note truncates the consent question’s risk disclosure

The hash prefix is shorter and no longer truncates the original prompt. Regression coverage asserts both configuration hashes and Risk:.

Acceptance criteria (tests.version=2)

AC Check Result
AC-1 test_resume_persists_an_earlier_grant_before_a_different_refusal passed
AC-2 test_cycle_answer_is_available_after_a_resume passed
AC-3 test_unasked_resume_id_keeps_an_actionable_preflight_note and processed-X note assertion passed
AC-4 test_compose_hash_drift_names_both_configuration_hashes passed
AC-5 test_docs_describe_resume_answer_persistence passed

Agent-reported verification (schema 2)

{
  "version": 2,
  "checks": [
    {"id":"configured-test","command":"python3 -m unittest discover -s tests","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":["AC-1","AC-2","AC-3","AC-4","AC-5"],"level":"test","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":2758},"attempts":[]},
    {"id":"acceptance-regressions","command":"python3 -m unittest discover -s tests -p test_compose_consent.py","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":["AC-1","AC-2","AC-3","AC-4","AC-5"],"level":"test","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":76},"attempts":[]},
    {"id":"package-validator","command":"python3 scripts/validate-package.py","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":[],"level":"static","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":null},"attempts":[]},
    {"id":"basedpyright","command":"basedpyright","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":["AC-1","AC-2","AC-3","AC-4"],"level":"static","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":null},"attempts":[]},
    {"id":"configured-unittest-alias","command":"python3 -m unittest","executor":"codex","profile":"cheap_coder","context":"project","required":false,"criteria":[],"level":"test","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"unverified","evidence":{"exit_code":0,"executed":0},"cause":"The command exited 0 but discovered zero tests.","attempts":[]},
    {"id":"cli-boundary","command":"sha256:3752ba3c0d3cd77a1a0d9c025a08a431d7686c1aa2878bc22654714515a66223","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":[],"level":"boundary","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":null},"attempts":[]}
  ],
  "conclusion":"verified_with_reservations",
  "boundary":"required"
}

Security: security_audit_ran=true; no confirmed vulnerability found. The recorded permission data remains filtered by repository and task, parsed by strict grant validation, and checked against the typed ID and recomputed effective scope before applying an answer.

Checks of pushed head 4084fce51f485878d2bd5fd70ce6e9373a5f55ba

GitHub checks were read once: 0 passed, 0 failed, 2 pending.

Check State
Classify the change in progress
Skills, manifests, and Bash installer queued

History

[CCR-20261124-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2

[CCR-20261124-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2

[CCT-20261124-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6 · schema:2

Triage dispositions for REV-001, REV-002, and REV-003 were recorded before edits; all are valid.

@datacas

datacas commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261124-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2

Verdict: REVIEW_PASSED_AWAITING_CI for 4084fce (complete diff from 4e6e627, 347 lines). No open finding blocks approval. CI: 6/7 passed, 1 pending.

  • REV-001 resolved: load_resume_requests scans newest-first and skips readiness records. The new test (X behind Y and a readiness record) passes.
  • REV-002 resolved: the AC-3 assertion now reads resumed.notes after prepare_answers.
  • REV-003 resolved: the stored prompt keeps both hashes and Risk:. Its test passes.
  • REV-004 (low, new, blocks:no): the drift prompt now exceeds the 600-character question contract. The terminal question line still cuts it.

Security audit ran: no confirmed vulnerability. Local: 2,758 tests OK. cli-boundary was not run here (refused by the stage table).

Findings, verification, security, CI and history

Findings

[REV-001] · medium · resolved · valid · blocks:yes — An earlier permission request is hidden by a newer non-permission record

scripts/grants.py:664-694. The loader iterates every matching decisions-*.json newest-first. It skips records without a permissions list (readiness, pending-verification and journal records) and keeps the newest request for each grant ID. Verified by execution: test_resume_persists_an_earlier_grant_before_a_different_refusal (records a = X, b = Y, c = readiness) passes, and X is persisted with no "no matching grant" note.

[REV-002] · low · resolved · valid · blocks:no — The AC-3 "no note for X" assertion is vacuous

tests/test_compose_consent.py:289 asserts on resumed.notes after resumed.prepare_answers(...). The assertion on later.notes (line 297) is still vacuous. It is now only supplementary, so it is not reopened. Verified by execution.

[REV-003] · low · resolved · valid · blocks:no — The Compose drift note truncates the consent question's risk disclosure

scripts/grants.py:1202-1208. The [:600] cut is gone, so the stored question keeps Outside table, Risk: and Pro:/Con:. The terminal stop also prints a separate risk: line (scripts/run_cycle.py:1112). Verified by execution: test_compose_hash_drift_names_both_configuration_hashes asserts both hashes and Risk:, and it passes.

[REV-004] · low · open · - · blocks:no — The Compose drift question prompt exceeds the 600-character question contract

scripts/grants.py:1207-1208, shown at scripts/run_cycle.py:1101.

Cause: the REV-003 fix prepends about 180 characters, the prefix plus two 64-character hashes, to a refusal_question prompt. That prompt is already cut to 600 (scripts/grants.py:442-450). The result is no longer truncated, so a drifted Compose question carries a prompt of about 780 characters.

Contract: question() documents "the shape stop_questions defines". stop_questions.MAX_PROMPT_LENGTH is 600, and questions_errors rejects longer prompts. The question goes unchanged into the decisions record's questions (scripts/run_cycle.py:1021), which the coordinator relays.

Display: the terminal line question 1/n uses readable(prompt, 600), so the Outside table … Risk … Con tail is still cut there with an ellipsis. The separate risk: line keeps the risk visible.

Fix: abbreviate the hashes in the prompt (for example the first 12 hex characters), since the full ones are in the record's pattern. Alternatively, shorten the fixed text by the prefix length. Test: assert stop_questions.questions_errors([prompt_question]) == [] in the drift test.

Evidence: code inspection and length arithmetic. The test asserts Risk: but not the length. It is not execution-verified, because inline Python is outside this stage's table.

Acceptance criteria (tests.version=2)

AC Check Result
AC-1 test_resume_persists_an_earlier_grant_before_a_different_refusal passed
AC-2 test_cycle_answer_is_available_after_a_resume passed
AC-3 test_unasked_resume_id_keeps_an_actionable_preflight_note; the resolved-X no-note assertion is in the AC-1 test passed
AC-4 test_compose_hash_drift_names_both_configuration_hashes (see REV-004 for the prompt length) passed
AC-5 the tests above plus test_docs_describe_resume_answer_persistence; docs/host-permissions.md updated passed

Verification (agent-reported, executed on 4084fce)

{
  "version": 2,
  "checks": [
    {"id":"configured-test","command":"python3 -m unittest discover -s tests","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":["AC-1","AC-2","AC-3","AC-4","AC-5"],"level":"test","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":2758},"cause":"Ran 2758 tests in 549.589s, OK (skipped=1)","attempts":[]},
    {"id":"acceptance-regressions","command":"python3 -m unittest discover -s tests -p test_compose_consent.py","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":["AC-1","AC-2","AC-3","AC-4","AC-5"],"level":"test","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":76},"cause":"Ran 76 tests, OK","attempts":[]},
    {"id":"package-validator","command":"python3 scripts/validate-package.py","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":[],"level":"static","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":null},"cause":"VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned","attempts":[]},
    {"id":"basedpyright","command":"basedpyright","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":["AC-1","AC-2","AC-3","AC-4"],"level":"static","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"pass","evidence":{"exit_code":0,"executed":null},"cause":"0 errors, 0 warnings, 0 notes","attempts":[]},
    {"id":"configured-unittest-alias","command":"python3 -m unittest","executor":"codex","profile":"cheap_coder","context":"project","required":false,"criteria":[],"level":"test","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"unverified","evidence":{"exit_code":0,"executed":0},"cause":"exited 0 but discovered 0 tests","attempts":[]},
    {"id":"cli-boundary","command":"sha256:3752ba3c0d3cd77a1a0d9c025a08a431d7686c1aa2878bc22654714515a66223","executor":"codex","profile":"cheap_coder","context":"project","required":true,"criteria":[],"level":"boundary","provenance":"runtime","reason":"runtime","head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"unverified","evidence":{"exit_code":null,"executed":null},"cause":"not executed in this rereview: the dry-run CLI command is outside the rereview stage's command table [layer=toolkit_hook, rule=command_table]; the resolve stage reported pass on this head","attempts":[{"head_sha":"4084fce51f485878d2bd5fd70ce6e9373a5f55ba","result":"unverified","cause":"python3 scripts/run_cycle.py --repo datacas/code-cycle-toolkit --task 522 --dry-run --json --no-config refused by the stage table"}]}
  ],
  "conclusion": "not_verified",
  "boundary": "required"
}

The conclusion is capped at not_verified only because the required cli-boundary check did not run in this stage. Every test-level and static check passed locally.

Security

Triage: the deterministic rule did not fire. No changed path matches the mandatory minimum, and .code-cycle.yml declares no always_when. The audit is mandatory under the plan (security_required), and it fits here because the change touches consent and persisted grants.

Result: cc-security-review ran on 4084fce and found no confirmed vulnerability. The REV-001 change widens the read from the newest matching record to every matching record. The trust boundary stays the same: the runtime's own decisions directory, owner-only files, a repo/task filter and a 1 MB cap per file. A grant is rebuilt only for an ID the user typed. That ID must equal the content-derived grant ID, and the scope, risks and isolation are recomputed.

Potential risks (informational):

  • _compose_drift takes the previous config_sha256 from an unvalidated record pattern. Someone who can write that directory controls that string in the prompt; the terminal output strips control bytes.
  • Every matching decisions file is now parsed on each run. Cost grows with the directory.

CI (policy: parallel, read once on 4084fce)

Check State
Classify the change pass
PowerShell installer pass
Windows test shard (windows-1) pass
Windows test shard (windows-2) pass
Windows test shard (windows-3) pass
Windows test shard (windows-4) pass
Skills, manifests, and Bash installer pending

Residual risk

  • REV-004 is based on inspection only.
  • Real Docker Compose drift is only emulated by the tests.
  • The cycle_cli.py wiring of load_resume_requests has no end-to-end test. The cli-boundary dry-run was not executed in this stage.

History

[CCR-20261124-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2

[CCR-20261124-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2

[CCT-20261124-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:8b50f2654cfe1a1b390546ffffb8b6d07c8d27b6 · schema:2

All three findings were triaged valid before the edits. The resolve stage claimed all three as resolved on 4084fce.

@datacas
datacas merged commit 214eba9 into main Nov 24, 2026
7 checks passed
@datacas
datacas deleted the fix/issue-522-grant-resume branch November 24, 2026 11:14
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.

1 participant