make test no longer runs the frontend's production build (refs #118) #137

Merged
clawbot merged 1 commits from issue-118-frontend-build-stage into next 2026-10-14 14:30:03 +02:00
Collaborator

make test no longer runs yarn build, which the frontend's unit tests do not need. This is the part of #118 that can be built now; the issue stays open.

What changed

  • The stage that runs the frontend's unit tests is renamed from frontend to frontend-test and no longer builds the page.
  • A new frontend-build stage starts from frontend-test, reusing its yarn packages and source, and runs yarn build. Like builder, it copies a file from the lint and test phases, so it cannot run unless both passed. The runtime stage copies dist/ from it.
  • git, which vite.config.js uses to read the commit for the footer, is installed in frontend-build instead of the test stage.
  • README.md, the comment in script/frontend-test and TODO.md say the same.

What a reader might trip over

  • In the image build, yarn build now waits for the Go tests and both linters instead of running beside them; it then runs alongside the Go compile in builder.
  • script/frontend-test on the host still runs the production build, because script/frontend-viewport-test uses it to make dist/.

Left for the ruling

Most of what remains of make test's time is compiling Go with the race detector from nothing. Whether a test build may keep Go's compiled packages between runs waits on sneak/prompts#113, so no build cache is added here. TODO.md lists it under Future Steps.

Judgement call: the stage rename, so the three node stages are named for what they do (frontend-lint, frontend-test, frontend-build).

Model: opus-5-5

`make test` no longer runs `yarn build`, which the frontend's unit tests do not need. This is the part of https://git.eeqj.de/sneak/netwatch/issues/118 that can be built now; the issue stays open. **What changed** - The stage that runs the frontend's unit tests is renamed from `frontend` to `frontend-test` and no longer builds the page. - A new `frontend-build` stage starts from `frontend-test`, reusing its yarn packages and source, and runs `yarn build`. Like `builder`, it copies a file from the `lint` and `test` phases, so it cannot run unless both passed. The runtime stage copies `dist/` from it. - `git`, which `vite.config.js` uses to read the commit for the footer, is installed in `frontend-build` instead of the test stage. - `README.md`, the comment in `script/frontend-test` and `TODO.md` say the same. **What a reader might trip over** - In the image build, `yarn build` now waits for the Go tests and both linters instead of running beside them; it then runs alongside the Go compile in `builder`. - `script/frontend-test` on the host still runs the production build, because `script/frontend-viewport-test` uses it to make `dist/`. **Left for the ruling** Most of what remains of `make test`'s time is compiling Go with the race detector from nothing. Whether a test build may keep Go's compiled packages between runs waits on https://git.eeqj.de/sneak/prompts/issues/113, so no build cache is added here. `TODO.md` lists it under Future Steps. Judgement call: the stage rename, so the three node stages are named for what they do (`frontend-lint`, `frontend-test`, `frontend-build`). Model: opus-5-5
clawbot added the needs-review label 2026-10-14 13:22:09 +02:00
clawbot self-assigned this 2026-10-14 13:22:09 +02:00
Author
Collaborator

PASS: make test no longer runs the production build, and the new frontend-build stage still cannot run unless the lint and test phases pass, as #118 asks of this part.

Disclosure: the branch conflicts with next only in TODO.md's Completed Steps list; I gated it rebased onto current next with both entries kept, this one on top, so it needs that rebase before merge.

Model: opus-5-5

PASS: `make test` no longer runs the production build, and the new `frontend-build` stage still cannot run unless the lint and test phases pass, as https://git.eeqj.de/sneak/netwatch/issues/118 asks of this part. Disclosure: the branch conflicts with `next` only in `TODO.md`'s Completed Steps list; I gated it rebased onto current `next` with both entries kept, this one on top, so it needs that rebase before merge. Model: opus-5-5
clawbot added 1 commit 2026-10-14 14:16:31 +02:00
yarn build moves out of the stage that runs the frontend's unit tests,
now named frontend-test, into a frontend-build stage of its own. It
starts from frontend-test for its yarn packages and source, installs
the git that vite.config.js reads the commit with, and copies from the
lint and test phases as builder does, so it cannot run unless they
passed. The runtime stage copies dist/ from it. The Go compile, most of
make test's time, is unchanged and waits on the ruling asked for in
sneak/prompts#113; no build cache is added.

Model: opus-5-5
clawbot force-pushed issue-118-frontend-build-stage from 139c965bef to bc150834a7 2026-10-14 14:16:31 +02:00 Compare
clawbot merged commit 580d12a934 into next 2026-10-14 14:30:03 +02:00
clawbot deleted branch issue-118-frontend-build-stage 2026-10-14 14:30:04 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/netwatch#137