Repository navigation
fix(gateway): connect bootstrap clients to self-signed WSS - #80204
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 1:14 AM ET / 05:14 UTC. ClawSweeper reviewWhat this changesThe PR shares Gateway TLS fingerprint selection with bootstrap clients so local self-signed WSS connections work for ACP, MCP bridge, and approval flows. Merge readinessNo blocking correctness finding: current main still omits TLS pins for bootstrap clients, while this PR centralizes the existing call-path policy and propagates it to ACP, MCP, and approval clients. The remaining gate is Gateway-owner acceptance of the audited certificate-trust boundary. Priority: P2 Review scores
Verification
How this fits togetherGateway clients resolve a target URL, credentials, and TLS policy before opening a WebSocket to the Gateway. Bootstrap-driven ACP, MCP, and approval clients now receive the same certificate pin as ordinary Gateway calls. flowchart LR
A[Gateway configuration] --> B[Connection target selection]
B --> C[TLS pin resolver]
C --> D[Bootstrap clients]
D --> E[WebSocket transport]
E --> F[Gateway authentication]
Decision needed
Why: The implementation is consistent with the existing call path, but the policy determines which self-signed Gateway certificate privileged clients trust. Before merge
Agent review detailsSecurityNone. PR surfaceSource +57, Tests +289. Total +346 across 14 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the single shared resolver after Gateway-owner sign-off, retaining the tested target-source precedence instead of adding per-client TLS exceptions. Do we have a high-confidence way to reproduce the issue? Yes: on current main, a local self-signed WSS Gateway selected through bootstrap has no fingerprint to pass to ACP, MCP, or approval clients; the missing handoff is directly traceable in source. Is this the best way to solve the issue? Yes: centralizing the existing call-path policy at the bootstrap boundary prevents three consumers from independently reconstructing certificate-pin rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 75ef5aebecb8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (13 earlier review cycles; latest 8 shown)
|
6a8726e to
c714322
Compare
c714322 to
87de5e7
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
@clawsweeper re-review Maintainer rewrite pushed at |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Please review exact head The previous rank-up moves are addressed: the release-owned changelog entry is removed, the TLS resolver type is file-local, and the final source review covered explicit, remote, environment, CLI override, local, and fallback pin-selection branches. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Please review exact head The patch range is unchanged apart from collapsing the obsolete changelog add/remove pair. Contributor credit, signed commits, focused TLS proof, and the Punchcard trailer are preserved. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: Xiaoshuai Zhang <[email protected]> Punchcard-Session: cobalt-brook-meadow-m9
Punchcard-Session: cobalt-brook-meadow-m9
Punchcard-Session: cobalt-brook-meadow-m9
|
@clawsweeper re-review Please review exact head The reviewed patch was replayed onto |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Merged via squash.
|
What Problem This Solves
ACP, MCP channel bridge, and operator-approval clients could fail certificate
verification when connecting to a local self-signed
wss://Gateway. Thoseclients used the shared bootstrap path, but that path did not carry the Gateway
certificate fingerprint.
Why This Change Was Made
TLS fingerprint selection now has one shared Gateway owner used by both
callGatewayand bootstrap clients. Configured remote pins apply only toselected
wss://remote targets, CLI URL overrides remain explicit-only, andremote-mode local fallback uses the local generated certificate pin.
No Gateway server TLS behavior, auth mode, config schema, environment variable,
or public endpoint changed.
The final follow-ups keep the resolver type file-local, leave the release-owned
changelog entry absent, preserve configured-pin rejection for plaintext targets, and
use one parsed
wss:predicate across fingerprint selection and clienttransport setup.
User Impact
Operators using a local self-signed TLS Gateway can start ACP, MCP channel, and
native approval clients without those clients failing before authentication.
Existing remote, CLI-override, plaintext, and fallback behavior remains explicit
and covered.
Evidence
Exact reviewed head:
77e5621398572bf4e94a7decaeb1d832178c2a6bmainat39bbd8afd338dde0831dea3214cf17f80594ea44; the aggregate stable patch IDremains
9174affea4d45fd5ffb7aa5e31ba054f8b7bd6a8, with range-diff changes onlyfor the required Punchcard trailers.
src/gateway/client-bootstrap.test.tsfailed because the local WSS bootstrapreturned
undefinedinstead ofsha256:local.OKover local WSS,and ACP reached the expected scope-upgrade approval gate without a TLS or
fingerprint failure.
type was made file-local; 43 focused tests passed and all production,
full-tree, and script Knip unused-export scans returned zero entries.
git diff --check, changed-file formatting, and targeted type-aware oxlintpassed.
ratchets, extension export guards, duplicate coverage, dependency pins,
Plugin SDK API contract, deprecated API usage, plugin boundaries, package
patch policy, and test-temp reporting.
import-cycle, webhook-auth, and pairing-auth guards passed.
and for the dependency-gate correction at 0.99.
local, and fallback TLS-pin branches.
remote pins were dropped for plaintext targets, and uppercase
WSS://targets disagreed with the client's raw scheme checks. Both are repaired at
the shared parsed URL-policy boundary.
Original call, ACP, MCP, and approval bootstrap siblings passed 158 tests.
mainrefresh, the 39 focused resolver/client tests and all 158sibling tests passed again; direct oxlint, targeted oxfmt, and
git diff --checkremained clean.Punchcard-Session: cobalt-brook-meadow-m9trailer, and direct oxfmt, oxlint, andgit diff --checkpassed across all 14 changed files.Run Testboxbut produced no result for 31 minutes and was stopped as an infrastructure stall: https://github.com/openclaw/openclaw/actions/runs/30971746545. It is not counted as passing proof.git diff --checkpassed on the repairedexact head. The repository oxlint wrapper remained blocked only by the
unchanged
packages/terminal-core/src/ansi.ts:194declaration mismatch.Change size
Blacksmith Testbox capacity fallback: lease
tbx_01kz6nzdm1e2qskf64gqp2bm17remained queued without a runner IP or ActionsURL, so trusted-source proof fell back locally. Local core typechecking was
blocked by the unchanged
packages/terminal-core/src/ansi.ts:194dependencysignature mismatch already present on
main; dependencies were not reconciledinside the GWT.
Punchcard-Session: clear-orchard-lantern-bc