Skip to content

fix(miner): remove stale not-yet-migrated cast/comment for resolveReplaySnapshotDbPath - #8715

Closed
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/miner-stale-migration-comments-8642
Closed

fix(miner): remove stale not-yet-migrated cast/comment for resolveReplaySnapshotDbPath#8715
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/miner-stale-migration-comments-8642

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

packages/loopover-miner/lib/migrate-cli.ts and packages/loopover-miner/lib/status.ts both carried a comment and a type cast claiming resolveReplaySnapshotDbPath's env parameter was still typed as NodeJS.ProcessEnv ("not yet migrated"). This is no longer true: replay-snapshot.ts's resolveReplaySnapshotDbPath has typed env as Record<string, string | undefined> (matching every sibling resolver) since commit 321a734b7 — which landed before migrate-cli.ts's comment was even written, and a day before the same stale comment was copied into status.ts. The casts were harmless no-ops but actively misled a future reader into thinking a real type inconsistency still existed.

  • Removed the cast + comment at both call sites; both now call resolveReplaySnapshotDbPath(env) directly with no cast.

No production behavior change — the two casts were already no-ops at runtime.

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 #8642

Validation

  • npm run typecheck — passes with both casts removed, no new error surfaces at either call site.
  • git diff --check
  • npm run docs:drift-check
  • npm run manifest:drift-check
  • Repo-wide grep confirms no other call site carries this same stale comment for resolveReplaySnapshotDbPath.

Per the issue's own Test Coverage Requirements: this is a type-level/comment-accuracy fix with no behavioral change, so no new test is required — npm run typecheck passing is the verification.

…laySnapshotDbPath

replay-snapshot.ts's resolveReplaySnapshotDbPath has typed env as
Record<string, string | undefined> (matching every sibling resolver)
since commit 321a734 -- before migrate-cli.ts's comment was even
written and a day before the same stale comment was copied into
status.ts. The casts were harmless no-ops but actively misled a reader
into thinking a real type inconsistency still existed.

Verified via typecheck: removing both casts introduces no new error at
either call site.

Closes JSONbored#8642
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8715      +/-   ##
==========================================
- Coverage   93.79%   90.63%   -3.16%     
==========================================
  Files         797       98     -699     
  Lines       79480    22700   -56780     
  Branches    24078     3962   -20116     
==========================================
- Hits        74545    20575   -53970     
+ Misses       3563     1945    -1618     
+ Partials     1372      180    -1192     
Flag Coverage Δ
backend 99.04% <ø> (+3.98%) ⬆️

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 100.00% <ø> (ø)
packages/loopover-miner/lib/status.ts 98.83% <ø> (ø)

... and 699 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 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-26 00:30:28 UTC

2 files · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

  • AI review already in progress for this PR head: Another LoopOver pass is already running the AI review for this exact PR head. This pass is skipping to avoid a duplicate LLM call.

Review summary
AI review is already running for this PR head in another LoopOver pass. LoopOver is holding this PR for manual review until that pass completes.

Nits — 2 non-blocking
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
  • AI review already in progress for this PR head — The gate is held for a human reviewer rather than passed automatically; it re-evaluates once the in-flight review completes or on the next update.

CI checks failing

  • validate
  • validate-code

Decision drivers

  • ✅ Code review — No blockers (No AI review summary)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8642
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: 161 registered-repo PR(s), 73 merged, 5 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 161 PR(s), 5 issue(s).
Improvement ℹ️ None detected risk: low · value: none
Linked issue satisfaction

Addressed
Both call sites in migrate-cli.ts and status.ts have had the stale 'not yet migrated' comments and type casts removed, now calling resolveReplaySnapshotDbPath(env) directly as required.

Review context
  • Author: joaovictor91123
  • 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: 161 PR(s), 5 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 26, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-code)). 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 26, 2026
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.

fix(miner): remove stale 'not yet migrated' type-cast comments for resolveReplaySnapshotDbPath in migrate-cli.ts and status.ts

1 participant