fix(miner): wire policy_verdict_cache into the per-repo purge/status/migrate store lists (#6987)#7055
Conversation
…migrate store lists (JSONbored#6987)
|
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 #7055 +/- ##
==========================================
- Coverage 93.74% 87.27% -6.47%
==========================================
Files 692 609 -83
Lines 68706 48144 -20562
Branches 18760 15133 -3627
==========================================
- Hits 64409 42020 -22389
- Misses 3302 4634 +1332
- Partials 995 1490 +495
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-17 20:14:34 UTC
Review summary Nits — 2 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (1))). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
policy_verdict_cachekeys its table onrepo_scope TEXT PRIMARY KEY— a genuine per-repo column, structurally identical to the six repo-scoped storesstore-maintenance.jsalready documents as purgeable — yet it was never wired into any of the three "known local stores" lists it qualifies for. Its per-repo rows could therefore persist indefinitely: uncleaned bypurge, unmonitored bydoctor, and unmigrated bymigrate.POLICY_VERDICT_CACHE_PURGE_SPEC = { table: "policy_verdict_cache", repoColumn: "repo_scope" }tostore-maintenance.js(same shape as the six existing specs) and apurgeByRepomethod to the store (mirroring the sibling repo-scoped stores).purge-cli.js'sREAL_PURGE_TARGETS,status.js'sstoreIntegrityChecks, andmigrate-cli.js'sSTORES.policy-doc-cache.js(keyed byurl, not a repo column) is intentionally left out, exactly as before and as the issue scopes it.Why
This closes a data-hygiene gap: per-repo policy verdicts had no purge/health/migration coverage despite fitting the exact
repoColumnpattern the other six stores use.Validation
npm run typecheckclean.policy-verdict-cacheand pass — this is the regression the issue asks for: the dry-run and real purge tests seed the store and assert it's counted/purged by repo scope (wouldPurge: 1/purged: 1), the doctor store-integrity sweep assertsstore-integrity:policy-verdict-cache, and migrate's store list asserts it — so all three code paths are verified to reach the newly-wired store. The only unchanged-and-still-failing local test is a pre-existing Windows path-separator case inminer-statusunrelated to this change. 100% coverage on the new executable code (purgeByRepo).Closes #6987