Repository navigation
gateway: persist node.health.frame telemetry + add node.health.get - #14
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: becae1db26
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the Codex inline note about whitespace-only nodeId: now rejects blank/whitespace nodeId (schema tightened to require a non-whitespace char + defensive runtime check) and includes a regression test. Commit: 4792e1f. |
|
Follow-up: the specific method is node.health.get (whitespace-only nodeId now rejected). (Sorry: my first comment ate the method name due to shell backticks.) |
Implements gateway-side support for node health telemetry frames sent by nodes.
What changed
node.health.framenode events (Ajv/TypeBox) before storing.node.health.get:{}→ latest entry per node{ nodeId, limit? }→ recent entries for a node (oldest → newest)Why
Unblocks consumers (e.g. dashboards) from having to scrape logs to display node telemetry/health.
Manual verification
node.eventwithevent: "node.health.frame"and payload like:{ "ts": 123, "kind": "telemetry", "data": { "ok": true } }node.health.getand confirm the stored entry is returned.Tests
pnpm vitest -c vitest.gateway.config.tsLabel:
no-auto-merge}