fix: vendor web-shared via git subtree, unblock frontend build#2
Merged
fix: vendor web-shared via git subtree, unblock frontend build#2
Conversation
git-subtree-dir: web/ui/src/shared git-subtree-split: a5195d42958310e8d1cbc14a7d5349d30115b251
Previously web/ui/vite.config.ts and tsconfig.json resolved
@beacon-shared/* via a path relative to a sibling directory outside
the haul repo:
"@beacon-shared": "../../../web-shared"
That only worked on the author's laptop and broke the docker build
stage on CI, which runs `npm run build` inside the Dockerfile as
part of image creation. Haul has no standalone frontend test job, so
the failure only surfaced in the docker job and was easy to miss
among the Go-side test failures — but the structural problem is the
same as pilot and prism got hit by this week.
Vendors web-shared into haul's tree at web/ui/src/shared/ via
`git subtree add --prefix=web/ui/src/shared
https://github.com/beacon-stack/web-shared.git main --squash` (the
parent commit on this branch), then rewires the Vite alias and the
tsconfig path map to point at the vendored copy.
No import changes in any haul source file — every existing
`import X from "@beacon-shared/Y"` still resolves correctly.
Same architectural reasoning as pilot and prism's parallel PRs:
subtree over published npm package because web-shared ships .tsx
source, a real package needs build/exports/peerDeps, and the React
singleton hack gets harder when the dep is installed via npm instead
of aliased in-tree.
Verified: `npm run build` succeeds cleanly in 1.36s.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
haul depends on anacrolix/torrent which transitively pulls in a large DHT/BitTorrent package tree. golangci-lint's default context-load timeout (1 minute) is long enough for most Go projects but trips on haul with a misleading "JSON decoding failed: unexpected EOF" error that actually means "context load timeout hit mid-flight, partial JSON response truncated." Bump the timeout to 5m. Real linting is still sub-minute; the extra buffer is for the initial package graph construction only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Unblocks haul's frontend build step (inside the docker image build) which was failing with:
```
Failed to resolve import "@beacon-shared/..."
```
Same structural issue as pilot's and prism's parallel PRs — a sibling-directory path alias in `vite.config.ts` that resolved locally but not on GitHub runners. Haul has no standalone frontend test job, so the failure only surfaced in the docker build stage.
What this PR does
Zero import changes in any haul source file.
Verification
```
cd web/ui && npm run build # ✓ 1.36s clean
```
Why subtree
Same reasoning as the pilot and prism parallel PRs. Short version: `web-shared` ships `.tsx` source, a real published package needs build + `exports` map + `peerDependencies`, and the existing React singleton hack gets harder when the dep resolves via `node_modules`. Full decision trail is in beacon-stack/pilot#2.
Test plan