Repository navigation
Conversation
fix(cron): honor explicit delivery channel; don't fail run on unsupported
gateway: accept + broadcast node health frames (schema + in-memory store)
…dows-20260206 ci: fall back to github-hosted runners (avoid blacksmith queue stall)
Prefer provider-qualified model ids when deriving session default contextTokens to avoid stale/mismatched ctx reporting.
…r-qualified Fix default context window lookup for gpt-5.2 (use provider-qualified id)
…60206 protocol: add node health frame schemas
Gateway: advertise node.health.frame in hello-ok features
…-20260206 cron: don't advance overdue nextRunAtMs on reload
…02-06 docs: draft node auth + pairing protocol fields
…20260206 docs: document connect.auth vs device signature payload
docs(gateway): WS connect auth + pairing fields
Co-authored-by: Deano Calver <[email protected]>
sync: merge upstream/main (2026-02-07)
…260210 gateway: persist node.health.frame telemetry + add node.health.get
|
Superseded by a clean upstream branch/PR with the same feature and minimal diff: #14026 |
| host: Type.Optional(NonEmptyString), | ||
| connId: NonEmptyString, | ||
| identity: Type.Optional( | ||
| Type.Object( | ||
| { | ||
| kind: Type.Union([Type.Literal("upstream"), Type.Literal("fork")]), | ||
| mode: Type.Union([ | ||
| Type.Literal("auto"), | ||
| Type.Literal("upstream"), | ||
| Type.Literal("fork"), | ||
| ]), | ||
| source: Type.Union([ | ||
| Type.Literal("default"), | ||
| Type.Literal("config"), | ||
| Type.Literal("env"), | ||
| ]), | ||
| }, | ||
| { additionalProperties: false }, | ||
| ), |
There was a problem hiding this comment.
TypeBox union breaks schema guardrails
This adds Type.Union(...) for hello-ok.server.identity.*. The repo’s schema guardrails (AGENTS.md:171) explicitly forbid Type.Union/anyOf/oneOf in tool/protocol schemas because some validators/codegen reject them. This will fail in environments that enforce those guardrails and can break downstream schema consumers. Please rework these fields to avoid unions (e.g., use an enum helper / stringEnum pattern consistent with the rest of the schema layer).
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/gateway/protocol/schema/frames.ts
Line: 78:96
Comment:
**TypeBox union breaks schema guardrails**
This adds `Type.Union(...)` for `hello-ok.server.identity.*`. The repo’s schema guardrails (AGENTS.md:171) explicitly forbid `Type.Union`/`anyOf`/`oneOf` in tool/protocol schemas because some validators/codegen reject them. This will fail in environments that enforce those guardrails and can break downstream schema consumers. Please rework these fields to avoid unions (e.g., use an enum helper / stringEnum pattern consistent with the rest of the schema layer).
How can I resolve this? If you propose a fix, please make it concise.|
|
||
| const configSnapshot = loadConfig(); | ||
| const gatewayIdentity = resolveGatewayInstanceIdentity({ cfg: configSnapshot, env: process.env }); | ||
| const trustedProxies = configSnapshot.gateway?.trustedProxies ?? []; |
There was a problem hiding this comment.
Identity cached per connection
gatewayIdentity is resolved once when the message handler is attached, so changing gateway.identity.mode via hot reload (or setting OPENCLAW_GATEWAY_IDENTITY_MODE) won’t be reflected in hello-ok for new handshakes on existing server process until a full restart. If the intent is runtime override/compat testing without restart (as docs imply), identity should be resolved at handshake time (or tied into the config reload path).
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/gateway/server/ws-connection/message-handler.ts
Line: 194:197
Comment:
**Identity cached per connection**
`gatewayIdentity` is resolved once when the message handler is attached, so changing `gateway.identity.mode` via hot reload (or setting `OPENCLAW_GATEWAY_IDENTITY_MODE`) won’t be reflected in `hello-ok` for new handshakes on existing server process until a full restart. If the intent is runtime override/compat testing without restart (as docs imply), identity should be resolved at handshake time (or tied into the config reload path).
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5a594e71b
ℹ️ 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".
| status: "ok", | ||
| summary, | ||
| outputText, | ||
| deliveryResult: { status: "ok" }, |
There was a problem hiding this comment.
Report failed best-effort deliveries in deliveryResult
When delivery.bestEffort is enabled and outbound delivery fails (for example, deliverOutboundPayloads throws on provider/API errors or announce flow fails), this function logs the error but still returns deliveryResult: { status: "ok" }. In those scenarios the message was not delivered, so returning ok can mislead schedulers/UI into treating delivery as successful and skipping retries or operator alerts.
Useful? React with 👍 / 👎.
Upstreaming DeanoC#15.
This adds a lightweight gateway identity signal in the WS hello payload (
server.identity) and supports override mode for compatibility testing.Fork PR: DeanoC#15
Included
hello-ok.server.identity = { kind, mode, source }Greptile Overview
Greptile Summary
This PR adds gateway “instance identity” metadata (
hello-ok.server.identity {kind,mode,source}) with config + env overrides, and introduces node health snapshot/telemetry plumbing (newnode.health.getmethod,node.health.frameevent, in-memory node health frame store, periodic node health snapshot refresh/broadcast).It touches the gateway WS handshake payload/schema, config schema/types/docs for the new identity override (
gateway.identity.modeandOPENCLAW_GATEWAY_IDENTITY_MODE), and wires a new maintenance timer + close handler cleanup for node health broadcasting and node disconnect cleanup.Confidence Score: 3/5
Type.Unionin a place where repo guardrails disallow it and downstream schema consumers may break, and (2) the identity override is cached at WS handler attach time, so runtime overrides/hot reload won’t take effect as described without a restart.(5/5) You can turn off certain types of comments like style here!
Context used:
dashboard- AGENTS.md (source)