Skip to content

fix(spec)!: retire the orphaned LocalPkgInstallStep.Version (sdk#315's spec half) - #208

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/retire-localpkg-version
Oct 7, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/retire-localpkg-version

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #204 — the spec-side half of opencharly/sdk#315, and the last leg of that
cutover (the sdk half landed first, producer-first: opencharly/sdk#354, squash-merged c2b7a1fc,
tag v0.2026280.2222).

spec.LocalPkgInstallStep.Version has had no writer since that merge deleted
deploykit/install_build.go's Version: img.EffectiveVersion, whose own producer
(deploykit.ComputeEffectiveVersions) died in sdk#313 — and it has no reader anywhere either:
downloadLocalPkg obtains the format's stable-latest download_template, never a versioned URL. It is
pure residue, and it is also a guidance defect: its doc claimed a behaviour the code never had.

Deleted in this cutover: the in-proc field (spec/install_step_vocab.go) and the doc line that
promised a versioned download; both round-trip assignments (spec/install_step_view.go, StepToView /
StepFromView), so the wire no longer pretends to carry a version; and the two fixtures that set it
(spec/install_step_vocab_test.go, spec/install_step_view_test.go).

Named, not silently dropped — and proven, not asserted. The wire view's own
version?: string @go(Version) (spec/schema/deploy.cue:711, inside #InstallStepView) is now written by
nothing and read by nothing, and both halves are executed output rather than a claim. Written by nothing:
the only writer was StepToView's v.Version = s.Version, deleted here. Read by nothing — every
.Version read in the module, classified:

$ git grep -n '\.Version\b' -- '*.go' | grep -v _test | grep -v cue_types_gen.go
merge/merge_unified.go:31:	if src.Version != "" && dst.Version == "" {
merge/merge_unified.go:32:		dst.Version = src.Version
refs/git.go:431:	if p.Version != repoCacheProvenanceVersion || p.Commit == "" {
spec/candy_ref_entry.go:11:// .Bare()/.Version()/.IsRemote() so a ref's identity and its pinned version can never drift apart.
spec/candy_ref_entry.go:16:// pinned version (.Version()) are DERIVED on demand.
spec/distro_config_methods.go:71:	version := def.Version
spec/distro_config_methods.go:73:		version = resolved.Version
spec/install_plan_view.go:37:		Version:         p.Version,
spec/install_plan_view.go:105:		Version:         v.Version,
spec/distro_config_methods.go:71:	version := def.Version
spec/install_plan_view.go:37:		Version:         p.Version,
spec/install_plan_view.go:105:		Version:         v.Version,
$ for r in sdk charly; do printf '%s: ' "$r"; git -C "$r" grep -c 'StepView\.Version\|step\.Version' origin/main -- '*.go' | wc -l; done
sdk: 0
charly: 0

None of those hits is an InstallStepView: they are the merged-config struct (merge), ref provenance
(refs), a candy ref (candy_ref_entry), a distro def (distro_config_methods) and InstallPlan.Version
(install_plan_view); the consumer repos have zero StepView.Version/step.Version reads.

The named exit for that residual is task-5 (cluster C9, owner wire-types) — the Lead has handed the
spec/schema/deploy.cue deletion (plus its charly task cue-gen regeneration) to that owner, because
spec/schema/* is their surface this wave. So this PR retires everything the field needed in the surfaces
it owns, and the one remaining surface has a named owner and a named batch; #204 closes as scoped, and it
says so.

How tested

The module's own committed CI, DISCOVERED at origin/main (.github/workflows/ci.yml: go build ./...,
go test ./..., gofmt, golangci-lint), executed on this head:

$ cd .worktrees/loader-paths/spec
$ go build ./...; echo "build exit=$?"
build exit=0
$ test -z "$(gofmt -l .)"; echo "gofmt exit=$?"
gofmt exit=0
$ go vet ./...; echo "vet exit=$?"
vet exit=0
$ go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./...
0 issues.
$ go test ./... > /tmp/spec-test.log 2>&1; echo "exit=$?"; grep -c 'FAIL' /tmp/spec-test.log
exit=0
0
$ tail -2 /tmp/spec-test.log
ok  	github.com/opencharly/spec/spec	0.252s
ok  	github.com/opencharly/spec/transport	0.207s

The step-IR round-trip test is the coverage that matters here (StepFromView(StepToView(s)) must stay
DeepEqual to s for every kind); removing a field from both the concrete step and its view keeps it
green, and removing it from only one side would not compile — which is exactly the invariant the pair
exists to hold.

The no-reader/no-writer claim is proven by executed output, on origin/main before this change:

$ git -C sdk grep -n 'Version' origin/main -- 'deploykit/localpkg.go' 'deploykit/candy_steps.go' 'deploykit/install_build.go'
deploykit/install_build.go:55:		Version:         layer.GetVersion(),
deploykit/install_build.go:223:		Version:     img.EffectiveVersion,
$ git -C charly grep -n 'LocalPkgInstallStep' origin/main -- '*.go' | grep -v _test
charly/plugin_executor_reverse.go:154:// LocalPkgInstallStep (makepkg + pacman/dnf/apt), SystemPackagesStep (the format's
charly/plugin_executor_reverse.go:214:	case *spec.LocalPkgInstallStep:
$ git -C spec grep -n 'Version' origin/main -- 'spec/install_step_view.go'
spec/install_step_view.go:125:		v.Version = s.Version
spec/install_step_view.go:263:			Version:     v.Version,

That block is the pre-fix state and it names its own witness: line 223 populated
LocalPkgInstallStep.Version
— it IS the writer this cutover removes, in the sibling repo, and it was
still on sdk origin/main when that paste was taken. Re-measured after opencharly/sdk#354 merged
(git -C sdk fetch origin main), the same greps on the CURRENT sdk origin/main:

$ git -C sdk grep -n 'Version' origin/main -- 'deploykit/localpkg.go' 'deploykit/candy_steps.go' 'deploykit/install_build.go'
deploykit/install_build.go:55:		Version:         layer.GetVersion(),
$ git -C sdk show origin/main:deploykit/install_build.go | sed -n '221,229p'
	return &LocalPkgInstallStep{
		PackageName: pkg.Name,
		CandyName:   layer.GetName(),
		CandyDir:    layer.GetSourceDir(),
		Format:      fmtName,
		LocalPkg:    lp,
	}
$ echo "exit=$? (grep: no Version on a LocalPkgInstallStep literal)"
exit=0

Line 223 is GONE and the surviving line 55 is InstallPlan.Version — a different struct (InstallPlan,
the plan as a whole). The charly hits are a type switch that reads no field; the two view lines are the
round-trip this PR deletes.

The claim-keyed sweep for a surface still promising a versioned LocalPkgInstallStep:

$ grep -rn 'LocalPkgInstallStep' --include='*.go' . | grep -i version
   (no output, exit 1 — no live reference to a LocalPkgInstallStep version)
$ grep -rn 'release CalVer' --include='*.go' --include='*.cue' .
./spec/deploy_executor.go:284:	// CalVer is the in-development release CalVer (default: `<Binary> version`).

The single release CalVer hit is a different claim about a different thing (the charly BINARY's
in-development CalVer on DeployExecutor), not the deleted field's versioned download — so no surface
still promises a versioned LocalPkgInstallStep."
no live hit for either (the deleted doc line was the only one)


`git diff --stat` for this head:

```bash
$ git diff --stat origin/main...HEAD
 spec/install_step_view.go       | 2 --
 spec/install_step_view_test.go  | 1 -
 spec/install_step_vocab.go      | 2 --
 spec/install_step_vocab_test.go | 2 +-
 4 files changed, 1 insertion(+), 6 deletions(-)

Head 4a76d4644fa7f093e70c2029f807155e3d62d264

Rulebook compliance

  • R0 — skills loaded for the surfaces this touches: /charly-internals:go and
    /charly-internals:plugin (the spec IR + per-plugin/wire contract), /charly-internals:git-workflow
    (before any git/PR action, with its pre-validator self-audit), /charly-internals:strict-policy
    (R1/R2/R3/R5 + RDD), /charly-internals:install-plan (the step IR and its view bridge).
  • R1 — the removal's premise was re-derived on origin/main and is pasted above, not assumed; no
    anomaly was silenced. The one divergence this fix surfaces (a false doc comment) is deleted with the
    field rather than left standing.
  • R2 — no deferral: the in-proc field, the doc, the round-trip lines and the fixtures all go in this
    one commit. The single residual — the CUE-sourced view field in spec/schema/deploy.cue — is named
    in the Summary and in spec: LocalPkgInstallStep.Version has no reader — delete the orphaned field, its view round-trip and the doc that claims a versioned download #204's close
    , with the reason it is not edited here (another owner's surface),
    and it is reported to the Lead rather than parked as "out of scope".
  • R3 — no duplication introduced; the change only removes, and the step/view pair stays the single
    bridge it documents itself to be.
  • R4 — no sleep, retry, suppression or shim; nothing is worked around, a field is removed.
  • R4a — docs were not routed around a defect: the false doc line is deleted in the same commit.
  • R5 — the vestige and every in-repo reference to it die together, proven by the executed sweep
    above (grep -rn 'LocalPkgInstallStep' --include='*.go' . | grep -i version → no live hit).
  • R6 — git status --short is empty after the commit; no reset, no force-push, no hook bypass.
  • R7 — the behaviour proved is the round-trip invariant the deleted lines were part of: the suite
    that asserts StepFromView(StepToView(s)) DeepEquals s for every step kind passes, and it cannot
    compile if only one side of the pair is edited — the pair is self-guarding.
  • R7a — N/A — no boundary crosses a real external service; this is a pure type/wire deletion inside
    the contract module.
  • R8 — the emitted wire shape loses only a field nothing populates: StepToView no longer writes
    Version, so a serialized step view is identical minus an always-empty key. Proven by the
    round-trip test and by the module suite.
  • R9 — N/A — no binary is built or deployed by this repo; its artefact is the module itself, and the
    module's own CI is the gate.
  • R10 — the class is Contract / library module (/charly-check:check references/beds-and-r10.md:
    a Go module with no charly.yml project and no disposable: true entity — no bed can exist here), so
    the gate is this module's own committed CI, green on this head and pasted in full above.
  • Rule 11 (guidance in the same cutover) — the claim this change invalidates is the field's doc
    line, deleted with it; the sweep above shows no other surface promises a versioned
    LocalPkgInstallStep, and the one surface that does still declare a version key (the CUE view def)
    is named with its file and its owner rather than left to drift silently.

Change classification

Code — Go source plus tests in the spec contract module, removing an exported field, so this is a
breaking change for any consumer of spec.LocalPkgInstallStep.Version (marker !). Not a docs-only
change, so documentation reviewed would be invalid; the tier below is the one the pasted evidence
supports: the module's own CI (build, test with zero failures, gofmt, golangci-lint 0 issues) on this
head, plus the executed no-writer/no-reader proof and the claim-keyed sweep.

Agent: loader-paths
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

…s spec half)

Closes #204. The field has had no writer since opencharly/sdk#354
deleted deploykit/install_build.go's `Version: img.EffectiveVersion` (whose
producer, deploykit.ComputeEffectiveVersions, died in sdk#313), and it has no
reader anywhere either: downloadLocalPkg obtains the format's stable-latest
`download_template`, never a versioned URL, so the in-proc field and its view
round-trip are pure residue.

Deleted in this cutover:
- spec/install_step_vocab.go — the `LocalPkgInstallStep.Version` field AND the doc
  that claimed a behaviour the code never had ("Version is the release CalVer
  (e.g. "2026.225.1200") to download") — the R5 half and the guidance half of
  the same removal.
- spec/install_step_view.go — both round-trip assignments (StepToView /
  StepFromView), so the wire no longer pretends to carry a version.
- spec/install_step_vocab_test.go, spec/install_step_view_test.go — the fixtures
  that set it (the step-IR round-trip test stays green).

Not touched, and named rather than silently dropped: the wire view's own
`version?: string @go(Version)` in spec/schema/deploy.cue (#InstallStepView) is
now written by nothing and read by nothing, but spec/schema/* is another
owner's surface in this wave, so it is reported to the Lead rather than edited
here.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 4a76d4644fa7f093e70c2029f807155e3d62d264 (branch: feat/retire-localpkg-version)

Change class: code — Go contract module spec (LocalPkgInstallStep field removal, breaking).

Blocks

  1. How tested / body-truthfulness (rule 4, B12) — the PR's own pasted evidence refutes its central premise. The Summary asserts the field "has had no writer since that merge deleted deploykit/install_build.go's Version: img.EffectiveVersion", yet the PR's executed output shows that exact line still present on sdk origin/main:

    deploykit/install_build.go:223:		Version:     img.EffectiveVersion,
    

    The body explains line 55 (InstallPlan.Version) and the charly/spec hits, but never accounts for line 223. Either line 223 is a live writer of LocalPkgInstallStep.Version — in which case the "orphaned / no writer" premise is false and deleting the field is unsafe — or it populates a different struct the body must name. Fix: state which struct line 223 initializes and show it is not LocalPkgInstallStep, or withdraw the "no writer" claim. As written, the pasted proof contradicts the body.

  2. R5 / B14(b) — the surviving #InstallStepView.version wire field is deferred without a named exit, and its deadness is unproven. The body states the CUE-sourced version?: string @go(Version) in spec/schema/deploy.cue is "written by nothing and read by nothing" and routes it to "the Lead" / "another owner's surface in this wave" — that names no batch/task/PR, so it is the forbidden R2 deferral. The "read by nothing" assertion also has no executed sweep: the only version-keyed grep pasted is grep -rn 'LocalPkgInstallStep' … | grep -i version, which cannot establish anything about InstallStepView.Version (a different type). Fix: paste the executed grep proving no reader of InstallStepView.Version anywhere, and name the specific batch/PR that retires the spec/schema/deploy.cue field (or retire it in this same commit).

Comment intake

0 comments in the thread — nothing to disposition.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 4a76d4644fa7f093e70c2029f807155e3d62d264 (branch: feat/retire-localpkg-version)

Security screen: PASS (no injection, no secrets/egress, no weakened guardrails, no supply-chain change; not security machinery, so no maintainer sign-off required).
Checklist: All applicable rules PASS or NA — clean symmetric 4-file removal, body accounts for every diff item, --stat and head SHA match, breaking-change marker correct, attribution tier justified by the executed round-trip/CI evidence, CUE residual routed to a named task.
Comment 6048307094 (@github-actions[bot]): stale-superseded — both blocks are refuted by the CURRENT body: (1) line 223 Version: img.EffectiveVersion is explicitly labelled the pre-fix writer and shown gone on the post-sdk#354 origin/main via the pasted sed -n '221,229p' of the LocalPkgInstallStep literal; (2) the CUE residual now names its exit (task-5, cluster C9, owner wire-types) and is backed by an executed no-writer/no-reader sweep (.Version classification + StepView.Version/step.Version → 0 in sdk/charly), neither of which the stale comment saw.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 7, 2026 22:43
@github-actions
github-actions Bot merged commit a022353 into main Oct 7, 2026
2 of 3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 7, 2026
aitrawog added a commit to opencharly/sdk that referenced this pull request Oct 8, 2026
…ained

The validator's R1/R5 finding is correct and the divergence was introduced by this
hunk: one event — "the field lost its only writer" — was attributed three ways
(sdk#315 in the new comment, sdk#313 in the new error string directly beneath it, and
sdk#354 in the PR body), and the guard-adding PR was attributed to #354.

Measured, rather than picked from the three:
  - #315 does NOT resolve as a pull request; it is the ISSUE, now CLOSED:
    "deploykit: install_build.go still assigns the now-unpopulated EffectiveVersion
    (dead after sdk#313)".
  - the assertion this change replaces — the retained evidence, itself tagged sdk#315 —
    said the box's EffectiveVersion "lost its only writer in sdk#313".
  - opencharly/spec#208 is the spec-side PR of that retirement (the field and its view
    round-trip), which is what this change adapts to.
  - #354 is a loaderkit fix ("the candy-manifest fallback runs the one
    desugar step (#323, #315)"), not the field's retirement, so naming it as the writer's
    deleter or the guard's author was false.

The comment and the error string now both say the same thing: the writer was already
lost in sdk#313; the retirement is tracked by ISSUE sdk#315 and landed on the spec side
as spec#208. No PR number is invented for the guard: the commit that added it could not
be measured from this checkout (`git log -S` on its text finds nothing here), so the
text names the issue instead of guessing a number.

Refs #315, opencharly/spec#208

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
github-actions Bot pushed a commit to opencharly/sdk that referenced this pull request Oct 8, 2026
…egs) (#358)

* chore(deps): adopt spec v0.2026280.2244 (the sdk#315 and sdk#253 consumer legs)

Bumps `require github.com/opencharly/spec` v0.2026276.0 -> v0.2026280.2244 via
`go get` + `go mod tidy` (the toolchain, never a hand-pin) and adapts the two
consumer surfaces the adopted range changes:

1. spec#208 removed `spec.LocalPkgInstallStep.Version` (with its view
   round-trip) after #354 deleted the field's only writer. The
   dead-vestige guard added in that PR asserted the field was EMPTY, which no
   longer typechecks; it now asserts STRUCTURALLY that the type has no `Version`
   field at all — a reinstated assignment is a compile error, and the reflection
   check keeps the vestige from creeping back as a field without a writer.

2. spec#202 made a ref's identity its PROJECT identity, not the enclosing
   repository (the fix for the false import back-edge sdk#253 measured as three
   namespace failures). `loaderkit.RepoIdentity` is a plain alias of
   `spec.RepoIdentity`, so the stale expectation in `TestRepoIdentity` is updated
   to the project identity and the reason is recorded at the assertion: stripping
   `@github.com/o/r/candy/x:v1.2.3` to `github.com/o/r` is the PRE-#202
   behaviour.

This closes the residual the sdk#253 dossier named — "sdk's own go.mod still pins
spec v0.2026276.0 (a pin bump, not the defect)" — in the same range.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* docs(deploykit): reconcile one retirement's provenance to what is retained

The validator's R1/R5 finding is correct and the divergence was introduced by this
hunk: one event — "the field lost its only writer" — was attributed three ways
(sdk#315 in the new comment, sdk#313 in the new error string directly beneath it, and
sdk#354 in the PR body), and the guard-adding PR was attributed to #354.

Measured, rather than picked from the three:
  - #315 does NOT resolve as a pull request; it is the ISSUE, now CLOSED:
    "deploykit: install_build.go still assigns the now-unpopulated EffectiveVersion
    (dead after sdk#313)".
  - the assertion this change replaces — the retained evidence, itself tagged sdk#315 —
    said the box's EffectiveVersion "lost its only writer in sdk#313".
  - opencharly/spec#208 is the spec-side PR of that retirement (the field and its view
    round-trip), which is what this change adapts to.
  - #354 is a loaderkit fix ("the candy-manifest fallback runs the one
    desugar step (#323, #315)"), not the field's retirement, so naming it as the writer's
    deleter or the guard's author was false.

The comment and the error string now both say the same thing: the writer was already
lost in sdk#313; the retirement is tracked by ISSUE sdk#315 and landed on the spec side
as spec#208. No PR number is invented for the guard: the commit that added it could not
be measured from this checkout (`git log -S` on its text finds nothing here), so the
text names the issue instead of guessing a number.

Refs #315, opencharly/spec#208

Assisted-by: DeepSeek Harness ollama-cloud/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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec: LocalPkgInstallStep.Version has no reader — delete the orphaned field, its view round-trip and the doc that claims a versioned download

1 participant