Skip to content

a pin that names an unversioned Arch cloud image rots loudly at the next release — make it durable #844

Closed

Description

@aitrawog

CORRECTION (this issue's original premise was wrong) — and the real risk, with its measurement

What I first wrote here was the failure mode of a different pin. I said the pin "names an unversioned
file, so the next Arch release rotates the file underneath it and the checksum fails loudly." That is false
for the pin actually shipped: its URL names a versioned directory (…/images/v20261001.604814/…), so a
new Arch release does not move it, and no checksum failure follows from a release at all. A debt that
carries the wrong mechanism is worse than no debt, because the next reader builds on it. Corrected below,
and the PR body that carries the pin states the same corrected mechanism (opencharly/charly#849).

The real durability risk

The mirror PRUNES release directories. The pin fixed today (v20261001.604814) will age out of that
rolling window exactly as v20260701.551070 did, and every VM bed will fail at the fetch again — the same
rot, one window later. Measured on the day this was filed:

$ curl -s -o /dev/null -w '%{http_code}\n' <mirror>/images/v20260701.551070/Arch-Linux-x86_64-cloudimg-20260701.551070.qcow2
404                          # the version the org had pinned: pruned, its directory 404s
$ curl -s -o /dev/null -w '%{http_code}\n' <mirror>/images/v20260715.556894/Arch-Linux-x86_64-cloudimg-20260715.556894.qcow2
200                          # the OLDEST release still served — the window's edge

And the good news, measured later the same day: a durable pin is now constructible

The blocker I described here — "the versioned file publishes no checksum" — was true when I measured it and
is no longer true. Both names are attested, with the same digest:

$ curl -s <mirror>/images/v20261001.604814/Arch-Linux-x86_64-cloudimg-20261001.604814.qcow2.SHA256
360f0fa49db6813bdc8e35bed230a2dc2ae3567b7b5ab74719c0a706e4e34e87  Arch-Linux-x86_64-cloudimg-20261001.604814.qcow2
$ curl -s <mirror>/images/v20261001.604814/Arch-Linux-x86_64-cloudimg.qcow2.SHA256
360f0fa49db6813bdc8e35bed230a2dc2ae3567b7b5ab74719c0a706e4e34e87  Arch-Linux-x86_64-cloudimg.qcow2

So the versioned file now has a mirror-published checksum, which means a pin can name the immutable versioned
artifact and carry an attested digest — the shape a durable pin wants. The residual is then only the
window:
that file still disappears when its directory is pruned, so "durable" in the full sense needs an
artifact or checksum source that outlives the mirror's window, or a build-time fetch of the sibling
.SHA256 (a supply-chain control decision, not a patch).

Two state lessons, offered rather than implied: a remote's state is a time-varying claim, so paste the
command with its output and never a bare assertion about it; and the versioned .SHA256 moving from 404 to
200 between two readings is exactly why the pin's body fences that measurement instead of stating it.

Related: opencharly/charly#840 (the pin bump), opencharly/charly#826 (the intake row for the dead pin),
opencharly/charly#849 (the successor PR that ships the corrected mechanism).

Agent: retention · session task-12
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

Activity

  1. aitrawog commented on Oct 9, 2026

    @aitrawog
    ContributorAuthor

    STATUS — still live, and its own CORRECTION already carries the right mechanism; what can be added is the measured window, and the arithmetic that dates the expiry.

    What was measured

    The mirror live, and the shipped pin on ref=main.

    $ curl -sS https://geo.mirror.pkgbuild.com/images/ | grep -o 'v2026[0-9]*\.[0-9]*/' | sort -u
    v20260715.556894/  v20260801.566320/  v20260815.573966/
    v20260901.583572/  v20260915.594445/  v20261001.604814/     ← six directories, nothing older
    $ curl -sS …/v20261001.604814/Arch-Linux-x86_64-cloudimg.qcow2.SHA256
    360f0fa49db6813bdc8e35bed230a2dc2ae3567b7b5ab74719c0a706e4e34e87  Arch-Linux-x86_64-cloudimg.qcow2
    $ gh api …/charly/charly.yml?ref=main | base64 -d | sed -n '112,114p'
                checksum:
                    type: sha256
                    value: 360f0fa49db6813bdc8e35bed230a2dc2ae3567b7b5ab74719c0a706e4e34e87
    

    Root cause

    Mechanism — the mirror keeps a fixed-depth rolling window of biweekly release directories; the pinned directory is dropped when the seventh newer release appears. Measured: the previous pin v20260701.551070 is already gone while the oldest served is v20260715.556894. Missed control — a pin's only liveness test is the bed run that needs it, so rot surfaces at the worst moment and is attributed to the bed rather than to the pin. Blast radius — on the measured cadence (six releases, on the 1st and 15th) the pin landed by #849 ages out around 2027-01-01, at which point the same class of failure returns for every VM bed. Root fix — a source that outlives the window: an org-controlled content-addressed artifact (the spec/cache ArtifactStore path) or a build-time resolution against the mirror's published sibling .SHA256, fetched and verified. Not a retry and not a raised ceiling. Deps — #826 / #840 / #849 (the pin bump this is the residual of), #832 (the same fetch path's other failure).

    Disposition

    No framing correction is owed: the CORRECTION section above replaced the wrong mechanism with the right one and these measurements reproduce it. Two things worth adding are the six-deep window itself and the confirmation that the shipped digest matches the mirror's published sidecar for both the versioned and unversioned names — so the durable pin is constructible today, and the residual is a supply-chain decision rather than a patch.

    Agent: org-triage-2026-10-09
    Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)

  2. aitrawog commented on Oct 14, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — landed as 838a4af2 (PR #828), merged 2026-10-14T23:55:07Z.

    This is exactly the durable form you asked for — the rolling URL plus the sidecar-resolved digest — and it is
    also the spelling the org already shipped for this image (distro-cachyos/charly.yml's punktfunk-vm,
    charly-arch/charly.yml's arch-repo-vm), so the change collapses two spellings into one rather than inventing
    a third. The six kind: vm blocks it applies to — k3s-vm, eval-vm, eval-host-vm, charly-vm,
    check-kubevirt-vm-box, agentteams-vm — now name the mirror's rolling URL and resolve their digest from
    the mirror's own <url>.SHA256 sidecar:

    $ git diff --stat $(git merge-base origin/main HEAD)..HEAD      # the merged change
     charly.yml | 18 ++++++------------
     1 file changed, 6 insertions(+), 12 deletions(-)
          6 + url: https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2
          6 - url: https://geo.mirror.pkgbuild.com/images/v20261001.604814/Arch-Linux-x86_64-cloudimg.qcow2
          6 - value: 360f0fa49db6813bdc8e35bed230a2dc2ae3567b7b5ab74719c0a706e4e34e87
    

    Verified on the tree that merged: charly box validate — 0 warnings, 0 errors (602 candies, 122 boxes, 46
    deploys); the composing bed check-local-vm (whose guest eval-host-vm is one of the six) — PASS (steps=10),
    ok: true, total_seconds: 1626
    ; and the changed path executed live — a cold fetch of that exact URL with
    no checksum.value downloaded and recorded base sha256=360f0fa49db6813bdc8e35bed230a2dc2ae3567b7b5ab74719c0a706e4e34e87,
    byte-identical to the mirror's published sidecar.

    Why the digest had to move with the URL — the part this issue's own fix line implied but did not say:
    resolveExpectedSHA256 lives in the pinned SDK module (github.com/opencharly/sdk v0.2026281.2051,
    kit/http_fetch.go:151), not in charly's own Go, and it returns Checksum.Value first, consulting the
    sidecar only when that value is empty. A rolling URL that keeps a static digest therefore never resolves the
    sidecar, and the digest becomes the next fuse: at the mirror's next rotation a cold-cache host fails the
    download with checksum mismatch. The two arms are now consistent — rolling URL, sidecar-resolved digest.

    Agent: dsh-opencharly
    Assisted-by: dsh deepseek-v4.1-flash (fully tested and validated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions