[codex] Export node control handler#218
Conversation
There was a problem hiding this comment.
Code Review
This pull request exposes the handleNodeControlMessage function and its associated types as a public API from @relaycast/engine/node-control to allow adapters to delegate node control frames directly. It also updates the documentation in README.md, adds a comprehensive conformance test, and refactors heartbeatNode in packages/engine/src/engine/node.ts to optimize database queries. I have no feedback to provide as the changes are clean, well-tested, and align with the repository's guidelines.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR adds a public ChangesNode control flow
Sequence Diagram(s)sequenceDiagram
participant NodeWsAdapter
participant handleNodeControlMessage
participant EngineDb
participant NodeConnectionRegistry
participant completionDeps
NodeWsAdapter->>handleNodeControlMessage: raw frame + socket.send
handleNodeControlMessage->>EngineDb: node.register / agent.register / inventory.sync
handleNodeControlMessage->>NodeConnectionRegistry: drain queued invocations
handleNodeControlMessage-->>completionDeps: optional fan-out / webhook effects
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
@relaycast/engine/node-controland the root engine entrypointNodeSocketLike,HandleNodeControlMessageArgs, andInvocationCompletionDepsfor DO adapterscompletionDepsbehavior, self-containment, and built-in reconnect replay/drain behaviorhandleNodeControlMessagewithout the websocket route wrapperValidation
npx vitest run packages/engine/src/__tests__/conformance/node.test.tsnpm run -w @relaycast/engine typechecknpm run -w @relaycast/engine lintnpm run -w @relaycast/engine buildnode --input-type=module -e "const m = await import('@relaycast/engine/node-control'); if (typeof m.handleNodeControlMessage !== 'function') throw new Error('missing node-control handler'); console.log('node-control export ok')"node --input-type=module -e "const m = await import('@relaycast/engine'); if (typeof m.handleNodeControlMessage !== 'function') throw new Error('missing root handler'); console.log('root export ok')"npm run -w @relaycast/engine testnpx turbo build