What's broken
The Cloudflare "Workers Builds" auto-deploy for gittensory-api (triggered on every push to main) has failed on every commit since 487d26ac (PR #3986, merged 2026-07-07T09:36:46Z). Confirmed via:
gh api repos/JSONbored/gittensory/commits/<sha>/check-runs \
--jq '.check_runs[] | select(.name == "Workers Builds: gittensory-api")'
The last successful deploy was 2026-07-07T09:33:24Z (wrangler deployments list --name gittensory-api) — the hosted Worker has been running code from before that point ever since.
Root cause
PR #3986 added src/mcp/find-opportunities.ts, which imports packages/gittensory-miner/lib/opportunity-fanout.js and opportunity-ranker.js (committed, pre-built JS). Both of those import @jsonbored/gittensory-engine, whose dist/ output is gitignored (packages/gittensory-engine/.gitignore) and only exists after an explicit npm run build --workspace @jsonbored/gittensory-engine step.
The Cloudflare Workers Build pipeline for gittensory-api runs npm run deploy:api directly (wrangler d1 migrations apply gittensory --remote && wrangler deploy) with no engine-build step first, so wrangler deploy's esbuild bundler can't resolve the import:
✘ [ERROR] Could not resolve "@jsonbored/gittensory-engine"
packages/gittensory-miner/lib/opportunity-fanout.js:2:39
The module "./dist/index.js" was not found on the file system
Reproduced locally: mv packages/gittensory-engine/dist /tmp/... && wrangler deploy --dry-run fails with the exact same error.
This is the same class of bug already fixed three times for other pipelines that gained this same import chain:
gittensory-api's deploy pipeline (npm run deploy:api in package.json, invoked directly by Cloudflare's Workers Builds product rather than a .github/workflows/*.yml file) is the one consumer that never got the equivalent fix.
Fix
Prepend the engine build to deploy:api in package.json, mirroring the other three fixes.
What's broken
The Cloudflare "Workers Builds" auto-deploy for
gittensory-api(triggered on every push tomain) has failed on every commit since487d26ac(PR #3986, merged 2026-07-07T09:36:46Z). Confirmed via:The last successful deploy was
2026-07-07T09:33:24Z(wrangler deployments list --name gittensory-api) — the hosted Worker has been running code from before that point ever since.Root cause
PR #3986 added
src/mcp/find-opportunities.ts, which importspackages/gittensory-miner/lib/opportunity-fanout.jsandopportunity-ranker.js(committed, pre-built JS). Both of those import@jsonbored/gittensory-engine, whosedist/output is gitignored (packages/gittensory-engine/.gitignore) and only exists after an explicitnpm run build --workspace @jsonbored/gittensory-enginestep.The Cloudflare Workers Build pipeline for
gittensory-apirunsnpm run deploy:apidirectly (wrangler d1 migrations apply gittensory --remote && wrangler deploy) with no engine-build step first, sowrangler deploy's esbuild bundler can't resolve the import:Reproduced locally:
mv packages/gittensory-engine/dist /tmp/... && wrangler deploy --dry-runfails with the exact same error.This is the same class of bug already fixed three times for other pipelines that gained this same import chain:
release-selfhost.yml)ci.yml)gittensory-api's deploy pipeline (npm run deploy:apiinpackage.json, invoked directly by Cloudflare's Workers Builds product rather than a.github/workflows/*.ymlfile) is the one consumer that never got the equivalent fix.Fix
Prepend the engine build to
deploy:apiinpackage.json, mirroring the other three fixes.