Skip to content

fix(paddock): stamp the shell served at / too, and adopt a build when unstamped - #70

Merged
jhgaylor merged 1 commit into
mainfrom
fix/paddock-index-stamp
Sep 7, 2026
Merged

fix(paddock): stamp the shell served at / too, and adopt a build when unstamped#70
jhgaylor merged 1 commit into
mainfrom
fix/paddock-index-stamp

Conversation

@jhgaylor

@jhgaylor jhgaylor commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Why (live regression from #69, found in production after the roll)

#69 stamped the build id only on the SPA fallback path. / maps straight to index.html and was served as a bare file, so every tab loaded from the root (which is every tab) carried no <meta name="paddock-build">, sent no x-paddock-build header, and was turned away from the strip with 409 stale_client by the very check meant for old bundles. Checked against paddock.demo.managoat.com after the rollout: the x-paddock-build header and /api/config named the build, the HTML did not.

Consequence while it stands: a freshly loaded tab never gets a strip, and an owner's boot sees no box and sends the bootstrap turn as an extra tab on the existing machine.

What changed

  • serveStatic routes / and /index.html through the stamped shell like every client-side route. The test now covers all three paths and fails without the fix (checked by stashing the server change).
  • src/lib/build.ts: a tab whose HTML carried no stamp adopts the first build a response names and sends it from then on, so a current bundle can never be permanently refused by a server that stamps. The cost is the sub-second window between the HTML and its first API answer, in which a deploy would leave that tab not self-reloading until the deploy after; far cheaper than the failure this guards against.

222 pass, tsc --noEmit and bun run build green locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_018R1XyyWd9MDMYXqFL71owk

… unstamped

#69 stamped the build id only on the SPA fallback path. `/` maps straight to
`index.html` and was served as a bare file, so every tab loaded from the root
-- which is every tab -- carried no <meta name="paddock-build">, sent no
x-paddock-build header, and was turned away from the strip with 409
stale_client by the very check meant for OLD bundles. Verified in production
after the roll: the header and /api/config named the build, the HTML did not.

- serveStatic routes `/` and `/index.html` through the stamped shell like
  every client-side route; the test now covers all three paths and fails
  without the fix.
- A tab whose HTML carried no stamp adopts the first build a response names
  and sends it from then on, so a current bundle can never be permanently
  refused by a server that stamps. The cost is the sub-second window between
  the HTML and its first API answer, in which a deploy would leave that tab
  not reloading until the deploy after -- far cheaper than the failure this
  guards against.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018R1XyyWd9MDMYXqFL71owk
@jhgaylor
jhgaylor merged commit e493201 into main Sep 7, 2026
2 checks passed
@jhgaylor
jhgaylor deleted the fix/paddock-index-stamp branch September 7, 2026 05:25
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