Repository navigation
chore: bump astro to 7.2.9 - #1102
Conversation
Two majors. Rendered output compared build-to-build: identical structure and all 123 text nodes. Astro 7's compressHTML:'jsx' default strips inter-element whitespace, but every inline-adjacent case sits in a flex or grid container that already ignored it.
tend-agent
left a comment
There was a problem hiding this comment.
One gap in the breaking-change audit — the Astro 7 major that lands on this repo's dev workflow rather than on the built site.
astro dev daemonizes itself when it detects an agent. Astro 7 added background dev-server management (withastro/astro#16610): when am-i-vibing reports an agent environment, astro dev spawns a detached child and returns. am-i-vibing is now a direct astro dependency, and it types a bare CLAUDECODE env var as claude-code / agent — so any worktree whose post-start hook runs from inside a Claude Code session takes that path.
That collides with the server step in .config/wt.toml — wt step tether -C site -- npm run dev -- --port {{ branch | hash_port }} — whose comment says "Tether owns the whole Astro process group until the worktree is removed". In astro@7.2.9 the spawn is detached: true plus child.unref() (dist/cli/server.js, in background()), so the server gets its own process group and the tethered npm run dev exits as soon as it has forked. Teardown on worktree removal no longer reaches the real server, which keeps holding the branch's hashed port; a later worktree on that branch then binds the next free port while wt list's URL column still points at the orphan serving the old tree. Restarts are at least benign — background() sees the existing .astro/dev.json lock and returns 0 rather than erroring.
Two doc claims go stale with it: the child redirects stdout/stderr to .astro/dev.log, so wt config state logs (site/README.md) and "logs land in .git/wt/logs/" (root CLAUDE.md) stop describing where dev-server output goes.
The opt-out is one env var on that step — the gate is !process.env.ASTRO_DEV_BACKGROUND && isRunByAgent(), so ASTRO_DEV_BACKGROUND=0 (or any non-empty value) restores the foreground behaviour the tether expects. npm run preview has the identical shape under ASTRO_PREVIEW_BACKGROUND, and site/README.md documents that script too.
I read this off the shipped astro@7.2.9 and am-i-vibing@0.4.0 rather than running it in a worktree, so the trigger condition — whether CLAUDECODE actually reaches the hook in practice — is the part worth confirming. Happy to push the wt.toml line here if you want it folded into this PR.
What else I checked, all clean
- Lockfile portability. All nine
@astrojs/compiler-binding-*platform packages are in the lockfile as optional deps, sonpm ciresolves on darwin/linux/win and both libcs — not just the platform that regenerated it. No orphaned astro-5-era entries, singlenode_modules/astro, rootdependenciesin sync withpackage.json. astro/tsconfigs/strictstill ships in 7.2.9 (fetched it). Worth checking explicitly because nothing in CI typechecks the site —astro builddoesn't runastro check— so a removed preset would have failed silently in editors only.- Config keys.
site,base,server.hostall still validate; the greenbuild-sitejob on this PR is the evidence, since Astro rejects unknown config. - Remaining 7.0.0 majors.
@astrojs/dbremoval,astro:transitionsdeprecated-API removal, theexperimental.rustCompiler/queuedRendering/cache/routeRulesflag removals, Sätteri as the Markdown processor, and advanced routing'ssrc/fetch.tsentrypoint all miss a single static page with no.mdcontent and no on-demand rendering. The Rust compiler's stricter syntax handling is covered by the same green build. - Version. 7.2.9 is npm's current
latest; a caret range on a major bump matches how the other pins in the weekly sweep are written.
Astro 7 re-spawns `astro dev` detached when it detects an agent environment (a bare `CLAUDECODE` satisfies `am-i-vibing`), which takes the real server out of the tether's process group and redirects its output to `site/.astro/dev.log`. Set `ASTRO_DEV_BACKGROUND` on the post-start step to keep the pre-7 foreground behaviour the tether and the log docs assume.
|
Confirmed against the shipped packages and folded the fix in as Still unconfirmed, as you flagged: I read this off the packages rather than running a worktree, so whether One thing the audit didn't reach — Astro 7 also adds a dev-server lockfile at I didn't push an exclude for it: Where this is in the codeRead from
Residual cosmetic effect of the fix: the foreground server writes
|
Moves the site from Astro 5 to Astro 7 (`^5.14.0` → `^7.2.9`), the last pin in the weekly sweep still behind. Two majors, so this is checked against the built output rather than just a green build: the rendered page is semantically unchanged, and the one behaviour change that does reach the output — Astro 7 makes `compressHTML: 'jsx'` the default, which strips whitespace between elements — lands only in places where flex or grid already ignores it. `publish-site.yaml` builds on PRs precisely for this, so CI is the second check. The one Astro 7 major that doesn't land on the built site is `astro dev` backgrounding itself under an agent environment, which would break the `wt` worktree dev-server tether. A second commit sets `ASTRO_DEV_BACKGROUND` on that post-start step to keep the foreground behaviour; details in the review thread. <details><summary>How the output was compared</summary> Both versions were built from the same source and the `dist/` trees diffed. **Structure and text.** With scope hashes and asset hashes normalised, the two `index.html` files are identical in tag sequence and attributes, and all **123 text nodes are byte-identical**. The `<pre>` block carrying the install commands is byte-identical too, newlines included. **The whitespace change.** Astro 7 removes inter-element whitespace at 239 of 286 tag gaps. Most sit between block elements, where it never rendered. Six kinds of gap have an inline-capable element on both sides, and each is inside a container that does not render whitespace between its children: | Gap | Container | Why it can't show | |---|---|---| | `</svg> <span>tend</span>` (wordmark) | `.site-header .wordmark` | `display:inline-flex; gap:.55rem` — flex ignores it, the gap supplies the space | | `</a> <a>` ×2 (footer links) | `.site-footer nav` | `display:flex; gap:1.4rem` | | `</span> <span>`, `</span> <a>`, `</a> <time>` ×36 (activity placeholder rows) | `.activity-rows` / `.activity-row` | `display:grid` with `grid-template-columns:subgrid` | Same-line whitespace is preserved as the changelog says: `tended by hand · <a>MIT</a>` still carries its space. **CSS.** Identical selector set. Every declaration difference is a Lightning CSS normalisation with the same computed result — `transparent` → `#0000` and `background:0 0`, `animation:X 3s ease` → `animation:3s ease X`, `.05s` → `50ms`, `grid-column:1 / -1` → `1/-1`, `column-gap:0;row-gap:.5rem` → `gap:.5rem 0`, `transition:opacity .25s ease` → `.25s` (`ease` is the initial value). **JS.** Bundles are re-minified by a different engine, so they don't diff usefully. Every string the runtime depends on is present in the same number of modules in both builds: `api.tend-src.com`, `/activity`, `/currently-tending`, `recent-activity`, `currently-tending`, `stats`, `data-stat-strip`, `activity-row`. Not verified: the bundles were not executed in a browser — there's no headless browser in this environment. **Astro 7 breaking changes, against what this site uses:** `@astrojs/db` removal, `astro:transitions` deprecated-API removal, `experimental.rustCompiler`/`queuedRendering`/`cache`/`routeRules` flag removals, and the Sätteri Markdown processor all touch features the site doesn't use — it is one static `.astro` page with client scripts. Vite 8 and the Rust compiler are internal. **Node.** Astro 7 requires `node >=22.12.0`. `publish-site.yaml` uses `node-version: '22'`, which resolves to the newest 22.x (22.23.2 on this runner), so it is satisfied — worth knowing if that pin is ever narrowed. </details> --------- Co-authored-by: tend-agent <270458913+tend-agent@users.noreply.github.com>
Moves the site from Astro 5 to Astro 7 (
^5.14.0→^7.2.9), the last pin in the weekly sweep still behind. Two majors, so this is checked against the built output rather than just a green build: the rendered page is semantically unchanged, and the one behaviour change that does reach the output — Astro 7 makescompressHTML: 'jsx'the default, which strips whitespace between elements — lands only in places where flex or grid already ignores it.publish-site.yamlbuilds on PRs precisely for this, so CI is the second check.The one Astro 7 major that doesn't land on the built site is
astro devbackgrounding itself under an agent environment, which would break thewtworktree dev-server tether. A second commit setsASTRO_DEV_BACKGROUNDon that post-start step to keep the foreground behaviour; details in the review thread.How the output was compared
Both versions were built from the same source and the
dist/trees diffed.Structure and text. With scope hashes and asset hashes normalised, the two
index.htmlfiles are identical in tag sequence and attributes, and all 123 text nodes are byte-identical. The<pre>block carrying the install commands is byte-identical too, newlines included.The whitespace change. Astro 7 removes inter-element whitespace at 239 of 286 tag gaps. Most sit between block elements, where it never rendered. Six kinds of gap have an inline-capable element on both sides, and each is inside a container that does not render whitespace between its children:
</svg> <span>tend</span>(wordmark).site-header .wordmarkdisplay:inline-flex; gap:.55rem— flex ignores it, the gap supplies the space</a> <a>×2 (footer links).site-footer navdisplay:flex; gap:1.4rem</span> <span>,</span> <a>,</a> <time>×36 (activity placeholder rows).activity-rows/.activity-rowdisplay:gridwithgrid-template-columns:subgridSame-line whitespace is preserved as the changelog says:
tended by hand · <a>MIT</a>still carries its space.CSS. Identical selector set. Every declaration difference is a Lightning CSS normalisation with the same computed result —
transparent→#0000andbackground:0 0,animation:X 3s ease→animation:3s ease X,.05s→50ms,grid-column:1 / -1→1/-1,column-gap:0;row-gap:.5rem→gap:.5rem 0,transition:opacity .25s ease→.25s(easeis the initial value).JS. Bundles are re-minified by a different engine, so they don't diff usefully. Every string the runtime depends on is present in the same number of modules in both builds:
api.tend-src.com,/activity,/currently-tending,recent-activity,currently-tending,stats,data-stat-strip,activity-row. Not verified: the bundles were not executed in a browser — there's no headless browser in this environment.Astro 7 breaking changes, against what this site uses:
@astrojs/dbremoval,astro:transitionsdeprecated-API removal,experimental.rustCompiler/queuedRendering/cache/routeRulesflag removals, and the Sätteri Markdown processor all touch features the site doesn't use — it is one static.astropage with client scripts. Vite 8 and the Rust compiler are internal.Node. Astro 7 requires
node >=22.12.0.publish-site.yamlusesnode-version: '22', which resolves to the newest 22.x (22.23.2 on this runner), so it is satisfied — worth knowing if that pin is ever narrowed.