Repository navigation
Allow repository-specific OpenRouter diff budgets #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,6 +179,10 @@ jobs: | |
| roast_level: professional | ||
| status_comments: "true" | ||
| max_tool_turns: ${{ steps.pr.outputs.turns }} | ||
| # Configure this on the target repository, not organization-wide. | ||
| # Keep review budgets modest (e.g. 512 KiB); the action validates | ||
| # positive integers. | ||
| max_diff_kb: ${{ vars.OPENROUTER_MAX_DIFF_KB || '300' }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 max_diff_kb input may not exist on the pinned action commit, silently leaving the default 300 KB budget ( The PR's stated purpose is that a Support Desk full-PR review includes every changed hunk instead of stubs. If The workflow is the only file in this repo that references the action, and a repo-wide grep for A one-line confirmation that the pinned action's
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disputed with verified pinned-action and actual repository-configuration evidence: #19 (comment). Existing action input validation remains authoritative; Support Desk override is repository-scoped. Leaving this thread unresolved for visibility.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Org-level variable visibility leaks the Support Desk budget to every repo under the org ruleset ( The comment says the override is "bounded repository overrides" (i.e., per-repo), but The concrete cost is a large diff budget (plus token cost) being applied to every repo's reviews when only one repo needs it. Repo-level variables override org variables, so the safe configuration is a repo-level variable on the Support Desk repo, or an org variable scoped to "Selected repositories". Nothing in the workflow or the PR body states that constraint, so an operator can plausibly set the org variable and not notice the blast radius.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disputed with verified pinned-action and actual repository-configuration evidence: #19 (comment). Existing action input validation remains authoritative; Support Desk override is repository-scoped. Leaving this thread unresolved for visibility. |
||
| env: | ||
| OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} | ||
|
|
||
|
|
@@ -189,6 +193,7 @@ jobs: | |
| ACTION: ${{ github.event.action }} | ||
| KEY_PRESENT: ${{ steps.key.outputs.present }} | ||
| SCOPE: ${{ steps.pr.outputs.scope }} | ||
| MAX_DIFF_KB: ${{ vars.OPENROUTER_MAX_DIFF_KB || '300' }} | ||
| VERDICT: ${{ steps.review.outputs.verdict }} | ||
| ISSUES: ${{ steps.review.outputs.issue_count }} | ||
| REVIEW_URL: ${{ steps.review.outputs.review_url }} | ||
|
|
@@ -202,6 +207,7 @@ jobs: | |
| echo "| Eligible | \`${REVIEW_ELIGIBLE}\` |" | ||
| echo "| Secret present | \`${KEY_PRESENT:-n/a}\` |" | ||
| echo "| Scope | \`${SCOPE:-n/a}\` |" | ||
| echo "| Diff budget (KiB) | \`${MAX_DIFF_KB}\` |" | ||
| echo "| Models | \`${OR_MODELS}\` |" | ||
| echo "| Requested routes | \`${OR_MODEL_ROUTES}\` |" | ||
| echo "| Judge | \`${OR_JUDGE}\` |" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 No workflow-side validation of OPENROUTER_MAX_DIFF_KB; any non-positive or non-integer value fails the required check for every PR in the repo (
risk)If a repo admin sets
OPENROUTER_MAX_DIFF_KBto something invalid (e.g."0","abc","1.5","-5", or a whitespace-only string like" 400"), the|| '300'fallback only covers unset/empty values, so the invalid value is passed straight to the action'smax_diff_kbinput and the action's positive-integer validation fails. The consequence is that the required check turns red for every PR in that repo until the variable is fixed — and the failure is opaque, because the Summary step doesn't show the effective budget and nothing in the workflow names the variable as the culprit.The workflow is the only gate:
vars.OPENROUTER_MAX_DIFF_KBis read at line 180 with no validation, and a repo-wide grep finds no other place that checks the value. Note the PR body's claim that the action validates the value is contributor data — the pinned action (FlyOverCoderKY/openrouter-pr-review-action@4471f596) is external and not verifiable from this checkout, so the exact failure mode (hard fail vs. silent ignore) is a proof gap.A cheap guard — a
grep -E '^[0-9]+$'step before the action, or a warning when the variable is non-empty but non-numeric — would make the failure mode visible and diagnosable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disputed with verified pinned-action and actual repository-configuration evidence: #19 (comment). Existing action input validation remains authoritative; Support Desk override is repository-scoped. Leaving this thread unresolved for visibility.