Skip to content

fix(schema): drop the dead pacstrap fields, and resync the generated params - #5

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

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

Conversation

@atrawog

@atrawog atrawog commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

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 (merged) and the spec declarations in opencharly/spec#77; this repo carries the remaining copy in candy/plugin-distro/schema/distro.cue.

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

The generated params had drifted, and that is in here too

Regenerating removes the two dead fields — and surfaced that the committed params/cue_types_gen.go no longer matched its own schema. It was missing fields the schema already declares:

+	Disk_layout DsDiskLayout `yaml:"disk_layout,omitempty" json:"disk_layout,omitempty"`
+	Installer   DsInstaller  `yaml:"installer,omitempty"   json:"installer,omitempty"`
	(plus a further block at the end of the file)

So the diff 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, and splitting them would leave a "DO NOT EDIT" file knowingly wrong.

How tested

Regenerated, never hand-edited — the same pipeline spec's task cue:gen runs, with the pinned cue (v0.16.1) built by spec's bootstrap-cue:

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

Step 2 matters: a bare gengotypes run emits json:"…" only, and this repo's committed file carries both tags. Diffing before the retag showed exactly that difference, which is how I know the pipeline is the right one rather than a plausible-looking approximation.

Result on the committed tree:

$ grep -c 'keyring_init_cmd\|mirrorlist_url' candy/plugin-distro/params/cue_types_gen.go
0

$ go build ./...
build exit=0

$ go test ./...
ok  	github.com/opencharly/plugin-distro/candy/plugin-distro	0.004s
?   	github.com/opencharly/plugin-distro/candy/plugin-distro/cmd/serve	[no test files]
?   	github.com/opencharly/plugin-distro/candy/plugin-distro/params	[no test files]

The added fields are additive struct members — previously the plugin silently ignored disk_layout: and installer: if a distro authored them, and now it decodes them. That is the direction the schema already specified.

Ordering

Last of three, and the order was forced: removing a schema declaration before the authored usage would reject a charly.yml that still writes the field. Authored usage first (charly#484, merged), then spec (#77), then this. At no point was an authored field rejected by the schema, and no live consumer was ever left without its field — there were none.

Rulebook compliance

  • R1 (RCA) — the zero-consumer claim is a grep across the umbrella; the drift was found by regenerating and diffing rather than assumed absent.
  • R2 (no deferral) — charly#477 was mine, filed rather than fixed; this completes it, and the drift found on the way is fixed here rather than filed as another issue.
  • R3 (no duplication) — removes a second, non-functional way to express keyring init and mirror selection.
  • R4 (no workarounds) — regenerated through the real pipeline; no sed on generated Go, which is exactly what the retag tool exists to avoid.
  • R5 (delete legacy completely) — the third of three instances; after this the fields exist nowhere.
  • R6 (git safety) — feature branch, no force-push, no hook bypass.
  • R7 (prove the gate) — build and full test suite on the committed tree pasted above.
  • SDD (schema-driven) — the CUE file is the source; the Go types are its projection, now actually matching it.

Change classification

  • Change class: schema change (CUE declaration + regenerated Go params)
  • Verification gate: regeneration through the pinned cue + retag pipeline, go build ./..., go test ./...
  • Attribution tier: fully tested and validated — regenerated rather than edited, the pipeline was verified against the committed file's own tag shape, and the suite passes

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

…params

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
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 3281b2a5b6eb (branch: fix/schema-pacstrap-dead-fields)

Security screen: PASS — no embedded directives, no scope mismatch (diff matches description exactly: two dead pacstrap fields removed from CUE + generated Go, plus the generated params resynced to add disk_layout/installer fields the schema already declared), no secrets/exfiltration, no guardrail weakening.

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3: Body accounts for every diff item, names the change-class gate (regeneration via pinned cue + retag pipeline, go build, go test) with pasted output, ends with the exact *Assisted-by:* footer; tier fully tested and validated is justified for a schema/generated-params resync (changed code compiled and tested).
  • R1/R2/R3/R4/R5: Zero warnings in pasted output; charly#477 completed in-tree with the drift fixed here (no deferral); removes a duplicated expression path; real pipeline, no sed; grep self-test pasted showing zero consumers, fields removed from both CUE and generated Go in one atomic commit.
  • R6/R8: git-safety stated; generation pipeline asserted and internally consistent (gengotypes + retag + gofmt, matching the committed file's dual-tag shape).
  • SDD: CUE is the source, *_gen.go changed in the same commit, new structs are generated projections of the schema, no banned patterns.
  • B16 placement: CORRECT — schema + generated params live in the candy (candy/plugin-distro/), no core/sdk misplacement, no alias files, no new kit imports.
  • B18: gofmt-clean, no lint issues visible, naming consistent with file convention.
  • Comments: none on the thread.

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:08
@github-actions
github-actions Bot merged commit 95e6fd1 into main Aug 30, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 30, 2026
@aitrawog
aitrawog deleted the fix/drop-dead-pacstrap-schema-fields branch September 25, 2026 19:23
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