René's URL Explorer Experiment


Title: id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 · Issue #6969 · developing-today/code · GitHub

Open Graph Title: id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 · Issue #6969 · developing-today/code

X Title: id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 · Issue #6969 · developing-today/code

Description: Problem pkgs/id/web/scripts/build-manifest.ts is not idempotent: a second run deletes the web UI's only stylesheet and writes a manifest that no longer mentions it — exit 0, no warning. The script's first step deletes every hashed styles...

Open Graph Description: Problem pkgs/id/web/scripts/build-manifest.ts is not idempotent: a second run deletes the web UI's only stylesheet and writes a manifest that no longer mentions it — exit 0, no warning. The script'...

X Description: Problem pkgs/id/web/scripts/build-manifest.ts is not idempotent: a second run deletes the web UI's only stylesheet and writes a manifest that no longer mentions it — exit 0, no warning. The scr...

Opengraph URL: https://github.com/developing-today/code/issues/6969

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0","articleBody":"## Problem\n\n`pkgs/id/web/scripts/build-manifest.ts` is not idempotent: a second run deletes the web UI's only stylesheet and writes a manifest that no longer mentions it — exit 0, no warning.\n\nThe script's first step deletes **every** hashed stylesheet in `dist/`:\n\n```ts\n// Remove stale hashed CSS files before processing\nfor (const file of readdirSync(distDir)) {\n  if (file.match(/^styles\\.[a-f0-9]+\\.css$/)) {\n    unlinkSync(join(distDir, file));\n  }\n}\n```\n\nThe only path that puts a stylesheet back is renaming an *unhashed* `styles.css` (the Tailwind output) later in the script. After a first run, `dist/` contains only `styles.\u003chash>.css` — there is no `styles.css` left to rename. So a second run:\n\n1. deletes `styles.\u003chash>.css` (the live stylesheet),\n2. finds no `styles.css` to rename,\n3. writes `manifest.json` with no `styles.css` entry, and logs it as success.\n\nThe Rust server then silently falls back to the unhashed default URL (`pkgs/id/src/web/mod.rs`, `load_asset_urls`: missing `styles.css` key → `/assets/styles.css`), which does not exist in `dist/` — every page is served unstyled, with no error at build time or runtime.\n\n`build:manifest` is a standalone script in `pkgs/id/web/package.json` (`\"build:manifest\": \"bun run scripts/build-manifest.ts\"`), so re-running it on an already-built `dist/` — a rebuild retry, a packaging step, a developer re-running one stage — is a realistic invocation, not a contrived one. The full `bun run build` sequence masks the bug because `build:css` regenerates `styles.css` first.\n\n## Evidence (verified this run, laptop probe)\n\nFixture `dist/` with `styles.css` + `main.abc12xyz.js`, script copied verbatim from `pkgs/id/web/scripts/build-manifest.ts` @ main `d3c26e14b5`, probe at `~/git/fleet/probe-build-manifest` on the laptop:\n\n- Run 1: `manifest.json: { \"main.js\": \"main.abc12xyz.js\", \"styles.css\": \"styles.74d94aed.css\" }`; `dist/` = `main.abc12xyz.js`, `manifest.json`, `styles.74d94aed.css`. Correct.\n- Run 2 (same dist, no regeneration): `manifest.json: { \"main.js\": \"main.abc12xyz.js\" }`; `dist/` = `main.abc12xyz.js`, `manifest.json` — **`styles.74d94aed.css` is gone and the manifest has no `styles.css` entry**. Exit code 0.\n\nThe JS side does not have this defect: the hashed bundle is kept and re-recorded on re-runs (only *stale extra* bundles are removed, newest by mtime wins). The CSS side deletes first and asks questions never.\n\nRelated contract: `pkgs/id/src/web/assets.rs` `is_hashed_filename` (#6779) pins the emitted names (`styles.` + exactly 8 lowercase hex + `.css`); the deletion regex in the script (`[a-f0-9]+`, any length) is also broader than that contract.\n\n## Why it matters\n\nA build step that destroys a built artifact on re-run, silently, turns a benign retry into a broken deployment: the server keeps serving pages whose stylesheet 404s. Nothing fails — not the script, not the server startup, not the manifest parse — so the breakage surfaces only as a visibly unstyled UI, far from the cause.\n\n## Acceptance criteria\n\n- Running `build-manifest.ts` twice in a row on the same `dist/` leaves the stylesheet file in place and `manifest.json` still maps `styles.css` to it (idempotent re-run).\n- A re-run with no unhashed `styles.css` but an existing contract-valid `styles.\u003c8-hex>.css` adopts that file into the manifest instead of deleting it (or fails loudly naming the missing input — silently dropping the entry is the one unacceptable outcome).\n- Stale-stylesheet cleanup still works: when `build:css` produces a new `styles.css` whose hash differs, the old hashed file is removed and the manifest points at the new one.\n- The deletion/adoption patterns match the #6779 emitted-name contract in `assets.rs` (exactly 8 hex chars for styles), or the divergence is explicitly justified in a comment.\n- A regression test or fixture script exercises the double-run case (the probe above is a ready-made repro).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-07T22:43:57Z","url":"https://github.com/developing-today/code/issues/6969"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0dfb0332-8a1a-e2ea-0a36-a743c045084f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC240:B70F1:A4ED8A:DCE617:6B064238
html-safe-nonce533ab271239eae84a17cdf810b636e3374c770c0713a309f59ba26bb9ac52766
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjQwOkI3MEYxOkE0RUQ4QTpEQ0U2MTc6NkIwNjQyMzgiLCJ2aXNpdG9yX2lkIjoiMzIxMjMzNDM2MzIxMTg3NDg3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacce1166e1ab88232f0928f4f4cc6ab4efda4be1b81d1cda3da42dcae417382e73
hovercard-subject-tagissue:6265029219
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/6969/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0a7ff9486abec7ea271877122dc188ee231994ece5fab599ac3de3f8454b1c96/developing-today/code/issues/6969
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0a7ff9486abec7ea271877122dc188ee231994ece5fab599ac3de3f8454b1c96/developing-today/code/issues/6969
og:image:altProblem pkgs/id/web/scripts/build-manifest.ts is not idempotent: a second run deletes the web UI's only stylesheet and writes a manifest that no longer mentions it — exit 0, no warning. The script'...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseac613d3698d3d8565651455086e1f74da07bf277
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/6969#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F6969
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F6969
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/6969
Reloadhttps://github.com/developing-today/code/issues/6969
Reloadhttps://github.com/developing-today/code/issues/6969
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests171 (171)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/6969
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/6969
#7051https://github.com/developing-today/code/pull/7051
id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0https://github.com/developing-today/code/issues/6969#top
#7051https://github.com/developing-today/code/pull/7051
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 7, 2026https://github.com/developing-today/code/issues/6969#issue-6265029219
#6779https://github.com/developing-today/code/issues/6779
id(web/assets): is_hashed_filename treats any 8+ lowercase dotted segment as a content hash — ordinary names (app.development.js, styles.darkmode.css) get a one-year immutable Cache-Control at a stable URL #6779https://github.com/developing-today/code/issues/6779
Nexthttps://github.com/developing-today/code/issues/6969?timeline_page=1
dezren39https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
on Nov 7, 2026https://github.com/developing-today/code/issues/6969#event-35463755087
https://github.com/apps/developing-today
developing-todayhttps://github.com/apps/developing-today
on Nov 7, 2026https://github.com/developing-today/code/issues/6969#issuecomment-6714021387
developing.todayhttps://kaneo.security.cab
CODE-2207https://kaneo.security.cab/dashboard/workspace/6oQgIkST0YGrCcxrnhbHPOUCfgdD3cqE/project/pfcq432h349r20up18gttfv4/task/ul7m9a0tdw9pkvor46zsm8fy
dezren39https://github.com/dezren39
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
on Nov 7, 2026https://github.com/developing-today/code/issues/6969#event-35463755716
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 7, 2026https://github.com/developing-today/code/issues/6969#issuecomment-6714022637
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
on Nov 8, 2026https://github.com/developing-today/code/issues/6969#event-35471280857
https://github.com/apps/developing-today
developing-todayhttps://github.com/apps/developing-today
on Nov 8, 2026https://github.com/developing-today/code/issues/6969#issuecomment-6716016562
developing.todayhttps://kaneo.security.cab
id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 #6969https://github.com/developing-today/code/issues/6969
id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 #6969https://github.com/developing-today/code/issues/6969
dezren39https://github.com/dezren39
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
on Nov 8, 2026https://github.com/developing-today/code/issues/6969#event-35471523074
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 8, 2026https://github.com/developing-today/code/issues/6969#issuecomment-6726454606
fix(id-web): build-manifest re-run keeps the stylesheet (#6969) #7051https://github.com/developing-today/code/pull/7051
id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 #6969https://github.com/developing-today/code/issues/6969
fix(id-web): build-manifest re-run keeps the stylesheet (#6969) #7051https://github.com/developing-today/code/pull/7051
Unowned PR batch from branch disposition (2026-11-07) #7297https://github.com/developing-today/code/issues/7297
dezren39https://github.com/dezren39
on Nov 9, 2026https://github.com/developing-today/code/issues/6969#event-35627060287
fix(id-web): build-manifest re-run keeps the stylesheet (#6969) (#7051)https://github.com/developing-today/code/commit/e074555307ba0af734f74399321cfd5ef7ef9277
#6969https://github.com/developing-today/code/issues/6969
#7051https://github.com/developing-today/code/pull/7051
e074555https://github.com/developing-today/code/commit/e074555307ba0af734f74399321cfd5ef7ef9277
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#7051https://github.com/developing-today/code/pull/7051
on Nov 9, 2026https://github.com/developing-today/code/issues/6969#event-35627060587
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 9, 2026https://github.com/developing-today/code/issues/6969#issuecomment-6754649339
fix(id-web): build-manifest re-run keeps the stylesheet (#6969) #7051https://github.com/developing-today/code/pull/7051
fix(id-web): build-manifest re-run keeps the stylesheet (#6969) #7051https://github.com/developing-today/code/pull/7051
e074555https://github.com/developing-today/code/commit/e074555307ba0af734f74399321cfd5ef7ef9277
id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 #6969https://github.com/developing-today/code/issues/6969
fix(id-web): build-manifest re-run keeps the stylesheet (#6969) #7051https://github.com/developing-today/code/pull/7051
id(web/build-manifest): a second run deletes the only stylesheet and drops its manifest entry — dist is left unstyled, exit 0 #6969https://github.com/developing-today/code/issues/6969
fix(id-web): build-manifest re-run keeps the stylesheet (#6969) #7051https://github.com/developing-today/code/pull/7051
dezren39https://github.com/dezren39
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Nov 9, 2026https://github.com/developing-today/code/issues/6969#event-35627103729
developing-todayhttps://github.com/apps/developing-today
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
on Nov 10, 2026https://github.com/developing-today/code/issues/6969#event-35627738715
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/6969
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/6969
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.