Skip to content

fix(kit): delete the retired acme_email use — the contract field is gone - #563

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/drop-acme-email
Nov 18, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/drop-acme-email

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

opencharly/spec#379 retired acme_email from the schema — not deprecated, deleted.
sdk still read it in four places, so every sdk tag at or after that merge fails to compile
against the released contract (meta.AcmeEmail undefined (type *spec.BoxMetadata has no field or method AcmeEmail)). This change deletes every reference and adopts the tag that retired it.

What breaks for consumers — the behaviour change, named. ACME_EMAIL is no longer populated
from a box's metadata
. It cannot be: the contract has no field to carry it, so there is nothing to
copy into the variable map. Concretely, for a charly plan step or deploy template that used
${ACME_EMAIL}:

  • charly's own plans never used it. The claim-keyed sweep below finds no run:/check: step
    anywhere in this repo, charly's candies, or the boxes that expands ${ACME_EMAIL} from charly's
    variable map.
  • The one live consumer is Traefik's own expansion, pod-traefik/traefik.yml:27
    (email: ${ACME_EMAIL:[email protected]}). That ${…} is expanded by Traefik inside the
    container
    , from the container's process environment — not by charly's variable map — so it is
    unaffected by this change as long as the operator supplies the value the way that surface always
    worked
    : a deploy env: / env_file: entry. What is gone is the second, implicit source: putting
    acme_email: on a box/deploy and having charly hand it to the variable map. That authoring
    surface was already gone with spec#379; this PR is where the code catches up, so the fallback
    [email protected] is what a Traefik deploy that relied on the metadata path will now use —
    silently, which is why it is stated here rather than left to be discovered.
  • Nothing else read it. deploykit's overlay→metadata copy and the DeployOnlyCapabilityFields
    exemption existed only to carry the field from the overlay to the metadata; both go with it.

The producer-first ordering defect — this PR is the repair. spec#379 retired the field
without the consumer moving first, and not in the same cutover. The rulebook's relocation
invariant is explicit: the replacement must be merged at its new home before the removal, or
both land in one change — otherwise, at the commit where the producer drops the field, the
consumer is broken on main and every sdk release until the repair lands. That is exactly what
happened: spec v0.2026322.1356 (which carries #379) cannot be consumed by any sdk tag, so the
sdk had to follow the spec tag rather than precede it. The order is recorded here so the next
reader sees why this leg is a repair and not a cleanup.

Files: kit/checkvars.go (the ACME_EMAIL map entry), kit/checkvars_test.go (fixture +
expectation), deploykit/deploy_file.go (the overlay.AcmeEmail copy + the schema-v4 note),
deploykit/capabilities.go ("AcmeEmail" exemption + two comments), buildkit/config_resolve.go
(note), go.mod/go.sum (require github.com/opencharly/spec v0.2026322.1814).

Head 9331191f748cf4f20f88534559d4fc34620f1c27 (7 files changed, 30 insertions(+), 35 deletions(-)).

How tested

The repo's authoritative gate is .github/workflows/ci.yml (gofmt, vet, golangci-lint v2.13.2,
test, and the four-arch cross-compile). Every command ran in
/home/atrawog/Sync/Atrapub/a/dsh/opencharly/.worktrees/remove-acme/sdk under
GOWORK=off GOTOOLCHAIN=go1.26.8 GOTMPDIR=~/.cache/go-tmp TMPDIR=/tmp/cs.

$ GOWORK=off go build ./...; echo "exit=$?"
exit=0
$ test -z "$(gofmt -l .)"; echo "exit=$?"
exit=0
$ golangci-lint run ./...; echo "exit=$?"
0 issues.
exit=0
$ go vet ./...; echo "exit=$?"
exit=0
$ for arch in amd64 arm64 arm 386; do GOOS=linux GOARCH=$arch CGO_ENABLED=0 go build ./... && echo "linux/$arch ok"; done
linux/amd64 ok
linux/arm64 ok
linux/arm ok
linux/386 ok
$ git rev-parse HEAD
9331191f748cf4f20f88534559d4fc34620f1c27
$ git diff --shortstat $(git merge-base origin/main HEAD)..HEAD
 7 files changed, 30 insertions(+), 35 deletions(-)
$ grep -n 'opencharly/spec ' go.mod; grep -c replace go.mod
18:	github.com/opencharly/spec v0.2026322.1814
0

go test -count=1 ./... is RED on THIS host, and the red is pre-existing and environmental.
One test fails — deploykit.TestResolveBoxRef_BoxShortName — and it fails identically on an
unmodified origin/main worktree
that carries none of my changes:

$ git -C /home/atrawog/Sync/Atrapub/a/dsh/opencharly/.worktrees/clean-store/sdk rev-parse --short HEAD
c4b297f
$ git -C /home/atrawog/Sync/Atrapub/a/dsh/opencharly/.worktrees/clean-store/sdk grep 'opencharly/spec ' go.mod
18:	github.com/opencharly/spec v0.2026322.1111
$ cd /home/atrawog/Sync/Atrapub/a/dsh/opencharly/.worktrees/clean-store/sdk && GOWORK=off go test ./deploykit/ -run 'TestResolveBoxRef_BoxShortName' -count=1 > /tmp/cs/pre.log 2>&1; echo "rc=$?"; grep -E '^(--- FAIL|FAIL)' /tmp/cs/pre.log; grep -m1 'image not found' /tmp/cs/pre.log
rc=1
--- FAIL: TestResolveBoxRef_BoxShortName (0.12s)
FAIL
FAIL	github.com/opencharly/sdk/deploykit	0.125s
FAIL
    box_ref_test.go:194: ResolveBoxRef("pod-cdi-layer-nvidia") unexpected error: box ref "pod-cdi-layer-nvidia": resolving bootc image "pod-cdi-layer-nvidia": image not found in local storage: pod-cdi-layer-nvidia (build it first with `charly box build pod-cdi-layer-nvidia`)

Its cause is a disagreement between two readers of one engine store (kit.ListLocalImages lists
the name; the contract's container.ResolveLocalImageRef cannot find it), it reproduces on
pristine main, and it skips on a host with no local images — i.e. on CI's runners. It is RCA'd
and FILED as #562 (see ## Filed issues), not suppressed here. With that one arm
excluded, the suite is green, and the exclusion is named:

$ GOWORK=off go test -count=1 ./... > /tmp/cs/full.log 2>&1; echo "rc=$?"; echo "ok-packages=$(grep -cE '^ok' /tmp/cs/full.log)"; grep -E '^(FAIL|--- FAIL)' /tmp/cs/full.log
rc=1
ok-packages=20
--- FAIL: TestResolveBoxRef_BoxShortName (0.10s)
FAIL
FAIL	github.com/opencharly/sdk/deploykit	5.656s
FAIL
$ GOWORK=off go test -count=1 ./... -skip 'TestResolveBoxRef_BoxShortName' > /tmp/cs/skip.log 2>&1; echo "rc=$?"; echo "ok-packages=$(grep -cE '^ok' /tmp/cs/skip.log)"
rc=0
ok-packages=21

One anomaly during the gates, RCA'd. The first golangci-lint run ./... after the version bump
panicked inside goanalysis's loadFromSource with "file requires newer Go version go1.27
(application built with go1.26)"
. It is an analysis-CACHE artifact, not a code finding: the same
command with a FRESH cache directory returns 0 issues, go vet and go build are clean under the
same toolchain, and the default-cache run is ALSO green immediately afterwards (the stale entry was
replaced). Evidence, both arms:

$ GOLANGCI_LINT_CACHE=/tmp/cs/lintcache-fresh-1 golangci-lint run ./...; echo "exit=$?"
0 issues.
exit=0
$ golangci-lint run ./...; echo "exit=$?"
0 issues.
exit=0

The repo's own AGENTS.md documents this family of mismatch (there as export data version 5 > maximum 4): golangci-lint v2.13.2 is itself built with a go1.27 toolchain and its cache key does not
include that fact, so a shared ~/.cache/golangci-lint can carry an entry the go1.26 type-checker
cannot re-load. Nothing in the change is implicated, and the final tree is green.

Rulebook compliance

  • R0 — the skills the dispatcher selects were loaded before the first tool call (go, plugin, git-workflow, strict-policy, root-cause-analyzer, cutover-policy, check), plus this repo's AGENTS.md in the worktree.
  • R1 — every anomaly got an RCA. Two were surfaced and both are disposed in the open: the pre-existing TestResolveBoxRef_BoxShortName failure (RCA'd, proven on a pristine tree, FILED as deploykit: TestResolveBoxRef_BoxShortName fails on any store holding a name the contract's resolver cannot find (two readers of one store disagree) #562) and the golangci-lint cache panic (RCA'd as an analysis-cache/toolchain artifact with both arms pasted, then re-run green). The change's own four removed references are fixed here, not filed.
  • R2 — one implementation per behaviour: the variable map has one builder and one entry list, and the retired field's entry is deleted from each place that enumerated it rather than shimmed; the DeployOnlyCapabilityFields exemption existed only for this field and is not replaced by anything.
  • R3 — no workaround: no compatibility field, no //nolint, no fallback that would keep a var alive from a second source, no sleep or retry. The lint anomaly was diagnosed with a fresh-cache arm before the re-run rather than being retried until green.
  • R4 — product before prose: the code is brought to the contract (not the contract to the code), and the four prose notes that still named the retired field are reworded in the same commit; they now state that it was retired, so a reader cannot take them for a live reference.
  • R5 — every reference to the retired identifier is deleted or reworded, with the before/after control showing the live uses are GONE and only retirement notes remain:
$ git show origin/main:kit/checkvars.go | grep -c "ACME_EMAIL"; grep -c "ACME_EMAIL" kit/checkvars.go
1
0
$ git show origin/main:kit/checkvars_test.go | grep -c "ACME_EMAIL"; grep -c "ACME_EMAIL" kit/checkvars_test.go
1
0
$ git show origin/main:deploykit/capabilities.go | grep -c '"AcmeEmail"'; grep -c '"AcmeEmail"' deploykit/capabilities.go
1
0
$ git show origin/main:deploykit/deploy_file.go | grep -c "AcmeEmail"; grep -c "AcmeEmail" deploykit/deploy_file.go
3
0
$ git grep -n --untracked -i -E "acme_?email" -- .
buildkit/config_resolve.go:171:	// (`acme_email` is gone from the contract entirely — opencharly/spec#379.)
deploykit/capabilities.go:55:	// meaning); `acme_email` has since been retired from the contract
deploykit/capabilities.go:128:// never round-trip through OCI labels. (`AcmeEmail` was on this list until
deploykit/deploy_file.go:483:		// deploy-only). `acme_email` was retired from the contract entirely

The four remaining lines are retirement notes (each says "retired"/"gone"), never a stale
reference: a reader landing there learns why the field is not in the map rather than being told it
is. No live reference survives — that is what the 0s above assert.

  • R6 — git status --short was empty before the commit and after every gate; only this worktree's own paths were touched, nothing was force-pushed, and no history was rewritten.
  • R7 — the change is a DELETION whose proof is that the tree compiles against the released contract (that is the failure mode the task exists for): go build ./... rc=0 at spec v0.2026322.1814, plus the whole suite green minus the one pre-existing arm. The deleted entry's guard is the whole-map DeepEqual in TestResolveTestVarsBuild, which fails if any field-derived variable reappears.
  • R8 — live or skip, never fake. The suite contains live engine arms; the annotation-control arm ran against podman/docker/rootless containerd on this host earlier in the same session, and the one engine arm that is environment-dependent is the pre-existing failure above, filed rather than papered over.
  • R9 — no binary is built or deployed and no runtime OS dependency is added; packaging: is untouched.
  • R10 — the gate that owns this change class is this repo's ci.yml, and every step of it ran on the committed head: gofmt, vet, golangci-lint v2.13.2, go test (with the one pre-existing, environment-dependent arm named and filed), and the four-arch cross-compile, as pasted above.
  • HC — one coherent scope: all four references and every prose mention in ONE change, with the contract bump that makes it compile. No shim, no deferred cleanup inside this repo.

Change classification

Code (kit/, deploykit/, buildkit/ + go.mod/go.sum) — not documentation, so
documentation reviewed is not claimed. The tier claimed is fully tested and validated: every
step of the change-class gate passed on this head, except the one pre-existing, environment-dependent
test arm, which is RCA'd, proven on a pristine tree, and filed — the tier's "gate passed on the final
tree" clause therefore diverges on exactly that arm, and the divergence is stated rather than
absorbed.

Breaking change + rollback: the CODE change is a deletion forced by the contract, and the
behaviour it removes is named at the top: ACME_EMAIL is no longer sourced from box metadata, so a
Traefik deploy that relied on acme_email: falls back to its own ${ACME_EMAIL:[email protected]}
default; supply the value with a deploy env: entry instead. The API removal is spec's, already
merged. Rollback is to drop this branch — but note that rolling back to the previous sdk tag cannot
compile against spec at or after v0.2026322.1356, which is why the repair has to land.

Filed issues

Agent: sdk-store
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)

opencharly/spec#379 deleted `acme_email` from the schema on purpose, so every sdk tag at
or after that merge fails to compile against the released contract
(`meta.AcmeEmail undefined`). The field is retired, not deprecated: nothing sources it any
more, so every sdk reference goes in the same change (R5).

- kit/checkvars.go — the `ACME_EMAIL` entry in the build-time variable map is DELETED: a
  box's metadata can no longer carry an ACME address. Nothing in charly's own plans used
  the variable; the one live consumer is Traefik's OWN `${ACME_EMAIL:-…}` expansion inside
  a container, which reads the container's process environment, so an operator who needs
  it passes it as a deploy `env:` entry (a first-class surface, untouched by this change).
- deploykit/deploy_file.go — the overlay→metadata copy of `overlay.AcmeEmail` is DELETED,
  and the schema-v4 note no longer names the field.
- deploykit/capabilities.go — `"AcmeEmail"` is removed from DeployOnlyCapabilityFields (it
  cannot be a spec.BoxMetadata field any more), and the two comments listing it reworded.
- buildkit/config_resolve.go — the resolve note reworded.
- kit/checkvars_test.go — the fixture and the expected-map entry removed; the whole-map
  DeepEqual remains as the regression guard against a field-derived var coming back.
- go.mod/go.sum — `require github.com/opencharly/spec v0.2026322.1814`, and no replace.

Refs: opencharly/spec#379, opencharly/spec#384
Agent: sdk-store
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 9331191f748cf4f20f88534559d4fc34620f1c27 (branch: fix/drop-acme-email)

Security screen: PASS
Checklist: All applicable rules PASS or NA (pure code deletion + first-party spec version bump; no schema/candy/security-machinery changes; the one red test arm is RCA'd, reproduced on pristine main, and filed as #562; changed paths executed via the passing kit test).

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 18, 2026 18:27
@github-actions
github-actions Bot merged commit adb1e36 into main Nov 18, 2026
8 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 18, 2026
github-actions Bot pushed a commit that referenced this pull request Nov 18, 2026
…, leg 2 of 3) (#564)

The loader derived its own copy of the #ResourceKind membership at package init:

  resourceKindSet = sliceSet(spec.ResourceKinds)

so the parse and the contract held two independent derivations of one list that could
only agree by luck. The parse now asks spec.ResourceKindSet() at every consult
(memberDisc and the deploy-body member scan), and the copy is gone. sliceSet stays
standing for its six other callers; only the resource-kind site moves.

RED-first, on the right claim. The test makes spec.ResourceKinds MOVE and asks the
parse, so it fails while the loader answers from its own copy and passes only when the
verdict comes from the contract:

  memberDisc does not see a word the composed schema now declares: the loader answers
  from a snapshot taken at package init, so its verdict can disagree with
  spec.ResourceKindSet()

The observable is divergence, not compilation. The earlier `undefined: ResourceKindSet`
failure available on an un-bumped tree was refused for exactly that reason: it proves a
symbol is missing, not that the two derivations can disagree.

Base moved during the wait, deliberately and for a measured reason: this branch was
rebased from sdk#561's head (8de8a57, carrying the spec v0.2026322.1616 bump) onto
aec1d52, because #561 was CLOSED as a policy action while its content landed through
#563 and the deploykit fix. The redundant commits are dropped rather than inherited,
which is why the diff is one behaviour change and not a pin bump. Premise re-measured at
the new tip (spec v0.2026322.1814 carries spec.ResourceKindSet; loaderkit/parse.go:35
still held its own copy), not assumed.

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.

1 participant