argus-reviewer-e2e 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/action/action.yml CHANGED
@@ -51,6 +51,10 @@ inputs:
51
51
  description: Cap on inline review comments posted per run; overflow is summarized in the sticky. Overrides review.maxComments when set.
52
52
  default: ''
53
53
  required: false
54
+ code-model:
55
+ description: Optional OpenRouter model slug for code review (e.g. openai/gpt-5-mini). Wins over the checkout's config code_model — including on pull_request events, where PR config never executes.
56
+ default: ''
57
+ required: false
54
58
  install-consumer-dependencies:
55
59
  description: Explicitly install the consumer project's dependencies for a trusted runtime lane. Disabled by default so code review never runs PR-controlled lifecycle scripts beside secrets.
56
60
  default: 'false'
@@ -138,6 +142,7 @@ runs:
138
142
  ARGUS_BROWSER: ${{ inputs.browser }}
139
143
  ARGUS_BUDGET_USD: ${{ inputs.budget-usd }}
140
144
  ARGUS_MAX_COMMENTS: ${{ inputs.max-comments }}
145
+ ARGUS_CODE_MODEL: ${{ inputs.code-model }}
141
146
  run: node "$ARGUS_ACTION_PATH/bootstrap.mjs"
142
147
 
143
148
  - name: Reject executable lanes on untrusted pull requests
@@ -204,6 +209,7 @@ runs:
204
209
  ARGUS_DEBUG: '1'
205
210
  ARGUS_DIFF_BASE: ${{ inputs.diff-base }}
206
211
  ARGUS_BUDGET_USD: ${{ inputs.budget-usd }}
212
+ ARGUS_CODE_MODEL: ${{ inputs.code-model }}
207
213
  ARGUS_REVIEWER_TRACE: >-
208
214
  {"repo":"${{ github.repository }}",
209
215
  "pr":"${{ github.event.pull_request.number }}",
@@ -13,6 +13,7 @@ import {
13
13
  setActionOutput,
14
14
  validateBrowser,
15
15
  validateBudget,
16
+ validateCodeModel,
16
17
  validateMaxComments,
17
18
  validatePathInput,
18
19
  validateVersion,
@@ -29,6 +30,7 @@ const reportDir = validatePathInput(
29
30
  validateBrowser(process.env.ARGUS_BROWSER || 'chromium')
30
31
  validateBudget(process.env.ARGUS_BUDGET_USD)
31
32
  validateMaxComments(process.env.ARGUS_MAX_COMMENTS)
33
+ validateCodeModel(process.env.ARGUS_CODE_MODEL)
32
34
 
33
35
  async function stageConfig() {
34
36
  if (configInput === '' || configInput === 'argus-reviewer.config.ts') return
@@ -93,6 +93,18 @@ export function validateMaxComments(raw) {
93
93
  return Number(raw)
94
94
  }
95
95
 
96
+ export function validateCodeModel(raw) {
97
+ if (raw === undefined || raw === '') return undefined
98
+ const value = String(raw).trim()
99
+ // OpenRouter slugs are `vendor/model` with an optional `:variant`
100
+ // (`deepseek/deepseek-r1:free`). Env-only value — no shell — but keep it
101
+ // to slug-shaped input so typos surface here instead of at the API.
102
+ if (!/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$/.test(value)) {
103
+ throw new Error('code-model must be an OpenRouter model slug (e.g. openai/gpt-5-mini)')
104
+ }
105
+ return value
106
+ }
107
+
96
108
  export function resolveWorkingDirectory(workspace, input) {
97
109
  const root = realpathSync(resolve(workspace))
98
110
  const requested = String(input ?? '').trim()
package/dist/cli.js CHANGED
@@ -1135,6 +1135,12 @@ async function cmdCodeReview(args, ctx, deps) {
1135
1135
  // (github.event.pull_request.number is empty), and '' is not nullish.
1136
1136
  const pr = fixtureDir !== undefined ? '0' : trace?.pr || trustResult.pr;
1137
1137
  const token = ctx.env.GITHUB_TOKEN ?? ctx.env.GH_TOKEN;
1138
+ // ARGUS_CODE_MODEL is an operator surface (workflow/plugin env) and wins
1139
+ // over checkout config — in the untrusted lane it is the only way to pick
1140
+ // the review model, since PR-controlled config never executes.
1141
+ const envCodeModel = ctx.env.ARGUS_CODE_MODEL?.trim();
1142
+ if (envCodeModel !== undefined && envCodeModel !== '')
1143
+ config.code_model = envCodeModel;
1138
1144
  const model = config.code_model ?? config.model;
1139
1145
  debug('code-review', `repo=${repo ?? 'none'} pr=${pr ?? 'none'} model=${model} budget=${config.codeReviewBudgetUsd ?? 'unlimited'}`);
1140
1146
  const skip = async (reason) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argus-reviewer-e2e",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "argus-reviewer — open-source vision-model E2E testing harness. Record, replay, heal, and assert with any OpenRouter model under a hard budget cap.",
5
5
  "type": "module",
6
6
  "license": "MIT",