Repository navigation
shots: the dashboard's screenshots are the documented spin release's own (R8) - #54
Merged
Merged
Conversation
…own, from its site-shots.tar.gz spin's site-shots.yml takes them of every release on the KVM fleet and puts them on it. task sources unpacks that asset beside the spin checkout with the sources token, and refgen copies the one of each test of site.spec.ts that shoots, recording the release, its commit and the test in shots.json. So the pictures arrive in the sync pull request with the pin that moves to their release, and nobody runs a stack, or brand's task screenshots, to take them. brand only copied the PNGs and recorded what spin's checkout already says, so the site takes them straight from the release and brand holds them no longer: no repository writes to another, and the sources App reads nothing it did not. refgen -check fails on a picture that is not the release's and on a record of another release than the reference documents; task sources fails on a release without the asset, saying to run `gh workflow run site-shots.yml -R spin-stack/spin -f tag=<tag>`. The dashboard's page names its screenshots' release, so pinReleases leaves it to the release installations run apart. Co-Authored-By: Claude Opus 5.5 <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.
Plan step R8, its last part: the site's screenshots come from the spin release the site documents, with no person in the loop.
Where the screenshots come from: spin's release, straight (A)
brand's
cmd/shotsdid no processing. It copied the PNGs byte for byte and recorded the release, the commit and each test's title. The spin checkout at the pin already holds all three. So the website takessite-shots.tar.gzfrom the documented release itself, and brand stops holding the screenshots (spin-stack/brand, the companion PR).Option (B), brand kept up to date by the daily sync, would need the sync App to write to brand, and a second PR every release. (A) needs no new permission. The sources App already reads spin's contents, and that covers release assets. The sync App still writes only to website.
What changes
tools/sources: after it fetches spin, it unpacks the release'ssite-shots.tar.gzinto.sources/spin-site-shots/. The download goes through the API withSOURCES_TOKEN. The directory is stamped<tag> <pin>last, so the latertask referenceinsync.yml, which runs with no token, asks nothing again. The archive must hold only flat PNGs; anything else in it is refused.spin-stack/spin v20261019.02 has no site-shots.tar.gz: ... give it one with gh workflow run site-shots.yml -R spin-stack/spin -f tag=v20261019.02 and fetch againA pin that is not a release fails too. Nothing falls back to the pictures already in the repository.
refgen:releaseShotscopies the PNG of eachsite.spec.tstest that shoots, and removes any other.shots.jsonwith the release, the commit and the test titles.checkShotsnow holdsshots.jsonto the documented release (reference.jsonspin.tagandspin.commit), no longer toinstalls. In-checkthe PNG bytes are compared with the release's own.reference.json.brandFilesno longer copies screenshots from brand.pinReleasesskipsuse/dashboard.md: that page names its screenshots' release, which installations may not run yet. Without the skip, refgen and pinReleases kept rewriting each other's line.installsis still the newest release inimages.json(v20261019.02).shots.jsonand the dashboard page are now spin v20261024.01's. README, the Taskfile (SHOTS=) and brand's note inversions.yamlare updated to match.No workflow changes.
sync.yml's "Bump the pins" step (task sources:bump) fetches the asset with the token it already has. The screenshots therefore land in the same sync PR as the pin move, and a release without them turns that step red.Verified
go test ./...andgo vet ./.... The new tests use no network (httptest, a temp dir). A mutation that drops the release comparison, or the missing-asset error, makes them fail.SOURCES_TOKEN=$(gh auth token) go tool task checkpasses:reference:check, the gate withreference:public, the build and every link. Before the regeneration,reference:checkfailed with:the dashboard's screenshots are of spin v20261019.02 at 617175ff..., and the site documents spin "v20261024.01" at b3598142....task sourcesfailed with the backfill command above.task sources:bumpprintedspin: v20261019.02 ... -> v20261024.01 b3598142db...andspin: site-shots.tar.gz of v20261024.01: workspace.png, workspaces.png.task reference, with no token, then changed exactlyversions.yaml,src/assets/shots/workspace{,s}.png,src/data/shots.jsonandsrc/content/docs/use/dashboard.md.For the reviewer
release.ymlsends nosources-releaseddispatch, so the sync runs once a day.site-shots.ymlfinishes about an hour after Release. If a release is cut shortly before 05:23 UTC, that day's sync fails with the backfill message, and the next day's run succeeds. The fix would be for spin'ssite-shots.ymlto send the dispatch after its upload.site-shots.ymlheader still names "brand's screenshots step" as a consumer.🤖 Generated with Claude Code