Skip to content

doctor/migrate store lists (status.ts, migrate-cli.ts) are missing ranked-candidates.ts and deny-hook-synthesis.ts #8008

Description

@JSONbored

Context

packages/loopover-miner/lib/status.ts's storeIntegrityChecks (lines 361-375) and packages/loopover-miner/lib/migrate-cli.ts's STORES (lines 49-73) both carry an explicit "keep in sync" comment (status.ts: "Keep in sync with migrate-cli.js's STORES list (#6768)... every durable local SQLite store using resolveLocalStoreDbPath") and enumerate the package's local SQLite stores.

Two fully-formed stores with their own resolve*DbPath/init* exports and real CREATE TABLE schemas are absent from both lists: ranked-candidates.ts (resolveRankedCandidatesDbPath, table miner_ranked_candidates) and deny-hook-synthesis.ts (resolveDenyHookSynthesisDbPath, tables deny_rule_proposals/deny_rule_proposals_v2).

A corrupted file in either store is currently invisible to loopover-miner doctor's integrity check, and neither store gets its pending migrations proactively applied by loopover-miner migrate.

⚠️ Required pattern — read the existing entries in both status.ts's storeIntegrityChecks and migrate-cli.ts's STORES before starting. Add the two missing stores following the exact same shape every other entry already uses (same resolve*DbPath reference convention, same list structure) — do not invent a new registration mechanism.

Requirements

  • Add ranked-candidates.ts and deny-hook-synthesis.ts to status.ts's storeIntegrityChecks list, using resolveRankedCandidatesDbPath/resolveDenyHookSynthesisDbPath the same way every other entry references its own resolver.
  • Add the same two stores to migrate-cli.ts's STORES list, in the same shape as the existing 13-14 entries.

Deliverables

  • status.ts's storeIntegrityChecks includes both ranked-candidates and deny-hook-synthesis stores.
  • migrate-cli.ts's STORES includes both stores.
  • loopover-miner doctor reports on both stores' integrity; loopover-miner migrate applies pending migrations to both.

Test Coverage Requirements

packages/loopover-miner/** — 99%+ Codecov patch target. Add/update unit tests for status.ts and migrate-cli.ts confirming both new stores appear in the respective lists and are exercised by the existing test harness the same way other stores are.

Expected Outcome

doctor and migrate cover every durable local SQLite store this package ships, with no silent gap for ranked-candidates or deny-hook-synthesis.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions