fix(selfhost): build gittensory-engine before bundling in deploy-selfhost-prebuilt.sh - #4533
Conversation
…host-prebuilt.sh packages/gittensory-engine/dist/ is gitignored and built via tsc, but run_node_build() ran npm ci --ignore-scripts straight into build-selfhost.mjs --all with no step in between to build it. This was latent until packages/gittensory-miner/lib/opportunity-fanout.js and opportunity-ranker.js started importing the engine package, which the --all bundle now needs to resolve. Mirrors the existing build:miner script's ordering (engine build before miner build). Discovered while updating edge-nl-01 to current main; the fix was verified there by running the equivalent step manually before this PR landed.
|
Superagent did not 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 #4533 +/- ##
=======================================
Coverage 94.04% 94.04%
=======================================
Files 422 422
Lines 37574 37574
Branches 13724 13724
=======================================
Hits 35335 35335
Misses 1583 1583
Partials 656 656 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-09 23:21:00 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
run_node_build()rannpm ci --ignore-scriptsstraight intobuild-selfhost.mjs --allwith no step to buildpackages/gittensory-enginefirstpackages/gittensory-engine/dist/is gitignored (built viatsc), and the self-host bundle's dependency graph reaches it transitively (src/mcp/find-opportunities.ts→packages/gittensory-miner/lib/opportunity-fanout.js/opportunity-ranker.js→@jsonbored/gittensory-engineby package name) — this was latent until that miner-side import landed, and will reproduce on any self-host instance's next update until fixedbuild:minerroot script's ordering (engine build before miner build)Verification
edge-nl-01while bringing it current withmain(worked around out-of-band there first, no repo changes, then verified this exact fix resolves it cleanly on a second run)bash -nsyntax check passes; new test passes; unrelated pre-existing typecheck errors intest/unit/miner-opportunity-ranker.test.tsare untouched by this changeTest plan
npx vitest run test/unit/docs-selfhost-update-rollback.test.tsbash -n scripts/deploy-selfhost-prebuilt.shFixes #4530