Repository navigation
feat: upgrade legacy managed Gateways to Tailscale auth - #1128
TheAngryPit wants to merge 7 commits into
Conversation
|
Codex review: needs real behavior proof before merge. What this changesAdds a confirmed action to enable Tailscale Dashboard authentication on eligible existing managed WSL Gateways while retaining credentials and pairing. Example: An existing wss://openclaw-host.tail1234.ts.net Gateway uses Core-managed foreground Serve with allowTailscale=false.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this PR provides distinct, maintainer-engaged upgrade work absent from current main; no actionable code findings remain. Reviewed head: Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe connection manager coordinates authenticated Core configuration requests and registry persistence; the shared Dashboard link service turns verified trust or approved fallback credentials into browser URLs. flowchart TD
A[Connection menu] --> B[Connection manager]
B --> C[Core config RPC]
B --> D[Gateway registry]
B --> E[WSL ingress verifier]
D --> F[Dashboard link service]
E --> F
F --> G[System browser]
Technical reviewBest possible solution: Retain the explicit admin-gated upgrade and shared Dashboard policy, then complete the approved qualification before landing. Do we have a high-confidence way to reproduce the issue? Current-main source lacks the explicit managed-Gateway adoption action and local trust marker; the report supplies a concrete existing-WSL-Gateway scenario, but this review ran no target code. Is this the best way to solve the issue? The narrow Core leaf patch, acceptance-before-persistence ordering and shared Dashboard policy fit the accepted scope while preserving personal sign-in and independent credential authorization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d0a9f21b8cee. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (40 earlier review cycles; latest 8 shown)
Reviewed December 1, 2026, 4:31 PM ET / 21:31 UTC (Revision 41). |
|
Thanks for flagging the Both pass the submitted object to The regression test deliberately verifies that an unrelated top-level field is absent from the submitted patch. I added a source comment documenting this invariant; no behavior changed in that follow-up commit. The draft remains blocked on the product/security decision in #1117 and does not claim exact-head runtime proof for the new failure branches. @clawsweeper please re-review the updated head. |
|
CI follow-up on exact head The setup-connect E2E exposed a real regression in The fix removes only that guard. Existing behavior remains:
Fresh proof after the correction:
The draft remains blocked on #1117's product/security decision and exact-head runtime-proof gate. The new CI run is the supported E2E proof for this head. |
|
Exact-head architecture and upstream reconciliation proof for
Fresh proof after the merge:
The first closeout run had one unrelated telemetry-listener test failure. The exact test passed on one bounded rerun, and the canonical closeout then passed in full; no telemetry code was changed. This is test/build/review proof, not current-head runtime or end-to-end proof. The draft remains blocked on the legacy-gateway authorization-policy decision and an inspectable redacted runtime artifact showing Core/local convergence, retained fallback credentials, and token-free Dashboard authentication. |
b57cc9c to
afc9111
Compare
Current-head Windows runtime proofI tested the published #1128 head as part of a combined Windows Companion candidate at The supported build passed all five projects. Focused validation passed 1,073 tests with zero failures, and the canonical Shared/Tray closeout passed 5,896 tests with zero failures (32 existing integration-category skips). The exact candidate was then installed and exercised through the supported {
"revalidated": true,
"success": true,
"trustTailscaleAuth": true,
"credentialFragmentPresent": false,
"errorCode": null
}This provides runtime proof that the installed Companion revalidated the authoritative Core setting and produced a successful trusted-auth dashboard result without including the retained fallback credential. No browser or Launcher was invoked, and no URL, token, endpoint, gateway identifier, or raw Core response was persisted. The temporary Local MCP proof surface was returned to Scope note: this Gateway had already adopted trusted auth, so the proof exercises current-head revalidation and token-free result construction rather than replaying the initial Sanitized agent transcript@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Addressed the remaining contributor-owned localization finding on exact head 653135c.
Validation:
The maintainer policy decision for the legacy identity authorization boundary and current-head proof of the initial untrusted-to-trusted transition remain open gates; this commit does not claim to resolve either. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Initial-adoption proof — provenance correctionCorrection: the installed combined Windows build The operator and Codex ran one bounded, explicitly authorized, reversible transition through the installed Companion's supported Connection UI. The transition observations and receipt below are runtime evidence for the authentication implementation at The current PR head is one descendant commit ahead. Its complete Accordingly, the strongest accurate proof is: Sanitized result: {
"status": "pass",
"proofLevel": "runtime_proven_plus_exact_head_equivalence",
"runtimeProvenPrCommit": "afc91117402e0ca46834faee791150ded570a90a",
"currentHead": "653135ce02ad3814604879b516b8e18e7f1b4593",
"currentHeadDelta": "localization_only",
"initial": {
"coreAllowTailscale": true,
"localTrustMarker": true,
"sharedFallbackPresent": true
},
"controlledReset": {
"coreAllowTailscale": false,
"localTrustMarker": false,
"sharedFallbackRetained": true
},
"adoption": {
"entrypoint": "supported_companion_connection_ui",
"fallbackReconnectSucceeded": true,
"coreAllowTailscale": true,
"localTrustMarker": true,
"sharedFallbackRetained": true
},
"rollback": {
"originalBooleanStateRestored": true,
"companionRunning": true
}
}What this proves:
The receipt SHA-256 is Receipt provenance note: the hashed receipt's Redaction: no URL, token, Gateway identifier, raw response, or secret value was persisted or included here. No update was installed. The two disposable identity runtimes used during diagnosis were removed after verification. This closes the behavioral initial-adoption proof gap through runtime evidence for |
|
@clawsweeper re-review |
|
@clawsweeper re-review |
653135c to
b51aa91
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Reapply the complete PR openclaw#1128 delta from ae660ef on upstream main 3670fcd. Co-authored-by: bkudiess <bakudies@microsoft.com>
ae660ef to
6eabf15
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Note 🤖 Codex responding on behalf of TheAngryPit Update for head The previous Core/CLI job exposed a blocked session-file send that surfaced The local Debug build, all eight focused session-file tests, and all 7,271 Tray tests passed. The full local Shared suite finished with 6,231 passed, 30 skipped, and the same 12 Windows symlink/reparse failures as the previous local run. Hosted CI for the new head is still running. Its Core and CLI job, which previously failed, now passes. I verified the published The new x64 CI artifact was built from test merge |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Note 🤖 Codex responding on behalf of TheAngryPit I verified the x64 publish-smoke artifact for Could a maintainer point me to an approved signed x64 candidate for this revision, or the supported way to obtain one for the upgrade rehearsal? This would let me exercise the normal update path in an isolated Windows/WSL2 environment and check that the saved Gateway record, credentials, and device identity survive before running the Foreground Serve Dashboard scenarios. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Related: #1117. Separate from #1989. Maintainer proof requirements.
What Problem This Solves
Existing Companion-managed WSL Gateways lack a supported in-place action to adopt Tailscale Dashboard authentication while preserving existing shared access.
User Impact
Operators can explicitly enable Core-verified Tailscale Dashboard authentication for eligible legacy managed Gateways. Existing credentials remain intact. This action supports Gateway-managed foreground Serve; it does not convert Setup background-Serve deployments or perform automatic migration. Real lab opt-in, local-persistence failure/retry and fixture-backed selective revocation are demonstrated below. Previous-version upgrade, complete proof-pool qualification and maintainer acceptance remain open.
Why This Change Was Made
The upgrade captures the authenticated connection epoch before reading config, requires the existing admin scope and authoritative base hash, then patches only
gateway.auth.allowTailscale. Replacement connections cannot receive a patch captured for the old connection. Core patch acceptance permits saving local trust; it does not prove asynchronous apply or continued ingress readiness. Dashboard link creation revalidates current config/applied state and managed ingress before a token-free launch.Saved links validate the credential/export requirements for that link, and setup authority is checked immediately before browser dispatch after asynchronous validation. An independently approved browser credential remains an intentional fallback for this upgrade flow. Personal-mode no-fallback selection is the separate #1989 contract.
Evidence
Real Windows/WSL/browser qualification was collected on 14 November 2026. It now includes normal native opt-in from false/false, token-free authenticated browser access, accepted-config/local-save failure followed by retry, selective application-grant denial, retirement of an admitted browser with code 4001, denied reconnect, and independent valid authentication. Details and limitations are below.
Current source and the native proof binary are both
ae660ef0e692d5dacb7a642cc026bd534560d8df, integrating frozen main34e8b609. All three runtime scenarios were repeated on this exact head. Current-head Build and Test and CodeQL passed; complete proof-pool acceptance remains open. No merge readiness is claimed.Change Type
Scope
winnodeRequired proof pools
windows-wsl-gateway-e2e: Partially qualified in operation. The three requested lab scenarios have real Gateway/browser evidence below. The grant policy is fixture-backed. A previous-version installer/data upgrade and the complete pool are not claimed.windows-winui-interactive: Partially qualified in operation. Mounted native Connection menu opt-in, failure/retry and normal Dashboard browser dispatch ran. Remaining full UI/distribution obligations and current CI are separate.Validation
./build.ps1 -Project All -Configuration Debug -NoTrustRepository: all five targets passed on native Windows x64, sourceae660ef0.dotnet test tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj --no-restore --filter 'FullyQualifiedName~GatewayTailscaleAuthLiveVerifierTests|FullyQualifiedName~GatewayTailscaleAuthUpgradeTests': 156 passed, zero failures/skips. The new healthy-slow-probe regression failed before repair, then passed after it../scripts/validate-test-timing-patterns.ps1: passed after marking the intentional latency with the repository's required timing directive. No baseline increase.dotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter FullyQualifiedName~TestDeterminismGuardTests: 38 passed, zero failures/skips after that directive.ae660ef0, 235 focused Connection cases, all 6,712 Tray cases and 557 focused approval/client cases passed. Full Shared had 5,871 passes, 30 skips and 12 explicit missing-symbolic-link-privilege failures; those failures were not hidden. Scoped Autoreview, NoComments and independent Astra reviewed the manual conflict resolution.Real Behavior Proof
Published and freshly built source:
ae660ef0e692d5dacb7a642cc026bd534560d8df, integrating pinned main34e8b6099f4cbf225c4247fa814e4823dd75c9d2. Native executable SHA-256:102D56749223CFA6CA19B5365198C5AC34919A21A62610801A743BF457DF8A33. Native opt-in, failure/retry, normal browser dispatch, protected access/reload and selective revocation were repeated with this binary. Earlier results for7676549c/2eb34396remain historical records.Environment: Windows x64 Companion, a separate task-owned Ubuntu WSL Gateway running official OpenClaw
2026.11.3 (847611d), Tailscale1.104.7, and genuine Gateway-owned foreground Serve on HTTPS 443. The saved legacy record and device were synthetic; the running Gateway, pairing, configuration transaction and browser were real. This is not a previous-version installer/upgrade proof. No model-provider credentials or private conversations were copied.allowTailscale=falsehello.auth.method=tailscaleand successfully requestedagents.list. The normal mounted Connection Dashboard button, with external-browser suppression disabled, also opened a new default-Chrome tab which authenticated through Tailscale and successfully requestedagents.list. Reload retained authenticated access.4001. A subsequent protected request failed because that connection was retired, and fresh handshakes were denied atauth_validatedwith causeoperator-access-denied. Serve remained reachable and independent pre-existing synthetic token/device authentication successfully fetched Gateway health over the same real WSS endpoint.operator.readreceivedFORBIDDEN: missing scope: operator.adminwhen invoking the fixture's revoke method. Repeating an authorized revocation reported zero newly aborted leases.agents.listagain.The grant policy and its admin operation are explicitly fixture-backed. They demonstrate enforcement by real Core, not a native grant-management UI or an external grant store's notification delivery. Network ACL withdrawal, device-token deletion and global
allowTailscale=falsewere not substituted for selective person revocation. A disconnected page can retain previously rendered content; that is not evidence of newly authorized protected I/O.Validation and remaining limits
ae660ef0.Readyexpected,Unavailablereturned after the old five-second aggregate deadline). After repair, 156 verifier/upgrade cases passed. The production runner's existing per-command timeout and cleanup remain in force; explicit verifier deadlines and caller cancellation remain supported.Security Impact
Compatibility and Migration
gateway.auth.allowTailscale=trueonly on the supported managed foreground-Serve topology. No automatic credential deletion or record replacement.Review Conversations
The current evidence materially advances the requested migration/retry/selective-denial proof. Current-head Build and Test and CodeQL passed. Maintainer acceptance and full pool/distribution obligations remain open. No upstream merge or review-thread resolution is claimed.
Current rebase proof (6eabf15)
Rebased onto upstream main
3670fcd6. The updated WinUI launcher compiles and the full repository build passed on Windows x64. The rebase preserves upstream typed request outcomes and the bound on time spent queued for dispatch. The connection and wizard request suites passed 156 and 16 focused tests on parent60e97867. The final commit changes only a WinUI lambda parameter name. It resolves the sole P0–P3 review finding, and the independent review of that fix returned no further findings.The isolated full-app fixture passed the Dashboard hand-off and retry after a simulated browser failure at this head. The Retry dialog was visible in the capture and the test observed a successful retry for the same route. The earlier live upgrade, selective revocation and independent-authentication proofs above belong to their recorded revisions. A live upgrade rehearsal at the new head remains outstanding.
CI cancellation follow-up (f58ffc0)
The first rebased head reproduced
SearchSessions_CallerCancellationWhileQueuedDoesNotWriteAfterUnlockin the hosted Core and soak jobs. Caller cancellation could unwind and dispose the dispatch deadline before its linked cancellation reached the queued send. The follow-up explicitly cancels that deadline before unwinding.The corrected head passed 19 focused search-cancellation and wizard-request cases. The exact previously failing test also passed in 12 independent test processes. The follow-up P0–P3 review returned no actionable findings. Earlier WinUI fixture evidence above remains bound to
6eabf15c.Additional validation at
f58ffc04GitHub Core and CLI, changed-test soak, and the WSL network-recovery E2E jobs passed. The UI shard timed out reopening the Systems Gateway row at 1000 px. The exact test passed locally at both 1000 and 480 px on the same head. The hosted timeout remains visible in the UI job.
The full native Windows build, Tray suite (7,131 tests), and WinNode CLI suite passed locally. The Shared suite hit 12 symlink-privilege failures. The three Connection failures and the three SetupEngine gateway-timeout formatting failures were reproduced in targeted tests on the pinned upstream baseline.
The full mounted SystemsPageProofTests class also produced the same eight failed cases on this PR and on upstream main at 3670fcd. The specific 1000 px Gateway row case that timed out on the hosted runner passed locally on both revisions.
Windows Companion fixture at
f58ffc04On
f58ffc04599497cb5ff6c3092825f1f6f1138384, four native app cases passed with a synthetic Gateway. The saved Channels receipt opened the Dashboard, rejected a revoked identity before launch, and remained available for successful retry after a browser failure. The separate Channels navigation case also exercised browser failure and retry. The full-app fixture used isolated Windows state.The latest-stable installed-state upgrade still needs a restorable Windows host and a real existing WSL Gateway. Check that the existing Gateway record, stored credentials and device pairing survive the upgrade, then run the agreed adoption, interruption/retry and denial cases. The hosted Systems-row timeout remains open.
Validation at
4ad63347The local Debug build, eight focused session-file tests, and all 7,271 Tray tests passed. The full local Shared suite finished with 6,231 passed, 30 skipped, and 12 local symlink/reparse setup failures. The hosted Build and Test run completed successfully, including CI Gate, Core and CLI, UI/accessibility, and WSL setup/connect, network and revocation recovery. CodeQL also completed successfully. The test and signature evidence includes the x64 CI payload, which has release identity and returned
NotSignedwhen inspected.GitHub currently marks v2026.11.3 as the latest stable Companion. Its x64 installer matches the release SHA-256 digest and has a valid OpenClaw Foundation Authenticode signature. That is the baseline for the requested stable installed-state upgrade. The live rehearsal with the current candidate, preservation of stored access and pairing, and applicable maintainer proof-pool acceptance remain open.
Saved Gateway personal sign-in at
b92d9de0This revision addresses the exact-head review finding. A saved Gateway using explicit personal Tailscale sign-in sends a token-free browser request even when another Gateway is active. The shared-credential mode still uses managed Tailscale readiness checks and the existing credential authorization before fallback. The focused saved-row source contract failed before the patch and passed afterward. All 99 focused Dashboard, URL builder, and handoff tests and the local Debug build passed. Native installed-state upgrade qualification remains open.
Dashboard sign-in across entry points at
4aa9dc31This revision addresses the active Dashboard finding. The active browser action,
app.dashboard.url, and the saved-row action now use the same rule for passing a Gateway ID into managed trust revalidation. Explicit personal sign-in omits that ID and continues to leave browser identity checks to the Gateway. Shared-credential mode still requires a matching trusted record for managed revalidation and retains the existing fallback authorization.The local Debug build and all 470 Dashboard and connection recovery tests passed. The focused run covers a failed revalidator with a paired-device credential and a token-free URL for personal sign-in. It also checks that the shared-credential path keeps its revalidation gate, and that all three callers use the shared rule. The full Tray suite passed all 7,275 tests. Build and Test and CodeQL completed successfully for this revision. Shared passed 6,230 tests with 30 skipped, 12 recurring local symlink/reparse setup failures, and one WebSocket timeout that passed on isolated rerun. ClawSweeper’s exact-head review confirms no actionable code findings; the live upgrade from stable
v2026.11.3and preservation of the saved Gateway record and existing identity files remain open.