The card harness moves into the package, and not one card moves - #57
Merged
Conversation
`og-recipe.mjs` kept the knobs and lost the machinery: the card list, the frame and the hide rules stay here byte for byte, and `recipeFor(REPO_ROOT)` binds the hashing from `@robertblust/design/cards/recipe`. The exporter, the check and the recipe tests are four lines each over the shared modules. 541 duplicated lines across those four files, carried identically by three sites, are now none. The point of the move is that nothing about the pictures changes, so that is what was measured: `npm run og:check` is byte-identical before and after, no `og.png` or `og.sha` appears in `git status`, and the recipe suite goes from 29 tests to 32 — the three the other two sites had and this one had lost. `REPO_ROOT` stays derived from `import.meta.url` here and is passed in, never derived by the package: the line is correct in a file that really sits at the repository root and points inside `node_modules` anywhere else. `test:og` and `og:check` move after `npm ci` in ci.yml. Both import the package now, which is not on disk until then, and left where they were every push fails with `ERR_MODULE_NOT_FOUND` — confirmed by running `og:check` with `node_modules` moved aside, because a machine that already has it cannot see this. They still run before `npx playwright install`; needing no browser is the property worth keeping. `test:dupes` imports nothing outside `node:` and stays first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Adopts
@robertblust/designv0.13.0, which carries the shared card harness.og-recipe.mjskeeps the knobs and loses the machinery: the card list,FRAMEandHIDEstay here byte for byte, andrecipeFor(REPO_ROOT)binds the hashing from@robertblust/design/cards/recipe.export-og.mjs,og-check.mjsandverify/og-recipe.test.mjsare four lines each over the shared modules. 541 duplicated lines across those four files, carried identically by three sites, are now none.The point of the move is that nothing about the pictures changes, so that is what was measured:
npm run og:checkoutput is byte-identical before and after (diffclean).og.pngorog.shaappears ingit status.npm run ogwas deliberately not run.node --test verify/og-recipe.test.mjsreports 32 tests, up from 29 — the three the siblings had and this site had lost (settle,hash, and two-cards-agree).design:check,verify,test:dupesall green.ci.yml
test:ogandog:checkmove to afternpm ciand beforenpx playwright install. Both import the package now, which is not on disk untilnpm cihas run; left where they were, every push fails withERR_MODULE_NOT_FOUND. A local run cannot catch this, so it was reproduced the way CI sees it:They still need no browser, which is the property worth keeping.
test:dupesimports nothing outsidenode:and stays where it is.Notes
REPO_ROOTstays derived fromimport.meta.urlhere and is passed in, never derived inside the package — correct in a file that really sits at the repository root, wrong anywhere undernode_modules.recipeFor(REPO_ROOT), notexport * from, which would leaverootunbound and makestate()throw for this site's own callers.github:robertblust/design#v0.13.0, kept indevDependencieswhere this site already had it.🤖 Generated with Claude Code