Skip to content

The card harness moves into the package, and not one card moves - #57

Merged
robertblust merged 1 commit into
mainfrom
card-harness
Sep 2, 2026
Merged

The card harness moves into the package, and not one card moves#57
robertblust merged 1 commit into
mainfrom
card-harness

Conversation

@robertblust

Copy link
Copy Markdown
Owner

Adopts @robertblust/design v0.13.0, which carries the shared card harness.

og-recipe.mjs keeps the knobs and loses the machinery: the card list, FRAME and HIDE stay here byte for byte, and recipeFor(REPO_ROOT) binds the hashing from @robertblust/design/cards/recipe. export-og.mjs, og-check.mjs and verify/og-recipe.test.mjs 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 output is byte-identical before and after (diff clean).
  • No og.png or og.sha appears in git status. npm run og was deliberately not run.
  • node --test verify/og-recipe.test.mjs reports 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:dupes all green.

ci.yml

test:og and og:check move to after npm ci and before npx playwright install. Both import the package now, which is not on disk until npm ci has run; left where they were, every push fails with ERR_MODULE_NOT_FOUND. A local run cannot catch this, so it was reproduced the way CI sees it:

$ mv node_modules /tmp/nm-check && npm run og:check
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@robertblust/design'
    imported from .../og-check.mjs

They still need no browser, which is the property worth keeping. test:dupes imports nothing outside node: and stays where it is.

Notes

  • REPO_ROOT stays derived from import.meta.url here and is passed in, never derived inside the package — correct in a file that really sits at the repository root, wrong anywhere under node_modules.
  • Bound via recipeFor(REPO_ROOT), not export * from, which would leave root unbound and make state() throw for this site's own callers.
  • The pin is the exact tag github:robertblust/design#v0.13.0, kept in devDependencies where this site already had it.

🤖 Generated with Claude Code

`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>
@robertblust
robertblust merged commit 773490b into main Sep 2, 2026
1 check 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