Repository navigation
fix(render): re-render cards whose image files changed under --incremental, and batch dependency updates - #230
Merged
Merged
Conversation
…ental `metaplate render --incremental` reused a card after an image file it draws changed under the same path, including files read through fileImageLoader, because inputHash covers copy, plate source, and fonts but not files read at render time. Each manifest entry now records `inputs`: the files the card read while it rendered, with the SHA-256 of their contents. readImageAsset and fileImageLoader report every read (including memoized calls) to a recorder the CLI installs on globalThis under a registered symbol, so the CLI bundle and a render module's metaplate/assets import share it. An AsyncLocalStorage scope attributes each read to the card being rendered; reads made while the module loads count for every card. --incremental reuses a card only while every recorded file still has its recorded hash. For files read with plain fs, createNodeOg, createEdgeOg, and createTakumiOg take an `inputs: (copy) => paths` option whose files are hashed the same way. Closes #229
… paths Review fixes for the --incremental inputs tracking: - Renders running at once in one process (runCli from metaplate/cli) no longer clobber each other's recorder. The global recorder is now a dispatcher with one listener per render: a read is claimed by the render whose card scope it was made in, and a read outside any card is shared by all of them. A render finishing leaves the others listening. - Input files outside the working directory are written as ../ relative paths rather than absolute ones, so the manifest (published under --out by default) never names the builder's home directory, and cards are reused across checkouts. Only a file on another Windows drive stays absolute. - The inputs error message no longer throws for values JSON cannot write. - docs: a promise the plate caches itself records its file only for the card that created it; share files through fileImageLoader instead.
AGENTS.md tells coding agents to review their whole branch diff like a maintainer before reporting work done, committing, or opening a pull request, with the angles that review must cover, the checks to run, and how to stage commits. CLAUDE.md imports it for Claude Code.
…takumi The plate definition types reference it, so without a public export the declaration bundles keep a private reference that can surface as TS2742 in consumer builds.
…d audit Satori 0.64.3 Takes the Dependabot development-dependencies group (#232) and the github-actions group (#231), each at its newest in-range release: @react-router/{dev,node,serve} and react-router 8.5.3 in lockstep, @sveltejs/kit 3.4.1, @sveltejs/adapter-node 6.0.6, @sveltejs/vite-plugin-svelte 7.3.2, svelte 5.59.2, vite 8.4.0, eslint 10.16.0, typescript-eslint 8.74.0, vitest 5.1.2, @types/node 26.6.11, @types/react 19.3.3, astro 7.4.14, @astrojs/node 11.1.15, and github/codeql-action 4.39.5. TypeScript stays on 6.0.x for typescript-eslint 8. Both Dependabot PRs failed check:package because satori 0.64.x was published and a fresh install of the packed tarball now selects 0.64.3, not the audited 0.63.2. The audited release moves to 0.64.3, which also replaces fflate 0.7.3 (GHSA-px8p-9vwx-vf98) with 0.7.5 and drops css-box-shadow. Every test passes on it, including the probes that pin the lineClamp guard and the Takumi parity budget to Satori's real behavior; the two source comments that name the probed Satori release say so. npm audit also reported two advisories against development-only packages already on main: cross-spawn 7.0.6 (GHSA-ghv9-86vm-4v8m, critical) and minimatch 11.0.3 (GHSA-cf2h-pxjq-68xw and others, high). npm audit fix moves them to 7.1.2 and 11.0.10, and the minimatch override floor rises to ^11.0.10 so it cannot resolve to an affected release again. Dependabot's lockfile left @react-router/express nested under @react-router/serve, where the package verifier does not look for it; it is placed at the top level again, as on main, with no other change. The fflate@0.7.3 alerts in socket-score-report.json no longer match the lockfile, so their dependency evidence is re-derived with the importer's rules (unresolved, with the reason), and socket-dispositions.json is rebound to the rewritten artifact. Scores, alerts, and dispositions are unchanged.
lnorton89
force-pushed
the
claude/epic-galileo-sndxei
branch
from
December 2, 2026 00:43
0b4e246 to
3d0fd6b
Compare
This was referenced Dec 2, 2026
Merged
lnorton89
added a commit
that referenced
this pull request
Dec 2, 2026
fix(render): re-render cards whose image files changed under --incremental, and batch dependency updates
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.
Summary
Fixes
metaplate render --incrementalreusing cards whose image files changed (#229), and batches the pending dependency updates, which every CI run now needs.Closes #229. Supersedes #231 and #232.
--incrementaland image files (#229)--incrementalreused a card after an image file it draws changed under the same path, including files read throughfileImageLoader. This happened becauseinputHashcovers copy, plate source, and fonts, but not files read at render time.inputs: every file the card read while it rendered, with the SHA-256 of its contents.--incrementalreuses a card only while each of those files still has that hash. A changed or deleted file makes the card render again.readImageAssetandfileImageLoaderreport every read, includingfileImageLoadercalls served from memory.globalThisunder a registered symbol, because the CLI bundle and the render module'smetaplate/assetsimport are separate bundles.AsyncLocalStoragescope attributes each read to the card being rendered.runCli) each keep their own reads: one listener per render claims the reads made in its card scopes.../for files outside it, so the manifest (published under--outby default) never names the builder's home directory. Only a file on another Windows drive stays absolute.inputsoption.createNodeOg,createEdgeOg, andcreateTakumiOgtakeinputs: (copy) => pathsfor files read with plainfs.fingerprint(), and plates gain aninputs(copy)member.RenderInputsOptionis exported frommetaplate/node,metaplate/edge, andmetaplate/takumi.docs/render-cli.md):logo ??= readImageAsset(...)) records the file only for the card that created it.emoji/languageFontsloaders are not hashed.revisionremains the fix for those.inputs, so the first--incrementalbuild after upgrading renders every image once.Dependency batch (supersedes #231 and #232)
Both Dependabot PRs failed
check:package. So would any CI run now, this PR included: satori 0.64.x was published on 2026-11-30, so a fresh install of the packed tarball selects 0.64.3 instead of the audited 0.63.2.github/codeql-action4.39.5 from ci(deps): bump the github-actions group with 2 updates #231, each at its newest in-range release, plus astro 7.4.14 and @astrojs/node 11.1.15. TypeScript stays on 6.0.x for typescript-eslint 8.lineClampguard and the Takumi parity budget to Satori's real behavior.main.npm auditreported two against development-only packages: cross-spawn 7.0.6 (critical) and minimatch 11.0.3 (high).npm audit fixmoves them to 7.1.2 and 11.0.10.minimatchoverride floor rises to^11.0.10.@react-router/expressunder@react-router/serve, where the package verifier does not find it. It is placed at the top level again, with no other change.socket-dispositions.jsonis rebound to the rewritten report. Scores, alerts, and dispositions are unchanged.Agent instructions
Adds
AGENTS.md, plus aCLAUDE.mdthat imports it. Coding agents must review their whole branch diff rigorously before reporting work done, committing, or opening a PR, and must treat build warnings as failures.Test plan
On Linux, Node.js v22.23.5:
npm run checkpasses: lint, duplicates, workflow policy, dependency inventory and Socket dispositions, deployment evidence, release notes, typecheck, typecheck:examples, 1542 tests, build with no declaration-bundle warnings, and pack.npm run check:packagepasses against the packed tarball, with satori 0.64.3 selected.npm audit --audit-level=highreports 0 vulnerabilities.tests/cli/render-inputs.test.tsand an end-to-end test through the spawned CLI cover recorded and declared inputs, top-level reads,../paths, concurrent renders, and a realcreateNodeOgplate drawing a changed SVG.dist/. After the SVG edit,--incrementalrendered both cards again and the PNG bytes changed.Checklist
npm run checkpassesnpm run check:packagepassesREADME.mdsummary and the relevantdocs/guideCHANGELOG.mdunder Unreleased. No.github/releases/vX.Y.Z.mdexists yet for the next version.dist/, coverage, log, or package archive filesGenerated by Claude Code