Repository navigation
types(tools/photos): the photo pipeline is TypeScript - #526
Merged
Merged
Conversation
Second slice. 12 files renamed, specifiers rewritten across 16 more, including
the shell scripts that invoke them and the og-cards workflow.
The JSDoc trap was checked FIRST this time rather than discovered: both casts in
gen-desktop-partial and gen-quadgram-table were converted to real syntax in the
same pass, so neither annotation spent a moment inert.
What the types found, all of it the same family — a bag whose keys arrive later:
- ICON_DEFS entries are spread into sectionTile(prefix, colors, art), and a
widened (string | string[])[] has no arity for a spread to satisfy.
- the favicon map, the photo-semantics entries and their `out` record, and
photo-index.json's per-stem shape, which this checker's whole job is to
assert and which json() answers as unknown.
- inject-og-meta's `alt` is optional, which its own caller already assumed.
- the Fuji recipe card is a flat bag off metadata.json, so its values need
stringifying before they reach a template.
TWO PROVENANCE BANNERS WERE LYING. gen-desktop-partial writes its own name and
its input's name into the generated lib/desktop.ts and into an HTML comment, and
both still said .mjs after the rename. Regenerated, so the file now names the
generator that actually produced it.
And a git lesson worth keeping: `git mv` here staged the ADDS while leaving the
DELETES unstaged, so `git ls-files` reported both extensions and #520's coverage
check correctly refused a tree where tools/photos/*.mjs still appeared to exist.
The check was right and the working tree was wrong. `git add -A` settled it.
353/353 under bun, 352 under node, photos:check green, route oracle green, six
type programs clean, tools baseline still 0.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
aadhar-sh | 54af920 | Aug 24 2026, 01:02 AM |
Contributor
Wire-size diff vs merge base
Brotli q11, the quality the edge serves. Every number here is deterministic: Client assetsNo change. 22 files, 77.74 KiB Brotli total. PagesTotal Brotli: 531.35 KiB → 531.29 KiB (-0.06 KiB, -0.0%) across 50 files, 46 changed. No single file moved by 0.13 KiB or more. Plus 46 files under the 0.13 KiB floor, net -0.06 KiB — usually content-hash churn in Worker bundleNo change. 237.91 KiB gzip. Dictionary deltas (
|
This was referenced Aug 24, 2026
oddharsh
added a commit
that referenced
this pull request
Aug 24, 2026
…named #526 moved the photo pipeline to TypeScript and says it rewrote "the shell scripts that invoke them". It got add-photos.sh (check-photo-pipeline.ts) and missed three: extract-photo-metadata.sh build-exif-index.mjs -> .ts extract-photo-metadata.sh build-histogram-index.mjs -> .ts hash-thumbnails.sh build-image-fingerprints.mjs -> .ts All three throw MODULE_NOT_FOUND, because no file answers to those names any more. Two of them are the steps that roll the per-photo files into the two committed indexes, so the failure lands after the expensive work rather than before it. This is the same family as the rest of this branch and it is why the branch exists: a rename that a grep for the old string cannot find, in a pipeline nobody has run since the moves, so the break sits there looking fine. Worth noting that the extension is the visible half. The reason a sweep misses these is that the specifier is assembled from a variable and a literal, which is gotcha 29's blind spot again. node 26 runs a .ts file directly (type stripping), verified here, so `node` is still correct in front of these and only the name was wrong. Controls, all three run after the change. build-image-fingerprints.ts exits 0 on a clean checkout. The other two exit 1 on a MISSING public/images/meta, which is the gitignored build output that extract-photo-metadata.sh writes earlier in the same script, so standalone in a clean tree that is the honest answer; with the directory present both exit 0 and regenerate exif.json and histograms.json byte-identically, no drift against the committed copies.
oddharsh
added a commit
that referenced
this pull request
Aug 24, 2026
…named (#529) #526 moved the photo pipeline to TypeScript and says it rewrote "the shell scripts that invoke them". It got add-photos.sh (check-photo-pipeline.ts) and missed three: extract-photo-metadata.sh build-exif-index.mjs -> .ts extract-photo-metadata.sh build-histogram-index.mjs -> .ts hash-thumbnails.sh build-image-fingerprints.mjs -> .ts All three throw MODULE_NOT_FOUND, because no file answers to those names any more. Two of them are the steps that roll the per-photo files into the two committed indexes, so the failure lands after the expensive work rather than before it. This is the same family as the rest of this branch and it is why the branch exists: a rename that a grep for the old string cannot find, in a pipeline nobody has run since the moves, so the break sits there looking fine. Worth noting that the extension is the visible half. The reason a sweep misses these is that the specifier is assembled from a variable and a literal, which is gotcha 29's blind spot again. node 26 runs a .ts file directly (type stripping), verified here, so `node` is still correct in front of these and only the name was wrong. Controls, all three run after the change. build-image-fingerprints.ts exits 0 on a clean checkout. The other two exit 1 on a MISSING public/images/meta, which is the gitignored build output that extract-photo-metadata.sh writes earlier in the same script, so standalone in a clean tree that is the honest answer; with the directory present both exit 0 and regenerate exif.json and histograms.json byte-identically, no drift against the committed copies. Co-authored-by: Aadharsh Pannirselvam <19518661+oddharsh@users.noreply.github.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.
Second slice of
tools/. 12 files renamed, specifiers rewritten across 16 more — including the shell scripts that invoke them and the og-cards workflow.The JSDoc trap was checked first this time, rather than discovered: both casts were converted to real syntax in the same pass, so neither annotation spent a moment inert.
What the types found
All one family — a bag whose keys arrive later:
ICON_DEFSentries are spread intosectionTile(prefix, colors, art), and a widened(string | string[])[]has no arity for a spread to satisfyoutrecord, andphoto-index.json's per-stem shape — which this checker's whole job is to assert, and whichjson()answers asunknowninject-og-meta'saltis optional, which its own caller already assumedmetadata.json, so its values need stringifying before reaching a templateTwo provenance banners were lying
gen-desktop-partialwrites its own name and its input's name into the generatedlib/desktop.tsand into an HTML comment. Both still said.mjsafter the rename. Regenerated, so the file names the generator that actually produced it.A git lesson worth keeping
git mvhere staged the adds while leaving the deletes unstaged, sogit ls-filesreported both extensions and #520's new coverage check refused a tree wheretools/photos/*.mjsstill appeared to exist.The check was right and the working tree was wrong.
git add -Asettled it — and it's a good sign that the check landed hours before it caught something.353/353 under bun, 352 under node,
photos:checkgreen, route oracle green, six type programs clean, tools baseline still 0.