⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
packages/loopover-miner/lib/migrate-cli.ts:64-67 and packages/loopover-miner/lib/status.ts:401-402
both carry a comment and a type cast claiming resolveReplaySnapshotDbPath's .d.ts still types
its env parameter as NodeJS.ProcessEnv ("not yet migrated"), and cast around that supposed
mismatch.
This is no longer true. packages/loopover-miner/lib/replay-snapshot.ts:64 has typed env as
Record<string, string | undefined> — matching every sibling resolver — since commit 321a734b7,
which landed the same day as (and after) the migrate-cli.ts comment was written, and before the
same stale comment was copied into status.ts a day later. The casts are harmless no-ops today,
but the comments actively mislead a future contributor into thinking a real type inconsistency
still exists in this file, potentially causing wasted investigation time or a defensive workaround
for a problem that no longer exists.
Requirements
- Remove the now-unnecessary type casts and their accompanying "not yet migrated" comments at both
call sites (migrate-cli.ts:64-67 and status.ts:401-402), calling
resolveReplaySnapshotDbPath(env) directly with no cast, since env's real type
(Record<string, string | undefined>) already matches what both call sites pass.
- Confirm via
tsc (part of the existing npm run typecheck) that removing the cast introduces no
new type error at either call site.
Deliverables
All Deliverables above are required in the same PR.
Test Coverage Requirements
This is a type-level/comment-accuracy fix with no behavioral change — no new runtime branch is
introduced, so no new test is required. npm run typecheck passing with the casts removed is the
verification for this issue.
Expected Outcome
Neither call site claims a type mismatch that no longer exists; both call
resolveReplaySnapshotDbPath with its real, already-correct type, with no misleading comment for a
future reader.
Links & Resources
packages/loopover-miner/lib/migrate-cli.ts:64-67
packages/loopover-miner/lib/status.ts:401-402
packages/loopover-miner/lib/replay-snapshot.ts:64 (the already-correct type to trust)
- Fixed by commit
321a734b7, whose fix these two comments never caught up to
Context
packages/loopover-miner/lib/migrate-cli.ts:64-67andpackages/loopover-miner/lib/status.ts:401-402both carry a comment and a type cast claiming
resolveReplaySnapshotDbPath's.d.tsstill typesits
envparameter asNodeJS.ProcessEnv("not yet migrated"), and cast around that supposedmismatch.
This is no longer true.
packages/loopover-miner/lib/replay-snapshot.ts:64has typedenvasRecord<string, string | undefined>— matching every sibling resolver — since commit321a734b7,which landed the same day as (and after) the
migrate-cli.tscomment was written, and before thesame stale comment was copied into
status.tsa day later. The casts are harmless no-ops today,but the comments actively mislead a future contributor into thinking a real type inconsistency
still exists in this file, potentially causing wasted investigation time or a defensive workaround
for a problem that no longer exists.
Requirements
call sites (
migrate-cli.ts:64-67andstatus.ts:401-402), callingresolveReplaySnapshotDbPath(env)directly with no cast, sinceenv's real type(
Record<string, string | undefined>) already matches what both call sites pass.tsc(part of the existingnpm run typecheck) that removing the cast introduces nonew type error at either call site.
Deliverables
packages/loopover-miner/lib/migrate-cli.ts's call toresolveReplaySnapshotDbPathno longerhas a type cast or a "not yet migrated" comment.
packages/loopover-miner/lib/status.ts's call toresolveReplaySnapshotDbPathno longer has atype cast or a "not yet migrated" comment.
npm run typecheckpasses with both casts removed (no new error surfaces).All Deliverables above are required in the same PR.
Test Coverage Requirements
This is a type-level/comment-accuracy fix with no behavioral change — no new runtime branch is
introduced, so no new test is required.
npm run typecheckpassing with the casts removed is theverification for this issue.
Expected Outcome
Neither call site claims a type mismatch that no longer exists; both call
resolveReplaySnapshotDbPathwith its real, already-correct type, with no misleading comment for afuture reader.
Links & Resources
packages/loopover-miner/lib/migrate-cli.ts:64-67packages/loopover-miner/lib/status.ts:401-402packages/loopover-miner/lib/replay-snapshot.ts:64(the already-correct type to trust)321a734b7, whose fix these two comments never caught up to