feat(base): HIP-0110 ZAP server for forward + reverse push#7
Open
hanzo-dev wants to merge 4 commits into
Open
Conversation
Replace dirs broke CI because sibling repos don't exist on the runner. Switch to: - hanzoai/zip v0.2.0 (tagged release) - hanzoai/cloud v0.1.1-0.20260519183759-098489930d01 (resolvable pseudo-version from main) Transitive bumps from go mod tidy: - luxfi/age v1.4.0 → v1.5.0 - luxfi/math v1.2.3 → v1.2.4 - luxfi/metric v1.5.0 → v1.5.1 - hanzoai/dbx v1.15.0 → v1.16.0 - cloud.google.com/go/storage v1.51.0 → v1.59.2 - otel v1.40.0 → v1.43.0 - modernc.org/sqlite v1.49.1 → v1.50.0 Local dev still works via either a workspace go.work or explicit `go work init` plus a directory replace in their own go.work — no longer baked into go.mod.
Aligns base internal/zap/server.go with github.com/hanzoai/gateway/zap_wire.go. Constants were 0x1010/0x1020/0x1030; zap.FinishWithFlags shifts type<<8 into the upper byte of a uint16, so types > 0xFF overflow. Repinned to 0x80/0x81/0x82 to match the gateway side.
a06704f to
d644b8e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/zap/server.go— the HIP-0110 surface on top of base's existingplugins/zapsocket.plugins/zapIDs:MsgTypeForward (0x1010)— decodes the gateway→base envelope and delegates to a pluggableDispatcher.MsgTypeSubscribe (0x1030)— records(ConnID, collection) → gateway peer IDfor reverse-push routing.Server.BroadcastRecordproducesMsgTypePushenvelopes when a record changes — pre-encoded SSE / WS frame, no JSON re-marshaling.Test plan
go build ./internal/zap/...