fix(ci): build the engine package before Typecheck, not just before coverage#5093
Conversation
…overage validate-code's "Build engine package" step ran after Typecheck, so packages/gittensory-engine/dist/ (git-ignored, only materializes once that step runs) didn't exist yet when tsc ran. This was latent until a root test file added the first real (non-vi.mock) `import type` from the "@jsonbored/gittensory-engine" package specifier -- needing its dist/-backed types, not just its vi.mock-redirected runtime behavior -- which failed TS2307 in CI while passing locally against a stale leftover dist/ (PR #5082). The exact same ordering class was already fixed once for "Test with coverage" (#ci-engine-build-order); this moves the build step ahead of both consumers instead of just one. Verified by removing packages/gittensory-engine/dist locally, running the build step, then typecheck in that order -- passes clean, matching the new CI sequence.
|
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 #5093 +/- ##
=======================================
Coverage 94.20% 94.20%
=======================================
Files 470 470
Lines 39736 39736
Branches 14501 14501
=======================================
Hits 37435 37435
Misses 1645 1645
Partials 656 656
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 14:48:38 UTC
⏸️ Suggested Action - Manual Review
Review summary Blockers
Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory 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://gittensory.aethereal.dev/docs/gittensory-commands 🟩 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
validate-code's "Build engine package" step ran after "Typecheck", sopackages/gittensory-engine/dist/(git-ignored, only materializes once that step runs —package.json'smain/typespoint atdist/index.js/dist/index.d.ts) didn't exist yet whentsc --noEmitran.This was latent until PR #5082 (
test/unit/miner-coding-agent-house-rules.test.ts) added the first real (non-vi.mock)import type {...} from "@jsonbored/gittensory-engine"in a root test file — needing the package specifier'sdist/-backed types, not just itsvi.mock-redirected runtime behavior — which failedTS2307: Cannot find modulein CI while typechecking fine locally against a stale leftoverdist/from a previous local build.The exact same ordering class was already fixed once, for "Test with coverage" — the
#ci-engine-build-ordercomment right above the build step documents it:src/mcp/find-opportunities.tsimports committed miner-lib JS that itself imports@jsonbored/gittensory-engine, so any backend test run needsdist/built first, not just a PR that touchespackages/gittensory-engine/**directly. That fix moved the build step ahead of coverage, but it stayed after Typecheck — so Typecheck kept the exact same gap coverage used to have.This moves "Build engine package" ahead of both "Restore TypeScript incremental build cache"/"Typecheck" and "Test with coverage" instead of just the latter, and updates the comment to explain both consumers.
Validation
packages/gittensory-engine/distlocally and rannpm run typecheck— passed clean (proving the OLD order's local-vs-CI discrepancy was purely about a stale leftoverdist/masking the gap, not a false alarm).dist/again, rannpm run build --workspace @jsonbored/gittensory-engine(the exact command the moved step runs), thennpm run typecheckin that order — passes clean, matching the new CI sequence.npm run actionlint— clean on the modified workflow file.Scope
.github/workflows/ci.yml), reordering + comment update only.site//CNAME/VitePress.Safety
Notes
Checked
.github/workflows/release-selfhost.ymlfor the same class of bug — it already builds the engine package correctly (before its self-host bundling step), with its own#ci-engine-build-order (release pipeline)comment noting it's a separate instance of the same fix. No change needed there.