Skip to content

fix(ci): build engine package before the release self-host bundle - #4063

Merged
JSONbored merged 1 commit into
mainfrom
fix/release-orb-build-engine-first
Jul 7, 2026
Merged

fix(ci): build engine package before the release self-host bundle#4063
JSONbored merged 1 commit into
mainfrom
fix/release-orb-build-engine-first

Conversation

@JSONbored

@JSONbored JSONbored commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

No issue: this is a maintainer-authored release-engineering fix for a live release failure (cutting orb-v0.4.0-beta.2), not a pre-planned feature — filing a tracking issue for a one-line CI fix already reproduced and verified below didn't seem warranted.

  • release-selfhost.yml's --all bundle mode (the self-contained Docker image build) hit the same @jsonbored/gittensory-engine resolution gap that ci.yml's validate-code job was fixed for earlier today (fix(ci): build engine package before running backend tests #4036): packages/gittensory-miner/lib/*.js (committed, pre-built) imports the engine package, whose dist/ is gitignored and only exists after an explicit build step.
  • The regular selfhost.yml smoke test's narrower (non --all) build never touches that import chain, so it never caught this — only the release pipeline's full self-contained bundle does.
  • Discovered when cutting orb-v0.4.0-beta.2 failed with Could not resolve "@jsonbored/gittensory-engine" on node scripts/build-selfhost.mjs --all.

Test plan

  • npm run actionlint — clean
  • Reproduced the failure locally: rm -rf packages/gittensory-engine/dist && node scripts/build-selfhost.mjs --all fails identically to the release run
  • Built the engine package and re-ran the same command — succeeds

release-selfhost.yml's --all bundle mode (the self-contained Docker image
build) hit the same @jsonbored/gittensory-engine resolution gap ci.yml's
validate-code job was fixed for: packages/gittensory-miner/lib/*.js (committed,
pre-built) imports the engine package, whose dist/ is gitignored and only
exists after an explicit build step. The regular selfhost.yml smoke test's
narrower (non --all) build never touches that import chain, so it never
caught this -- only the release pipeline's full bundle does, discovered when
cutting orb-v0.4.0-beta.2 failed on this exact error.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-07 20:59:01 UTC

1 file · 1 AI reviewer · 2 blockers · readiness 93/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

Review summary
This adds an explicit `npm run build --workspace @​jsonbored/gittensory-engine` step to release-selfhost.yml before the `--all` self-host bundle build, mirroring the fix already applied to ci.yml's validate-code job in #4036. The root cause (packages/gittensory-miner/lib/*.js imports the engine package's gitignored dist/, which only exists after a build step) is the same in both pipelines, so building the engine package in the same place it was fixed elsewhere is the correct, narrow fix rather than a workaround. The PR description documents a concrete local repro (`rm -rf packages/gittensory-engine/dist && node scripts/build-selfhost.mjs --all` fails, succeeds after the added build step) and all CI checks passed, so this isn't a can't-occur or speculative fix — it addresses a real failure that blocked cutting orb-v0.4.0-beta.2.

Nits — 4 non-blocking
  • No open issue is linked in the PR description; per repo convention this should reference the tracking issue for the beta.2 release failure (or state this is a maintainer-authored release-engineering fix) rather than leaving the tie unstated.
  • The 5-line comment block at release-selfhost.yml:99-105 largely restates the PR description verbatim — consider trimming it to the one non-obvious fact (dist/ is gitignored and only exists post-build) and let the PR/commit history carry the rest.
  • Confirm the `@​jsonbored/gittensory-engine` workspace name in this added step matches the same workspace name used in the ci.yml fix(ci): build engine package before running backend tests #4036 fix, to keep the two build invocations consistent if the package is ever renamed.
  • Since both ci.yml and release-selfhost.yml now independently invoke `npm run build --workspace @​jsonbored/gittensory-engine` before their respective bundle steps, consider whether selfhost.yml's narrower smoke test should also build the engine package preemptively so a future --all-only import doesn't silently reopen this gap there too.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
Signal Result Evidence
Code review ❌ 2 blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 51 registered-repo PR(s), 43 merged, 532 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 532 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 51 PR(s), 532 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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.

🟩 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.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.57%. Comparing base (1dc6e0a) to head (603950e).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4063   +/-   ##
=======================================
  Coverage   93.57%   93.57%           
=======================================
  Files         378      378           
  Lines       35487    35487           
  Branches    13017    13017           
=======================================
  Hits        33207    33207           
  Misses       1618     1618           
  Partials      662      662           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 7, 2026
@JSONbored
JSONbored merged commit ff9ec09 into main Jul 7, 2026
10 checks passed
@JSONbored
JSONbored deleted the fix/release-orb-build-engine-first branch July 7, 2026 21:00
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant