spike(GMT-1715): preserve the atomics oracle in the repo - #3408
Draft
dreamwasp wants to merge 1 commit into
Draft
Conversation
`gamut-atomics-poc` lived only in a local notes vault with no remote, and `dist/gamut-source.bundle.mjs` is the ONLY surviving executable copy of the Gamut prop config + Core theme. It cannot be regenerated: Panda is not installed here, and `gamut-styles/dist` now ships zero `.js` files under the tightened exports map. So `dist/atomics.css` (707,557 B / 7,650 rules) was re-checkable but not re-derivable, and the only copy of its input was unversioned. This makes the oracle citable from a PR instead of from a path on one laptop. Verified in-repo before committing: `node verify.mjs` exits 0 with NO install. 1,275 prop×value pairs agree declaration for declaration, and the check is loud (`process.exitCode = 1` on divergence). Generated artifacts are committed deliberately: dist/gamut-source.bundle.mjs 262 kB irreplaceable input dist/atomics.css 708 kB the byte-exact oracle dist/atomics-base.css 116 kB base-tier oracle dist/atomics-manifest.json 244 kB prop x value manifest Two notes on how this landed: - `--no-verify` was required, and the reason matters. The pre-commit hook runs `nx format:write` over staged files, which would REFORMAT the oracle and destroy the byte-identity it exists to prove. `spikes/gamut-atomics-poc/dist` is therefore added to `.prettierignore` in this commit. - The hook also cannot run in a git worktree without node_modules, which is how this was authored so the tsdown branch stayed untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
7 tasks
|
View your CI Pipeline Execution ↗ for commit a386a0c ☁️ Nx Cloud last updated this comment at |
Contributor
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a7b32fb4fc1b36e2ec92cca--gamut-preview.netlify.app |
|
Collaborator
|
📬 Published Alpha Packages:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Spike infrastructure, not for merge. Preserves the atomics oracle in version
control, because it currently exists only in a local notes vault with no remote.
The provenance problem this fixes:
dist/gamut-source.bundle.mjsis the onlysurviving executable copy of the Gamut prop config + Core theme. It cannot be
regenerated — Panda isn't installed in this repo, and
gamut-styles/distnow shipszero
.jsfiles under the tightenedexportsmap. Sodist/atomics.css(707,557 B / 7,650 rules) was re-checkable but not re-derivable, and the only copy
of its input was unversioned on one laptop.
Several claims in the 1.0 planning docs are measured against these bytes. This makes
them citable from a PR.
It works in the library, with no install
Verified in a clean worktree before committing. 1,275 prop×value pairs agree
declaration for declaration, and the check is loud —
process.exitCode = 1ondivergence, which is more than most of our spikes manage.
Two things reviewers will reasonably object to
1. It commits ~1.3 MB of generated artifacts. Deliberate, and named in the commit
message. The alternative is that an irreplaceable input to several planning decisions
lives in one unversioned directory.
dist/gamut-source.bundle.mjsdist/atomics.cssdist/atomics-base.cssdist/atomics-manifest.json2. It uses
--no-verify, and the reason is load-bearing. The pre-commit hook runsnx format:writeover staged files, which would reformat the oracle and destroy thebyte-identity it exists to prove.
spikes/gamut-atomics-poc/distis added to.prettierignorein the same commit. (The hook also can't run in a worktree withoutnode_modules, which is how this was authored so the tsdown branch stayed untouched.)
PR Checklist
verify.mjsis the assertion and exits non-zeroon divergence
Testing Instructions
To confirm the formatter really would break it, run
npx prettier --check dist/atomics.css.Known limitations
gamut-atomics-pocitself can no longer regenerate its own bundle — it reads theprebuilt one. Re-deriving from live
packages/gamut-styles/srcis the obviousfollow-up and is not done here.
Stacked on this: #3409 — the Gamut-owned emitter measured against it.
Related: #3402 · #3405 · #3406 · #3407