Skip to content

feat(orchestrators): run the optional issue review before implementation - #117

Merged
datacas merged 2 commits into
mainfrom
issue-115-orchestrator-issue-review
Sep 29, 2026
Merged

datacas merged 2 commits into
mainfrom
issue-115-orchestrator-issue-review

Conversation

@datacas

@datacas datacas commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Closes #115 — #115

What changes in the skills' behaviour

  • cc-orchestrator and cc-orca-orchestrator gain one shared section, ## Issue review before implementation, which applies the same gate run_cycle.py applies (issue_review.dispatch_decision and issue_review.assess are named as the executable definitions):
    • mode from issue_review=auto|off in the invocation, then code_cycle.issue_review.mode, then auto; an unknown value or key stops BLOCKED before dispatching;
    • auto skips only work declared difficulty 1 and not security-sensitive; unclassified work is reviewed;
    • cc-issue-review is dispatched read-only with no publication permission, before cc-implement-issue, and the checkout must be unchanged afterwards;
    • only a confirmed READY continues. An unconfirmed READY (low confidence or an unresolved material uncertainty) escalates once to senior_reviewer, then stops HUMAN_INTERVENTION. NEEDS_REFINEMENT → HUMAN_INTERVENTION, BLOCKED → BLOCKED, missing/malformed/other-work-item result → FAILED, all before implementation, with findings, evidence and proposed issue edits shown;
    • the work item is never edited, commented on or labelled; IR-NNN findings never enter the REV-xxx state; resumed cycles never run the stage; off keeps the previous flow.
  • cc-orchestrator: new issue_review input, workflow step 5 applies the gate, cc-issue-review statuses listed.
  • cc-orca-orchestrator: new issue_review input, workflow step 4 dispatches the stage as a worker, a new ### Issue review worker section (read-only review workspace, before/after head + porcelain check, escalated worker on the senior_reviewer profile or HUMAN_INTERVENTION, result read from its result file), a Task spec, and a From cc-issue-review decision.

Validator

check_issue_review_gate compares the shared section byte for byte across both orchestrators, checks it states the mode, skip rule, every issue_review.STATUSES token, the escalation and read-only boundary, and checks the Orca worker section states the read-only workspace. Four new regression tests cover a missing section, drifted copies, a lost off setting, and an Orca worker without a read-only workspace.

Docs

docs/workflows.md, docs/skills.md, docs/review-cycle.md, docs/configuration.md, the CONTRIBUTING shared-section table, and CHANGELOG say the orchestrators apply the gate.

Verification

  • python3 scripts/validate-package.py → VALID
  • python3 -m unittest discover -s tests → 912 tests OK
  • claude plugin validate . → passed

Not changed: the issue-review result contract and the runtime gate from #110.

Both orchestrators now apply the runtime's issue-review gate from one shared
section that the validator keeps identical and checks for the mode, skip rule,
outcomes, escalation and read-only boundary. The Orca orchestrator dispatches
the stage as a read-only worker before starting the implementer.

Closes #115
@datacas

datacas commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20260929-001] · reviewer · openai/?→? · ? · schema:1

Review summary

Reviewed the full accumulated diff from merge base 137498d94d7f026938c8b936edf4dfff50657562 through head 9cabf6b6ef10b89fc17f8f693900c0186ac12eff for PR #117, linked to issue #115. The 10 changed files add the issue-readiness gate to both orchestrators, validator checks, and documentation.

Two blocking findings remain. Package validation and the complete local Python suite pass. All four GitHub checks are now passing.

Findings

[REV-001] · medium · open · - · blocks:yes — Require an isolated Orca workspace

Path: skills/cc-orca-orchestrator/SKILL.md:240

When Orca cannot provide its own worktree, this instruction falls back to the current worktree. The existing workspace policy says Orca has no OS-level read-only permission and permits a review only in an explicit isolated workspace; it rejects a missing or overlapping workspace with no fallback (skills/cc-orchestrator/SKILL.md:261-265). The added HEAD/status comparison detects some persistent edits after the worker runs but does not enforce read-only access and misses ignored writes or edits reverted before worker_done. A controlled Git reproduction confirmed both cases leave HEAD and git status --porcelain --untracked-files=all unchanged. Stop before dispatch when an isolated review workspace is unavailable.

[REV-002] · medium · open · - · blocks:yes — Define issue review for fixed executor modes

Path: skills/cc-orchestrator/SKILL.md:315

The workflow says invocation modes such as single_agent and claude_codex fix executors for every stage and replace routing (skills/cc-orchestrator/SKILL.md:394-400). The new gate requires the issue-review target routed for its role and escalates an unconfirmed result to senior_reviewer, but it does not define either dispatch under those fixed modes. Specify how the gate and escalation follow each fixed mode, including the stop behavior when a distinct senior reviewer cannot be selected.

Security triage

The deterministic rule did not fire: .code-cycle.yml has no security_review.always_when override, the defaults matched none of the changed paths or filenames, and the PR has no labels. Reviewer triage requested cc-security-review because the change defines read-only workspace enforcement and executor selection. The audit found REV-001 as a potential security risk and no other security issue in the reviewed changes. Orca was not run, so the worker's ability to exploit the fallback was not exercised.

Verification

Preflight found no application runtime, database, migration, service, or port requirements for the changed areas. Verification ran in a disposable full clone at the reviewed SHA with Python 3.10.12; the shared worktree remained clean.

  • python3 scripts/validate-package.py — passed; 15 skills validated and shared sections aligned.
  • python3 -m unittest discover -s tests -v — passed; 912 tests.
  • Controlled Git fingerprint reproduction — reverted tracked edits and ignored-file writes both left the recorded HEAD/status unchanged.
  • The issue-review workflow behavior under fixed executor modes and the Orca worker itself were not run locally; these are skill-defined orchestration paths.

An initial suite run from a source archive without Git metadata failed because tests inspect Git state. It was discarded and rerun in a full clone, where the suite passed.

CI

GitHub Actions reports all checks passed, with two workflow invocations for each job:

  • Skills, manifests, and Bash installer — pass (2 runs). This job includes package validation, the Python suite, skill CLI discovery, and Bash installer checks.
  • PowerShell installer — pass (2 runs). This job includes Windows package validation, the Python suite, and PowerShell installer checks.

No pending, failed, cancelled, or skipped checks were present. No expected PR check was missing.

Residual risk and verdict

The validator and test suite do not catch either workflow-policy conflict. The local Git reproduction confirms the Orca fingerprint is not a read-only guarantee; live Orca and fixed-mode dispatch remain unverified. Both findings block approval.

Verdict: CHANGES_REQUESTED.

@datacas

datacas commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20260929-001] · reviewer · openai/?→? · ? · schema:1

[CCT-20260929-002] · ? · ?/?→? · ? · triaged:9cabf6b6ef10b89fc17f8f693900c0186ac12eff · schema:1

Review-comment resolution — PR #117

Resolution status: RESOLVED · previous head 9cabf6b6ef10b89fc17f8f693900c0186ac12eff · current head bf253f258ea9edac628ec650181619b79bbc28ca

[REV-001] · medium · resolved · valid · blocks:yes — Require an isolated Orca workspace

Path: skills/cc-orca-orchestrator/SKILL.md

The issue-review worker must receive its own isolated worktree at the base head. If the installed Orca contract cannot create and select it, the run stops with BLOCKED before worker start; it can no longer fall back to the current or shared worktree. The HEAD/status comparison is explicitly supplementary and does not claim to enforce isolation. Fix commit: bf253f258ea9edac628ec650181619b79bbc28ca.

[REV-002] · medium · resolved · valid · blocks:yes — Define issue review for fixed executor modes

Path: skills/cc-orchestrator/SKILL.md; docs/workflows.md

single_agent runs issue review in the current agent, and claude_codex runs it in Claude. Neither fixed mode assigns a distinct senior reviewer for this stage, so an unconfirmed READY stops with HUMAN_INTERVENTION without repeating the review or silently using routing. The workflow docs now state the same behavior. Fix commit: bf253f258ea9edac628ec650181619b79bbc28ca.

Verification

  • python3 -m unittest discover -s tests -p 'test_validate_package.py' — passed, 50 tests.
  • python3 scripts/validate-package.py — passed, 15 skills validated and shared sections aligned.
  • python3 -m unittest discover -s tests — passed, 913 tests.
  • git diff --check — passed.
  • Delegated cc-code-review — no remaining actionable findings; its P2 documentation finding was corrected and re-reviewed.
  • cc-security-review — no confirmed vulnerability found. Potential residual risk: isolation strength depends on the installed Orca contract; the worker was not run in a live Orca workspace.
  • GitHub CI — all expected checks passed: two Skills, manifests, and Bash installer runs and two PowerShell installer runs. No pending, failed, cancelled, or skipped checks; no expected gate was missing.
  • GitHub reported no inline review threads to resolve.

No blocking findings remain. Manual merge remains the repository workflow.

@datacas

datacas commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20260929-001] · reviewer · openai/?→? · ? · schema:1

[CCT-20260929-002] · ? · ?/?→? · ? · triaged:9cabf6b6ef10b89fc17f8f693900c0186ac12eff · schema:1

[CCR-20260929-003] · ? · anthropic/?→claude-opus-5-5 · ? · schema:1

Rereview — PR #117

Reviewed the full accumulated diff from merge base 137498d94d7f026938c8b936edf4dfff50657562 to head bf253f258ea9edac628ec650181619b79bbc28ca (10 files, +323/−28), linked to issue #115. The previous review covered 9cabf6b6ef10b89fc17f8f693900c0186ac12eff. The runtime did not report the routed profile, requested model, or effort, so those fields are ?.

What changed since the previous review (9cabf6b..bf253f2)

  • skills/cc-orca-orchestrator/SKILL.md, Issue review worker: now requires an isolated worktree at the base head, stops BLOCKED before worker-start when Orca cannot provide it, never falls back to the current or shared worktree, and describes the HEAD/porcelain comparison as a supplementary post-run check.
  • skills/cc-orchestrator/SKILL.md, workflow step 4: defines issue review under single_agent and claude_codex. In both modes an unconfirmed READY stops with HUMAN_INTERVENTION and is not re-routed.
  • docs/workflows.md step 3: states the same fixed-mode behavior.
  • scripts/validate-package.py and tests/test_validate_package.py: add the new phrases to the validator and a regression test for the fixed-mode stop.

Previous findings

[REV-001] · medium · resolved · valid · blocks:yes — Require an isolated Orca workspace

Path: skills/cc-orca-orchestrator/SKILL.md:235-246

Fixed and verified by execution. The worker section now matches the workspace policy in skills/cc-orchestrator/SKILL.md:261-265: an explicit isolated workspace, BLOCKED when one is unavailable, and no fallback. In a disposable clone at bf253f2, I replaced the no-fallback sentence with "otherwise use the current worktree". validate-package.py then exited 1 with '### Issue review worker' does not state 'never fall back to the current or shared worktree'. The live Orca worker was not run.

[REV-002] · medium · resolved · valid · blocks:yes — Define issue review for fixed executor modes

Path: skills/cc-orchestrator/SKILL.md:401-408; docs/workflows.md:96

Fixed and verified by execution. Both fixed modes now say where the stage runs, and an unconfirmed READY stops with HUMAN_INTERVENTION because neither mode selects a distinct senior_reviewer. This is consistent with the shared table's "stops … when the first pass already ran on senior_reviewer" rule. In the disposable clone, I replaced "do not route or ask the same executor a second time". The validator then exited 1 with '## Workflow' does not state 'do not route or ask the same executor a second time'. The new test test_rejects_fixed_modes_without_a_distinct_senior_reviewer_stop passes.

New findings

[REV-003] · low · open · - · blocks:no — Docs still describe the Orca issue-review worker as merely read-only

Path: docs/skills.md:165; docs/workflows.md:186; CHANGELOG.md:38; skills/cc-orca-orchestrator/SKILL.md:220 (workflow step 4)

The REV-001 fix changed the worker contract from a "read-only review workspace" to an isolated one with a BLOCKED stop and no fallback. Only the Issue review worker section says this. The skills catalogue, the Orca workflow description, the CHANGELOG entry, and workflow step 4 still say "read-only review workspace" / "in a read-only workspace". Orca itself does not claim that property (skills/cc-orchestrator/SKILL.md:261-263). A reader of the docs alone would not learn about the isolation requirement or the stop. The fix is to change those four places to "isolated review workspace" and mention the BLOCKED stop.

[REV-004] · low · open · - · blocks:no — Missing blank line before validate_manifest

Path: scripts/validate-package.py:590

The fixed-mode block added to check_issue_review_gate is followed by only one blank line before def validate_manifest. The rest of the module uses two (PEP 8 E302). This is cosmetic, with no functional effect.

Security triage

The deterministic rule did not fire: .code-cycle.yml defines no security_review.always_when, the cc-initial-review default triggers match none of the changed paths, and the PR has no labels. Reviewer judgement activated the audit because the change defines workspace isolation and executor selection for a read-only stage. I ran the cc-security-review criteria inline in this rereview session rather than as a separately loaded pass.

Result: no confirmed vulnerability. The REV-001 fallback that let a non-isolated worker run in the shared worktree has been removed. Residual risk: the fixed modes run issue review in the current agent (single_agent) or the Claude coordinator (claude_codex). There, only the SHA/working-tree comparison guards non-mutation, not an enforced read-only boundary. The existing cc-initial-review and cc-rereview stages already run the same way in those modes, so this PR does not introduce it.

Verification

Preflight found no runtime, database, service, or port requirements for the changed areas. I used Python 3.10.12 at bf253f2. The shared worktree was clean before and after.

  • python3 scripts/validate-package.py passed: VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned. That includes the byte-for-byte shared gate section across both orchestrators.
  • python3 -m unittest discover -s tests passed: 913 tests OK.
  • The 4 issue-review gate validator tests and the new fixed-mode test passed.
  • git diff --check 137498d HEAD passed.
  • The REV-001 and REV-002 mutation reproductions in a disposable clone both behaved as expected (see above).
  • Not verified: a live Orca issue-review worker, a live fixed-mode dispatch, and the escalation path. These are skill-defined orchestration paths with no local executable harness. run_cycle.py, issue_review.assess, and issue_review.dispatch_decision are unchanged by this PR.

CI

Checks on bf253f2: all passed. None pending, failed, cancelled, skipped, or missing.

  • Validate package / Skills, manifests, and Bash installer passed (2 runs)
  • Validate package / PowerShell installer passed (2 runs)

Residual risk and verdict

All previous blocking findings are resolved and verified. REV-003 and REV-004 are low and do not block. Live Orca and fixed-mode behavior remain unexercised. Manual merge remains the repository workflow.

Verdict: APPROVED.

@datacas
datacas merged commit fb6ff95 into main Sep 29, 2026
4 checks passed
datacas added a commit that referenced this pull request Sep 29, 2026
Bump both plugin manifests, the README badge, and the installer examples to
0.4.0, and move the Unreleased changelog entries under [0.4.0].

Bring the README in line with the orchestrator issue-review gate (#117): the
quick start mentions the readiness check, the status table covers its stops,
and the configuration table lists the issue_review= invocation parameter.

Describe the Orca issue-review worker's workspace as isolated, with its
BLOCKED stop and no fallback, in the docs, the changelog, and workflow step 4
(REV-003), and restore PEP 8 spacing in validate-package.py (REV-004).
@datacas
datacas deleted the issue-115-orchestrator-issue-review branch October 6, 2026 07:53
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.

feat(orchestrators): run the optional issue review before implementation

1 participant