Skip to content

fix(miner): cover four omitted stores in doctor and migrate#6922

Closed
RealDiligent wants to merge 2 commits into
JSONbored:mainfrom
RealDiligent:feat/doctor-migrate-four-stores-6768
Closed

fix(miner): cover four omitted stores in doctor and migrate#6922
RealDiligent wants to merge 2 commits into
JSONbored:mainfrom
RealDiligent:feat/doctor-migrate-four-stores-6768

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Add governor-state, attempt-log, replay-snapshot, and worktree-allocator to status.js storeIntegrityChecks and migrate-cli.js STORES (eleven stores, lists stay mirrored).
  • Update unit expectations + regression asserts for the previously omitted four.

Closes #6768

Test plan

  • Local smoke: runMigrateChecks returns all 11 names
  • CI: miner-migrate-cli / miner-status unit tests
  • Codecov patch green on changed lines

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 17, 2026 13:31
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.70%. Comparing base (fd53997) to head (04b6ae1).

Files with missing lines Patch % Lines
packages/loopover-miner/lib/migrate-cli.js 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6922      +/-   ##
==========================================
+ Coverage   89.39%   93.70%   +4.31%     
==========================================
  Files         685      685              
  Lines       68357    68358       +1     
  Branches    18726    18726              
==========================================
+ Hits        61108    64058    +2950     
+ Misses       5497     3303    -2194     
+ Partials     1752      997     -755     
Flag Coverage Δ
shard-1 43.62% <0.00%> (-0.06%) ⬇️
shard-2 36.80% <0.00%> (-0.04%) ⬇️
shard-3 32.68% <0.00%> (?)
shard-4 34.43% <0.00%> (-0.39%) ⬇️
shard-5 31.53% <0.00%> (+0.34%) ⬆️
shard-6 46.03% <0.00%> (+0.29%) ⬆️

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

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

... and 103 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 17, 2026
@RealDiligent
RealDiligent force-pushed the feat/doctor-migrate-four-stores-6768 branch from 0a94689 to 04b6ae1 Compare July 17, 2026 13:40
@RealDiligent

Copy link
Copy Markdown
Contributor Author

Rebased onto latest main and fixed unrelated merge-CI breakage: #6915 registered loopover_simulate_open_pr_pressure but left the MCP discovery invariant at 69 (actual register count is 70). Single follow-up commit so validate-tests can pass.

RealDiligent and others added 2 commits July 17, 2026 21:43
governor-state, attempt-log, replay-snapshot, and worktree-allocator were only migrated lazily; keep storeIntegrityChecks and migrate STORES in sync at eleven entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
JSONbored#6915 registered loopover_simulate_open_pr_pressure without updating the
alias-retirement discovery invariant; merge CI was failing expected 69 got 70.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-17 13:50:42 UTC

5 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This PR adds the four previously-omitted stores (governor-state, attempt-log, replay-snapshot, worktree-allocator) to both status.js's storeIntegrityChecks and migrate-cli.js's STORES list, keeping the two lists in the same order as required by the existing regression test. The core fix is correct and well-documented (updated header comments, a new cross-file sync note in status.js), and it closes the gap described in #6768. The diff also carries an unrelated tool-count bump in mcp-tool-rename-aliases.test.ts (69→70) that has nothing to do with this fix — almost certainly base-branch drift from #6915 rather than scope creep, but worth a callout.

Nits — 5 non-blocking
  • test/unit/miner-migrate-cli.test.ts:41 — `expect(STORE_NAMES).toEqual(expect.arrayContaining([...]))` only checks the test file's own hardcoded array against itself; it doesn't touch `runMigrateChecks`'s output and proves nothing about the real STORES list in migrate-cli.js — the preceding `toEqual(STORE_NAMES)` on `results.map(...)` is already the meaningful assertion.
  • test/unit/miner-status.test.ts:132-140 (per diff hunk) — same pattern: the `arrayContaining` block is redundant with the `toEqual` a few lines above it, which already pins the exact four names in the exact order.
  • test/unit/mcp-tool-rename-aliases.test.ts — the 69→70 tool-count bump is unrelated to this PR's stated fix (doctor's integrity sweep and migrate's proactive sweep both omit four real local stores #6768); if this is base-branch drift from feat(api): add a REST route + CLI mirror for loopover_simulate_open_pr_pressure #6915 rather than something this PR introduces, say so in the PR description so reviewers aren't left guessing why an unrelated test file is touched.
  • Drop the two tautological `arrayContaining` assertions in miner-migrate-cli.test.ts and miner-status.test.ts — the existing full-array `toEqual` checks already cover the regression.
  • Consider a small shared constant (e.g. exported `STORE_NAMES` from migrate-cli.js) that both status.js's `storeIntegrityChecks` and migrate-cli.js's `STORES` derive from, so future additions can't silently desync the two lists again — right now the only thing enforcing parity is a comment plus a test.

CI checks failing

  • codecov/patch — 0.00% of diff hit (target 99.00%)

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 #6768
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ❌ 8/20 High 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: 390 registered-repo PR(s), 195 merged, 35 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 390 PR(s), 35 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 390 PR(s), 35 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 1 step in the Signals table above.
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 commented Jul 17, 2026

Copy link
Copy Markdown

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). 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.

@loopover-orb loopover-orb Bot closed this Jul 17, 2026
@RealDiligent

Copy link
Copy Markdown
Contributor Author

Reopened after LoopOver auto-close on codecov/patch. Follow-up commit a4b5501d seeds the four #6768 stores so migrate's worktree-allocator open adapter is exercised (that one-line lambda was the sole uncovered patch line).

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor's integrity sweep and migrate's proactive sweep both omit four real local stores

1 participant