Skip to content

fix(ci): build engine package before running backend tests - #4036

Merged
JSONbored merged 1 commit into
mainfrom
fix/ci-build-engine-before-tests
Jul 7, 2026
Merged

fix(ci): build engine package before running backend tests#4036
JSONbored merged 1 commit into
mainfrom
fix/ci-build-engine-before-tests

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • src/mcp/find-opportunities.ts (root backend file) imports packages/gittensory-miner/lib/opportunity-fanout.js (committed, pre-built JS), which itself imports @jsonbored/gittensory-engine.
  • @jsonbored/gittensory-engine's dist/ output is gitignored and only exists after the "Build engine package" CI step runs.
  • That step ran after Test with coverage and was gated only on the narrow packages/gittensory-engine/** path filter — so any ordinary backend PR that didn't touch the engine package directly failed with Failed to resolve entry for package "@jsonbored/gittensory-engine" across ~48 test suites.
  • Moved the build step to run right after Typecheck (before test execution) and widened its trigger to also fire on any backend path change, in addition to push and the existing engine path filter.

Test plan

  • npm run actionlint — clean
  • Reproduced the failure locally: rm -rf packages/gittensory-engine/dist && npx vitest run test/unit/mcp-server-telemetry.test.ts failed identically to the CI log
  • Built the engine package and re-ran the same test — passed (3/3)

src/mcp/find-opportunities.ts imports packages/gittensory-miner/lib/opportunity-fanout.js
(committed, pre-built), which imports @jsonbored/gittensory-engine. That package's dist/ is
gitignored and only exists after the 'Build engine package' step, but the step ran after
'Test with coverage' and was gated on the narrow packages/gittensory-engine/** path filter,
so any backend PR that didn't touch the engine package directly failed to resolve it.
@JSONbored JSONbored self-assigned this Jul 7, 2026
@JSONbored
JSONbored merged commit 3a74800 into main Jul 7, 2026
6 checks passed
@JSONbored
JSONbored deleted the fix/ci-build-engine-before-tests branch July 7, 2026 12:11
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 7, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@aa94659). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4036   +/-   ##
=======================================
  Coverage        ?   93.58%           
=======================================
  Files           ?      381           
  Lines           ?    35483           
  Branches        ?    13014           
=======================================
  Hits            ?    33206           
  Misses          ?     1617           
  Partials        ?      660           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

JSONbored added a commit that referenced this pull request Jul 8, 2026
…4081) (#4084)

src/mcp/find-opportunities.ts (since #3986) imports packages/gittensory-miner/lib/
opportunity-fanout.js (committed, pre-built), which imports @jsonbored/gittensory-engine.
That package's dist/ is gitignored and only exists after an explicit build step -- Cloudflare's
Workers Builds pipeline for gittensory-api runs npm run deploy:api directly with no such step,
so wrangler deploy's bundler has failed to resolve the import on every push to main since
487d26a (2026-07-07T09:36:46Z). Mirrors the identical fix already applied to the self-host
image build (#4034), the release build (#4063), and the backend test suite (#4036).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant