fix(review): preserve cached review instructions - #1586
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 #1586 +/- ##
=======================================
Coverage 95.46% 95.46%
=======================================
Files 202 202
Lines 21839 21840 +1
Branches 7885 7886 +1
=======================================
+ Hits 20849 20850 +1
Misses 414 414
Partials 576 576
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary
Nits — 3 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. Exactly the right one-liner in exactly the right place. `reviewConfigToJson` was silently dropping `instructions` while every other nullable field on `FocusManifestReviewConfig` (`note`, `profile`, `inline_comments`) was already emitted — the fix follows the identical null-guard pattern with no deviation. The regression test is genuine: it drives `loadRepoFocusManifest` with a real fetcher, confirms the first call parses the field correctly, then verifies the second call hits cache (`fetches === 1`) and the value survives the round-trip intact. No fabricated state, no wrong-layer patch. Nits (3)
🟩 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
review.instructionsfield was parsed into the in-memory focus manifest but not emitted when the manifest was serialized for cache persistence, causing maintainer instructions to be lost after a cache round-trip and making per-repo reviewer guidance unreliable.Description
review.instructionsfromreviewConfigToJsonsomanifestToJsonpersists it, and add a regression unit test intest/unit/focus-manifest-loader.test.tsthat verifies a repo-file manifest withreview.instructionssurvives the repo-file cache round trip.Testing
npm test -- --run test/unit/focus-manifest.test.ts test/unit/focus-manifest-loader.test.tsand all tests passed (158 tests); ran typecheck withnpm run typecheck(tsc --noEmit) which passed;npm run test:coverageran the tests but coverage remapping failed withTypeError: jsTokens is not a function;npm audit --audit-level=moderatecould not complete due to a registry 403, so the full CI gate was not executed in this environment.Codex Task