fix(review): include mutable prompt inputs in ai slop cache fingerprint - #4073
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4073 +/- ##
=======================================
Coverage ? 93.56%
=======================================
Files ? 381
Lines ? 35480
Branches ? 13014
=======================================
Hits ? 33198
Misses ? 1621
Partials ? 661
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 23:33:32 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
Description
ai-slop-input:v2and extendedAiSlopCacheInputto includetitle,body,diff, anddeterministicBandinsrc/review/ai-slop-cache-input.ts.sha256Hex(JSON.stringify(payload))to fingerprint mutable prompt inputs.runAiSlopForAdvisory(src/queue/processors.ts) build the review diff once withbuildAiReviewDiff(args.files), includetitle,body,diff, anddeterministicBandin the cache fingerprint, and reuse the sameaiSlopDifffor the fresh advisory call on cache misses.migrations/0119_ai_slop_cache.sqlto reflect that the fingerprint covers mutable prompt inputs as well as provider identity.test/unit/ai-slop-cache.test.tsandtest/unit/ai-slop.test.tsto assert that changes to title/body/diff/deterministicBand produce distinct fingerprints and to seed cache rows using the new prompt-aware fingerprint.Testing
npx vitest run test/unit/ai-slop-cache.test.ts test/unit/ai-slop.test.ts, and the modified test suites passed locally.npm run typecheck, which succeeded.npm run db:migrations:check, which succeeded.npm run test:coverage, but coverage remapping failed in this container (Nodev24.15.0) withTypeError: jsTokens is not a function; the repository expects Node 22 for a successful coverage run.npm audit --audit-level=moderatecould not complete in this environment due to the npm audit endpoint returning403 Forbidden.Codex Task