Skip to content

[Bug]: Gateway acknowledges unsupported node events as handled #123717

Closed

Description

@steipete

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The Gateway acknowledges an unsupported node.event request with only {ok:true}, which makes the request look handled even though no event owner accepted it.

Steps to reproduce

  1. Start an isolated development Gateway from current main on a free port.
  2. Connect and pair a node WebSocket client.
  3. Send node.event with an unknown event name such as test.unsupported.
  4. Observe the RPC payload {ok:true}.

Expected behavior

The existing NodeEventResult contract should report an intentional non-outcome: {ok:true,event:"test.unsupported",handled:false,reason:"unsupported_event"}.

Actual behavior

The node-event dispatcher returns undefined for an unknown event. The RPC adapter converts that into {ok:true}, omitting the event name, handled state, and reason.

OpenClaw version

Current main at 9386ac096632509203dc94086d86d7b3de8bc30d.

Operating system

macOS 26; reproduced with an isolated Gateway and real WebSocket client.

Install method

Source checkout.

Model

N/A (Gateway control-plane RPC; no model involved).

Provider / routing chain

N/A (paired node WebSocket directly to the Gateway).

Additional provider/model setup details

N/A.

Logs

AssertionError: expected { ok: true } to deeply equal {
  ok: true,
  event: "test.unsupported",
  handled: false,
  reason: "unsupported_event"
}

Screenshots, recordings, and evidence

The regression is deterministic through the paired-node Gateway integration suite. The pre-fix run received exactly {ok:true}; the repaired owner and RPC suites pass 85/85 tests.

Impact and severity

Affected: node clients using the generic node.event RPC.

Severity: Low, but misleading—the response claims success without recording that no handler accepted the event.

Frequency: Every unsupported event name.

Consequence: clients cannot distinguish an applied event from an unsupported one using the declared result contract.

Additional information

The NodeEventResult schema already contains event, handled, and optional reason; no protocol, schema, or version change is required.

Activity

  1. added
    bug
    on Aug 14, 2026
  2. self-assigned this
    on Aug 14, 2026
  3. added
    maintainer
    on Aug 14, 2026
  4. added
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    maturity:stable
    P2
    on Aug 14, 2026
  5. clawsweeper commented on Aug 14, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 14, 2026, 11:54 AM ET / 15:54 UTC.

    Summary
    Current main still emits the misleading bare acknowledgment for an unsupported node event. This is a narrow, source-proven Gateway bug, but its maintainer label requires owner-managed handling rather than automated repair routing.

    Reproducibility: yes. from current source: send any schema-valid unknown event through a paired-node node.event RPC; the default dispatcher result is absent and the adapter emits {ok:true}.

    Next step
    The protected maintainer label requires owner-managed handling even though the code repair is otherwise small and clear.

    Review details

    Best possible solution:

    Return {ok:true,event,handled:false,reason:"unsupported_event"} from the dispatcher default and cover it with direct dispatcher and paired-node WebSocket regression assertions.

    Do we have a high-confidence way to reproduce the issue?

    Yes, from current source: send any schema-valid unknown event through a paired-node node.event RPC; the default dispatcher result is absent and the adapter emits {ok:true}.

    Is this the best way to solve the issue?

    Yes. Repairing the dispatcher’s default branch preserves the existing result contract while leaving intentional known-event no-op behavior unchanged.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The dispatcher has deliberate undefined exits for known event-specific no-op or invalid-payload paths; the repair should change only the unsupported-event default, not broaden the change through the RPC adapter.

    Codex review notes: model internal, reasoning high; reviewed against 9386ac096632.

    Label changes

    Label changes:

    • add P2: Unsupported events deterministically return a misleading result, but the affected scope is limited to generic paired-node Gateway clients.
    • add impact:other: The issue is an incorrect Gateway control-plane RPC outcome that does not match a more specific owned impact category.
    • add maturity:stable: The primary owner is the M4 Stable Gateway runtime’s RPC APIs and Events surface, and the existing protocol schema defines the broken result contract.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.

    Label justifications:

    • P2: Unsupported events deterministically return a misleading result, but the affected scope is limited to generic paired-node Gateway clients.
    • impact:other: The issue is an incorrect Gateway control-plane RPC outcome that does not match a more specific owned impact category.
    • maturity:stable: The primary owner is the M4 Stable Gateway runtime’s RPC APIs and Events surface, and the existing protocol schema defines the broken result contract.
    Evidence reviewed

    What I checked:

    • Current failure path: The node-event dispatcher default returns undefined, and its RPC adapter replaces an absent result with {ok:true}; therefore a valid unknown event produces the reported bare acknowledgment on current main. (src/gateway/server-node-events.ts:1224, 9386ac096632)
    • Existing protocol contract: The event envelope deliberately accepts any non-empty event name, while the declared result requires event and handled; no schema or protocol-version change is needed for the repair. (packages/gateway-protocol/src/schema/nodes.ts:64, 9386ac096632)
    • Boundary-test gap and adjacent coverage: The paired-node Gateway integration test proves structured node-event replies for a handled presence event, and direct dispatcher tests prove explicit unhandled results for an unmatched exec event, but neither covers an unsupported event name. (test/e2e/qa-lab/runtime/gateway-node-control-plane.e2e.test.ts:254, 9386ac096632)
    • Mature primary owner: The required maturity shortlist identifies Gateway runtime as M4 Stable for Gateway RPC APIs and Events and Nodes and Remote Capabilities; this issue is a broken existing Gateway RPC contract. (qa/maturity-scores.yaml:22, 9386ac096632)
    • Feature provenance: Local blame attributes both the dispatcher default and adapter fallback to the current source provenance; shortlog shows Peter Steinberger as the predominant contributor across the affected files. (src/gateway/server-methods/nodes.event.ts:154, 37a63fbf450e)

    Likely related people:

    • Peter Steinberger: Local blame assigns the current dispatcher default and RPC fallback to this source provenance, and shortlog shows the strongest contribution history across the affected Gateway files. (role: recent area contributor; confidence: high; commits: 37a63fbf450e; files: src/gateway/server-node-events.ts, src/gateway/server-methods/nodes.event.ts, packages/gateway-protocol/src/schema/nodes.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  6. added a commit that references this issue on Aug 14, 2026
    2b31cf1
  7. steipete commented on Aug 14, 2026

    @steipete
    ContributorAuthor

    Fixed on main by #123719 in 2b31cf114ba48e5367ae3ceb3d1582e6c9172b68.

    The dispatcher default now returns the existing structured non-outcome for unsupported events, while recognized event branches remain unchanged. Proof: 85/85 focused owner and paired-node Gateway tests, clean post-rebase changed gate and autoreview, and exact-head CI 31816922171 with openclaw/ci-gate green.

  8. added a commit that references this issue on Aug 15, 2026
    3fcd0b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2bugclawsweeper:source-reproimpact:otherissue-rating: 🦞 diamond lobstermaintainermaturity:stable

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions