Feat: PR diff viewer, review accuracy overhaul (grounding, gates, gatekeeper), and provider/module cleanup - #55
Open
devarshishimpi wants to merge 20 commits into
Open
Feat: PR diff viewer, review accuracy overhaul (grounding, gates, gatekeeper), and provider/module cleanup#55devarshishimpi wants to merge 20 commits into
devarshishimpi wants to merge 20 commits into
Conversation
…nhance utility functions
- Updated button styles for primary variant to include border and hover effects. - Implemented session-scoped caching in `useJobDetail` hook to improve performance by reading from sessionStorage. - Added a new `highlight` utility for syntax highlighting in the diff viewer, supporting multiple languages. - Refactored dashboard and job detail pages to improve UI and user experience, including tab navigation for job details. - Replaced icons in the dashboard and jobs pages for better visual representation. - Updated job logs page to enhance file status representation with badges. - Introduced GraphQL support in GitHub client for more efficient data fetching. - Enhanced database queries to support filtering by pull request number. - Updated shared schema to include new query parameters. - Added tests to ensure UI flows are functioning correctly.
Conflicts were limited to package.json / package-lock.json, where main's Dependabot bumps overlapped this branch's own dependency changes. Resolution takes the newer of each side: - wrangler ^4.114.0 (main) over ^4.110.0 - @cloudflare/vitest-pool-workers ^0.18.8, concurrently ^9.2.4 (main) - vitest ^4.1.10 (this branch) so it stays in lockstep with @vitest/browser and @vitest/browser-playwright, which pin an exact peer - Base UI retained and the Radix packages stay removed package-lock.json was regenerated from scratch rather than hand-merged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…proving omission reasons in review summary
This comment was marked as resolved.
This comment was marked as resolved.
Findings must quote the diff line they describe; unmatched quotes are dropped as hallucinations and the quote becomes the comment anchor. Response schemas are now per call, fixing a verification pass that was silently a no-op. Fingerprint + anchor hash stop re-posting findings on later commits, and webhook feedback suppresses ones humans delete. Adds nit priority, min_severity default P3, and consolidates migrations 003-008.
Cap quota 429s at 2 per file and defer the rest instead of walking the whole fallback chain; honor Google's body-stated cool-off. Size the per-file subrequest estimate from the chain length, and yield 8s (was 2s) so chunks stop sharing one invocation's budget. Move max_files to an instance-wide setting (1-500, default 200) and report files left over the cap in the review summary.
Add claim_type per finding, a disposition column recording which stage dropped it (was just posted=false), and shadow-eval logging for candidate filter rules. Drop the merged React language entry, which was double- checklisting .tsx files and causing hook-dependency false positives.
…an labels Enforce grounding on every provider, deny risky claim types by default, and rework verification into a subtractive pass with per-drop reasons. Add dashboard right/wrong labels on findings. Also fix temperature-0 sampling, migration lock scoping, and quote-folding for evidence matches.
…d JSONB encoding fixes Extract review.ts into focused modules (review-budget, review-diff-cache, review-request, verify-findings) and add a regex-based rule channel (rules/detect.ts, rules/table.ts) alongside the LLM, tagged via new source/rule_id columns for per-channel precision tracking. Add Google Vertex as a distinct provider (OAuth2 vs API keys) and a centralized SSRF guard for operator-supplied provider base URLs. Fix a jsonb encoding bug where JSON.stringify() bound to $n::jsonb stored a string scalar instead of an object across six columns; writers now bind $n::text::jsonb. Also adds fingerprint_v2 for recurrence detection. Client: PR diff UI additions (file-tree, prompt-diff, selection helpers) and removal of unused sparkline/card/dropdown-menu/meter components.
…te migrations Add eslint max-lines (400) and import-boundary rules, then break up every file that exceeded it — review.ts, github.ts, model-output.ts, model.ts, jobs.ts, schema.ts — into directories of cohesive modules behind unchanged barrel exports. verify-findings.ts folds into finding-gates.ts and review/gate-pipeline.ts. Fold migrations 004-009 into 003_grounding.sql (fresh-installs only) and patch 001_initial.sql defensively. Add migrate-sql-split.mjs for per-statement SQL execution, and split setup-cloudflare.js into setup-helpers.js/setup-provisioning.js. Reorganize test/ to mirror the new module boundaries.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Files-changed diff viewer. Job detail has a real diff view with syntax highlighting, findings shown next to the lines they're about, and a file tree, plus overview/files/logs tabs.
file_reviews.diff_inputis no longer persisted;GET /api/jobs/:id/diffsrebuilds it from the KV cache the job wrote or, once that expires, from GitHub using the job's own base and head commits so it still matches what was reviewed.Review accuracy, the bigger effort. This took several passes:
.tsxfiles and causing false positives around hook dependencies.Reliability fixes. Quota 429s are now capped at 2 per file with the rest deferred instead of walking the whole fallback chain, honoring the cool-off Google's response actually states.
max_filesmoved to an instance-wide setting (1 to 500, default 200) with leftover files reported in the summary. Also fixed a jsonb encoding bug whereJSON.stringify()bound straight to$n::jsonbwas storing a string scalar instead of an object, across six columns.Providers. Added xAI and a proper Google Vertex provider (OAuth2 instead of API keys), plus a centralized SSRF guard for operator-supplied provider base URLs.
Big refactor. Added an eslint max-lines rule (400) and broke up every file that exceeded it,
review.ts,github.ts,model-output.ts,model.ts,jobs.ts,schema.ts, into directories of smaller modules behind unchanged barrel exports, so nothing importing these should need to change. Migrations 004 through 009 got folded back into003_grounding.sqlfor fresh installs, and tests were reorganized to mirror the new module layout.UI. Radix to
@base-ui/react, reworked core primitives, and redesigned stats, repos, jobs, settings, landing, and the app shell. Session caching inuseJobDetail, GraphQL in the GitHub client, PR-number filtering on jobs, and new account settings with a display name and IANA timezone.Before merging: this needs a fresh migration run and a clean
npm ci(Base UI replaces the Radix packages, and the eslint/lint tooling changed too).Closes #42 #44
Part of #40 #43
Type of change
How Has This Been Tested?
Test suite was reorganized alongside the module split (
test/api/,test/findings/,test/review/,test/model/), with new coverage for evidence grounding, claim types, finding suppression, quota deferral, max-files capping, jsonb encoding, and the SQL migration splitter.test/api.spec.tswas split into per-route files.Checklist: