Skip to content

fix(ci): gate dist internals smoke tests on the published CLI version - #255

Draft
fahdfady wants to merge 1 commit into
masterfrom
fix/docker-ci-dist-internals-gate
Draft

fahdfady wants to merge 1 commit into
masterfrom
fix/docker-ci-dist-internals-gate

Conversation

@fahdfady

Copy link
Copy Markdown
Collaborator

Problem

Docker CI has failed on every master push since #249 (9f8f445):

[FAIL] GET client bundle source map -> expected 404, got 200
[FAIL] GET server bundle is not public -> expected 303, got 200
[FAIL] GET server cache is not public -> expected 303, got 200
[FAIL] GET build manifest is not public -> expected 303, got 200

The Docker workflow installs the published CLI pinned to
npm/cli/package.json (1.0.0-alpha.2, .github/workflows/docker.yml:31-32),
but #249 added /dist internals assertions in ssr.sh/ssg.sh that require
the server fix merged in that same PR. alpha.2 still serves all of /dist, so
the four SSR checks fail; the SSG block would fail the same way once the SSR
step passes.

Fix

Gate both dist-internals blocks behind METASSR_DIST_INTERNALS_SINCE
(default 1.0.0-alpha.3), the same mechanism already used for per-request
rendering (METASSR_SSR_PER_REQUEST_SINCE) and TypeScript API routes
(METASSR_TS_API_SINCE). Source builds (METASSR_VERSION unset) always
enforce the assertions; the Docker image skips them until a CLI carrying #249
is published.

  • tests/web-app/tests/ssr.sh — gate the Dist Internals block.
  • tests/web-app/tests/ssg.sh — gate the SSG Dist Internals block.
  • tests/README.md — document the new cutoff variable.

Verification

  • bash -n passes on both scripts.
  • Gate simulation: 1.0.0-alpha.2 -> skip; 1.0.0-alpha.3, 1.0.0-alpha.4
    and unset -> enforce.
  • Docker CI on this PR exercises the skip path against alpha.2 end-to-end.

The Docker workflow installs the published metassr CLI pinned to
npm/cli/package.json (currently 1.0.0-alpha.2), but #249 added /dist
internals assertions that require the server fix merged in the same PR.
alpha.2 still serves server bundles, cache and the manifest under /dist,
so four SSR assertions fail and the SSG block would fail the same way
once reached, breaking Docker CI on master since #249.

Gate both blocks behind METASSR_DIST_INTERNALS_SINCE (default
1.0.0-alpha.3), matching the version gating already used for per-request
rendering and TypeScript API routes. Source builds (METASSR_VERSION
unset) always enforce the assertions.
@fahdfady
fahdfady marked this pull request as draft November 16, 2026 23:21

This branch has not been deployed

No deployments
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