Skip to content

style(spec): gofmt the 5 drifted hand-written wire files (SDD hygiene) - #6

Merged
atrawog merged 2 commits into
mainfrom
feat/gofmt-wire-drift
Jul 8, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/gofmt-wire-drift

Conversation

@atrawog

@atrawog atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

gofmt -l . flagged 5 hand-written files committed unformatted across earlier cutovers (Cutover L/F/K/H — RCA'd via git log): spec/{deploy_wire,init_wire,k8sgen_wire,vm_wire}.go + spec/mcp_provides_test.go. Runs gofmt -w on them — the only sanctioned blanket auto-fix (AST-identical, behavior-neutral). NOT the cue-generated *_gen.go, so task cue:gen is unaffected. An SDD/R1 hygiene incident (unformatted code reached main).

Change class

sdk Go — but formatting-only (AST-identical); no runtime behavior surface.

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: a formatting-only (AST-identical) change has no runtime behavior to bed — the gate is gofmt -l empty + compile + unit tests in sdk + the in-tree consumer build.
  • Disposable target / fresh rebuild / concurrency: N/A (no runtime/deploy surface).
  • Did the changed code path execute live? The reformatted code compiles + its package tests run (below); there is no behavioral branch to exercise (formatting-only).
$ gofmt -l .                     # → EMPTY (was: 5 files)
$ git diff --stat                # 5 files, 56 ins / 56 del — pure line reflow
$ go build ./...  (sdk)          # exit 0
$ go test  ./...  (sdk)          # ok spec 0.308s; kit/vmshared ok; no other test pkgs
$ go build ./...  (charly, in-tree sdk via replace)  # exit 0 — consumer unchanged

Attribution tier

analysed on a live system — go build/go test ran and are pasted; formatting-only so there is no runtime branch to exercise beyond compile+test.

CLAUDE.md rule compliance

  • R0 skills: /charly-internals:go-quality — "gofmt -w . is the ONLY safe blanket auto-fix (AST-identical)".
  • R1 RCA: root-caused to hand-written wire files committed unformatted across L/F/K/H (git log), not a generator issue; gofmt -w is the canonical fix (no workaround).
  • R3: N/A (no duplication). R5: no identifier removed. SDD: the drift is NOT in *_gen.go; cue:gen reproducibility is unaffected.
  • R7/R10: the gate is compile+test for an AST-identical change (no bed); pasted above. R8/R9: N/A (library, no Containerfile/label/binary-deps surface).
  • Hard cutover: one atomic commit. Boundary-law/disposable-autonomy: N/A.
  • CHANGELOG: CHANGELOG/2026.189.0625.md staged.

Assisted-by: Claude (analysed on a live system)

atrawog added 2 commits July 8, 2026 08:28
gofmt -l flagged spec/{deploy_wire,init_wire,k8sgen_wire,vm_wire}.go +
spec/mcp_provides_test.go — hand-written wire types committed unformatted across
earlier cutovers (L/F/K/H). gofmt -w (AST-identical, behavior-neutral). Not the
cue-generated *_gen.go, so cue:gen is unaffected. After: gofmt -l empty, sdk go
build + go test green, in-tree charly consumer builds unchanged.

Assisted-by: Claude (analysed on a live system)
…c wire drift)

Assisted-by: Claude (analysed on a live system)
@atrawog

atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: sdk Go, but formatting-only (AST-identical) — the gate is compile+test, no bed.

I re-derived everything independently (new context; author's claims trusted for nothing).

Security screen (T1–T4): PASS — pure-whitespace diff across 5 files + CHANGELOG; no scope mismatch, no secrets/exfiltration, no supply-chain/dep change, no guardrail weakening, no attempt to manipulate the validator.

The crux — formatting-only (AST-identical) proof: for EACH of the 5 files, gofmt(origin/main version) is byte-identical to the feat version — i.e. the branch is exactly gofmt -w applied to main, no other edit:

OK spec/deploy_wire.go      gofmt(main) == feat
OK spec/init_wire.go        gofmt(main) == feat
OK spec/k8sgen_wire.go      gofmt(main) == feat
OK spec/vm_wire.go          gofmt(main) == feat
OK spec/mcp_provides_test.go gofmt(main) == feat

Every hunk is column-alignment whitespace only; no token/identifier/logic change.

My independent gate re-run (in the sdk checkout):

gofmt -l .            → EMPTY (whole tree clean → no partial sweep; R2/R3 completeness)
go build ./...  (sdk) → exit 0
go test  ./...  (sdk) → ok spec 0.320s; kit/vmshared ok; rest no-test
go vet   ./...  (sdk) → exit 0
golangci-lint run ./... → 0 issues
go build ./... (charly, in-tree sdk via replace) → exit 0

Not generated (SDD): the 5 files are hand-written *_wire.go (line 1 package spec, no Code generated … DO NOT EDIT header; deploy_wire.go even documents why gengotypes can't express its type). task cue:gen / *_gen.go reproducibility is not implicated.

Checklist: 0 security PASS · 1 description(template filled, pasted evidence) PASS · 2 change-class gate matches (no dry-run/rebuild-alone fraud; no runtime branch to exercise) PASS · 3 attribution tier PASS · 4 R0 skills (go-quality: gofmt -w is the only sanctioned blanket auto-fix) PASS · 5 R1 RCA + zero warnings PASS · 6 R2 no split (whole tree clean) PASS · 7 R3 PASS · 8 R4 (gofmt is the sanctioned tool) PASS · 9 R5 (no identifier removed) PASS · 10 R6/R8/R9 N/A · 11 R10 (compile+test is the complete gate) PASS · 12 RDD/ADE/SDD (not *_gen.go) PASS · 13 concurrency N/A · 14 one atomic commit PASS · 15 boundary law (sdk wire envelopes; format only) PASS · 16 N/A · 17 clean-arch + go gates PASS · 18 CHANGELOG present PASS.

Attribution tier: analysed on a live system is correct and not inflated — go build/go test ran and are pasted, the change is provably AST-identical so there is no runtime branch to exercise on a bed (a bed cannot fail on a formatting-only change → running one would be waste). documentation reviewed is not available (Go code is touched); fully tested and validated would over-claim (no applicable bed).

Decision: APPROVED. Finalizing the merge-time CalVer 2026.189.0633, merging --rebase, tagging v0.2026189.633.

Assisted-by: Claude (analysed on a live system)

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