Skip to content

feat: add NodeHelloResponse model - #36

Merged
NeonDaniel merged 1 commit into
NeonGeckoCom:devfrom
OscillateLabsLLC:FEAT_NodeHelloResponse
Aug 4, 2026
Merged

NeonDaniel merged 1 commit into
NeonGeckoCom:devfrom
OscillateLabsLLC:FEAT_NodeHelloResponse

Conversation

@mikejgray

Copy link
Copy Markdown
Collaborator

Adds the model for node.hello.response, the hub's acknowledgement of a node.hello — proposed in review on NeonGeckoCom/neon-hana#58 and implemented there (hub) and in OscillateLabsLLC/neon-node-flutter-app (node).

Shape

  • success: {"status": "success", "node": {node_id, node_name, capabilities}} — the hub-normalized snapshot as cached, i.e. what context.node will carry (session-derived node_id, not the client-claimed one)
  • rejection: {"status": "error", "error": {"message": <validation error>}}

status/error mirror NodeInvokeNativeResponse, including the model_validator coupling status to the presence of node/error. Hubs that predate the ack simply never send one, which is what lets a Node flag an outdated hub.

Why

Without the ack, a rejected node.hello is invisible to the Node: the hub logs a WARNING and everything downstream behaves as though the Node advertised nothing. We hit exactly this on-device — a missing node_id meant every hello was silently dropped and capability gating did nothing, with no error on either side.

Tests

test_node_hello_response in the existing style: success snapshot, wire-string capability round-trip, rejection message, and the three invalid status/field combinations. 157 pass locally.

Follow-ups once released

  • neon-hana#58 can construct the ack via this model (currently a hand-built Message with the same shape)
  • hana's node_v1_doc unions can gain the new type

🤖 Generated with Claude Code

Hub acknowledgement of a `node.hello`, per review discussion on
neon-hana#58: success carries the hub-normalized snapshot (session-
derived node_id, cached name and capabilities -- what `context.node`
will carry), rejection carries the validation error that made the hub
drop the hello. Without the ack, a rejected hello is invisible to the
Node and capability gating silently does nothing.

`status`/`error` mirror NodeInvokeNativeResponse, including the
model_validator coupling status to the presence of `node`/`error`.
@mikejgray
mikejgray requested a review from NeonDaniel July 30, 2026 01:25
@NeonDaniel
NeonDaniel merged commit 4388840 into NeonGeckoCom:dev Aug 4, 2026
5 checks passed
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.

2 participants