Skip to content

Manual review runs record host configuration - #99

Merged
datacas merged 2 commits into
mainfrom
issue-80-manual-review-runs
Sep 25, 2026
Merged

datacas merged 2 commits into
mainfrom
issue-80-manual-review-runs

Conversation

@datacas

@datacas datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Closes #80

Work item: #80

Summary

  • Manual review and triage lines use the reserved manual profile and record host-configured provider, requested model, and effort, using unknown per unavailable value.
  • Routed runs continue to copy runtime values verbatim; the runtime refuses manual as a configured profile.
  • The contract parser tests both manual and routed lines, while the docs and cc-stats guidance keep manual comment counts separate from telemetry dispatches.

Verification

  • python3 scripts/validate-package.py → VALID, shared sections in sync.
  • python3 -m unittest discover -s tests -v → 714 tests, OK.
  • Focused contract and router test suites passed (59 tests each).
  • git diff --check → passed.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Initial review — PR #99

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

(A manual run following the convention this PR proposes. Provider, model, and effort come from ~/.claude/settings.json (model: opus, effortLevel: high). No executor receipt, so the resolved model is ?.)

Verdict: CHANGES_REQUESTED. One finding blocks approval: REV-001.

Summary and scope

Reviewed head 4d45242 against base main @ 18bcc86 (merge-base 18bcc86). The diff is one commit, 11 files, +112/−0. It adds the reserved manual profile to the run-line guidance shared by cc-initial-review, cc-rereview, and cc-resolve-comments. It also updates docs/review-cycle.md, docs/instrumentation.md, docs/telemetry.md, and cc-stats. In the code, router.load_profiles now refuses manual as a declared profile, and there are parser tests for manual lines, routed lines, and lines with unknown tokens. The PR closes #80.

The change does what the issue asks for review run lines. Routed lines are unchanged, and the parser round-trips both forms. The gap is the triage run line, which is the one cc-resolve-comments actually writes.

Findings

[REV-001] · medium · open · - · blocks:yes — Manual guidance is attached only to the review run line; the triage run line has none

Paths: skills/cc-resolve-comments/SKILL.md (lines 216–240), plus the same shared section in skills/cc-initial-review/SKILL.md and skills/cc-rereview/SKILL.md.

The new paragraph sits inside the explanation of the review run line ("Its tokens are the run ID, the profile, …"). It has one CCR- manual example. The triage run line section just below it (line 242 onward) still has only the routed cheap_coder example and never mentions manual. cc-resolve-comments writes a CCT- line (step 5, line 297), not a CCR- line. So a manual resolver has no direct instruction for its own line. Issue #80 names the all-unknown CCT- line as half of the problem. The PR description says "Manual review and triage lines use the reserved manual profile", but only docs/instrumentation.md says this. The skills, which are what agents follow, do not.

Suggested fix: in the shared section, say that the manual rule applies to both review and triage run lines, and add a CCT-… manual example next to the triage example. For example: #### [CCT-20260924-003] · manual · openai/gpt-6-sol→? · high · triaged:<sha> · schema:1. validate-package.py parses the run-line examples in the skills, so the new example is checked automatically.

Evidence: code inspection. At runtime I confirmed that the parser already accepts the manual triage line #### [CCT-…] · manual · unknown/unknown→? · unknown · triaged:0123456 · schema:1 and round-trips it. The gap is in the instructions, not the parser.

[REV-002] · low · open · - · blocks:no — Host-configuration sources are not precise enough to give consistent values

Paths: the shared run-line section in the three skills, and docs/review-cycle.md.

  • Codex: the text says to read model and model_reasoning_effort from ~/.codex/config.toml plus -c overrides. It does not cover a selected profile (a profile = … entry or --profile, whose [profiles.<name>] table overrides the model), -m/--model, or $CODEX_HOME. profile_config.codex_models already respects $CODEX_HOME. A run that uses a Codex profile would record the wrong requested model.
  • Claude Code: "the selected session model and effort exposed by the host" does not name a source. This run shows the ambiguity. ~/.claude/settings.json gives the alias opus, while the session's system context gives the full ID claude-opus-5-5, and /model or --model can override both. Two manual runs in the same setup could record opus or claude-opus-5-5, which weakens the drift comparison this line exists for.

Suggestion: list the resolution order for each host (CLI flag → selected profile → config file, respecting $CODEX_HOME). For Claude Code, say whether to record the alias as configured or a full model ID the host injects.

[REV-003] · low · open · - · blocks:no — review_contract.MANUAL_PROFILE is unused, and the router's check duplicates an existing rejection

Paths: scripts/review_contract.py:57, scripts/router.py:231, scripts/router.py:275.

  • review_contract.MANUAL_PROFILE is used only by the tests. The parser does not treat manual differently, and no production caller reads the constant. router.py defines its own copy of the same string instead of importing it, so the two could drift apart.
  • manual is not in DEFAULT_PROFILES, so load_profiles already refused it through the following unknown profile names check. The new check only changes the error message. That's a reasonable UX gain, but the new test confirms the message, not new protection. profile_config.declared_profiles has no matching reservation. It is only used for proposals filtered by DEFAULT_PROFILES, so there is no current bypass.

Issue #80's acceptance criterion "rejects manual inside a runtime-routed context" is met by construction: the router can only route to DEFAULT_PROFILES. Nothing more is required, but you could either use the shared constant from one module or drop the unused one.

Security triage

No security_review.always_when rule is declared in .code-cycle.yml, so I applied the default triggers. The deterministic check did not fire: no auth, secrets, dependencies, CI workflows, or environment templates changed, and there are no labels. My own reading marked it observability-adjacent, because the change tells agents to read host config files and publish values from them. I ran a focused audit inline in this coordinator, not as a separate cc-security-review pass. Only the model identifier and effort string get published. No code path reads config files; this is guidance only. No vulnerability was found. See the residual risk below.

Commands executed and observed results

Command Result
python3 scripts/validate-package.py VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned
python3 -m unittest discover -s tests Ran 714 tests — OK
python3 -m unittest tests.test_review_contract tests.test_router Ran 118 tests — OK
git diff --check origin/main...HEAD clean
Parse and format of a manual CCT- line and a manual CCR- line with unknown effort (inline Python against review_contract) both round-trip byte-for-byte, profile manual

The review, security, and verification passes ran inline in this coordinator, not as separately loaded cc-pr-review / cc-security-review / cc-verify delegates.

Unverified

CI

gh pr checks 99: 4 passed, 0 failed. These are two runs of the Validate package workflow, each with Skills, manifests, and Bash installer ✅ and PowerShell installer ✅. No checks are pending, skipped, or missing compared with the repository's workflow.

Residual risks

  • Telling agents to read ~/.codex/config.toml can bring unrelated entries into the agent's context, such as MCP server env tokens. Only the model and effort are meant to be published. Consider saying "read only these keys".
  • Historical manual lines stay all unknown. cc-stats counts manual runs only when the user asks for comment-based analysis, so there is no telemetry for them by design.

Project review verdict: CHANGES_REQUESTED (blocking: REV-001).

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

[CCT-20260925-001] · manual · openai/gpt-6-luna→? · high · triaged:4d45242373f24b7f0175f3cb493c553b08fd9a38 · schema:1

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[REV-001] · medium · resolved · valid · blocks:yes — Manual guidance is attached only to the review run line; the triage run line has none

[REV-002] · low · resolved · valid · blocks:no — Host-configuration sources are not precise enough to give consistent values

[REV-003] · low · resolved · valid · blocks:no — review_contract.MANUAL_PROFILE is unused, and the router's check duplicates an existing rejection

Resolution summary

All three findings were valid against 4d45242373f24b7f0175f3cb493c553b08fd9a38 and are resolved in 255e41d.

  • REV-001: Added manual review and triage run-line guidance and examples across the shared initial-review, rereview, and resolve-comments skill sections. Manual run lines are described as comment-only and separate from telemetry dispatches.
  • REV-002: Documented how to record effective Codex and Claude Code model, provider, and effort settings, including source precedence and alias handling. The guidance limits reads to those values and says to use unknown when a value cannot be resolved.
  • REV-003: Kept the manual reservation in the router, where it gives a direct configuration error, and removed the unused constant from review_contract.py. Parser tests cover manual run lines, unknown values, and routed values.

Verification

  • rtk python3 scripts/validate-package.py — passed; 14 skills validated, shared sections in sync, manifests aligned.
  • rtk git diff --check origin/main — passed.
  • rtk python3 -m unittest discover -s tests — passed; 715 tests.
  • Delegated post-change diff review — no findings.
  • CI for 255e41d3ed17ebbc8f2744b75f5584dd4044b739 — all 4 reported checks passed.

Security review

No confirmed vulnerabilities found.

Reviewed surface

The router's new profile-name validation, review-contract parser tests, and manual host-configuration instructions. The router change adds no file reads or command execution.

Not reviewed

External host configuration and unrelated authentication, network, and dependency surfaces, which are outside this change.

Residual risk

Manual configuration handling is workflow guidance, so confidentiality still depends on the host exposing effective values and the agent following the field-only instruction.

Status

RESOLVED — no blocking findings remain open. The PR remains open for normal review; this comment does not approve or merge it.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Rereview — PR #99

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

Earlier run lines on this PR, kept unchanged:

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-001] · manual · openai/gpt-6-luna→? · high · triaged:4d45242373f24b7f0175f3cb493c553b08fd9a38 · schema:1

(This is a manual run. The provider, model selector, and effort come from ~/.claude/settings.json (model: opus, effortLevel: high), as the rule in this PR describes. No executor receipt is available, so the resolved model is ?.)

Verdict: APPROVED. No open finding blocks approval. One new non-blocking nit: REV-004.

What changed since the previous review

Previously reviewed head: 4d45242. Current head: 255e41d ("Resolve manual run review findings"). Base: main @ 18bcc86. The new commit changes 7 files (+145/−44):

  • The shared run-line section in all three skills now says the manual rule covers both review and triage lines and adds a CCT- manual example. It also gives the order in which Codex and Claude Code settings are resolved, plus alias handling.
  • docs/review-cycle.md and docs/instrumentation.md are updated to match.
  • The unused review_contract.MANUAL_PROFILE was removed. The router keeps the reserved-name check.
  • A new parser test covers a manual CCT- line with unknown values.

I rereviewed the full diff from the merge-base (18bcc86...255e41d), not only the new commit.

Previous findings

[REV-001] · medium · resolved · valid · blocks:yes — Manual guidance is attached only to the review run line; the triage run line has none

Fixed and verified. All three skills now say "use the reserved profile token manual for both review and triage run lines", and a CCT-20260924-004 · manual … example sits next to the triage example. validate-package.py parses the run-line examples in the skills and passes, so the new example is valid. The new test test_manual_triage_run_round_trips_with_unknown_host_values passes.

[REV-002] · low · resolved · valid · blocks:no — Host-configuration sources are not precise enough to give consistent values

Fixed and verified against the installed hosts:

  • codex-cli 0.157.0 --help confirms -m/--model, -c/--config, and -p/--profile ("Layer $CODEX_HOME/<name>.config.toml on top of the base user config"). This matches the documented $CODEX_HOME/<profile>.config.toml.
  • claude --help confirms --model, --effort, and --settings, which the Claude Code order relies on.
  • The alias rule ("keep opus, do not expand to a versioned ID; record a full ID only when that is all the host exposes") settles the opus vs claude-opus-5-5 ambiguity. This run's line follows it.
  • The text now says to read only the needed keys and never copy unrelated configuration. That covers the residual risk from the first review.

[REV-003] · low · resolved · valid · blocks:no — review_contract.MANUAL_PROFILE is unused, and the router's check duplicates an existing rejection

Fixed and verified. grep -rn MANUAL_PROFILE scripts tests now finds it only in scripts/router.py (the constant and the reservation check). The tests use the literal "manual". Keeping the router check for its clearer error message is reasonable.

New findings

[REV-004] · low · open · - · blocks:no — A hyphen split across a line break in docs/instrumentation.md renders as "Comment- based"

Path: docs/instrumentation.md:51.

Line 51 ends with Comment- and line 52 starts with based analysis. Markdown joins wrapped lines with a space, so the rendered text says "Comment- based analysis". Fix: keep Comment-based on one line. This is cosmetic only.

Security triage

No security_review.always_when rule is declared, so I applied the default triggers. The deterministic check did not fire: no auth, secrets, dependencies, CI workflows, environment templates, or labels changed. My own reading again marked it observability-adjacent, because the guidance tells agents to read host configuration. I audited it inline in this coordinator. The new text limits reads to the model, provider, and effort keys and forbids copying unrelated configuration. The only code change removes a constant. No vulnerability was found.

Verification

Command Result
python3 scripts/validate-package.py VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned
python3 -m unittest discover -s tests Ran 715 tests — OK
git diff --check origin/main...HEAD clean
grep -rn MANUAL_PROFILE scripts tests only scripts/router.py:231,275,277
codex --help, claude --help the flags and profile-file layout named in the guidance exist

The review, security, and verification passes ran inline in this coordinator, not as separately loaded delegates.

Unverified: no manual Codex session was observed publishing · manual · openai/<configured model>→? · <configured effort> ·. That depends on agent behaviour, not code.

CI (head 255e41d)

gh pr checks 99: 4 passed, 0 failed, 0 pending or skipped. These are two runs of Validate package, each with Skills, manifests, and Bash installer ✅ and PowerShell installer ✅.

Residual risk

Confidentiality still depends on agents following the "read only the needed keys" rule. Nothing in the code enforces it.

Project review verdict: APPROVED for head 255e41d3ed17ebbc8f2744b75f5584dd4044b739. No open blocking findings; REV-004 is optional.

@datacas
datacas merged commit 7875beb into main Sep 25, 2026
4 checks passed
@datacas
datacas deleted the issue-80-manual-review-runs 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.

Manual runs: record profile 'manual' and the host-configured model instead of all 'unknown'

1 participant