feat: harden packaged reviewer runtime - #110
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis change centralizes review-root validation and Git pathspec generation, updates checklist scripts to consume injected or configured roots, and adds packaged review-mode execution with asset fingerprinting, judge environment propagation, checklist retries, and expanded tests. ChangesReview roots and checklist integration
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
85ee11f to
04284c2
Compare
6e36107 to
c75e582
Compare
**3 of 7 — review only this slice.** - Supersedes part of #95 - Predecessor: #108 - Base: `codex/review-stack-02-profile-hooks` - Next head: `codex/review-stack-04-baselines` - Landing: keep the stack frozen for review; after approval, collapse top-down into PR 1, then squash PR 1 to `main`. Package reviewer briefs, skills, and checklist scripts into an isolated review runtime; resolve effective target topology through one shared `skills/_devkit/review-roots.mjs` helper; and verify each checklist artifact before accepting a verdict. Ordinary commit/ship keeps exact registry-owned checklist commands, while packaged review mode treats gate-selected files as authoritative and preserves artifacts until verification. The committed Claude/Cursor projections are generated by `devkit sync-skills`; reviewer agent and SKILL prose is unchanged from the parent. - Reviewer selection, runtime, checklist, and evaluator integration: 4 files / 181 tests passed - Previously timing-sensitive ship/reship/reconcile regressions: 4 files / 103 tests passed serially - Review-vs-commit cleanup behavior covered for all seven checklist scripts - Empty topology, whitespace normalization, unsafe/pathspec-magic rejection, ship-mode non-inheritance, literal roots, and shared-helper cache invalidation covered - Self-host Claude/Cursor projections are byte-identical to canonical skill scripts/support - Reviewer benchmark comparability hash covers the extracted runtime and shared helper - Typecheck, build, Biome, and structure lint: PASS - Fallow reports no duplicated root-normalization implementation; remaining advisory findings are inherited checklist-family debt - Independent correctness, materialization, benchmark-hash, and packaged-asset contract reviews: PASS - Full commit gates, domain reviewers, and pre-push suite: enforced by `devkit ship`
633ecb8 to
fc02b10
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skills/_devkit/review-roots.mjs (1)
59-88: 📐 Maintainability & Code Quality | 🔵 TrivialDuplicate fallback logic in
resolveConfigRoots/resolveReviewRoots.Both functions repeat the same try/normalize/catch/warn/
['.']-fallback shape, differing only in where the raw roots come from. Consider extracting a sharednormalizeOrFallback(roots, name, reviewerName)helper to keep the two call sites in sync as this module evolves.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/_devkit/review-roots.mjs` around lines 59 - 88, Extract the shared normalize/try-catch/warning/fallback behavior from resolveConfigRoots and resolveReviewRoots into a normalizeOrFallback(roots, name, reviewerName) helper. Update both functions to obtain their existing raw roots and delegate normalization to that helper, preserving their current names, warning context, and ['.'] fallback behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@skills/_devkit/review-roots.mjs`:
- Around line 59-88: Extract the shared normalize/try-catch/warning/fallback
behavior from resolveConfigRoots and resolveReviewRoots into a
normalizeOrFallback(roots, name, reviewerName) helper. Update both functions to
obtain their existing raw roots and delegate normalization to that helper,
preserving their current names, warning context, and ['.'] fallback behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 21436a91-37ff-4f78-8365-7e73dcfbd72f
📒 Files selected for processing (37)
.claude/skills/_devkit/review-roots.d.mts.claude/skills/_devkit/review-roots.mjs.claude/skills/api-security/scripts/checklist.mjs.claude/skills/backend-performance/scripts/checklist.mjs.claude/skills/commit-guard/scripts/checklist.mjs.claude/skills/correctness/scripts/checklist.mjs.claude/skills/frontend-accessibility/scripts/checklist.mjs.claude/skills/frontend-performance/scripts/checklist.mjs.claude/skills/frontend-security/scripts/checklist.mjs.cursor/skills/_devkit/review-roots.d.mts.cursor/skills/_devkit/review-roots.mjs.cursor/skills/api-security/scripts/checklist.mjs.cursor/skills/backend-performance/scripts/checklist.mjs.cursor/skills/commit-guard/scripts/checklist.mjs.cursor/skills/correctness/scripts/checklist.mjs.cursor/skills/frontend-accessibility/scripts/checklist.mjs.cursor/skills/frontend-performance/scripts/checklist.mjs.cursor/skills/frontend-security/scripts/checklist.mjs.devkit/skills-manifest.jsoncli/__tests__/checklist-scripts.test.mtseslint/baselines/size-lines.jsongate-engine/judge/run-judge.mtsgate-engine/review/__tests__/reviewers.test.mtsgate-engine/review/__tests__/run-review.test.mtsgate-engine/review/eval/reviewers/corpus.mtsgate-engine/review/reviewers.mtsgate-engine/review/run-review.mtsgate-engine/review/runtime.mtsskills/_devkit/review-roots.d.mtsskills/_devkit/review-roots.mjsskills/api-security/scripts/checklist.mjsskills/backend-performance/scripts/checklist.mjsskills/commit-guard/scripts/checklist.mjsskills/correctness/scripts/checklist.mjsskills/frontend-accessibility/scripts/checklist.mjsskills/frontend-performance/scripts/checklist.mjsskills/frontend-security/scripts/checklist.mjs
…line The runtime extraction compressed five rationale comments on code that did not change: the timeout-budget block (measured SIGKILL/421s data + the 600s foreground tool cap caveat), the model-telemetry pin rationale, the readChecklistState/cleanupChecklistState contracts, and the skill-less reviewer anti-hallucination note. Restored verbatim from main; run-review.mts re-frozen at its true 646 lines (comment restoration, not new debt). Also applies the biome format fix to ship-branch.test.mts:1333 — a pre-existing lint error inherited via the #108 merge that currently fails repo-wide 'biome check .' on every commit and in CI; bundled here only because it blocks this and every subsequent commit.
## Stack **4 of 7 — review only this slice.** - Supersedes part of #95 - Predecessor: #110 - Base: `codex/review-stack-03-reviewer-runtime` - Next head: `codex/review-stack-05-command` - Landing: keep the stack frozen for review; after approval, collapse top-down into PR 1, then squash PR 1 to `main`. ## Scope Add the review-only merge-base regression engine for ESLint and Fallow. It compares the final staged PR snapshot against an immutable merge-base worktree, preserves finding multiplicity, maps unchanged clone ranges through staged diff hunks, normalizes Git renames without grandfathering copies or touched ranges, and never rewrites repository baselines. Wiring it into the public command follows in Slice 5. ## Validation - Baseline parsing, ESLint subtraction, rename/line-shift handling, touched-range invalidation, Fallow baseline generation, and failure behavior: 1 file / 9 tests passed - Independent correctness recheck: PASS - Typecheck, Biome, and structure lint: PASS (`baseline-gate.mts` 488 lines) - Fallow new-only audit: PASS with zero introduced complexity, duplication, or dead code - Exact Slice boundary: three new files, no overlap with PR #110 - Full commit gates, domain reviewers, and pre-push suite: enforced by `devkit ship`
…runtime feat: harden packaged reviewer runtime
## Stack **4 of 7 — review only this slice.** - Supersedes part of #95 - Predecessor: #110 - Base: `codex/review-stack-03-reviewer-runtime` - Next head: `codex/review-stack-05-command` - Landing: keep the stack frozen for review; after approval, collapse top-down into PR 1, then squash PR 1 to `main`. ## Scope Add the review-only merge-base regression engine for ESLint and Fallow. It compares the final staged PR snapshot against an immutable merge-base worktree, preserves finding multiplicity, maps unchanged clone ranges through staged diff hunks, normalizes Git renames without grandfathering copies or touched ranges, and never rewrites repository baselines. Wiring it into the public command follows in Slice 5. ## Validation - Baseline parsing, ESLint subtraction, rename/line-shift handling, touched-range invalidation, Fallow baseline generation, and failure behavior: 1 file / 9 tests passed - Independent correctness recheck: PASS - Typecheck, Biome, and structure lint: PASS (`baseline-gate.mts` 488 lines) - Fallow new-only audit: PASS with zero introduced complexity, duplication, or dead code - Exact Slice boundary: three new files, no overlap with PR #110 - Full commit gates, domain reviewers, and pre-push suite: enforced by `devkit ship`
…runtime feat: harden packaged reviewer runtime
## Stack **4 of 7 — review only this slice.** - Supersedes part of #95 - Predecessor: #110 - Base: `codex/review-stack-03-reviewer-runtime` - Next head: `codex/review-stack-05-command` - Landing: keep the stack frozen for review; after approval, collapse top-down into PR 1, then squash PR 1 to `main`. ## Scope Add the review-only merge-base regression engine for ESLint and Fallow. It compares the final staged PR snapshot against an immutable merge-base worktree, preserves finding multiplicity, maps unchanged clone ranges through staged diff hunks, normalizes Git renames without grandfathering copies or touched ranges, and never rewrites repository baselines. Wiring it into the public command follows in Slice 5. ## Validation - Baseline parsing, ESLint subtraction, rename/line-shift handling, touched-range invalidation, Fallow baseline generation, and failure behavior: 1 file / 9 tests passed - Independent correctness recheck: PASS - Typecheck, Biome, and structure lint: PASS (`baseline-gate.mts` 488 lines) - Fallow new-only audit: PASS with zero introduced complexity, duplication, or dead code - Exact Slice boundary: three new files, no overlap with PR #110 - Full commit gates, domain reviewers, and pre-push suite: enforced by `devkit ship`
What this PR does
Makes review-mode judges use current packaged reviewer assets and one shared target-topology resolver instead of trusting reviewer files from the target checkout.
Why this slice exists
The owners-web smoke test showed that missing target-local reviewer files and empty repository topology could silently skip domain reviewers. This slice makes the selected packaged reviewer/checklist contract authoritative.
Review carefully
skills/,.claude/skills/and.cursor/skills/projections remain byte-equivalent.Explicit non-goals
devkit reviewcommand.Stack position
These PRs currently target one another. Landing them individually requires retargeting/rebasing each successor after its predecessor lands; otherwise wait until the full stack has been reviewed and use an agreed stack-collapse strategy.
Size and validation evidence
devkit ship; focused regression tests are included in the diff.Summary by CodeRabbit