Skip to content

gateway: expose fork/upstream identity metadata with override - #14026

Closed
DeanoC wants to merge 4 commits into
openclaw:mainfrom
DeanoC:upstream/workitem-18a-clean
Closed

DeanoC wants to merge 4 commits into
openclaw:mainfrom
DeanoC:upstream/workitem-18a-clean

Conversation

@DeanoC

@DeanoC DeanoC commented Feb 11, 2026 •

Copy link
Copy Markdown

Upstreaming gateway identity metadata from DeanoC#15 in a clean branch based on upstream/main.

Adds a lightweight identity signal in WS hello metadata so clients can detect fork vs upstream and support compatibility behavior.

Included in this upstream slice:

  • hello-ok.server.identity with kind, mode, source
  • identity mode override via config/env
  • schema/type wiring
  • focused tests for resolver + hello payload
  • docs updates (protocol/config/index)

Related fork PR: DeanoC#15
Earlier upstream attempt (superseded by this clean branch): #14025

Greptile Overview

Greptile Summary

Adds lightweight identity metadata to gateway hello-ok handshake, enabling clients to distinguish fork vs upstream instances. The implementation includes:

  • New gateway.identity.mode config option (auto|upstream|fork) with env override via OPENCLAW_GATEWAY_IDENTITY_MODE
  • Identity resolver that respects precedence: env > config > default
  • Schema wiring for hello-ok.server.identity with kind, mode, and source fields
  • Comprehensive unit tests for the resolver logic
  • E2E tests validating the identity appears correctly in handshake responses
  • Documentation updates across protocol, config, and gateway index

The change is well-isolated, follows existing patterns for config/env resolution, and provides the compatibility testing capability described in the PR description.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation is clean, well-tested, and narrowly scoped. All new code follows established patterns (config resolution with env override), includes comprehensive test coverage (unit + E2E), and doesn't modify any critical paths. The identity metadata is purely informational and consumed by clients, not used for authorization or control flow.
  • No files require special attention

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime labels Feb 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd33104558

ℹ️ 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".

Comment thread src/gateway/instance-identity.ts Resolved
@DeanoC

DeanoC commented Feb 11, 2026 •

Copy link
Copy Markdown
Author

Addressed review feedback in 734efd54f:

  • switched upstream default identity kind to upstream (auto mode now reports upstream by default)
  • removed new Type.Union usage in hello-ok.server.identity schema fields (now string enums)
  • resolved identity at handshake response time (hello-ok) so config hot reload updates are reflected for new handshakes
  • updated related docs wording/examples to match upstream defaults

Also note: #14025 was closed only because it was superseded by this clean branch PR (#14026), not due to mergeability state.

@DeanoC
DeanoC force-pushed the upstream/workitem-18a-clean branch from 55eec61 to e2b8cf0 Compare February 11, 2026 11:17
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels Feb 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Mar 11, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant