Repository navigation
chore: bump sdk pointer for gofmt spec wire files (P1.12) - #19
Conversation
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)
pr-validator — APPROVED ✅Change class: code (superproject submodule-pointer bump integrating sdk Go — but the sdk delta Independent re-derivation (trusted none of the author's claims — re-ran every gate):
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). Assisted-by: Claude (analysed on a live system) |
…bump) Assisted-by: Claude (analysed on a live system)
…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)
… 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
Summary of changes
Bumps the
sdkgitlinkad51c9b → 909a3059(+charly/go.modrequirev0.2026187.2336 → v0.2026189.633) to adopt the sdk gofmt-hygiene fix (P1.12): the 5 hand-writtenspec/*_wire.go/test files reformatted withgofmt -w(AST-identical, behavior-neutral). In-tree resolution rides thereplacedirective; 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
go test ./...runs charly's code against the reformatted sdk; there is no changed behavioral branch (AST-identical).Attribution tier
analysed on a live system —
go build/go testran against the reformatted sdk and are pasted; formatting-only so there is no runtime branch to bed-exercise. (documentation reviewedis NOT claimed — this integrates sdk code, correctly a code class.)CLAUDE.md rule compliance
/charly-internals:git-workflowB2 (sdk gitlink bump PLUS the go.mod require version, staged together).v0.2026189.633first; this is the consumer adoption.CHANGELOG/2026.189.0636.mdstaged.Assisted-by: Claude (analysed on a live system)