~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

An older run's pictures no longer overwrite the newest's

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:cli/check-images

What changes

knotless checks --images <dir> saved each picture as <workflow> <alt>.<ext>, writing every check's in the order listed, newest first. When the list held two runs of one workflow, as a branch's look reruns or a pull's heads do, the older run's picture was written last and overwrote the newest's. Now the newest run keeps the plain name. An older run's picture of the same name is saved as <workflow> <alt> <commit>.<ext>, with the commit's first 12 characters. One older still at that same commit is left out rather than written over the newer.

Why

Reading a look run's picture after asking for one again showed the earlier run's picture, byte for byte. That gave the wrong answer about what the page draws.

How it was checked

The private-repository runner test, whose listing holds two runs of fail, now checks that all 64 pictures are separate files, and that the older run's carries its commit. CI runs it.

🤖 Generated with Claude Code

Approved

This fixes knotless checks --images so an older run's picture no longer overwrites the newest run's. The newest run keeps the plain name. An older run's picture of the same name gets the commit's first 12 characters in its name. A run still older at that same commit is skipped. I read the logic in cli.rs and it holds. The checks arrive newest first, taken tracks the names already used, and the first free name of the two is used. The test asserts 64 distinct files and that the older run's commit-named path is listed. The docs and changeset are updated. I did not look at the CI results, and I did not check whether checks[1] in the test is the run at the found commit. It is the second entry of the newest-first listing.

Approved

The pull is unchanged in substance since round 1. The newest run keeps the plain picture name. An older run's picture of the same name gets the commit's first 12 characters. A run still older at that same commit is skipped. The only change since then is commit 78289cd, "Pictures are named in one chain", plus a merge of main.

The test run on the earlier head b34f8d0 failed on its coverage gate, not on a test. It reported cli.rs:1346 as uncovered. That was the skip branch for a name already taken twice, which the test never reaches. The new head folds that case into the find(...) and name.map(...) chain. So no separate line is left unreached.

I read the current code and the logic holds. The test still checks that all 64 pictures are separate files and that the older run's commit-named path is listed.

On the current head, test, check, e2e and docs were still queued when I looked. Make sure test passes before this merges. If the coverage gate still names a line, the skipped case needs a test or a different shape.

Merged as 4ca01b6