Skip to content

fix(distro): drop the dead pacstrap fields keyring_init_cmd and mirrorlist_url - #484

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/drop-dead-pacstrap-fields
Aug 30, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/drop-dead-pacstrap-fields

Conversation

@atrawog

@atrawog atrawog commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

First half of the cutover for #477.

#Pacstrap.keyring_init_cmd and #Pacstrap.mirrorlist_url have zero Go consumers anywhere in the umbrella — the only occurrences are the generated cue_types_gen.go, the schema declarations, and these authorings. They read as configuration and do nothing.

$ grep -rn 'KeyringInitCmd\|MirrorlistURL' --include='*.go' . | grep -v 'cue_types_gen\|_test'
   (nothing)

The file already knew. The omarchy pacstrap block carries comments explaining that it deliberately does not use either field because both are dead, and routes its mirror through runtime_pacman_conf instead. Two other distros went on authoring them anyway — which is the trap the issue describes: someone adding a distro copies arch or cachyos and inherits configuration that silently does nothing.

Nothing is lost by removing them:

  • Keyring init on the pacstrap path is done by pacstrap -K, which initialises the target keyring itself, and by the bootstrap install_cmd's own pacman-key --init.
  • The cachyos extra_repo entries carry siglevel: Never, so the F3B607488DB35A47 recv/lsign the dead field described was never load-bearing.
  • Mirrors reach pacman through runtime_pacman_conf's explicit Server = lines — which is how omarchy already does it.

The omarchy comments are restated as description rather than as a warning about fields that no longer exist here.

How tested

$ grep -c 'keyring_init_cmd\|mirrorlist_url' charly/charly.yml
0

$ python3 -c "import yaml; yaml.safe_load(open('charly/charly.yml'))"
YAML parses

$ go build ./charly/
exit 0

$ go test ./charly/
ok  	github.com/opencharly/charly/charly	79.117s

$ ./bin/charly box validate
validate exit=0

The full charly package suite passes, which matters here because it includes the distro/format-config tests that render these pacstrap blocks — the render is unchanged, because the fields never reached it.

Ordering (this is a cutover, not a partial change)

Removing the schema declarations first would reject a charly.yml that still authors the fields. So the authored usage goes first — here — and the schema declarations in opencharly/spec (schema/distro.cue + regenerated cue_types_gen.go) and opencharly/plugin-distro (schema/distro.cue) follow immediately, in that order. At no point is an authored field rejected by the schema; at no point is a live consumer left without its field, because there were none.

Rulebook compliance

  • R1 (RCA) — the deadness is established by grep across the umbrella and corroborated by the file's own omarchy comments, not assumed from the field names.
  • R2 (no deferral) — charly#477 was mine, filed rather than fixed; this closes the authored half and the schema half follows in the same piece of work.
  • R3 (no duplication) — removes a second, non-functional way to express keyring init and mirror selection, leaving the one that actually reaches pacman.
  • R4 (no workarounds) — the fields are deleted, not documented-around; the "it's dead, don't use it" comment was itself the workaround.
  • R5 (delete legacy completely) — the reason this is sequenced across three repos rather than left half-done.
  • R6 (git safety) — feature branch, no force-push, no hook bypass.
  • R7 (prove the gate) — build, full package test and charly box validate pasted above.

Change classification

  • Change class: config change (embedded distro vocabulary; no Go code touched)
  • Verification gate: go build, full go test ./charly/, and charly box validate on the committed tree
  • Attribution tier: fully tested and validated — the removal is proved inert by the full suite that renders these blocks, and the zero-consumer claim is a pasted grep rather than an assertion

Assisted-by: Claude Code Anthropic Opus 5 (fully tested and validated)

…rlist_url

Both fields have ZERO Go consumers anywhere in the umbrella — the only
occurrences are the generated cue_types_gen.go, the schema declarations, and
these authorings. They read as configuration and do nothing.

    $ grep -rn 'KeyringInitCmd|MirrorlistURL' --include='*.go' .
      (nothing outside generated types and tests)

The file already knew: the omarchy pacstrap block carries comments explaining
that it deliberately does NOT use either field because both are dead, and
expresses its mirror through runtime_pacman_conf instead. Two other distros went
on authoring them anyway, which is the trap — a reader adding a distro copies
arch or cachyos and inherits config that silently does nothing.

Nothing is lost by removing them:

  - keyring init on the pacstrap path is done by `pacstrap -K`, which
    initialises the target keyring itself, and by the bootstrap install_cmd's
    own `pacman-key --init`.
  - the cachyos extra_repo entries carry `siglevel: Never`, so the
    F3B607488DB35A47 recv/lsign the dead field described was never load-bearing.
  - mirrors reach pacman through runtime_pacman_conf's explicit `Server =`
    lines, which is how omarchy already does it.

The omarchy comments are restated as description rather than as a warning about
fields that no longer exist here.

This is the first half of the cutover; the schema declarations in
opencharly/spec and opencharly/plugin-distro are removed next, in that order, so
there is never a window where an authored field is rejected by the schema.

Claude-Session: https://claude.ai/code/session_016fnPmYiC6ZkqXSi6D8PAP6
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 946dee706599773f9fb17e145ccab77543b943f6 (PR #484)

Security screen: PASS — no secrets, exfiltration, scope mismatch, or guardrail changes; the diff is a pure removal of two dead config fields from charly/charly.yml (arch, cachyos) plus comment restatement in omarchy, matching the description exactly.

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3 — Body fully accounts for the diff (field removals + omarchy comment restatement), supplies pasted evidence (grep -c → 0, YAML parse, go build exit 0, go test ok, box validate exit 0), classifies as config change with the matching gate, and ends with the exact *Assisted-by: Claude Code Anthropic Opus 5 (fully tested and validated)* footer. Tier is justified: the removal is proven inert by the full suite that renders these blocks, and the zero-consumer claim is a pasted grep.
  • R1/R2/R3/R4/R5 — No warnings in pasted output; the cross-repo cutover is explicitly sequenced (authored usage first, schema in opencharly/spec + opencharly/plugin-distro next) and names the batch (charly#477) rather than deferring vaguely; the change removes a duplicated non-functional path; no workarounds; fields are deleted outright, not documented-around.
  • R10/B12 — Config change gate (build/test/validate) satisfied with internally consistent pasted output; the grep -c 0 claim reconciles with the diff (all occurrences removed from arch/cachyos; omarchy never had the fields, only comments referencing them, now restated).
  • B16 — Placement CORRECT: removal of dead embedded distro vocabulary from core config; no new placement concerns.
  • B13/B14/B15/B17/B18 — NA (no candy/schema/cue changes in this repo, no concurrency framing, single atomic commit, no autonomous destroy, no Go code touched).

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 30, 2026 11:02
@github-actions
github-actions Bot merged commit 6bd3659 into main Aug 30, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 30, 2026
github-actions Bot pushed a commit to opencharly/plugin-distro that referenced this pull request Aug 30, 2026
…params (#5)

Third and last instance of the opencharly/charly#477 cutover.
keyring_init_cmd and mirrorlist_url have zero Go consumers anywhere in the
umbrella; the authored usages went in opencharly/charly#484 and the spec
declarations in opencharly/spec#77.

Regenerating the params with the pinned cue (v0.16.1, the same
gengotypes + retag pipeline spec's `task cue:gen` runs) removes them — and also
surfaced that the committed file had DRIFTED from its own schema. It was missing
fields the schema already declares:

    + Disk_layout DsDiskLayout
    + Installer   DsInstaller
    + (and a further block at the end of the file)

So this commit is the two dead fields going out plus the generated projection
catching up with its source. Both belong in the same change: a generated file
that does not match its schema is not a smaller problem than the dead fields
that prompted looking at it.

Regenerated, never hand-edited:

  1. cue exp gengotypes over schema/distro.cue headed `package params` + @go(params)
  2. spec's schemagen -mode=retag to double the json tags with yaml tags
  3. gofmt

Claude-Session: https://claude.ai/code/session_016fnPmYiC6ZkqXSi6D8PAP6

Co-authored-by: atrawog <[email protected]>
github-actions Bot pushed a commit to opencharly/spec that referenced this pull request Aug 30, 2026
…orlist_url (#77)

Second half of the opencharly/charly#477 cutover. The authored usages were
removed in opencharly/charly#484 (merged), so nothing declares these any more
and the schema can drop them.

Both had ZERO Go consumers: the only occurrences of KeyringInitCmd and
MirrorlistURL anywhere in the umbrella were this declaration and the types it
generates. They read as configuration and did nothing — charly's own omarchy
pacstrap block carried comments explaining it deliberately avoided them for
exactly that reason.

    schema/distro.cue      -- the two field declarations
    spec/cue_types_gen.go  -- regenerated by `task cue:gen`, not hand-edited

Claude-Session: https://claude.ai/code/session_016fnPmYiC6ZkqXSi6D8PAP6

Co-authored-by: atrawog <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Aug 30, 2026
…rap VM build (#493)

`charly vm build` of ANY bootstrap VM has been failing since #484:

    charly: error: command "vm": rendering bootstrap script:
    template: bootstrap-script:2:9: executing "bootstrap-script"
    at <.Distro.Pacstrap.KeyringInitCmd>: can't evaluate field KeyringInitCmd
    in type *spec.Pacstrap

Reproduced on arch-pacstrap and omarchy-pacstrap-vm identically — the pacstrap
builder template is shared, so this is every pacstrap distro, not one of them.

#484 dropped `keyring_init_cmd` and `mirrorlist_url` as dead fields. It verified
they had ZERO Go consumers, and that was true. What it missed is that this one
also had a TEMPLATE consumer, in charly.yml's own pacstrap builder body. Go
templates resolve struct fields at RENDER time, so the reference compiled,
validated, and passed every test — and then failed at `charly vm build`, which
no CI gate exercises.

Nothing is lost by removing it: `pacstrap -K` on the next line already
initialises the target keyring, which #484's own body says is all that was ever
needed.

TestPacstrapBuilderTemplateFieldsExist guards the CLASS rather than this string:
it reflects over spec.Pacstrap and requires every `.Distro.Pacstrap.X`
interpolated anywhere in charly.yml to be a real field. A hand-kept list of
allowed names would have to be updated by the same person who forgot the
template, which is no guard at all.

Verified: with the reference removed, arch-pacstrap renders its bootstrap script
and proceeds into pacstrap (the rootfs tar runs), failing only later on a
free-space precondition — which is that check working, not this defect.

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3

Co-authored-by: atrawog <[email protected]>
@aitrawog
aitrawog deleted the fix/drop-dead-pacstrap-fields branch September 25, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant