feat: Production-grade Polaris scan reliability#4
Merged
Conversation
- Harden Gemini integration: pinned SDK, JSON Schema output, 30s timeout,
90s total AI budget, gemini-2.5-flash fallback, sanitized error codes
- Graceful degradation: Gemini failure completes deterministic scan with
warning instead of failing the entire scan
- Strict AI evidence: AI findings require existing file, changed line,
exact redacted evidence, and verification agent approval
- Content protection: secrets redacted before Gemini, changed hunks only
- Trustworthy fixes: require exact unified diff, clean application,
syntax parsing, finding removal verification
- Secure apply: stale scan 409, concurrent apply idempotent
- Improved reporting: pending/success/failure/error lifecycle, coverage
and AI mode in summaries
- Retry support: POST /scans/{scan_id}/retry with auth
- Changed-line filtering and diff parsing
- Rule metadata with remediation guidance
- 21 new reliability tests, golden fixtures for all 4 formats
- CI workflow for backend tests, frontend checks, dep pinning
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Production-grade reliability overhaul for the Polaris scanner pipeline. Makes the system deterministic-first, evidence-driven, and resilient to AI failures.
Key Changes
Gemini Integration Hardening
google-genai==1.72.0, JSON Schema output, 30s per-call timeoutgemini-2.5-flashfallbackAI_RATE_LIMIT,AI_TIMEOUT,AI_INVALID_OUTPUT)Graceful Degradation
Strict AI Evidence Gate
Content Protection
Trustworthy Fixes
Improved Reporting
Retry Support
POST /scans/{scan_id}/retrywith authTests