Skip to content

chore(miner): migrate batch 4.1 foundational lib modules to TypeScript (#7309) - #7339

Closed
bitfathers94 wants to merge 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-7309
Closed

chore(miner): migrate batch 4.1 foundational lib modules to TypeScript (#7309)#7339
bitfathers94 wants to merge 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-7309

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

chore(miner): migrate batch 4.1 foundational lib modules to TypeScript (#7309)

Convert batch 4.1 of the loopover-miner TypeScript migration (#7309 / #7290
Phase 4): 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 #7299.

Regenerated .js / .d.ts via tsc so the published bin/lib layout and consumer
import paths stay unchanged; zero behavior change. Added unit tests for the
previously-uncovered validation and defensive-fallback branches these modules
carried so the converted sources meet codecov/patch on their diff.

Closes #7309

JSONbored#7309)

Convert batch 4.1 of the loopover-miner TypeScript migration (JSONbored#7309 / JSONbored#7290
Phase 4): 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.

Regenerated .js / .d.ts via tsc so the published bin/lib layout and consumer
import paths stay unchanged; zero behavior change. Added unit tests for the
previously-uncovered validation and defensive-fallback branches these modules
carried so the converted sources meet codecov/patch on their diff.

Closes JSONbored#7309
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 19, 2026 18: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 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.05%. Comparing base (bd3e583) to head (8d6d7fb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7339   +/-   ##
=======================================
  Coverage   91.04%   91.05%           
=======================================
  Files         714      714           
  Lines       72137    72159   +22     
  Branches    19391    19452   +61     
=======================================
+ Hits        65679    65702   +23     
+ Misses       5418     5417    -1     
  Partials     1040     1040           
Flag Coverage Δ
shard-1 41.30% <32.64%> (-0.37%) ⬇️
shard-2 35.60% <13.98%> (-0.05%) ⬇️
shard-3 31.53% <24.35%> (-0.21%) ⬇️
shard-4 31.05% <52.33%> (-0.81%) ⬇️
shard-5 31.14% <29.53%> (+0.63%) ⬆️
shard-6 43.74% <5.18%> (+0.27%) ⬆️

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

Files with missing lines Coverage Δ
packages/loopover-miner/lib/attempt-worktree.ts 100.00% <100.00%> (ø)
packages/loopover-miner/lib/claim-adjudication.ts 100.00% <100.00%> (ø)
...oopover-miner/lib/governor-chokepoint-persisted.ts 100.00% <100.00%> (ø)
packages/loopover-miner/lib/idea-feasibility.ts 100.00% <100.00%> (ø)
packages/loopover-miner/lib/portfolio-discovery.ts 100.00% <100.00%> (ø)
packages/loopover-miner/lib/process-lifecycle.ts 100.00% <100.00%> (ø)
...ages/loopover-miner/lib/rejection-state-machine.ts 100.00% <100.00%> (ø)
packages/loopover-miner/lib/sentry.ts 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 19, 2026
@loopover-orb

loopover-orb Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-19 18:39:23 UTC

27 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This PR converts eight loopover-miner lib modules (claim-adjudication, governor-chokepoint-persisted, sentry, idea-feasibility, rejection-state-machine, attempt-worktree, portfolio-discovery, process-lifecycle) from hand-maintained .js/.d.ts to real .ts, with tsc regenerating the .js/.d.ts output and unit tests added for previously-uncovered branches. The regenerated portfolio-discovery.js and process-lifecycle.js diffs show only whitespace/formatting churn (2-space to 4-space indentation) plus added sourceMappingURL comments, consistent with a genuine tsc-emit pipeline rather than hand edits, and the .ts sources are faithful transcriptions of the prior .js+.d.ts pairs with types added. The 'magic numbers' and 'deep nesting' flags from the external brief are false positives here — 5671/128/2000 are pre-existing issue-reference/exit-code/timeout constants carried over unchanged from the .js originals, and the nesting flags land on ordinary migrated code, not new logic.

Nits — 5 non-blocking
  • The console.error fallback in process-lifecycle.ts:91 (installCliSignalHandlers' default log) is unchanged from the pre-existing .js behavior, not new logic, so it's not a concern, but worth confirming no lint rule forbids console in lib/ now that it's TS-typed.
  • Test-to-code ratio is low (99 test lines vs 1280 source lines added) per the external brief, but codecov/patch passed, so the added coverage evidently targets the specific previously-uncovered branches as described rather than the whole migrated surface — worth a quick sanity check that claim-adjudication.ts and governor-chokepoint-persisted.ts (which show no corresponding new test files in the diff) actually hit their patch-coverage target.
  • portfolio-discovery.js:94-area nesting flag and attempt-worktree.js depth-5 flag are pre-existing structure carried over from the original .js, not new branching introduced by this PR.
  • Confirm claim-adjudication.ts and governor-chokepoint-persisted.ts have accompanying unit tests somewhere in the 27-file diff (not shown in the truncated listing), since no test file for either appears in the visible file list.
  • Double check the .d.ts regeneration for rejection-state-machine and sentry (omitted from full-content view) matches their .ts sources 1:1 the way process-lifecycle's and attempt-worktree's do.

CI checks failing

  • validate
  • validate-tests-merge

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 #7309
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
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: 42 registered-repo PR(s), 29 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 42 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff converts all eight listed files (claim-adjudication, governor-chokepoint-persisted, sentry, idea-feasibility, rejection-state-machine, attempt-worktree, portfolio-discovery, process-lifecycle) from .js to .ts with tsc-regenerated .js/.d.ts artifacts, matching the batch's scope and in-place emit pattern from Phase 1.

Review context
  • Author: bitfathers94
  • 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: 42 PR(s), 0 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (issue #7300)
  • Related work: Titles/paths share 7 meaningful terms. (issue #7302)
  • Related work: Titles/paths share 7 meaningful terms. (issue #7301)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps 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 19, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests-merge)). 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 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(miner): migrate foundational, most-depended-on packages/loopover-miner/lib modules to TypeScript (batch 4.1 of 8 (Phase 4))

1 participant