Skip to content

release: promote dev to main - #48

Merged
Sycatle merged 3 commits into
mainfrom
dev
Aug 25, 2026
Merged

release: promote dev to main#48
Sycatle merged 3 commits into
mainfrom
dev

Conversation

@Sycatle

@Sycatle Sycatle commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Carries the two deployment fixes from #47 to the branch people land on.

  • 8163e70 fix(deploy): unset an empty media origin, so the image matches the manifest
  • 8b9b814 fix(docker): anchor the ignore patterns, or apps/web/dist ships in the image

Why this matters now that the repository is public. main is the default branch, so somebody cloning today and standing up deploy/ gets a bundle that does not match the manifest v0.1.0 publishes — scripts/verify-web.sh reports 221 matched, 5 altered. The mechanism the release exists for does not work from the branch a visitor gets.

After: 226 matched, 0 altered, 0 missing.

Two files, no source change, no migration. CI on #47: changes and web green; rust, wasm and audit skipped by their path filters, since neither file touches Rust, the WASM artefact or Cargo.lock.

Sycatle and others added 3 commits August 25, 2026 19:20
…nifest

`ARG VITE_MEDIA_URL=` defined the variable as an empty string, and Vite
distinguishes a variable that is absent from one that is defined and empty:
absent, the bundle keeps `const e={}, x=!!e?.VITE_MEDIA_URL`; defined and
empty, it folds to a constant and minification removes the branch.

So every deployment built from this image produced a bundle that did not
match the manifest `.github/workflows/release.yml` publishes — including a
deployment running no media server at all. That is backwards from what
`docs/THREAT-MODEL.md` § 4quinquies claims: the trade is "verifiable **or**
calls", and a deployment configuring no calls was paying it anyway. It made
the whole publishing mechanism inert in the one configuration it was built
for.

Reproduced here before committing, `dist/index.html`:

  variable absent, as CI builds it      2a26c3f24aff3326
  ARG VITE_MEDIA_URL=  (before)         9b4c1178cc297802
  unset when empty     (after)          2a26c3f24aff3326
  unset when empty, calls configured    a13e1dcae6b3cbae

The last line is the one that must still differ, and does: a deployment that
configures calls names an origin in its policy and knowingly stops matching.

Mine to have missed. I measured that configuration no longer changes the
bytes, and then wrote a Dockerfile that reintroduced exactly that — because
the measurement was run without the variable while the image always set it.
Testing the thing rather than the thing as it is deployed.
…e image

`.dockerignore` patterns match against paths relative to the context root
unless they begin with `**/`. So `dist/` excluded the one at the top and copied
`apps/web/dist` straight in, and `node_modules/` did the same with 683 MiB of
`apps/web/node_modules`. The context carried 683 files where the source tree has
457.

# What the stale dist did, which is the reason this is a fix and not a tidy-up

Tailwind scans source files for class names. Given the previous bundle, it
scanned that too and emitted a different stylesheet, so the chunk hashes moved
and `index.html` with them. The deployment then no longer matched the manifest
`.github/workflows/release.yml` publishes — which is precisely the property
`scripts/verify-web.sh` exists to check.

A build whose output depends on whether somebody ran `pnpm run build` beforehand
is not reproducible, and nothing anywhere said so. It presented as five altered
files out of 226, all of them the ones Vite produces.

# Measured, before and after

`scripts/verify-web.sh` against a `deploy/` stack, using the manifest from the
v0.1.0 release:

  before   221 matched, 5 altered, 0 missing
  after    226 matched, 0 altered, 0 missing

Context file count: 683 → 457, the same as the source tree.
…manifest

fix(deploy): make a deployment match the manifest it publishes
@Sycatle
Sycatle merged commit 2fd8735 into main Aug 25, 2026
5 checks passed
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