Repository navigation
fix(tools): name the clean, not the build, when .next cannot go - #458
Merged
Merged
Conversation
e2e on main ran 38:30 and green, a new maximum, and the deploy landed 8.5 minutes after the old 1800 s witness rail would have expired. With the rail where it was this morning the measurement would have been lost the way #439 was. The lesson is not the band but distrust of it: a sampled upper bound was overtaken twice in one night. The swap itself: 2359 x 200 per path, zero non-200, offset +15.8 s with the identity read ten times rather than once. #453 gains a fifth data point and the loop's next unit, I1, is written up with the three decisions it waits on. Co-Authored-By: Claude Code <noreply@anthropic.com>
`rm -rf .next && npm run build` reported the build's reason for both failures. `make dev` runs its container as root, so what it leaves in .next/dev is root-owned, rm cannot unlink it, and the run ended on "npm run build failed" for a build that had never started -- two hundred lines of Permission denied above a message pointing at the wrong half. The two commands are separate now, the real rm error is shown, and the escape hatch is spelled out. selftest gets the broken case: an unwritable directory is the same refusal without needing a container, skipped as root because root ignores the mode bits. Verified red without the fix. This is the second half of #323's acceptance; the first half still needs a decision between running the dev container as node and moving the dev build output out of .next, so the issue stays open. Co-Authored-By: Claude Code <noreply@anthropic.com>
G1NG4R
added a commit
that referenced
this pull request
Oct 17, 2026
Backlog only — no code. The measurements around #458, including one swap that got away and the rule that follows from it. ## What it carries - **The `f0e5998` swap is unobserved, and the cause was my scheduling.** The witness was armed while `e2e` attempt 1 was running; that attempt **failed**, so `deploy` was gated off and its 2700 s rail burned down on a window where no swap could occur. It expired at 03:46:06. The rerun's `deploy` began at **03:46:26** — twenty seconds later. A second witness started at 03:51 and measured what was already over. - **The rule: one witness per `e2e` attempt**, re-armed until the target sha is actually serving. It worked immediately on the next swap — armed 04:13:34, twelve seconds after `e2e` began, and the swap came in clean: **934 × 200 per path, zero non-200**, offset **+15.8 s**. - **`v0.47.3` is the night's first release**, because `fix` is a releasing type where the six preceding `chore` and `docs` merges correctly produced none. - **`p95` read 241.2 ms**, measured five minutes after the restart. That is the #452 shape, and the entry says so **without claiming a second reading**: both of my reads returned the same `measuredAt`, so this is explained by precedent and arithmetic, not disproven by a fresh measurement. - **Two tooling errors of my own, same family**: a `kill` that returned 0 while the witness kept sampling (I had killed the wrapper, not the witness — a return code is not proof), and `printf '--- …'`, whose format string begins with a dash and is read as an option. The second is why the coverage figure for #453's sixth data point is derived rather than read. Tally: 6 drops in roughly 41 430 requests, thirteen swap runs in a row without one. A fifth no-deploy window was **discarded** rather than counted — it had no deploy ahead of it and was stopped so the next witness could not run beside it. `make check` green. Co-authored-by: Claude Code <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.
The second half of #323's acceptance: "and if the build genuinely fails, the
script says so for the right reason."
rm -rf .next && npm run buildreported the build's reason for both failures.make devruns its container as root, so what it leaves in.next/devisroot-owned,
rmcannot unlink it, and the run ended onnpm run build failedfor a build that had never started — two hundred lines of
Permission deniedabove a message pointing at the wrong half. Four sightings, a quarter of an hour
each.
What changed
rmline is shown, the message says the buildnever started, and the escape hatch is spelled out (a container of the same
origin, not
sudo).Both directions reproduced by hand against the real script:
The broken case, in selftest
bundle-size.shwas not in the fixture's copy list, so it had no coverage atall. One
refusescase now holds it: an unwritable directory is the samerefusal
rmgives on root-owned files, without needing a container to make one.Two traps avoided and noted in the source: the fixture's mode is restored
before the trap runs, because
cleanupis itselfrm -rf "$tmp"and wouldotherwise fail on it — the same bug class this PR fixes; and the case is skipped
as root, where the mode bits are ignored and it would go red for a missing
package.jsoninstead.Verified red without the fix:
rejected, but not for 'the build never started'.What this does not do
#323 stays open. Its first clause —
make devthenmake bundle-sizewithnothing deleted by hand — needs the decision the issue names and does not make:
run the dev container as
nodethe way the production image already does, ormove the dev build output out of
.next.make checkgreen;make check-toolsgreen with the new case.