Repository navigation
feat: review polish + scale — nit consolidation, deterministic rules, eval corpus - #174
Conversation
…, OpenRouter input contract
4931-line cli.ts becomes a 117-line entrypoint (main, dispatch, script guard, public re-exports) plus 12 modules under src/cli/: shared.ts (ctx/deps/plumbing), review-shared.ts (review machinery + public types), and one module per command. Zero behavior change — all public imports from src/cli.js preserved via re-exports; no-emoji test allow-lists retargeted to the new paths. Generated by scripted statement-boundary split (mask-aware tokenizer for comments/strings/templates/regex literals); verified: typecheck 0 errors, lint clean, build emits dist/cli/, 1409 tests pass. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…elegates to src/
The action's comment posting layer hand-copied ~30 symbols from
src/report/{comment,viewmodel}.ts and src/review/inline.ts — drift-prone
manual parity guarded only by contract tests. Now:
- action/parity-entry.mjs lists the shared leaf set
- npm run build:parity bundles it to action/parity.cjs (esbuild, node20 cjs)
- sticky-comment.cjs destructures the bundle; local copies deleted
- npm run check:parity regenerates + diffs — wired into CI after check:dist
- cell/code/bestFindingProof exported from comment.ts to feed the bundle
sticky-comment.cjs 1690 -> 1533 lines; every contract-pinned leaf
(dedup keys, body parsing, verdict math, glyphs) is now generated, so
divergence is structurally impossible. 160 contract/golden tests green.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…d extractUsageCost Knip + codebase-memory graph cross-check found every flagged src/ export had zero external importers — most were export-by-default rather than deliberate surface. Demoted to module-internal across 45 files; deleted: - contracts.ts re-exports of LANE_IDS/LaneId (consumers use manifest.js) - pr.ts re-export of PrBodyInput + decisions.ts re-export of ProviderValue - extractUsageCost in cost.ts (zero callers anywhere) Public surface untouched: api.js exports and cli.ts re-exports unchanged. app/worker findings excluded (sub-project knip can't resolve). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…s U2-U7) Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…dist/ Measured baseline for the polish work: comment volume tracks diff size at 0.59 correlation, nit share runs 56-100% on recent PRs, dist/ gets reviewed (no ignore list), and zero-comment PRs coincide with the deepseek-stall window — silence is currently indistinguishable from clean. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
scripts/review-eval.mjs replays corpus entries (repo/base/head/labels) via code-review --base in a temp worktree, reads code-review.json, and emits per-entry metrics (findings/comments/severity/path-type/drops/ precision+recall when labels exist) plus a run file under docs/audits/eval/. compare prints per-metric deltas between runs — the adopt/reject gate for U3+ polish changes. Corpus seeds with 4 own PRs spanning the noise spectrum (52-comment worst case to docs-only). metricsFromReport unit-tested. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
….4.2 review.nitsInline (default false) keeps nit findings out of inline review comments — they consolidate into a capped <details> fold on the sticky instead, where findingsLine already counts them. Opt back in with review.nitsInline: true. Mirrored in TS (comment.ts nitsFold) and the action renderer (sticky-comment.cjs nitsFold), goldens regenerated. The corpus audit found most observed noise traced to a stale action pin (119cacd, Oct 1 — predates DEFAULT_REVIEW_EXCLUDE and the evidence-footer fix). Both the action uses: and trusted-argus checkout ref now pin to v0.4.2 (bc462fa); the contract test enforces they match. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The TS head renderer is byte-locked to the action's first screen (parity contract), so the consolidated nit fold belongs only in the CJS folds section - rendering it in head() broke the golden parity test. Removed the TS-side nitsFold; the fold lives in sticky-comment.cjs. Eval harness: stalled column in run/compare tables driven by exitCode/missing report - report.ok is the verdict flag (needs_changes reads false), not health. Recorded post-U3 replay of the 4-entry corpus: nit consolidation visible on pr126 (6 findings, 4 comments), comment cap on pr59 (36 findings, 20 comments). pr173 stalled on a deepseek timeout - model flake, the exact failure class the stalled column exists to expose. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- scripts/aacr-corpus.mjs converts the Apache-2.0 benchmark into eval corpus entries: base = dataset pr_source_commit (base tip at capture), head resolved live via gh api pulls/<n> .head.sha; entries whose head cannot resolve are dropped rather than replaying target-branch drift. - review-eval.mjs: URL repos init + SHA-fetch into a cache dir, deepen per-SHA until merge-base exists (separate fetches - a multi-SHA deepen raced .git/shadow rewrites), stalled = exit!=0 or missing report (never report.ok, which is the verdict flag), per-entry reports kept under docs/audits/eval/reports/. - 10-PR labeled baseline: precision 1.00 on 5/8 completed entries; the gap is recall - both Java elasticsearch PRs scored 0/0 on real diffs with correctly-anchored labels.
…l-gated Two rules that flag real events, not opinions, at nit severity so they fold into the U3 consolidated section instead of adding inline noise: - dep-diff: new deps and major version jumps in package.json. Tracks deps-block membership on raw hunk lines; mid-block adds without a visible opener still flag when the value is a version spec (real failure: esbuild landed outside the +-3-line context window and was missed until the spec gate). Minor/patch bumps are audit-records only. - missing-test: one file-level nit on the highest-churn source file when a diff changes code but touches no test path - an evidence ask, not a mandate. Excludes test/script/data/generated paths. Measured on the u5-dep-bump corpus entry (87c8a39 replay): both rules fired - 2 rule findings, dep flagged, missing-test nit on action/parity-entry.mjs.
scripts/eval-corpus.dogfood.json holds one merged PR per repo (orchestral, wisp, kurultai, OmaSeal, dayflow-linux, omarchy-plugins; all public, unauthenticated fetch). The dogfood-corpus workflow runs the eval harness from the checked-out default branch every Monday, so each run measures the current review code with no action pin to drift - the stale-pin lesson from the U3 audit applied to the harness itself. Per-repo tallies land in the step summary; run JSON + per-entry reports upload as artifacts for corpus curation (entries whose findings look wrong graduate into eval-corpus.argus.json as regression fixtures).
Living comparison of Argus against CodeRabbit, Alibaba open-code-review, TestDriver, PR-Agent, Greptile, cubic and Copilot review on the axes that decide the roadmap: executes code, evidence artifacts, hosting, cost model, trust boundary. Includes the adoption ledger pattern - each borrowed mechanism lands only behind an eval-harness measurement.
…corpus validation Code review of the polish-and-scale batch converged on real fixes: - sanitizeCommentText shared via parity bundle; nit/findings folds now defuse ]( links, @mentions, and </details> escapes (was the only surface rendering model-controlled nit text). - COLLAPSE_ORDER learned 'nits' so the lowest-value fold collapses under the comment budget instead of staying expanded. - review-eval: ARGUS_UNTRUSTED=1 on corpus children (fetched trees must never exec configs beside secrets), remote entries require 40-hex SHAs, leading-dash rejection, skipped reviews surface as 'skipped' and count in the all-stall tally gate, incremental flush, fetch timeouts, worktree prune, -dirty provenance + per-entry model, tag-scoped kept reports, tag sanitization. - ARGUS_NITS_INLINE env + nits-inline action input restore operator override on untrusted lanes; nit fold renders only on serialized nitsInline:false (no double-render on version-skew reports). - rulesLaneScans shares the secretsScan skipped-reason chain between code-review and scan; dep-diff tracks per-hunk block state and rejects engines/tooling keys in bare mode; generated-path classifiers converge on *.generated.*/go.sum/npm-shrinkwrap. - aacr-corpus: strict canonical PR URL parsing (look-alike hosts and http dropped), pr_target_commit never carried, resolveHead required. - dogfood corpus: full 40-hex SHAs; workflow gets runner labels, concurrency, 120min budget. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
AACR-Bench's pr_target_commit being target-branch drift (not PR head) cost a real debug cycle; the verification rule generalizes to any external dataset whose "commit" fields anchor replays. CONCEPTS.md gains replay corpus entry, stalled entry, and drift commit. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedToo many files! This PR contains 122 files, which is 22 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
⛔ Files ignored due to path filters (97)
📒 Files selected for processing (122)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Stale comment
Risk: high. Not approved. This is a large review-pipeline, action, and workflow change that exceeds the medium approval threshold; Cursor Bugbot was not present after the first poll, and human review is needed. No reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Argus: ⊘ needs changes98 findings, none reproduced · head
◆ 10 bugs · ◈ 4 risks · ○ 84 nits · 4 high-confidence · 7 suggestions ready to commit Findings (98)Reviewed 90 of 217 changed files (127 excluded by review.exclude). Reviewed all 19 chunks (90 of 90 files). The changes introduce significant updates to the Argus reviewer, including new features, documentation improvements, and CI/CD pipeline enhancements. Key areas addressed include the handling of nits, improved documentation for concepts and contributions, and refinements to the review evaluation process. Several minor nits and convention issues were identified and should be addressed for better maintainability and clarity. There are also a few correctness and security concerns that need to be resolved. 3 finding(s) dropped: anchored outside the reviewed diff.
78 inline comments not posted: Spend ledger
Code review: google/gemini-2.5-flash-lite · 208938 tokens · $0.028332 Diagnostics
Argus 0.4.2 · workflow run and evidence · report |
The v0.4.2 dogfood lane on PR #174 flagged that probe-authored content reading process.env.AUTH_TOKEN / PASSWD slipped the secrets gate (the API_KEY part of the finding was a false positive — \w*KEY already hit). Widening the alternation is the safe direction for a gate that only marks probe content as needing secret env. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Argus self-review triage (v0.4.2 lane on
New head |
There was a problem hiding this comment.
Stale comment
Risk: high. Not approved. This is a large review-pipeline, action, and workflow change that exceeds the medium approval threshold; Cursor Bugbot was not present after the first poll, and human review is needed. No reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
The v0.4.2 lane on #174 produced 3 findings against third-party code embedded in docs/audits/eval/reports/*.json — captured AACR-Bench and dogfood snapshots are data, not reviewable source. review.exclude replaces DEFAULT_REVIEW_EXCLUDE, so the config restates the defaults plus docs/audits/eval/**. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Round-2 triage (re-review on
New head |
There was a problem hiding this comment.
Risk: high. Not approved. This is a large review-pipeline, action, and workflow change that exceeds the medium approval threshold; Cursor Bugbot was not present after the first poll, and human review is needed. No reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
|
Round-3 triage (re-review on
|


Summary
Review polish and scale: PR reviews are now measurably less noisy and measurably less silent — nits consolidate into the sticky, deterministic rules cover what models miss, and an offline corpus harness replays real PRs so review-quality changes are adopted on evidence, not vibes.
What is now different:
code-review.json), withreview.nitsInline/nits-inline/ARGUS_NITS_INLINEas the opt-back-in. The comment cap can no longer let 14 low-value comments bury 2 real ones.dep-diff,missing-test) flag supply-chain and coverage gaps the model lane structurally ignores — eval-measured before adoption.scripts/review-eval.mjsreplays corpus entries (Argus dogfood PRs, AACR-Bench labeled PRs, six sibling repos weekly) through the productioncode-reviewpath in temp worktrees, with precision/recall against labeled issues, stall/skip health, and run-compare deltas.v0.4.2— the stale October pin was the actual root cause of the ~20-comment average: it predated the default exclude set.Eval evidence (4-PR Argus corpus replay): pr126 2→4 comments, pr59 14→20 (cap engaged), noise class visible per-entry. AACR-Bench labeled replay showed model precision ~1.00 on 5/8 entries — the gap is recall (missed Java findings), so the reflection pass stays deferred per the plan's adopt-only-if-it-moves-the-number gate.
Review-hardening layer (11-reviewer pass over this branch): model-controlled text in folds now goes through
sanitizeCommentText(links/mentions/</details>escape), corpus entries run underARGUS_UNTRUSTED(fetched trees can never exec configs beside secrets), remote corpus SHAs must be full 40-hex, and skip-vs-clean is now distinguishable in every eval surface.Plan:
docs/plans/2026-10-07-1900-feat-review-polish-scale-plan.md(U1-U7; U4b eval-deferred).Test plan
npm run typecheck/lint/build/check:parity— greendogfood-corpusworkflow — first scheduled/dispatch run post-mergeUnapplied review findings
Recorded for follow-up (11-reviewer pass; several are pre-existing or eval-gated, not regressions):
cmdCodeReviewremains a ~1,150-line function (pre-existing); extractrunRulesLane/buildCodeReviewReport/resolveReviewDiffas a separate refactor.buildScanMessagesrestates the findings-message contract inline — a sharedFINDINGS_CONTRACTis deferred because prompt wording changes need eval evidence, not just dedup.scanRepobuffers every walked file whole (pre-existing perf item, plan-listed candidate) and--no-indexdiffs untracked files serially (pre-existing).a0-plugin-argus/helpers/argus.pycomment grammar predates inline sentinels/KTD4 dedup — port at the next deliberate pin bump (downstream precondition).^2,latest,catalog:) miss; spec-shaped values deep in unlabeled non-dep blocks can still false-positive — tighten only after AACR measurement.*.generated.*,go.sum,npm-shrinkwrap); a single sharedpathKind()inscope.tsremains the real fix for the four drifting classifiers.resolveRepo/ensureSha/tallypaths, hostile-message fold text, skipped-render coverage,ARGUS_UNTRUSTEDpinning.OPENROUTER_API_KEYsecret is the dedicated capped eval key; verify action pinbc462fastays reachable post-merge.Generated with Devin