Skip to content

protocol: single Go home for the silkd wire layer#45

Merged
CMGS merged 8 commits into
mainfrom
feat/protocol-wire
Jul 18, 2026
Merged

protocol: single Go home for the silkd wire layer#45
CMGS merged 8 commits into
mainfrom
feat/protocol-wire

Conversation

@CMGS

@CMGS CMGS commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Closes #44.

The silkd frame vocabulary (types, encode/decode, fastBulk, enums) moves from sdk/go/silkd into a new stdlib-only protocol/wire module, sitting next to the fixture corpus it is pinned to. Both Go consumers now import it:

  • sdk/go keeps only the conn/stream layer in silkd; all frame types are wire.*.
  • sandboxd/engine drops its hand-rolled fourth implementation: installca.go's raw map[string]any frames, silkd.go's untyped silkdFrame + string switches, and the port_forward/info probes now go through wire.EncodeRequest/wire.DecodeResponse — engine inherits corpus conformance instead of drifting silently.

No wire-format change: encode output is byte-identical (the corpus round-trip tests moved with the code and pass unchanged). RequestHead is newly exported for the bulk senders' spliced frames.

Verified: make go-test (16 packages, all 5 modules incl. the new protocol/wire) and make go-lint (dual-platform) both clean.

CMGS added 8 commits July 18, 2026 10:47
The frame vocabulary moves out of sdk/go/silkd into a new protocol/wire
module consumed by both the SDK and sandboxd, killing the fourth hand-rolled
implementation in engine (map literals + string switches in installca/
silkd.go/port_forward) — engine now speaks typed wire requests/responses and
inherits the fixture-corpus conformance the other implementations already
had. sdk/go/silkd keeps the conn/stream layer.
The zero pseudo-version only worked through the local replace, which
downstream consumers ignore — pin a real pseudo-version (cut a protocol/wire
tag alongside every sdk/go release, per the go.mod note). docs/sdk.md and
the README still pointed users at silkd.* for the moved frame vocabulary.
sdk/go's bumped protocol/wire requirement made mcp's zero-pseudo indirect
inconsistent under MVS, failing go list (and CI lint) in that module.
frame_test read ../fixtures/v1 — outside the module root, so a downloaded
module zip lost the corpus and wire's tests failed in a clean environment.
The canonical corpus moves to protocol/wire/fixtures/v1; the Rust, Python,
and engine tests keep sharing it at the new path. docs/sdk.md also still
told users to import sdk/go/silkd for wire.* — point it at protocol/wire.
AppendBulkRequest renders the data-carrying request frame into a caller
buffer — the zero-alloc twin of EncodeRequest — and both bulk senders
(Conn.sendBulk, the port relay's Write) now call it instead of splicing
their own copies of the byte layout; RequestHead goes private again. The
info probe literal and engine's duplicate frame cap follow: EncodeRequest
and wire.MaxFrame. An equivalence test pins the builder to EncodeRequest.
respFail had landed between parseRecord and its doc comment (misattaching
the godoc); DialGuestPort mixed three error-name styles; installca's
appendOut closure captured nothing; seven files carried a split internal
import group from the move's mechanical import injection.
@CMGS
CMGS merged commit 09c182c into main Jul 18, 2026
4 checks passed
@CMGS
CMGS deleted the feat/protocol-wire branch July 18, 2026 03:56
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.

engine: installca hand-rolls a fourth silkd wire implementation outside the fixture corpus

1 participant