Skip to content

feat(review): accept resolved model args from the caller - #763

Merged
kyle-sexton merged 4 commits into
mainfrom
feat/review-model-args
Oct 17, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
feat/review-model-args

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Refs: melodic-software/claude-code-plugins#7797

Summary

The review lanes and intake triage can take resolved model args from the caller. A repository with a models: block (claude-code-plugins, via its resolve-config action) can then route lane models from one config instead of these workflows' pins. Review-lane callers that pass nothing behave exactly as today. Intake triage changes for every caller that relies on its default claude-args: Sonnet 5.5 at effort medium instead of the claude-sonnet-5 pin (see Fix). The release notes must say so.

Fix

  • pr-review.yml, pr-review-security.yml:
    • New optional model-args input (default empty).
    • When set, the compose step checks it against ^(--model [a-z]+ )?--max-turns [1-9][0-9]*( --effort [a-z]+)?$, the resolve-config claude-args shape, and fails the step otherwise.
    • It then appends it in place of the --model/--effort that come from the model/effort inputs.
    • It reaches the shell only through an env var.
    • The model and effort inputs and their defaults stay for repositories with no resolve-config.
  • intake-triage.yml: the default claude-args becomes --model sonnet --effort medium --max-turns 30, replacing the stale claude-sonnet-5 pin. This is the owner's choice for Sonnet 5.5, made after research checked against Anthropic's effort guidance. A caller's claude-args still replaces the default entirely.
  • README input tables.

Verification

  • node --test .github/scripts/*.test.cjs .github/actions/report-lane-outcome/*.test.cjs: 461 pass, 0 fail. That includes 7 new cases that run the actual compose run: block.
    • With model-args empty, both review lanes compose exactly today's args.
    • A valid value replaces the input-derived model and effort.
    • The step fails with no output on ;, --allowedTools, a newline, $(id), a missing or zero --max-turns, an uppercase alias, a trailing space, and --dangerously-skip-permissions.
  • actionlint is clean. zizmor's two medium artipacked findings are on checkout steps this change does not touch.
  • No permission, action pin or bubblewrap step changed.

Related

  • Needs a standards policy.json entry registering model-args (both review lanes) and claude-args (intake) at the release SHA before callers can pass them.
  • Release after merge: release-tag.yml, bump minor.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR

kyle-sexton and others added 2 commits October 17, 2026 16:14
pr-review.yml and pr-review-security.yml take an optional model-args
input, default empty. When set, the compose step requires resolve-config's
claude-args shape ([--model <alias>] --max-turns <n> [--effort <level>]),
fails the job on any other value, and appends it after claude-args in
place of the --model and --effort from the model and effort inputs. With
it empty the composed args are unchanged, so callers without
resolve-config keep today's behavior.

intake-triage.yml's claude-args default moves from the stale
claude-sonnet-5 pin to --model sonnet --effort medium --max-turns 30, the
same shape, so a caller can pass resolve-config's claude-args into it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
With model-args set, only the flags it carries are appended, so a --model
or --effort in claude-args stays in effect when model-args leaves it out.
model-args carries Claude args only; a resolve-config subagent-model is
not supported, so routes feeding it keep subagent-model at inherit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 17, 2026 20:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T20:22:11.085010Z 12f6cbb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 19s —— View job


Security review — no issues found

  • Gather context (diff, changed files, workflow YAML)
  • Review model-args/claude-args validation regex and shell injection surface
  • Review intake-triage default change
  • Adversarial verification of candidate findings (independent hunter agent)
  • Post findings / summary

Reviewed only the files changed in this PR (git diff origin/main...HEAD):
pr-review.yml, pr-review-security.yml, intake-triage.yml, plus the two test files and the README table update.

No security issues found. This is a logic/trust-boundary focused pass (Actions hardening such as pin/permission widening is zizmor's lane and is out of scope here):

  • The new model-args input reaches the shell only through an env var (MODEL_ARGS) and is validated with a fully-anchored regex (^(--model [a-z]+ )?--max-turns [1-9][0-9]*( --effort [a-z]+)?$ via [[ "$MODEL_ARGS" =~ $pattern ]]) before it's concatenated into the composed CLI args string. The anchors bind the whole string (not per-line), so embedded ;, $(), backticks, extra flags (--allowedTools, --dangerously-skip-permissions), newlines, or trailing/irregular whitespace all fail closed with exit 1 and no GITHUB_OUTPUT write — confirmed both by reading the implementation and by the 7 new tests in claude-lane-compose-args.test.cjs that exercise the actual run: block against these exact payloads.
  • model_args fully replaces the --model $MODEL --effort $EFFORT substitution rather than appending alongside it, so there's no path to smuggle a second conflicting --model/--effort pair in; --allowedTools and --json-schema are appended afterward by the script itself, outside the validated input's reach.
  • model-args sits at the same trust tier as the pre-existing model/effort/claude-args inputs — it's set by the calling workflow's own YAML (workflow_call), not by untrusted PR content, so this PR does not widen who can influence the Claude CLI invocation.
  • The intake-triage.yml default change (--model claude-sonnet-5 --max-turns 30 → --model sonnet --effort medium --max-turns 30) is a capability/effort default swap with no new input surface or regex change — no security implication.
  • No agent-instruction files, guardrails, or allowlists were deleted, narrowed, or softened by this diff (only new documentation/validation was added), so the instruction-surface-deletion lens doesn't apply here.

An independent hunter pass (adversarial verification, separate agent) tried locale-dependent [a-z] range widening, Unicode/full-width digit tricks, ReDoS, and flag-collision angles against the same regex and reached the same conclusion: no exploitable path.

@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 56s —— View job


Code review in progress

  • Gather context (PR diff, changed files, CLAUDE.md/REVIEW.md, standards contract)
  • Review pr-review.yml / pr-review-security.yml model-args handling
  • Review intake-triage.yml default claude-args change
  • Review test coverage for new behavior
  • Review README updates
  • Adversarially verify a candidate finding (undocumented --max-turns override)
  • Post findings

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

claude-security-review has reviewed this pull request through a3263fc; a later push is reviewed from there.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

claude-review has reviewed this pull request through a3263fc; a later push is reviewed from there.

@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 22s —— View job


Security review (incremental) — no issues found

  • Gather context (.claude-lane/incremental.diff, gh pr diff for surrounding context)
  • Review the changed file: .github/scripts/intake-triage-apply.test.cjs
  • Confirm no security-relevant surface
  • Post findings

Scope: per the lane header, this is an incremental review against 12f6cbb. Only .github/scripts/intake-triage-apply.test.cjs changed since then; every other file was reviewed at that commit.

Finding: none. The diff in .claude-lane/incremental.diff is a pure whitespace reformat (2-space indentation → tabs, matching the repo's biome config per the commit message style(intake-triage): format the apply test with the repository's biome config). I diffed the change ignoring whitespace and confirmed every hunk is indentation-only — no assertions, fixtures, mock behaviors, or script logic changed. This file is also test-only code (.github/scripts/intake-triage-apply.test.cjs), not a code path that runs against untrusted input in CI.

No logic, trust-boundary, or Actions-hardening changes to report in this increment.

@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 10s —— View job


Code review complete

  • Gather context (incremental diff, review scope)
  • Invoke /review:code-review for this PR (incremental scope: .github/scripts/intake-triage-apply.test.cjs only)
  • Post findings as inline comments / summary

Review scope: incremental — last reviewed at 12f6cbb. Only the change since then in .github/scripts/intake-triage-apply.test.cjs is in scope; every other file was already reviewed at that commit per the lane's instructions.

Skip gate applied: comparing 12f6cbb..bedafd3 with whitespace ignored (git diff --ignore-all-space) shows exactly one non-whitespace hunk — the long assert.ok(...) call in the "default runs Sonnet at medium effort" test is reflowed onto multiple lines with identical arguments and semantics:

[`.github/scripts/intake-triage-apply.test.cjs#L510-L513`](https://github.com/melodic-software/ci-workflows/blob/bedafd3dbe78ad2e276b5408a958a0e0daf14039/.github/scripts/intake-triage-apply.test.cjs#L510-L513)

Everything else in the diff is the repo's biome formatter switching the file from 2-space to tab indentation, matching the commit message (style(intake-triage): format the apply test with the repository's biome config). This is a trivial, automated, no-semantic-change formatting pass with no meaningful review surface, so no findings are reported for this increment.
· branch feat/review-model-args

Restores the two-space indentation the previous commit replaced with tabs, and wraps the one line biome reported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 39s —— View job


Security review (incremental) — no issues found

  • Gather context (.claude-lane/incremental.diff, gh pr diff for surrounding context)
  • Invoke /review:security-review per the lane's custom instructions
  • Review the changed file: .github/scripts/intake-triage-apply.test.cjs
  • Confirm no security-relevant surface
  • Post findings

Scope: incremental, last reviewed at bedafd3. Only .github/scripts/intake-triage-apply.test.cjs changed since then; every other file was already reviewed at that commit.

Finding: none. git diff --ignore-all-space bedafd3dbe78ad2e276b5408a958a0e0daf14039 a3263fcc1abe2fddc5b8eefd3367d26e1c9ae71f -- .github/scripts/intake-triage-apply.test.cjs is empty — every one of the 406 changed lines is a pure formatting reflow (tabs → 2-space indentation, plus the long assert.ok(...) call wrapped across multiple lines with identical arguments), matching the commit messages (style(intake-triage): format the apply test with the repository's biome config, style(intake-triage): wrap the long assertion in the apply test). No assertions, fixtures, mock behaviors, or script logic changed.

This file is also test-only code (.github/scripts/intake-triage-apply.test.cjs), not a code path that runs against untrusted input in CI, so it carries no trust-boundary surface even setting the formatting-only nature aside.

No logic, trust-boundary, or Actions-hardening changes to report in this increment.
· branch feat/review-model-args

@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 7s —— View job


Code review complete

  • Gather context (incremental diff since bedafd3, scope limited to .github/scripts/intake-triage-apply.test.cjs)
  • Diff bedafd3..a3263fc with and without whitespace to isolate the real change
  • Apply skip gate / report findings

Review scope: incremental — last reviewed at bedafd3. Only the change since then in .github/scripts/intake-triage-apply.test.cjs is in scope; every other file was already reviewed at that commit per the lane's instructions.

Skip gate applied. git diff --ignore-all-space bedafd3dbe78ad2e276b5408a958a0e0daf14039 a3263fcc1abe2fddc5b8eefd3367d26e1c9ae71f -- .github/scripts/intake-triage-apply.test.cjs produces no output — the entire increment, despite touching every line of the file, is whitespace-only (tab indentation reflowed to the repo's 2-space style; the long assert.ok(...) call is wrapped onto multiple lines with identical arguments). No assertions, fixtures, mock behavior, or script logic changed between these two commits.

This is a trivial, automated formatting pass with no meaningful review surface, so no findings are reported for this increment.
· branch feat/review-model-args

@kyle-sexton
kyle-sexton merged commit 3c8a4b2 into main Oct 17, 2026
29 checks passed
@kyle-sexton
kyle-sexton deleted the feat/review-model-args branch October 17, 2026 20:39
kyle-sexton added a commit to melodic-software/standards that referenced this pull request Oct 17, 2026
…in callers (#797)

Refs: melodic-software/ci-workflows#763

## Summary

Registers ci-workflows v0.45.0
(`3c8a4b2aeff5871cf72d35a686692bc6f0d44815`) in runner policy and repins
the shared callers to it. claude-code-plugins can then pass
resolve-config's model arguments into the review lanes and intake
triage. claude-code-plugins' two hosted review callers become
`locally-owned`, so that repository can add its resolve step without
changing the shared component.

## Fix

- `components/runner-policy/policy.json`, at `3c8a4b2`:
- `pr-review` and `pr-review-security` copy their v0.44.1 entries and
add `model-args`.
  - `intake-triage` copies its v0.42.0 entry and adds `claude-args`.
  - `maintenance-sync-standards` is a verbatim copy, as in #796.
  - Permissions and secrets are unchanged.
- A new test checks that each entry is exactly its predecessor plus its
one new input.
- Repins the same nine callers #796 repinned, from v0.44.1 to v0.45.0.
- `distribution/sync-manifest.yml`: claude-code-plugins'
`pr-review-hosted.yml` and `pr-review-security-hosted.yml` move from
`managed` to `locally-owned`. Code search finds resolve-config with a
`models:` block only in claude-code-plugins. azure-iac uses
resolve-config only for its token broker, and pr-pipeline-sandbox's
config has no `models:` block and is not a sync target. So the resolve
step is not reusable today, and the shared job graph stays unchanged.
- Behavior change for every intake-triage caller that relies on the
default: v0.45.0 runs Sonnet 5.5 at effort medium for 30 turns,
replacing the `claude-sonnet-5` pin. The owner chose this, after
research checked against Anthropic's effort guidance.

## Verification

- `Runner policy passed.`; runner-policy tests: 306 pass, 0 fail.
- `sync-manifest.test.sh`: 336 pass, 0 fail; `Manifest valid: 44
components, 14 targets.`; the repin-policy-lockstep tests pass (23 of
23).
- The claude-lanes, managed-files-guard and repin-callers shell tests: 3
passed, 0 failed.
- naming-lint, markdownlint, gitleaks and biome are clean.

## Related

- The owner signed off v0.45.0 by hand on 2026-10-17 (README rollout
paragraph).
- Next: the sync into claude-code-plugins, then that repository's
callers pass `model-route`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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