chore(miner): migrate batch 4.1 foundational lib modules to TypeScript - #7384
Conversation
Converts claim-adjudication, governor-chokepoint-persisted, sentry, idea-feasibility, rejection-state-machine, attempt-worktree, portfolio-discovery, and process-lifecycle from plain .js + hand-maintained .d.ts to real .ts under the existing in-place tsc emit pipeline from JSONbored#7299. Extends targeted unit tests to drive every converted file to 100% statement/branch/function/line coverage.
f2cf7bc to
dd86655
Compare
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7384 +/- ##
=======================================
Coverage 91.19% 91.19%
=======================================
Files 716 716
Lines 72733 72759 +26
Branches 20578 20643 +65
=======================================
+ Hits 66326 66353 +27
+ Misses 5365 5364 -1
Partials 1042 1042
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-20 05:40:26 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
Closes #7309
Summary
Convert batch 4.1 of the
packages/loopover-miner/lib/**TypeScript migration (parent #7290, Phase 4):claim-adjudication,governor-chokepoint-persisted,sentry,idea-feasibility,rejection-state-machine,attempt-worktree,portfolio-discovery, andprocess-lifecyclefrom plain.js+ hand-maintained.d.tsto real.ts, compiled in place via the package's existing tsc build pipeline (matching the merged Phase 1 #7299 and Phase 4 batches 4.3/#7377, 4.4/#7383 precedent). Notsconfig.jsonchanges needed -- the package'sincludeglob already picks up new.tsfiles underlib/**. Regenerated and committed the compiled.js/.d.tsoutput alongside every.tssource (npm run build --workspace @loopover/miner).No behavior change: sources are faithful line-for-line transcriptions of the prior
.js+.d.tspairs with real type annotations, keeping the same defaults, error-message strings, and injectable-dependency test seams each file already used. Two genuinely-unreachable defensive fallbacks inattempt-worktree.ts(cloneResult.error ?? "ensure_repo_cloned_failed"andadded.error ?? "git_worktree_add_failed") were simplified to non-null assertions rather than faked with a test --ensureRepoCloned(repo-clone.ts) and the engine'saddWorktree(worktree-plan.ts) both always set a real, non-empty error string on everyok: falsereturn path, so the string-literal fallback was dead code.Testing
miner-claim-adjudication,miner-governor-chokepoint-persisted,miner-sentry,miner-idea-feasibility,miner-rejection-state-machine,miner-attempt-worktree,miner-portfolio-discovery,miner-process-lifecycle, plus dependentsminer-claim-conflict-resolver,miner-attempt-cli,miner-worktree-allocator,miner-local-store,miner-repo-clone-lock) -- 213 tests, all green.vitest run --coverage --coverage.reporter=json-summary, exact numbers parsed fromcoverage-summary.json).npm run typecheck(root) andpackages/loopover-miner's owntsc --noEmitclean.npm run build --workspace @loopover/minerclean, compiled output committed.actionlint,db:schema-drift:check,selfhost:env-reference:check,miner:env-reference:check,docs:drift-check,branding-drift:check,manifest:drift-check,engine-parity:drift-check,release-manifest:sync:check,command-reference:check,test:workers,build:mcp,test:mcp-pack,test:miner-pack,test:miner-deployment-docs-audit,ui:openapi:check,ui:typecheck,ui:lint,npm audit.git diff --checkagainstupstream/mainclean (no trailing-whitespace regressions in the compiled.jsoutput).upstream/mainimmediately before push (already up to date, no new commits to pick up).