Skip to content

feat(go): one builder binary that answers as the Python does - #27

Merged
Lutherwaves merged 15 commits into
mainfrom
feat/go-m1
Oct 26, 2026
Merged

Lutherwaves merged 15 commits into
mainfrom
feat/go-m1

Conversation

@Lutherwaves

Copy link
Copy Markdown
Owner

Milestone 1 of the Go port (spec: docs/superpowers/specs/2026-10-25-go-port-and-cleanup-design.md, plan: docs/superpowers/plans/2026-10-26-go-port-m1.md).

One builder binary now does what the Python does: hook, ledger, reach, security, budget and mcp-merge, plus go run ./cmd/support-table. The committed shim bin/builder runs the binary pinned to the plugin version, or exits 3 with the install line. The Python stays and still runs everything; milestone 2 switches the callers to the shim and deletes it.

  • tests/test_parity.sh runs the Python and the Go on the same inputs, 27 cases: text compared byte for byte, JSON after jq -S, plus ledger and reach files written in one language and read in the other.
  • Every Python test case is ported to Go tests.
  • scripts/validate.sh gains a → go step: gofmt, go vet, go test, the shim test and parity. CI sets up Go from go.mod.

Calls made on the way (each with its reason in the commits):

  • A non-UTF-8 Codex config.toml reads as empty, as in the Python.
  • The support table keeps fixtures in file order, so the README does not drift.
  • builder budget with a bad number prints the usage and exits 2; the Python crashed with a traceback.
  • The reach dedupe digest folds case with a table generated from Python's str.casefold.

Deferred minors (edge cases where the Go differs from the Python; none on a path a skill takes today): mcp-merge loses big-int precision and key order; non-UTF-8 reach.json is accepted; U+0085 in a logged text; a mapping block with no closing marker; +Inf vs inf; cli.Repr corner cases; one OS-reason wording; greedy version read on a one-line manifest; notifier WaitDelay; no kill test.

🤖 Generated with Claude Code

Lutherwaves and others added 15 commits October 26, 2026 13:48
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
set -e aborted the version read when the manifest was missing, so the shim exited 2 with no message.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ToLower missed Python casefold mappings such as final sigma and ligatures, so a send Python logged was not a duplicate for Go. A table generated from str.casefold replaces it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Lutherwaves
Lutherwaves changed the base branch from feat/go to main October 26, 2026 13:54
@Lutherwaves
Lutherwaves merged commit 614cc74 into main Oct 26, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 26, 2026
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