Skip to content

An older varve rejects a newer realms file with a bare TOML parse error, not 'this varve is too old' #174

Description

@avrabe

[fathom (gale) — friction, hit today]

varve-realms.toml grew retired-roots (v0.32.1). A varve older than that key does not recognise it and fails like this:

$ varve which synth
error: /path/to/varve-realms.toml: not a valid realms file: TOML parse error at line 21, column 1
   |

(line 21 is retired-roots = [.)

The message is accurate and unhelpful in the same breath: nothing in it says the realms file is newer than this binary, which is the actual situation and the actual fix. Every tool resolution then fails, so the diagnosis path a user reaches for — varve which <tool>, the thing that answers "which binary ran?" — is exactly what stops working.

It cost a while here because ~/.cargo/bin/varve (0.29.0, a leftover cargo install) shadowed ~/.varve/bin/varve (0.33.0), so the shipped varve was fine and the one on PATH was not. The visible symptom was "gale's committed realms file is corrupt", which it is not.

What would have made it a one-liner: on an unknown top-level key in a realms file, say so — e.g. "unknown key retired-roots; this realms file was written for a newer varve (this is 0.29.0). Upgrade varve, or use an older realms file." That is the same stance retired-roots itself exists to take: the comment above it in the file says a layer signed by an old root should be told which root and when "instead of getting 'No valid signatures', which is indistinguishable from a forgery." A version-skew failure deserves the same treatment as a trust-skew one.

Lower-priority companion: varve shim install cannot protect against a varve binary earlier in PATH than its own shim dir. A varve doctor-style note ("a different varve is ahead of the shims: /Users/…/.cargo/bin/varve 0.29.0") would catch this class, which also bit this machine for rivet, synth and meld.

No reproduction beyond: install varve ≤ 0.32.0, point it at a realms file containing retired-roots.

Activity

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions