Skip to content

fix(miner): add orb-export to the doctor and migrate store lists (#8318)#8470

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
galuis116:fix/miner-orb-export-store-lists
Jul 24, 2026
Merged

fix(miner): add orb-export to the doctor and migrate store lists (#8318)#8470
JSONbored merged 1 commit into
JSONbored:mainfrom
galuis116:fix/miner-orb-export-store-lists

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

Summary

Closes #8318.

packages/loopover-miner/lib/status.ts's storeIntegrityChecks and packages/loopover-miner/lib/migrate-cli.ts's STORES are both meant to enumerate every durable local SQLite store in the package -- migrate-cli.ts's header says it "Mirrors status.js's storeIntegrityChecks ... store list exactly", and status.ts's says to "Keep in sync with migrate-cli.js's STORES list". Both listed the same sixteen stores.

orb-export.sqlite3 -- the opt-in Orb telemetry export's per-instance HMAC anonymization secret and export cursor (#4277/#5681), opened via openOrbExportStore / resolveOrbExportDbPath -- is a real durable store and was in neither list. So:

  • a corrupted orb-export.sqlite3 was invisible to loopover-miner doctor's per-store integrity sweep, and
  • loopover-miner migrate never brought it up to date,

unlike every other store the package ships. Same gap class already fixed for policy-doc-cache (#7238), ranked-candidates + deny-hook-synthesis (#8008/#8036), and four earlier omissions (#6768) -- orb-export.ts was simply never added when it shipped.

Change

Adds the store to both lists using each list's existing entry shape, with no restructuring (as the issue requires):

  • status.ts: ["orb-export", resolveOrbExportDbPath(env)]
  • migrate-cli.ts: { name: "orb-export", resolveDbPath: resolveOrbExportDbPath, open: openOrbExportStore }

resolveOrbExportDbPath(env?: Record<string, string | undefined>) and openOrbExportStore(dbPath?: string) already match the sibling entries' signatures exactly, so unlike replay-snapshot this needs no cast. Neither file referenced a specific store count in its comments, so no count text needed updating.

Tests

Both existing tests pin these lists exactly, so both are updated rather than duplicated:

  • test/unit/miner-migrate-cli.test.ts -- STORE_NAMES gains orb-export (order preserved), the assertion's title goes sixteen -> seventeen, and a #8318 regression assertion is added beside the existing #6768 / #8008 ones.
  • test/unit/miner-status.test.ts -- the doctor check-name list gains store-integrity:orb-export.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (Closes #8318).

Validation

  • git diff --check
  • npm run actionlint - no workflow files touched.
  • npm run typecheck
  • npx vitest run test/unit/miner-migrate-cli.test.ts - 12/12 pass, including the updated seventeen-store assertion.
  • Changed-line coverage: the added lines are an import plus one data entry per list, which v8 tracks as part of the enclosing initializer -- no uncovered statements on the diff (verified locally with the v8 provider).
  • npm run test:coverage (full) / test:workers / build:mcp / ui:* - not run: this touches two miner lib files and their two unit tests, with no worker, MCP-package, or UI surface.
  • npm audit --audit-level=moderate - no dependency changes.
  • New or changed behavior has unit tests.

If any required check was skipped, explain why:

  • test/unit/miner-status.test.ts has two failures on this Windows checkout that reproduce identically on unmodified main (verified by stashing the change and re-running) -- environment-specific, not caused by this diff. The store-list assertion this PR updates is not one of them.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed -- this only adds a store name and path resolver to two enumerations; the HMAC secret inside that store is never read, logged, or surfaced here.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests - n/a, none touched.
  • API/OpenAPI/MCP behavior is updated and tested where needed - n/a.
  • UI changes use live API data or real empty/error/loading states - n/a, no UI change.
  • Visible UI changes include a UI Evidence section - n/a: no visible UI/frontend/docs/extension change.
  • Public docs/changelogs are updated where needed - n/a.

Notes

  • Both commands stay non-destructive for this store: doctor treats an absent file as healthy-by-absence, and migrate reports a not-yet-created store as a clean skip without creating it as a side effect (asserted by the existing test this PR extends).

@galuis116
galuis116 requested a review from JSONbored as a code owner July 24, 2026 14:20
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.81%. Comparing base (4119527) to head (71ee564).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8470      +/-   ##
==========================================
- Coverage   92.50%   88.81%   -3.69%     
==========================================
  Files         791       99     -692     
  Lines       79333    22902   -56431     
  Branches    23961     3946   -20015     
==========================================
- Hits        73386    20341   -53045     
+ Misses       4807     2383    -2424     
+ Partials     1140      178     -962     
Flag Coverage Δ
shard-1 0.00% <ø> (-57.78%) ⬇️
shard-2 0.00% <ø> (-47.32%) ⬇️
shard-3 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-miner/lib/migrate-cli.ts 0.00% <ø> (-100.00%) ⬇️
packages/loopover-miner/lib/status.ts 0.00% <ø> (-100.00%) ⬇️

... and 692 files with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-24 15:41:40 UTC

4 files · 1 AI reviewer · no blockers · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This is a narrow, well-targeted fix that adds the previously-omitted orb-export store to both status.ts's storeIntegrityChecks and migrate-cli.ts's STORES lists, along with corresponding test updates that pin the new seventeen-store count and order. The change follows the existing entry shape exactly (no restructuring), matches the pattern of prior similar fixes (#7238, #8008/#8036, #6768), and both new imports (openOrbExportStore, resolveOrbExportDbPath) are used consistently with sibling entries' signatures. CI is green across all checks, and the diff closes the linked issue #8318 directly.

Nits — 2 non-blocking
  • migrate-cli.ts's header comment still says 'same eleven stores' and status.ts's storeIntegrityChecks comment doesn't mention the current count — neither was touched by this PR, but both are already stale from prior additions, so this may be worth a follow-up cleanup rather than blocking this PR.
  • Consider a follow-up issue to remove or generalize the hardcoded store-count language in migrate-cli.ts's module header comment so it doesn't need updating on every future store addition.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8318
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 1895 registered-repo PR(s), 1231 merged, 56 issue(s).
Contributor context ✅ Confirmed Gittensor contributor galuis116; Gittensor profile; 1895 PR(s), 56 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The diff adds orb-export using the exact same tuple/descriptor shapes to both storeIntegrityChecks in status.ts and STORES in migrate-cli.ts, and extends the corresponding tests to assert its presence, matching all stated requirements and deliverables.

Review context
  • Author: galuis116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Python, TypeScript, Dart, HTML, MDX, Rust, C++
  • Official Gittensor activity: 1895 PR(s), 56 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 24, 2026
…Nbored#8318)

status.ts's storeIntegrityChecks and migrate-cli.ts's STORES are both meant to
enumerate every durable local SQLite store in the package -- each file's own
comment says to keep it in sync with the other. Both listed the same sixteen
stores, but orb-export.sqlite3 (the opt-in Orb telemetry export's per-instance
HMAC secret and export cursor, JSONbored#4277/JSONbored#5681) was never added when it shipped.

The effect: a corrupted orb-export.sqlite3 was invisible to
`loopover-miner doctor`'s per-store integrity sweep, and `loopover-miner
migrate` never brought it up to date, unlike every other store the package
ships. Same gap class already fixed for policy-doc-cache (JSONbored#7238),
ranked-candidates + deny-hook-synthesis (JSONbored#8008/JSONbored#8036), and four earlier
omissions (JSONbored#6768).

Adds the store to both lists using each list's existing entry shape
(no restructuring): ["orb-export", resolveOrbExportDbPath(env)] in status.ts
and { name, resolveDbPath, open } in migrate-cli.ts. Both resolver/opener
signatures already match the sibling entries, so no casts are needed.

Updates the two tests that pin the lists exactly -- the migrate test's
store-name array (now seventeen, same order) and the doctor test's
store-integrity check names -- and adds a JSONbored#8318 regression assertion beside
the existing JSONbored#6768/JSONbored#8008 ones.
@JSONbored
JSONbored force-pushed the fix/miner-orb-export-store-lists branch from cf71315 to 71ee564 Compare July 24, 2026 15:58
@JSONbored
JSONbored merged commit c618b9c into JSONbored:main Jul 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(miner): orb-export.sqlite3 missing from status.ts's storeIntegrityChecks and migrate-cli.ts's STORES lists

2 participants