Skip to content

fix: stabilise the export harness and publish what was assembled - #352

Open
jackye1995 wants to merge 2 commits into
mainfrom
jack/exclude-dotfiles
Open

fix: stabilise the export harness and publish what was assembled#352
jackye1995 wants to merge 2 commits into
mainfrom
jack/exclude-dotfiles

Conversation

@jackye1995

@jackye1995 jackye1995 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Both problems here were found by verifying the first publish to assembled rather than trusting green CI.

The published tree was not the assembled tree

The assembler produced 268 files; the published branch had 267. actions/upload-artifact skips hidden files by default and silently dropped docs/.cursor/.

My first fix excluded dotfiles from the assembly instead. That was wrongmint export carries that file today, so excluding it would have quietly deleted a published file at cutover. The harness caught it immediately, which is the best evidence yet that the harness earns its keep. The upload now sets include-hidden-files: true, and the assembler publishes exactly what it assembled.

Deciding a file is "not really content" is how a byte-comparability guarantee turns into a list of exceptions.

The harness was intermittently failing on identical trees

Worse, and the reason this PR matters. Mintlify renders the OpenAPI reference non-deterministically: response code blocks come out syntax-highlighted on one run and plain on the next — ~2 KB across ~78 fragments, on top of the per-build React keys already normalised.

It is intermittent. Byte-identical trees, run 1 EQUIVALENT, run 2 DIFFERENT. In CI that is a gate failing at random, which is precisely the failure mode this project's design warns about: "false positives train engineers to route around the gate."

api-reference/rest/** is now compared for presence but not for bytes, and only that subtree. This gives up nothing about the assembler:

  • it passes openapi.yml through byte-identically, so both sides feed Mintlify the same spec
  • it has no way to influence one render differently from the other
  • a reference page appearing or disappearing is still caught, because the file set is compared exactly
  • the stronger guarantee — the assembled tree is byte-identical to its source — is proved directly by make assemble, and covers the spec file

Verified

Scenario Result
Five consecutive assembled-vs-direct comparisons all pass
Authored page content changed caught
Reference page removed caught
Reference page contents changed not caught — the knowing, documented limit

The first published build dropped docs/.cursor/ silently: actions/upload-artifact
skips hidden files by default, so the assembled tree had 268 files and the
`assembled` branch had 267.

Editor configuration is not site content and should not be published, but it
should not vanish by accident either. The assembler now excludes dot-prefixed
paths deliberately and names what it dropped, so the assembled tree and the
published tree are the same thing — which is the guarantee the whole pipeline
rests on.
Two problems found while verifying the first publish to `assembled`.

The published branch had 267 files where the assembler produced 268:
actions/upload-artifact skips hidden files by default and silently dropped
docs/.cursor/. The first attempt excluded dotfiles from the assembly instead,
which was wrong — mint export carries that file today, so removing it would have
quietly deleted a published file at cutover. The harness caught that, which is
the strongest evidence so far that it works. The upload now includes hidden
files, and the assembler publishes what it assembled.

The harness itself was intermittently failing on identical trees. Mintlify
renders the OpenAPI reference non-deterministically: response code blocks come
out syntax-highlighted on one run and plain on the next, ~2 KB across ~78
fragments. One comparison passed, the next failed, on byte-identical input. A
gate that fails at random is one people learn to route around.

That subtree is now compared for presence but not for bytes, and only that
subtree. It gives up nothing about the assembler, which passes openapi.yml
through byte-identically and cannot influence one render differently from the
other; a page appearing or disappearing is still caught. Verified: five
consecutive comparisons pass, an authored-page change is caught, a reference
page being removed is caught, and a reference page's contents are knowingly not.
@jackye1995 jackye1995 changed the title fix: exclude tooling dotfiles so the published tree matches the assembly fix: stabilise the export harness and publish what was assembled Sep 2, 2026
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