docker: deferred findings from the #10 review (digest refs, registry headers, chooser bands, small cleanups) #12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-ups agreed in the fourth review pass on #10 — none loses data or writes anything wrong, which is why they were deferred rather than fixed there. Sources: the review at #10 and the fix commits
b92f637/ef7944c.F5 — digest-pinned refs mangle instead of being refused.
retag/tagOftreat the:inside@sha256:…as a tag separator, so pinning a digest-pinned service producespostgres@sha256:16.4, whichfetchRemoteDigestthen reports asno such image in the registry. Fails safe, diagnoses wrong. Refuse digest-pinned refs by name at the top of both pin routes: "this service is pinned by digest; move it to a tag first".F6 — a missing
docker-content-digestheader reads as "no such image".updates.tsreturns{digest: null, error: null}on a 200 without the header, and the pin route only tests!digest. Proxying registries that omit the header on HEAD are real. Distinguish the two, or fall back to a GET manifest request.Chooser bands inconsistent for four-component schemes.
listUpgrades().minoradmitsshared === 1whilewithinScope("minor")fixes two components, so the offered list can contain versions the minor jump will never choose. Align the band arithmetic withwithinScope. UI applies exact tags, so nothing writes wrong meanwhile.Small:
commit.ts:rootOfruns once per file for grouping and again insidecommitOne— cache per directory, halves thegit rev-parsecount.ConfirmDialog: the focus effect re-runs whenbusyflips false, a focus grab on re-render rather than mount. Harmless while the dialog is{#key}ed; worth splitting the deps if that ever changes.StacksPage.svelteis the one intricate piece with no direct test — extracting it to a.svelte.tsmodule would make it testable. This is the largest item here and probably its own PR.Not in scope: action SHAs / Dockerfile base digests /
known_hostspinning — owned by #11 and its pinning issue.Three more from the fifth review pass on #10, deferred here rather than growing that PR further.
Windows: four tests fail where the review actually happens.
deno task teston a Windows checkout is 299 passed / 4 failed — the threecommit_test.tsgit probes andcompose_update_test.ts's "a legal../path is accepted". Path shape, not logic:rootOfreturnsC:/Users/…while the file paths carry\, sofile.startsWith(root + "/")misses, thediff --githeader keeps an absolute path andgit apply --cachedrejects it; andmakeTempDir()returnsC:\…, which failsstartsWith("/"). They run rather than skip because git is present, so they are red rather than ignored. Guard withDeno.build.os === "windows"alongside the existingignore: !hasGit, or normalise separators. These are tests added in #10, and the "251 local / 245 + 4 ignored" figure only ever held because every run was POSIX.checkUpdatescan starve its tail indefinitely. Separate from the budget bounding starts rather than work: the worker pool walks[...images]in fixedstate.stacksorder every pass, with no rotation and no resume cursor. If the leading images sit on a slow or unreachable registry and burn the budget, everything past the cutoff getsprevious ?? "ran out of time"on every pass, forever — a security update on a tail image would never surface. The serial loop this replaced was slower but always reached the end. Rotate the start offset per pass, or order by least-recently-checked.Duplication worth one dedup pass:
tools/dep-check/remote.tsre-implementsupdates.ts's parse/bearer/paginate, and the copy is missing the same-host token guardlistTagshas;dep-check/version.tsvstags.ts, PRERELEASE lists already drifted by one word;jobs.tsmerge()still hand-mirrorsupdate_feed.svelte.ts's carry-forward — the field drift that had to be patched in lockstep once already;/container/:id/pinand/stack/:project/pincarry ~190 lines of the same read → rewrite → validate → restore → commit pipeline, already subtly diverged.None of these loses data or writes anything wrong, which is why they are here. Credit to @julian's fifth pass on #10 for all three.