Skip to content

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

Merged
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
RealDiligent:fix/doctor-migrate-four-stores-6768
Jul 17, 2026
Merged

fix(miner): cover four omitted stores in doctor and migrate#6928
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
RealDiligent:fix/doctor-migrate-four-stores-6768

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Add governor-state, attempt-log, replay-snapshot, and worktree-allocator to doctor's storeIntegrityChecks and migrate's STORES (eleven stores, keep lists in sync).
  • Regression tests assert the four names appear; migrate seeds the four on-disk files so the worktree-allocator open adapter is executed (codecov/patch).
  • Unrelated but required for green merge CI: bump MCP loopover_ tool count pin 69→70 after #6915 registered loopover_simulate_open_pr_pressure.

Closes #6768

Test plan

  • Local smoke: runMigrateChecks returns 11 skips on empty state; seeded four stores report up-to-date
  • CI validate-tests + codecov/patch ≥ 99%

Supersedes closed #6922 (auto-closed on prior codecov miss; this PR includes the coverage fix up front).

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

Copy link
Copy Markdown
Contributor

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

governor-state, attempt-log, replay-snapshot, and worktree-allocator were only
migrated lazily; keep storeIntegrityChecks and migrate STORES in sync at eleven
entries. Tests seed the four stores so the worktree-allocator open adapter is
covered. Also bump the MCP discovery invariant 69→70 for JSONbored#6915's
loopover_simulate_open_pr_pressure (merge CI pin drift on main).

Closes JSONbored#6768

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

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.71%. Comparing base (6080457) to head (cf5e4b0).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6928      +/-   ##
==========================================
+ Coverage   89.39%   93.71%   +4.31%     
==========================================
  Files         685      685              
  Lines       68357    68358       +1     
  Branches    18726    18726              
==========================================
+ Hits        61108    64059    +2951     
+ Misses       5497     3302    -2195     
+ 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.62% <100.00%> (+0.42%) ⬆️
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/migrate-cli.js 100.00% <100.00%> (ø)
packages/loopover-miner/lib/status.js 94.53% <ø> (ø)

... and 103 files with indirect coverage changes

validate-code failed: resolveReplaySnapshotDbPath expects NodeJS.ProcessEnv.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid ProcessEnv-typed resolve helpers that reject the slim tempEnv object
under the repo's strict Env typing; the uncovered patch line is the adapter.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-17 14:12:31 UTC

5 files · 1 AI reviewer · no blockers · readiness 86/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds four previously-omitted stores (governor-state, attempt-log, replay-snapshot, worktree-allocator) to both doctor's storeIntegrityChecks and migrate's STORES list, keeping the two lists in sync as documented in the comment at status.js. The change is mechanical and low-risk: each new entry follows the exact same shape as existing entries, imports resolve to real modules referenced elsewhere (resolveGovernorStateDbPath, initAttemptLog, etc. are consistent with existing naming conventions for other stores in the same files), and tests assert both the new names appear and that the worktree-allocator adapter actually executes via a seeded on-disk file for coverage. The bundled MCP tool-count bump (69→70) is flagged in the description as unrelated-but-required for green CI, which is reasonable since it's a one-line pin update, not scope creep.

Nits — 5 non-blocking
  • The PR bundles an unrelated MCP tool-count pin bump (mcp-tool-rename-aliases.test.ts) with the store-list fix — even though it's needed for green CI, it's worth calling out explicitly in the PR body as a separate concern rather than folding it silently into the diff.
  • test/unit/miner-migrate-cli.test.ts:32-33 asserts both `results.map(name)).toEqual(STORE_NAMES)` and then redundantly `expect(STORE_NAMES).toEqual(expect.arrayContaining([...]))` — the second assertion is checking a hardcoded local array against itself in part, which is a tautology since STORE_NAMES literally contains those four strings by construction; it doesn't add real coverage beyond the first assertion.
  • worktree-allocator's STORES entry uses an inline arrow-function adapter `(dbPath) => openWorktreeAllocator({ dbPath })` while every other entry passes a bare function reference — worth a one-line comment explaining why this one needs wrapping (differing call signature) for future readers skimming the list.
  • Consider extracting the worktree-allocator adapter's shape mismatch (object-arg vs positional dbPath) into a comment at packages/loopover-miner/lib/migrate-cli.js:39 so it's clear why it differs from its neighbors.
  • The redundant arrayContaining assertion in miner-migrate-cli.test.ts:32-33 could be simplified or removed since the `toEqual(STORE_NAMES)` check above it already fully covers the four new names appearing in the exact list.

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, #6922
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 (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 389 registered-repo PR(s), 194 merged, 33 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 389 PR(s), 33 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds all four missing 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 sync as required, with regression tests asserting the four names appear in both.

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: 389 PR(s), 33 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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit e1df4aa into JSONbored:main Jul 17, 2026
16 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.

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