Skip to content

chore: bump sdk pointer for gofmt spec wire files (P1.12) - #19

Merged
atrawog merged 2 commits into
mainfrom
feat/bump-sdk-gofmt
Jul 8, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/bump-sdk-gofmt

Conversation

@atrawog

@atrawog atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Bumps the sdk gitlink ad51c9b → 909a3059 (+ charly/go.mod require v0.2026187.2336 → v0.2026189.633) to adopt the sdk gofmt-hygiene fix (P1.12): the 5 hand-written spec/*_wire.go/test files reformatted with gofmt -w (AST-identical, behavior-neutral). In-tree resolution rides the replace directive; the require bump is for out-of-tree consumers + tag consistency.

Change class

code — submodule pointer bump integrating sdk Go (formatting-only, AST-identical) + go.mod require.

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

  • The gate for this change class: the bumped sdk delta is AST-identical (pure gofmt), so no runtime behavior can change — the correct gate is compile + unit tests of the consumer against the reformatted sdk, not a bed (a bed would exercise byte-identical behavior and prove nothing new).
  • Disposable target / fresh rebuild / concurrency: N/A (no behavior/deploy/generation surface changes).
  • Did the changed code path execute live? go test ./... runs charly's code against the reformatted sdk; there is no changed behavioral branch (AST-identical).
$ git diff --cached --submodule=short sdk   # ad51c9b...909a3059 (gofmt-only sdk delta)
$ (charly) go build ./...                   # exit 0
$ (charly) go test  ./...                    # ok charly 42.129s; ok pluginsgen

Attribution tier

analysed on a live system — go build/go test ran against the reformatted sdk and are pasted; formatting-only so there is no runtime branch to bed-exercise. (documentation reviewed is NOT claimed — this integrates sdk code, correctly a code class.)

CLAUDE.md rule compliance

  • R0 skills: /charly-internals:git-workflow B2 (sdk gitlink bump PLUS the go.mod require version, staged together).
  • R2: the producer sdk PR refactor(loader): remove LibvirtGraphicsListeners YAML expander (JSON decoder serves both paths) #6 MERGED + tagged v0.2026189.633 first; this is the consumer adoption.
  • R5: additive bump; no identifier removed. R7/R10: compile+test is the complete gate for an AST-identical adoption (pasted); no runtime behavior to bed.
  • R8/R9: N/A — the sdk delta is formatting-only, so emitted Containerfiles/labels/binary behavior are unchanged (same AST).
  • Hard cutover: one atomic commit (gitlink + go.mod + CHANGELOG). RDD/ADE/SDD/boundary-law/disposable-autonomy: N/A (no schema/candy/core-kind/destroy surface; the sdk files are hand-written wire, not generated).
  • CHANGELOG: CHANGELOG/2026.189.0636.md staged.

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

Bumps sdk ad51c9b→909a3059 + charly/go.mod require v0.2026189.633 to adopt the sdk
gofmt-hygiene fix (5 hand-written spec/*_wire.go reformatted, AST-identical). In-tree
resolution rides replace; require bump for out-of-tree consumers. Gate (formatting-
only → compile+test, no bed): go build exit 0 + go test ./... green vs reformatted sdk.

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: code (superproject submodule-pointer bump integrating sdk Go — but the sdk delta ad51c9b..909a3059 is pure gofmt, AST-identical)

Independent re-derivation (trusted none of the author's claims — re-ran every gate):

  • [PASS] 0. Security/anti-tampering (T1–T4): diff is EXACTLY 3 items (sdk gitlink ad51c9b→909a3059, charly/go.mod require v0.2026187.2336→v0.2026189.633, CHANGELOG/2026.189.0636.md) — matches the description with no scope mismatch; no secrets/exfiltration/obfuscation; the ref points at a REAL merged sdk commit (909a3059 is on sdk origin/main and is the tip) carrying tag v0.2026189.633; no guardrail/security-machinery touched; no manipulation directive in the body.
  • [PASS] 1. Description complete: template filled, every applicable rule answered with a HOW, gate rationale + commands supplied (not a promise).
  • [PASS] 2. Change-class gate (R7/R10): the sdk delta is AST-identical, so the correct gate is compile+test of the consumer, NOT a bed (a bed exercises byte-identical behavior — it cannot fail on this change). Re-ran myself in charly/: go build ./... exit 0; go test -count=1 ./... → ok charly 42.157s + ok pluginsgen, exit 0. No fraud clause (not a dry-run; go test here IS the class gate, not a substitute for a runtime gate that applies).
  • [PASS] 3. Attribution tier: analysed on a live system — build/test ran live and are pasted; formatting-only ⇒ no runtime branch to bed-exercise. Correctly NOT fully tested and validated (no changed behavioral branch) and NOT documentation reviewed (it integrates sdk code).
  • [PASS] 4. R0 skills: /charly-internals:git-workflow B2 honored — sdk gitlink AND go.mod require bumped together; go.mod require = tag v0.2026189.633 = commit 909a3059.
  • [PASS] 5. R1: my re-run has ZERO warnings (build clean, go test clean, gofmt -l sdk/spec empty, gofmt -l charly empty). No flake/transient framing.
  • [PASS] 6. R2: producer sdk landed first (tag v0.2026189.633 on sdk origin/main); this is the consumer adoption — no out-of-scope split.
  • [PASS] 7–8. R3/R4: N/A — trivial pointer bump; no duplication, no ad-hoc workaround.
  • [PASS] 9. R5: git grep 2026187.2336 = 0 refs; git grep ad51c9b = only the CHANGELOG/ history file (sanctioned). No transitional/dual-mode path.
  • [PASS] 10. R6/R8/R9: no destructive git action; generation is AST-identical so emitted Containerfiles/labels are unchanged (N/A); pkg/arch/PKGBUILD pins the sdk source dynamically via git -C …/sdk rev-parse HEAD (P1.2), so it auto-tracks the gitlink — no stale pin, no manual host install.
  • [PASS] 11. R10: compile+test is the correct R10 for an AST-identical adoption; no new functionality needing a would-fail-without-it test (formatting adoption). Fresh consumer build/test green.
  • [PASS] 12. RDD/ADE/SDD: the 5 changed files (deploy_wire.go, init_wire.go, k8sgen_wire.go, mcp_provides_test.go, vm_wire.go) are HAND-WRITTEN wire (verified: no Code generated … DO NOT EDIT header; the generated cue_types_gen.go carries that header and is NOT in the changed set) — so the gofmt fix has no generator to drift from and task cue:gen stays a no-op. No schema/candy ⇒ RDD/ADE N/A.
  • [PASS] 13–16. concurrency (no shared-state path), hard-cutover (EXACTLY one atomic change commit on the feat branch, no Phase-2/TODO), kernel/plugin boundary (no core-kind logic), disposable-only autonomy (no destroy) — all N/A or satisfied.
  • [PASS] 17. Clean architecture + Go gates: gofmt -l clean on both sdk/spec and charly; go build/go test green; charly's own source is unchanged by this bump.
  • [PASS] 18. CHANGELOG: CHANGELOG/2026.189.0636.md staged (placeholder CalVer — finalized to the merge-time stamp at merge).

Decision: APPROVED. The crux — that the sdk delta is behavior-neutral — is positively verified: every hunk across the 5 spec files is pure inter-column whitespace re-alignment with identical field names, types, struct tags, and literal values (no token/identifier/logic change). 909a3059 is a real merged sdk commit (tip of origin/main, tagged v0.2026189.633) that the go.mod require and the gitlink both name consistently. The consumer compiles and its full test suite passes fresh against the reformatted sdk. Finalizing the merge-time CalVer, merging --rebase, and tagging.

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

…bump)

Assisted-by: Claude (analysed on a live system)
@atrawog
atrawog merged commit cf95f15 into main Jul 8, 2026
@atrawog
atrawog deleted the feat/bump-sdk-gofmt branch July 8, 2026 06:48
atrawog added a commit that referenced this pull request Jul 9, 2026
…lose 4 fail-opens

Both gates on main detect git commands with an INVOKE regex whose option-value pattern
[^\s]* cannot span a quoted arg with a space, so git -C "/has space" commit fails to
match and the gate allows everything. Same regex, same fail-open, in both gates.

DISCIPLINE BACKSTOPS, not security boundaries (every change is re-validated by a fresh
pr-validator + GitHub branch protection). Replace the per-gate regex with one shared
shlex tokenizer, zero fallbacks (operator-directed full simplification).

- New shared .claude/hooks/gitcmd.py: git_invocations() tokenizes with shlex
  (posix, punctuation_chars) so a quoted spaced arg is one token, splits on shell
  separators so a compound command's args don't bleed into the next, and raises
  ValueError on an UNBALANCED/UNQUOTED quote. Also the shared fail-closed predicate
  mentions_subcommand() and the refspec pair is_force_refspec()/refspec_dst(): every
  predicate both gates need lives here ONCE -- the security-relevant fail-closed probe
  above all (R3). INVOKE deleted from both gates. -B so no __pycache__.
- FAIL CLOSED on unparseable, NO fallback: what shlex cannot tokenize is an unbalanced/
  unquoted quote (an apostrophe in a heredoc body, an unterminated quote) -- NOT a
  heredoc. A CLEAN heredoc tokenizes fine and is judged normally (git commit -F - <<EOF
  is ALLOWED on both main and this branch, not scanned for absence, as main documents).
  When a command genuinely cannot be tokenized and a git commit/push is plausibly
  present, block it with the accurate remedy (balance quotes; long message via -F file).
- Positional scan_commit_args (commit): consumes the -m/-F value then classifies the
  rest, so post-message --no-verify/-n is caught and an attached -m"...trailer with an
  a..." is never a false flag. Unresolvable -C fails closed for a diff-checked tier.
- pre-push-gate over the same parser, and force detection now catches a leading-+
  refspec: `git push origin +feat/x` force-updates feat/x. main reads the + only while
  stripping the DESTINATION, so it blocked +main as a main-push but let +feat/x through.
  Force-push is forbidden on EVERY branch in every repo -- a real fail-open, now closed.

vs origin/main, measured: 4 fail-opens closed (quoted-space -C; --no-verify after the
message; a RUNTIME-tier commit on an unresolvable -C -- main already blocks the docs-tier
case; a leading-+ force refspec to a non-main branch), 0 opened. Compound-arg bounding
and clean-heredoc handling are UNCHANGED from main (both already correct) -- not claimed
as fixes.

In-tree test .claude/hooks/gate_test.py (new): drives both real gates over throwaway
repos in its own mkdtemp trees and asserts gitcmd tokenization directly (clean heredoc
TOKENIZES; apostrophe-in-body/unterminated quote -> ValueError; quoted-spaced -C is one
token). 42 cases pass; the count is MEASURED by the assertion counter, never asserted as
a literal. Restoring any of the four fail-opens fails a case here (R10 check-coverage).

Known limitation (documented; its own immediate-next cutover): the hook fires before the
command, so a compound 'git add && git commit' stages after the diff check reads the
index. Separable -- this cutover's gate passes and proves its claim without the fix.

Paired doctrine sweep: merged as plugins PR #19 (gitlink bumped to 3149fc9), adding the
fail-closed clause and KEEPING the correct 'not scanned for absence' sentence (R1/R5).

Assisted-by: Claude (fully tested and validated)
atrawog added a commit that referenced this pull request Aug 18, 2026
… a bracket

Round-4 items 2 and 3.

The sweep's own commit message says "The fact each one attaches to is kept". That
was false: it also dropped three figures that carried no date and are measurements
of current state - "~90% permanent" became "overwhelmingly", "~0.3%" became "a
fraction of a percent", "4 wire types" became "wire types". Those numbers are what
give the warnings force; a mis-classification warning that cannot say how wrong the
mis-classification was is advice, not evidence. All three restored.

The distinction the batch now encodes and this commit repairs: a date says WHEN
someone learned a fact and decays; a measurement says WHAT IS TRUE of the tree and
is the content. The sweep keyed on "looks like provenance" and took both.

Also closes an orphaned bracket at charly-internals L1319, where stripping
"Task #19, <date>:" left "(a nil/absent ..." mid-sentence.

Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Claude-Session: https://claude.ai/code/session_01EcRjMUc6bAdoq8aEr84V9Y
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