Repository navigation
Allow repository-specific OpenRouter diff budgets - #19
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
OpenRouter review posted ( |
|
@codex security review |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: issues
Scope: full-pr (full-pr)
Mode: initial
Commit: bf7ed285cd233088746acb14017a6d7dd2bc49d4
Judge: openai/gpt-5.6-luna (repaired(canonical+6): source coverage preserved before publication cap)
Cost: $0.0354 (lanes $0.0328 + judge $0.0026)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 14.5s, 20522+467 tokens (12492 cached), 3 tool round(s), via Azure, $0.0286)z-ai/glm-5.3-flash: ok (6 finding(s), 161.6s, 41877+10426 tokens (24895 cached), 6 tool round(s), via OpenInference, $0.0042)
Findings
🟠 Issue 1 — 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
.github/workflows/openrouter-code-review.yml:180 · risk · identified by z-ai/glm-5.3-flash
If a repo admin sets OPENROUTER_MAX_DIFF_KB to 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's max_diff_kb input 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_KB is 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.
🟠 Issue 2 — max_diff_kb input may not exist on the pinned action commit, silently leaving the default 300 KB budget
.github/workflows/openrouter-code-review.yml:180 · risk · identified by z-ai/glm-5.3-flash
The PR's stated purpose is that a Support Desk full-PR review includes every changed hunk instead of stubs. If max_diff_kb is not a declared input in the pinned action's action.yml (FlyOverCoderKY/openrouter-pr-review-action@4471f5963751223c26a2e169d78c0f13817165aa), GitHub Actions emits only a warning about unexpected inputs and the review runs at the default 300 KB — meaning the PR's goal silently does nothing until someone notices stubs in a review body again.
The workflow is the only file in this repo that references the action, and a repo-wide grep for max_diff_kb finds only the new line, so there is no in-repo documentation or test pinning the input contract. The PR body's claim that the input is "documented" on the action is contributor data; the action itself is not reachable from this checkout, so the input contract is unverified.
A one-line confirmation that the pinned action's action.yml declares max_diff_kb (and validates it as a positive integer) would close this gap.
🟠 Issue 3 — Org-level variable visibility leaks the Support Desk budget to every repo under the org ruleset
.github/workflows/openrouter-code-review.yml:180 · risk · identified by z-ai/glm-5.3-flash
The comment says the override is "bounded repository overrides" (i.e., per-repo), but vars.OPENROUTER_MAX_DIFF_KB resolves org variables too, and this workflow is the org-required review for every pegma-dev repository. If the Support Desk budget is configured as an org-level variable with "all repositories" visibility, every repo inherits the larger budget — the intended repo-level override is not enforced anywhere in this file.
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.
🟠 Issue 4 — No upper bound on the override; a very large budget can blow the 30-minute job timeout and OpenRouter cost
.github/workflows/openrouter-code-review.yml:179 · risk · identified by z-ai/glm-5.3-flash
The word "bounded" in the new comment only refers to the action's positive-integer validation — there is no upper bound in the workflow. A repo admin who sets OPENROUTER_MAX_DIFF_KB to, say, 100000 embeds up to ~100 MB of diff into the review, and the review can exceed timeout-minutes: 30, turning the required check red for exactly the large PRs the override was meant to fix (the header's list of accepted red modes includes the job timeout, but that's a failure mode here, not a review outcome).
The workflow header already documents that the job timeout is one of the few ways the check can turn red, so the cost of an unbounded variable is real and silent. An upper clamp (or at least a note in the comment stating the variable must be set at repo level and kept modest) would prevent the failure scenario.
🔵 Issue 5 — Summary step does not surface the effective max_diff_kb budget
.github/workflows/openrouter-code-review.yml:186 · nit · identified by z-ai/glm-5.3-flash
The Summary table lists Models, Judge, Scope, Verdict, and Issues but not the budget actually used. When a reviewer or operator is debugging a misconfigured OPENROUTER_MAX_DIFF_KB (or a silent fallback to 300 because the variable is unset/empty), the run summary gives no signal — the only visible symptom is a review with stubbed large files or a failed validation, with no way to tell which knob is wrong.
Adding max_diff_kb to the summary table (e.g. \${{ vars.OPENROUTER_MAX_DIFF_KB || '300' }}` as a row) would make both the override and the fallback visible in the run UI.
🔵 Issue 6 — Comment overclaims: the override applies to every run, not only full-PR reviews
.github/workflows/openrouter-code-review.yml:179 · nit · identified by z-ai/glm-5.3-flash
The new comment says "Allow bounded repository overrides for large full-PR reviews", but the input is set on the single action step used for both scopes — latest-commit runs (incremental reviews after a ledger exists) inherit the same larger budget. The behavior is harmless (latest-commit diffs are small), but the comment overclaims the scope, which matters for future readers reasoning about which lane a variable affects.
A repo-wide grep confirms the only other place the override is mentioned is the PR body, which also frames it as a full-PR fix. Rewording the comment to "for large reviews" (or noting it applies to both scopes) would match the actual behavior.
| status_comments: "true" | ||
| max_tool_turns: ${{ steps.pr.outputs.turns }} | ||
| # Allow bounded repository overrides for large full-PR reviews. | ||
| max_diff_kb: ${{ vars.OPENROUTER_MAX_DIFF_KB || '300' }} |
There was a problem hiding this comment.
🟠 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_KB to 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's max_diff_kb input 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_KB is 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.
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.
| status_comments: "true" | ||
| max_tool_turns: ${{ steps.pr.outputs.turns }} | ||
| # Allow bounded repository overrides for large full-PR reviews. | ||
| max_diff_kb: ${{ vars.OPENROUTER_MAX_DIFF_KB || '300' }} |
There was a problem hiding this comment.
🟠 max_diff_kb input may not exist on the pinned action commit, silently leaving the default 300 KB budget (risk)
The PR's stated purpose is that a Support Desk full-PR review includes every changed hunk instead of stubs. If max_diff_kb is not a declared input in the pinned action's action.yml (FlyOverCoderKY/openrouter-pr-review-action@4471f5963751223c26a2e169d78c0f13817165aa), GitHub Actions emits only a warning about unexpected inputs and the review runs at the default 300 KB — meaning the PR's goal silently does nothing until someone notices stubs in a review body again.
The workflow is the only file in this repo that references the action, and a repo-wide grep for max_diff_kb finds only the new line, so there is no in-repo documentation or test pinning the input contract. The PR body's claim that the input is "documented" on the action is contributor data; the action itself is not reachable from this checkout, so the input contract is unverified.
A one-line confirmation that the pinned action's action.yml declares max_diff_kb (and validates it as a positive integer) would close this gap.
There was a problem hiding this comment.
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.
| status_comments: "true" | ||
| max_tool_turns: ${{ steps.pr.outputs.turns }} | ||
| # Allow bounded repository overrides for large full-PR reviews. | ||
| max_diff_kb: ${{ vars.OPENROUTER_MAX_DIFF_KB || '300' }} |
There was a problem hiding this comment.
🟠 Org-level variable visibility leaks the Support Desk budget to every repo under the org ruleset (risk)
The comment says the override is "bounded repository overrides" (i.e., per-repo), but vars.OPENROUTER_MAX_DIFF_KB resolves org variables too, and this workflow is the org-required review for every pegma-dev repository. If the Support Desk budget is configured as an org-level variable with "all repositories" visibility, every repo inherits the larger budget — the intended repo-level override is not enforced anywhere in this file.
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.
There was a problem hiding this comment.
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.
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
R1 triage before the fix push:
The patch will address r1-4's wording/operational guidance, r1-5's effective-budget summary, and r1-6's scope wording. No new hard upper-limit policy or model/security redesign is needed for the specific 512 KiB repository override. Invalid values continue to fail closed through the existing action validation. The branch has been locally rebased onto PR #18's d3b814c main, preserving its Sol lane, US route, and action pin. Disputed threads remain unresolved for visibility. Fresh current-head checks/reviews will run after the fix push, and Support Desk's full-coverage review will be checked after this caller lands. |
bf7ed28 to
f2ce0d9
Compare
|
@codex security review |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: clean
Scope: rebase (full-pr)
Mode: verify
Commit: f2ce0d94a1c43424841fdbf1ae059195c88c9aa4
Judge: openai/gpt-5.6-luna
Cost: $0.0591 (lanes $0.0589 + judge $0.0001)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 25.1s, 42810+1147 tokens (28961 cached), 3 tool round(s), via Azure, $0.0539)z-ai/glm-5.3-flash: ok (0 finding(s), 44.7s, 47080+6330 tokens (28672 cached), 3 tool round(s), via InferenceNet, $0.0051)
Round 2 resolution
- 🤝
r1-1disputed — 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: The technical rebuttal establishes intentional fail-fast validation in the pinned action, including whitespace stripping and an input-specific error. Duplicating that parser in the workflow is unnecessary. The current workflow also surfaces OPENROUTER_MAX_DIFF_KB in its always-running summary. No current repository evidence invalidates the rebuttal. - 🤝
r1-2disputed — max_diff_kb input may not exist on the pinned action commit, silently leaving the default 300 KB budget: The current action pin is 0d6a05e41616281368c1f6bb7fb5a47ddf41375d, matching the rebuttal's specific input-declaration, environment-export, parser, and collection references. No local evidence contradicts that contract. The external action is unavailable in this inert checkout, so it could not be independently reread; that limitation is not new evidence that the input is unsupported. - 🤝
r1-3disputed — Org-level variable visibility leaks the Support Desk budget to every repo under the org ruleset: Normal GitHub organization/repository variable precedence is intentional, not a newly introduced configuration leak. The supplied configuration readback identifies a repository-scoped Support Desk override, and the current comment explicitly directs operators to configure the target repository rather than the organization. No current evidence shows an organization-wide override. - ✅
r1-4fixed correctly — No upper bound on the override; a very large budget can blow the 30-minute job timeout and OpenRouter cost: The original finding explicitly accepted modest-budget operational guidance as an alternative to a hard clamp. The current comment removes the misleading 'bounded' claim, directs configuration to the target repository, and recommends modest budgets with a concrete 512 KiB example. This implements that accepted repair; it does not claim to enforce an upper limit. - ✅
r1-5fixed correctly — Summary step does not surface the effective max_diff_kb budget: The Summary step now receives MAX_DIFF_KB using the same variable expression and 300 fallback as the action input, and prints a 'Diff budget (KiB)' row. Its existing always() condition also exposes the configured value after an action failure. - ✅
r1-6fixed correctly — Comment overclaims: the override applies to every run, not only full-PR reviews: The replacement comment refers to review budgets without restricting the override to full-PR reviews. It accurately describes the input shared by full-pr and latest-commit runs. - Open findings after this round: 0 (0 bug-severity).
No structured findings from the successful lane(s).
|
Fixed body-only r1-5 in f2ce0d9: the summary receives and safely prints the effective diff budget from the same default-300 expression used by the action. Current-head security and review are requested again; the three disputed findings retain concrete primary-source/configuration evidence and remain visible. |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
The bounded Copilot review window has expired. Review was requested around 03:27 UTC and again for current head f2ce0d9. At 04:04 UTC, the reviews, conversation comments, and requested-reviewer readbacks still show no observable Copilot review activity. This is an unavailable-reviewer fallback, not a passing Copilot review, and no quota or authentication cause is inferred. Current-head completed evidence is clean: OpenRouter review 5816460670 has both actual lanes successful, a decoded ledger with 0 OPEN findings, and the complete one-file full-PR diff embedded without truncation or stubs; standalone security receipt 6716832244 reports no issues. The required check is successful and the PR is mergeable. The six-line patch was inspected against PR #18 main and preserves its model route, action pin, permissions, and ledger behavior. Proceeding under the existing bounded fallback while keeping disputed threads visible. |
Large Support Desk PRs exceed the review action's default 300 KiB embedded diff budget, leaving changed files represented only by stubs. The required workflow now forwards OPENROUTER_MAX_DIFF_KB to the documented max_diff_kb input for both full and incremental reviews, retaining 300 when unset. Its run summary shows the effective budget.
Configure the variable on the target repository and keep budgets modest; Support Desk's repository-only value is set and read back as 512. No organization variable was created. Existing action validation rejects invalid values before model execution; this change adds no new hard upper-limit policy.
The branch is rebased onto PR #18's current main and preserves Sol, Azure US routing, the action pin, permissions, scope selection, ledger handling, tool turns, failure behavior, and authentication. The actual pinned action declares max_diff_kb.
Validation: inspected the exact six-line diff, pinned input/parser contract, and repository-variable readback. Whitespace and control-byte checks passed. No application tests apply to this workflow wiring. Current-head review and required checks remain required before merge. Support Desk PR #39 stays a draft and will receive a new complete full-PR review after this caller lands.