Repository navigation
Conversation
commit: |
|
Correction to the lint note: the 121 |
|
Review record for head CI (gate 1): passed on this head. Required checks: Check, react-doctor, and both Publish @getpie/cli preview runs. State was MERGEABLE / CLEAN. Blocker (context, not a code defect)
What would warrant another review: #466, or at least its §0/§3/§5/§11 decisions, lands on Code review: no blocking defect found on this head. The change is additive and isolated: one module, one
Independent verification (gate 3), in a clean reviewer worktree pinned to
Gaps: none in verification. No runtime surface is affected, so runtime, UI and real-model proof does not apply. Merge is held only by the design blocker above. |
Requirement
Slice 1 of Hub Phase 1 (RFC, #466, section 5 and 10): the shared wire vocabulary a daemon and a Hub speak, as Effect Schemas in
@getpie/contract. Decisions 1 to 3 of the RFC are settled.Expected behavior
@getpie/contract/hubexports:HubEventSchema: the vendor's event name and action astype, the vendor's JSON aspayload(unchanged; its size is bounded by Hub's event size limit at the HTTP and WebSocket layer, not here), an optionalwebhookId, Hub-setreceivedAtandexpiresAt.hub.hello(protocol version,environmentIdUUID, optional features),hub.event.ack(accepted | duplicate, orrejectedwith a stablecodeand nothing else),hub.pong.hub.welcome(the acknowledged handshake that activates an enrollment),hub.event.deliver(event plusdeliveryAttempt),hub.ping.HUB_PROTOCOL_VERSIONandHUB_CLOSE_REVOKED(4403).Nothing else changes: no runtime, no storage, no oRPC procedure, no other export.
hub.welcomeis not in the RFC's frame list yet; it is added to #466 in the same change set because section 3 needs an acknowledged handshake.Changes and risks
One new module, one
exportsentry and one test file. No callers yet, so no compatibility or data risk. No trust boundary is crossed in this slice; the schemas are what the later Hub and connector slices will validate frames with at the receiving boundary (UUIDs, field lengths, discriminants, direction-specific unions).Verification
Tested revision
2b00d78aonorigin/maina617dcea.pnpm --filter @getpie/contract test: 74 passed, no type errors (includes the newhub.test.ts: accepts each valid frame; rejects an unknown version, a bad source, an empty or oversized event id, a rejection without a code or with an unstable one, a non-UUID Environment, a zero delivery attempt, and frames sent in the wrong direction).pnpm exec turbo run typecheck --filter=@getpie/contract: passed.oxfmt --check packages/contract: clean.pnpm lint:checkreports 121 errors in unrelated files on this checkout (for examplepackages/server/src/daemon/launcher.ts) and none underpackages/contract; I did not investigate whether they reproduce onmainor are local. Fullpnpm testand CI were not run locally.