fix(selfhost): stop .dockerignore from breaking the engine's own build - #4354
Merged
Conversation
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`.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This was referenced Jul 9, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ownsrc/review/enrichment-analyzers-taxonomy.tsimportsreview-enrichment/analyzer-metadata.jsondirectly, so excluding the whole directory strips a filescripts/build-selfhost.mjs's esbuild bundle actually needs.docker buildfails withCould not resolve "../../review-enrichment/analyzer-metadata.json"— a pre-existing bug onmain, 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 touchingdocker-compose.ymldid..dockerignorenegation pattern (!review-enrichment/analyzer-metadata.json), mirroring the exact same technique already used two lines above it fordist/server.mjs. The rest ofreview-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.mjsboth pass).Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checkdocker build --target build— reproduced the failure pre-fix, confirmed the fix resolves it (esbuild bundle + sourcemap validation both pass)src/**/test/**change — nothing fornpm run test:coverage/Codecov to measure;.dockerignoreisn't TypeScript and isn't part of the patch-coverage surfacenpm audit --audit-level=moderate— 0 vulnerabilities (unaffected by this change, ran as part of validating the sibling PRs)Safety
.dockerignorechange.Notes
cf-typegenregeneration needed.