Skip to content

feat(spec): InstallPlan IR discriminator enums (P4-unit-1) - #11

Merged
atrawog merged 2 commits into
mainfrom
feat/sdk-ir-enums
Jul 8, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/sdk-ir-enums

Conversation

@atrawog

@atrawog atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

First P4 unit — begins the InstallPlan IR E-envelope move to sdk. Moves the IR discriminator enums verbatim out of charly into sdk/spec/ir_enums.go (hand-written): Venue (int + String), Phase (int + String), StepKind (string, 13 kinds), Gate (string, 4 gates).

SDD call: these are INTERNAL execution enums, NOT host↔plugin wire carriers — the StepView wire struct (deploy_wire.go) serializes them as primitives (Venue int, Gate string, Kind string). So the wire-type-CUE mandate does not apply, and Venue/Phase are int iota enums cue exp gengotypes cannot faithfully express anyway. Hand-written matches the existing ReverseOpKind/Scope spec precedents. The charly consumer (delete defs, alias) is the paired superproject PR.

Change class

sdk Go — moved internal IR enums (no authored/wire schema surface → no schema-version bump).

How R10-tested

  • Verbatim move; charly's golden tests exercise it and pass (zero-churn type+const aliases).
  • Beds (fresh binary, source frozen): check-builder-local PASS 4/4 + check-local PASS 4/4, golangci-lint 0 both repos, zero warnings.

Attribution tier

fully tested and validated

Compliance

  • R3: one importable home for the IR enums (charly aliases). R5: charly deletes its defs (paired PR). Boundary: internal IR types → sdk. Producer-first; P4 decomposed per-unit. CHANGELOG present.

Assisted-by: Claude (fully tested and validated)

Moves the IR discriminator enums out of charly into sdk/spec (ir_enums.go,
hand-written): Venue (int,+String), Phase (int,+String), StepKind (string,13),
Gate (string,4). Internal execution enums, NOT wire carriers — StepView serializes
them as primitives (Venue int / Gate string / Kind string), so no CUE (and Venue/
Phase are int iota enums gengotypes can't express). Matches the ReverseOpKind/Scope
precedents in spec. First P4 unit; the InstallPlan struct + step vocabulary follow.

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — FRESH independent evaluation: PASS

Re-validated PR #11 (feat/sdk-ir-enums, head 2aec5fe) against R0–R10 as an independent evaluator, trusting none of the author's claims.

Diff scope (exact): two new files only — spec/ir_enums.go (+122) and CHANGELOG/2026.189.1400.md (+13). schema/version.cue untouched (correct: these are internal IR execution enums, not an authored/wire surface, so NOT CUE-sourced). No stray files; ONE commit.

SDD justification (crux): the four moved enums are NOT wire carriers — the wire struct InstallStepView (spec/deploy_wire.go) serializes them as primitives (Kind string, Venue int, Gate string; Phase isn't on the wire at all), so the wire-type-CUE mandate does not apply. Hand-written matches the existing Scope/ReverseOpKind spec precedents, and Venue/Phase are int iota enums cue exp gengotypes cannot faithfully express. Correct — hand-write justified.

Verbatim faithfulness: the type defs + all const values + both String() methods are byte-identical to charly 555f70e install_plan.go:66–181 (57 code lines, empty diff after stripping comments/blank/package lines). All 23 const values present: 3 Venue + 3 Phase + 13 StepKind + 4 Gate. No value/logic drift; only package main→spec and doc-comment wording differ.

Go gates:

  • sdk: go build / go vet / go test (all pass) / gofmt -l . (clean) / golangci-lint run ./... (0 issues).
  • consumer (charly, in-tree replace => ../sdk + paired alias block): go build ./... OK, go test ./... all ok. Alias block re-exports the type aliases + all 23 const aliases (clean R5 cutover).

R10 beds (both disposable: true, re-run by me on a fresh task build:charly binary, concurrently) — both PASS (steps=4), zero warnings:

bed deploy-add check-live update cleanup total
check-builder-local ok ok ok ok 71s
check-local ok ok ok ok 57s

summary.yml ok: true for every step (fresh CalVer 2026.189.1551). The update step is the fresh-rebuild leg — the IR-enum move is proven end-to-end (loader → IR compiler → builder DEPLOY leg → local deploy → external-plugin execution over the reverse channel → fresh charly update → teardown) with Venue/Phase/StepKind/Gate sourced from sdk/spec.

Merging --rebase after finalizing the merge-time CalVer.

Assisted-by: Claude (fully tested and validated)

…nstallPlan IR discriminator enums move)

Assisted-by: Claude (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