fix(miner): resolve status.ts's monorepo-sibling paths at the compiled dist/lib depth - #8636
Conversation
…d dist/lib depth The 2026-07-24 out-of-place dist/ emit migration (c896797) added a directory level between the compiled CLI and its monorepo siblings, and introduced resolveMonorepoSiblingPath to try both the source (lib/) and compiled (dist/lib/) depths. That helper was wired into two of the four sibling-path call sites in status.ts, but the other two were left on the pre-migration hardcoded join(moduleDir(), "../../loopover-engine/package.json"), which only resolves correctly from lib/: - readInstalledEnginePackageVersion's catch-all workspace fallback returned null from the real compiled CLI instead of finding the workspace engine version. - readExpectedEnginePackageVersion's monorepo-engine check always missed, so it always fell through to the static expected-engine.version pin even when a live packages/loopover-engine/package.json was present. Route both through resolveMonorepoSiblingPath (now taking the module dir as an explicit argument so tests can simulate the dist/lib depth without a real build), and add regression tests covering both fixed call sites from a simulated dist/lib depth — including every branch of the now-reachable catch block, whose /* v8 ignore next 9 */ annotation is removed. Closes JSONbored#8630
|
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 #8636 +/- ##
==========================================
- Coverage 93.76% 90.62% -3.15%
==========================================
Files 798 97 -701
Lines 79464 22661 -56803
Branches 24078 3952 -20126
==========================================
- Hits 74512 20536 -53976
+ Misses 3566 1945 -1621
+ Partials 1386 180 -1206
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-25 16:29:40 UTC
Review summary Nits — 2 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed 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.
|
The 2026-07-24 out-of-place dist/ emit migration (c896797) added a directory
level between the compiled CLI and its monorepo siblings, and introduced
resolveMonorepoSiblingPath to try both the source (lib/) and compiled (dist/lib/)
depths. That helper was wired into two of the four sibling-path call sites in
status.ts, but the other two were left on the pre-migration hardcoded
join(moduleDir(), "../../loopover-engine/package.json"), which only resolves
correctly from lib/:
from the real compiled CLI instead of finding the workspace engine version.
always fell through to the static expected-engine.version pin even when a live
packages/loopover-engine/package.json was present.
Route both through resolveMonorepoSiblingPath (now taking the module dir as an
explicit argument so tests can simulate the dist/lib depth without a real build),
and add regression tests covering both fixed call sites from a simulated dist/lib
depth — including every branch of the now-reachable catch block, whose
/* v8 ignore next 9 */ annotation is removed.
Closes #8630