Skip to content

fix(selfhost): stop .dockerignore from breaking the engine's own build - #4354

Merged
JSONbored merged 1 commit into
mainfrom
claude/fix-dockerignore-analyzer-metadata
Jul 9, 2026
Merged

fix(selfhost): stop .dockerignore from breaking the engine's own build#4354
JSONbored merged 1 commit into
mainfrom
claude/fix-dockerignore-analyzer-metadata

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • review-enrichment/ is correctly excluded from the Docker build context wholesale — it's REES, a separate Railway service with its own Dockerfile. But the main engine's own src/review/enrichment-analyzers-taxonomy.ts imports review-enrichment/analyzer-metadata.json directly, so excluding the whole directory strips a file scripts/build-selfhost.mjs's esbuild bundle actually needs.
  • Result: docker build fails with Could not resolve "../../review-enrichment/analyzer-metadata.json" — a pre-existing bug on main, not caused by any in-flight change. It surfaced now because the "build + boot smoke test" workflow is path-gated (only runs when relevant paths change) and hadn't been triggered by a recent PR until one touching docker-compose.yml did.
  • Fix: re-include just that one file via a .dockerignore negation pattern (!review-enrichment/analyzer-metadata.json), mirroring the exact same technique already used two lines above it for dist/server.mjs. The rest of review-enrichment/ (the actual REES service code) stays excluded.

Verified with a real local docker build --target build -t gittensory-build-test:local . — reproduced the failure on the unpatched file, confirmed green after the fix (build-selfhost.mjs + validate-selfhost-sourcemap.mjs both pass).

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused — a single-line root-cause fix, no unrelated changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • Discovered as a blocking CI failure while validating feat(selfhost): tune Ollama concurrency for a shared embed+vision GPU (#4327) #4352; filing as its own PR since it's a pre-existing, unrelated bug.

Validation

  • git diff --check
  • Real local docker build --target build — reproduced the failure pre-fix, confirmed the fix resolves it (esbuild bundle + sourcemap validation both pass)
  • No src/**/test/** change — nothing for npm run test:coverage/Codecov to measure; .dockerignore isn't TypeScript and isn't part of the patch-coverage surface
  • npm audit --audit-level=moderate — 0 vulnerabilities (unaffected by this change, ran as part of validating the sibling PRs)

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • N/A — no auth/UI/API/OpenAPI/MCP surface touched; single-file .dockerignore change.

Notes

  • No migration, OpenAPI, or cf-typegen regeneration needed.

review-enrichment is excluded wholesale (it's REES, a separate
Railway service with its own Dockerfile) but the main engine's own
src/review/enrichment-analyzers-taxonomy.ts imports
review-enrichment/analyzer-metadata.json directly -- excluding it
strips a file scripts/build-selfhost.mjs's esbuild bundle needs,
failing the Docker build with a module-resolution error. Re-include
just that one file via a dockerignore negation, verified with a real
local `docker build --target build`.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 9, 2026
@JSONbored
JSONbored merged commit 06d3856 into main Jul 9, 2026
8 checks passed
@JSONbored
JSONbored deleted the claude/fix-dockerignore-analyzer-metadata branch July 9, 2026 03:35
JSONbored added a commit that referenced this pull request Jul 10, 2026
…#4370) (#4687)

Vision-vision screenshots are captured fullPage, so image HEIGHT scales
with a page's full scrollable content even at a fixed 1440px viewport
width -- Qwen's dynamic-resolution encoder tokenizes proportional to
pixel count, inflating vision prefill cost/latency on long pages.

Adds a downscale-to-1280px-longest-edge step scoped ONLY to the bytes
sent to the vision model (fetchShotContentBlock), via the same
Worker-safe-stub / self-host-real-implementation seam already used for
pixel-diff.ts and scroll-gif.ts -- sharp is a native binding and can't
run on the Cloudflare Workers runtime, so capture.ts (Worker-reachable)
imports only a no-op default; the real resize is swapped in by
build-selfhost.mjs's esbuild plugin for the self-host bundle only.
Stored/displayed screenshots (the same URL embedded in the PR comment)
are completely untouched.

Verified with a real local docker build + boot on the target
architecture: sharp must be a genuine `dependencies` entry (not
devDependencies) since NODE_ENV=production in the runtime image
silently skips an explicit `npm install` of a devDependency-classified
package -- caught only by actually building and booting the image, not
by static review, mirroring how #4354 was diagnosed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant