Files
sprites/tools/deploy
Christopher Monsanto da25d70f78 Add a refactor verb, for what a change did to the published files
This repo owns xy/ and xyicons/ now, so nothing else writes there and asking
rsync what it would delete answers a question nobody has. The one worth asking
is whether an edit changed what we ship, which until now meant materializing a
deploy twice and diffing 300M of gifs.

Nothing has to be materialized. A finish already ends in an ActionQueue holding
one op per published file, and the bytes behind each are identified already: a
built artifact's CAS path spells its own digest, so only raw sources get read.
Digest those, keep the map in .build/ beside the rest of the build state, and a
comparison is a dictionary diff.

    node tools/deploy/index.ts refactor --record   # on what you are comparing to
    node tools/deploy/index.ts refactor            # after the change

prints + for a name that appeared, - for one that went, M for one whose bytes
moved, and exits non-zero if any did. Which is tup's refactor a layer out: it
checked that a Tupfile edit left the build graph alone, and this checks the
names and bytes the deploy blocks decide, where a lost alias or a rename
actually shows up.

Recording rather than failing when a file has no baseline yet, so the first run
in a checkout is useful instead of an error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 02:01:02 -04:00
..
2026-08-21 01:13:14 -04:00