Skip to content

feat: upgrade legacy managed Gateways to Tailscale auth - #1128

Open
TheAngryPit wants to merge 7 commits into
openclaw:mainfrom
TheAngryPit:codex/tailscale-legacy-upgrade-20260807
Open

TheAngryPit wants to merge 7 commits into
openclaw:mainfrom
TheAngryPit:codex/tailscale-legacy-upgrade-20260807

Conversation

@TheAngryPit

@TheAngryPit TheAngryPit commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

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 main 34e8b609. 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

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required 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, source ae660ef0.
  • 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.
  • Both increments received normal Codex Autoreview (scoped-clean P0–P3), TestAudit and named NoComments. Independent Astra reviewed the native timeout repair and fixture proof plan. The retained comment is machine-consumed timing metadata.
  • On current integration 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.
  • Current-head hosted Build and Test and CodeQL completed successfully. Earlier all-green runs remain historical.

Real Behavior Proof

Published and freshly built source: ae660ef0e692d5dacb7a642cc026bd534560d8df, integrating pinned main 34e8b6099f4cbf225c4247fa814e4823dd75c9d2. 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 for 7676549c/2eb34396 remain historical records.

Environment: Windows x64 Companion, a separate task-owned Ubuntu WSL Gateway running official OpenClaw 2026.11.3 (847611d), Tailscale 1.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.

Scenario Actual observed result
Existing record, client trust false and Core allowTailscale=false Clean browser reached the Gateway but required a matching secret. Normal native Connection menu opt-in then received Core acceptance, persisted local trust and retained the original record/device.
Token-free Dashboard Generated HTTPS URL had no token query/fragment. A clean browser connected with hello.auth.method=tailscale and successfully requested agents.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 requested agents.list. Reload retained authenticated access.
Accepted patch, failed local persistence A temporary read-sharing lock on the synthetic registry prevented atomic persistence. UI reported that local trust could not be saved. Authoritative Core readback was true while persisted client trust was false. No rollback was claimed. After releasing the lock, the old device reconnected Ready and the normal retry persisted trust in the same record. No permission changes were used.
Selective person denial and live revocation A task-only plugin used Core's supported Gateway access-policy API. Its admin-scoped fixture method persisted revocation and aborted real captured grant signals; it did not close sockets or synthesize authorization failures. Core closed the admitted browser with code 4001. A subsequent protected request failed because that connection was retired, and fresh handshakes were denied at auth_validated with cause operator-access-denied. Serve remained reachable and independent pre-existing synthetic token/device authentication successfully fetched Gateway health over the same real WSS endpoint.
Fixture mutation authority A real shipped Core client admitted with only operator.read received FORBIDDEN: missing scope: operator.admin when invoking the fixture's revoke method. Repeating an authorized revocation reported zero newly aborted leases.
Restoration Restoring only the test grant with a new lifetime permitted a fresh Tailscale-authenticated browser connection and protected agents.list again.

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=false were 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

  • Native full five-target build passed on ae660ef0.
  • The deliberate slow-probe regression failed before the fix (Ready expected, Unavailable returned 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.
  • Timing-pattern validation and all 38 determinism-guard tests passed after the required timing directive. No ratchet baseline was raised. Autoreview and named NoComments completed for both increments; NoComments retained the machine-consumed directive.
  • On the frozen integration, 235 focused Connection cases, all 6,712 Tray cases, and 557 focused approval/client integration cases passed. The manual test conflict resolution received scoped Autoreview, NoComments and independent Astra compatibility review.
  • Current-head Build and Test and CodeQL completed successfully. Previous-head green runs remain historical.
  • Local full Shared qualification had 5,871 passes, 30 skips and 12 failures caused by absent Windows symbolic-link privilege. Those failures were not hidden or relabelled green. Current hosted Shared/Core results must be read separately.
  • A previous-version installed-app upgrade, signing/distribution qualification and complete UI proof-pool coverage are not claimed. The local native viewport fixture was blocked at the required 1,000-DIP layout on this display; assertions and display settings were preserved.
  • Local private receipts contain endpoint/profile/device details and are not public artifact links. This summary intentionally omits those details. Maintainer acceptance and merge remain separate.

Security Impact

  • New permissions or capabilities? No new Core provider or operator grant; adds an explicit admin-gated configuration action.
  • Secrets or tokens handling changed? Yes: credential-free links require verified Tailscale readiness; independent browser credentials retain their export authorization.
  • New or changed network calls? Yes: config read/patch and existing managed Serve readiness checks.
  • Command or tool execution surface changed? Existing managed WSL/Serve diagnostics are used; no new end-user permission is granted.
  • Data access scope changed? No broader grant is intended; Core remains the authority.
  • If any answer is Yes, explain the risk and mitigation: captured connection epoch/base hash, explicit admin requirement, leaf-only patch, revalidation before identity readiness, retained credentials and final setup dispatch authority. Real lab denial and migration evidence is recorded above; full qualification and maintainer acceptance remain mandatory before merge.

Compatibility and Migration

  • Backward compatible? The real lab kept the original saved record, device identity and independent credential through opt-in and retry. Its legacy record was seeded through the production registry API; a previous-version installer/data upgrade is not claimed.
  • Config or environment changes? Explicit operator opt-in sets gateway.auth.allowTailscale=true only on the supported managed foreground-Serve topology. No automatic credential deletion or record replacement.
  • Migration needed? Operator-initiated adoption. Core acceptance and local persistence are separate; link creation still verifies applied config and current ingress before omitting a token.
  • Upgrade steps and residual limits: use the Connection menu's opt-in, retain independent access, and use its normal retry after correcting a local persistence failure. The demonstrated interruption was an accepted patch followed by failed local persistence, not an arbitrary power-loss proof. Full pool/distribution acceptance remains open.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

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 parent 60e97867. 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_CallerCancellationWhileQueuedDoesNotWriteAfterUnlock in 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 f58ffc04

GitHub 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 f58ffc04

On 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 4ad63347

The 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 NotSigned when 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 b92d9de0

This 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 4aa9dc31

This 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.3 and preservation of the saved Gateway record and existing identity files remain open.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Aug 8, 2026
@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

Adds 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.

  • Before: Companion has no supported in-place adoption action and opens the Dashboard with its shared credential.
  • After: Explicit enablement requests allowTailscale=true, saves trust after Core acceptance, and omits the browser token after readiness verification.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Source review found no remaining actionable defect and exact-head hosted checks pass, but required current-head behavior and stored-state upgrade qualification remain incomplete.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Existing managed WSL Gateway users cannot adopt Tailscale Dashboard authentication through a supported in-place action while retaining established access.
Reason: The maintainer accepted the repaired direction and bounded its qualification to supported foreground Serve, credential preservation, recovery and authorization behavior.

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: 4aa9dc317dbbc49143763ec60dbfea62f1f56799

Before merge

  • Add real behavior proof - Historical ae660ef output exercises real Companion, Core, foreground Serve and browser adoption, persistence-failure retry and fixture-backed selective revocation; later app receipts use a synthetic Gateway. The full body and latest substantive comment still leave current-head stable-installed-state qualification open for gateways.json TrustTailscaleAuth and existing identity files. The author reports that the candidate is unsigned and requests an approved signed build. Provide a short recording or redacted output identifying the candidate commit, Core version, Serve configuration and preservation results; remove IPs, keys and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Await maintainer action - A maintainer must approve and schedule the applicable proof pools and provide an approved signed x64 candidate containing this head for the stable-upgrade rehearsal.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: The proof owner must demonstrate current-head adoption, recovery and denied/revoked access on real foreground Serve after upgrading from v2026.11.3 with the saved Gateway, credentials and device identity intact.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Setup-managed Tailscale boundary changes intended behavior with a stated reason (Add Tailscale Serve support for WSL gateways #967: Provide private tailnet access for new or replacement Gateways with separate identity-trust consent and root-owned Serve administration.)
  • Dashboard credential export and dispatch keeps the original intent (3eed1f1: Use the normal Dashboard credential path; later setup handoffs added final dispatch authorization, which the shared launcher retains.)
  • Personal Tailscale operator authentication keeps the original intent (6c14fe5: Let operators act as their Tailscale person without shared-owner fallback while preserving node authentication.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Andy Eskridge: Raw commit 8e79ace adds src/OpenClaw.SetupEngine/TailscaleSetupSteps.cs:128 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8e79aceb5571; files: src/OpenClaw.SetupEngine/TailscaleSetupSteps.cs)
  • Vitor Cepeda Lopes: Raw commit 6c14fe5 adds src/OpenClaw.Connection/GatewayRecord.cs:70 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6c14fe598718; files: src/OpenClaw.Connection/GatewayRecord.cs)

Preflight source

Source 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

Metric Value Why it matters
Production and regression coverage Production/resources +2116/-124; tests +3884/-122 The main growth implements the transaction, ingress ownership checks and distinct persistence, rejection, credential and browser-handoff regressions.

Labels

Label changes:

No label changes.

Label justifications:

  • merge-risk: 🚨 compatibility: The change persists TrustTailscaleAuth in gateways.json and changes Dashboard credential selection; latest-stable installed-state preservation remains unqualified.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (40 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-13T04:56:08.896Z sha d98a0e1 :: needs real behavior proof before merge. :: [P2] Inspect privileged Serve processes with sufficient read authority | [P2] Display Dashboard preparation failures with a recovery action
  • reviewed 2026-10-13T05:15:22.133Z sha 82258a4 :: needs real behavior proof before merge. :: [P2] Display Dashboard preparation failures with a recovery action
  • reviewed 2026-11-14T09:48:04.567Z sha ae660ef :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-14T09:54:53.312Z sha ae660ef :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-30T23:17:34.493Z sha f58ffc0 :: needs real behavior proof before merge. :: none
  • reviewed 2026-12-01T18:21:21.102Z sha 4ad6334 :: needs real behavior proof before merge. :: [P2] Preserve personal sign-in for inactive saved Gateways
  • reviewed 2026-12-01T18:36:30.658Z sha b92d9de :: needs real behavior proof before merge. :: [P2] Preserve personal sign-in in active Dashboard requests
  • reviewed 2026-12-01T18:51:07.906Z sha 4aa9dc3 :: needs real behavior proof before merge. :: none

Reviewed December 1, 2026, 4:31 PM ET / 21:31 UTC (Revision 41).

@TheAngryPit

Copy link
Copy Markdown
Contributor Author

Thanks for flagging the config.patch boundary. I checked it against both the pinned Core used by the runtime and current main:

Both pass the submitted object to applyMergePatch(snapshot.config, normalizedPatch, ...). The partial leaf patch in this PR is therefore intentional. Sending the full config.get snapshot would be unsafe because unrelated null values would become JSON Merge Patch deletion markers.

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.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 8, 2026
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

CI follow-up on exact head 00bfdd70:

The setup-connect E2E exposed a real regression in ExternalLike_QrOnlyFreshTray_RequiresExplicitDeviceApproval: the new early guard rejected the existing bootstrap credential path before the Dashboard URL could be returned.

The fix removes only that guard. Existing behavior remains:

  • QR/bootstrap onboarding may return its Dashboard URL without appending the bootstrap token;
  • shared-token URLs still append the token when Tailscale identity is not trusted;
  • shared-token omission still requires the persisted marker plus authoritative Core revalidation.

Fresh proof after the correction:

  • Dashboard URL builder tests: 4/4 passed
  • Tray suite: 2166/2166 passed
  • git diff --check: passed
  • scoped Auto-review: no findings, patch correct, confidence 0.96

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.

@TheAngryPit

Copy link
Copy Markdown
Contributor Author

Exact-head architecture and upstream reconciliation proof for b57cc9c6:

  • Addressed the prior P2 by extracting GatewayDashboardLinkService, shared by the tray launch and local MCP paths. App.xaml.cs now retains composition, logging, UI error display, and launch only.
  • Preserved the existing native contract: authoritative Tailscale revalidation omits the shared credential; failed revalidation falls back only to an already-approved browser credential; otherwise the action fails closed.
  • Merged current upstream main (9f9a8eda). The two conflicts were additive: retained upstream GatewayDirectConnectService/validation tunnel wiring and this PR's dashboard-link service.

Fresh proof after the merge:

  • focused dashboard/service/architecture tests: 10/10
  • full build: Shared, CLI, WinNodeCli, SetupEngine, and WinUI succeeded
  • dependency preflight: passed
  • canonical sequential closeout: Shared 3636/3636 with 32 skipped; Tray 2253/2253
  • git diff --check: passed
  • whole-branch Auto-review against current origin/main: no accepted/actionable findings, patch correct, confidence 0.87

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.

@TheAngryPit
TheAngryPit marked this pull request as ready for review August 8, 2026 14:11
@TheAngryPit
TheAngryPit force-pushed the codex/tailscale-legacy-upgrade-20260807 branch from b57cc9c to afc9111 Compare August 9, 2026 19:20
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

Current-head Windows runtime proof

I tested the published #1128 head as part of a combined Windows Companion candidate at 00a61d3a75a615ff4f2b80b30da4df4eb6df18ee.

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 app.dashboard.url entrypoint. The sanitized result was:

{
  "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 Off immediately afterwards. The original settings hash, process identity, binary identity, and zero-listener state were confirmed. The generated MCP credential file remains stored by the product's normal design; its value was never read or emitted.

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 false -> true adoption transition. An independent test on a Gateway that has not adopted the setting yet would usefully cover that remaining transition.

Sanitized agent transcript
[assistant]
I will work only in the #1128 staging worktree and the allowed surfaces. I am checking the saved-row path, focused service entrypoint, and contract tests before changing production code.

[assistant]
Failed-first was captured: the saved-row method did not delegate to the focused service. The minimal change retains the credential-provenance gate and routes policy through the authoritative service.

[assistant]
The supported build passed all five projects. Focused Connection, Setup, Shared, and Tray validation passed 1,073 tests with zero failures; canonical Shared/Tray closeout passed 5,896 tests with zero failures.

[assistant]
The exact combined candidate was installed. Read-only inspection confirmed the running executable and assemblies identify the expected SHA, with trusted auth active and the approved shared fallback retained.

[assistant]
After explicit operator authorization, the supported `app.dashboard.url` capability returned `revalidated=true`, `success=true`, `trustTailscaleAuth=true`, and `credentialFragmentPresent=false`. Browser and Launcher were not invoked, and no URL or credential value was persisted.

[assistant]
Local MCP was restored to Off. The settings hash, process, binary identity, and zero-listener state matched the pre-probe state. The product retained its generated bearer-token file by design; its value was never read or emitted.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 10, 2026
@TheAngryPit

TheAngryPit commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed the remaining contributor-owned localization finding on exact head 653135c.

  • Replaced the six new hard-coded Tailscale dashboard-authentication strings with resource lookups.
  • Added localized resources for all five supported locales: en-US, fr-FR, nl-NL, zh-CN, and zh-TW.
  • Added a focused source-contract regression covering every lookup.

Validation:

  • Failed first: the new focused regression failed 0/1 because the resource lookups were absent.
  • LocalizationValidationTests: 16/16 passed.
  • Supported build: 5/5 projects passed.
  • Shared: 3,636 passed, 32 skipped, 0 failed.
  • Tray: 2,257 passed, 0 failed.
  • git diff --check: passed.

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.

@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

TheAngryPit commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Initial-adoption proof — provenance correction

Correction: the installed combined Windows build 00a61d3a75a615ff4f2b80b30da4df4eb6df18ee contained PR #1128 commit afc91117402e0ca46834faee791150ded570a90a, not the later localization-only head 653135ce02ad3814604879b516b8e18e7f1b4593. The previous wording incorrectly described the installed candidate as containing the exact current head.

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 afc91117402e0ca46834faee791150ded570a90a.

The current PR head is one descendant commit ahead. Its complete afc911...653135 delta only replaces six UI strings with resource lookups, adds the corresponding values to the five existing locale files, and adds a localization source-contract test. It does not change the upgrade transaction, persisted trust marker, Core patch/revalidation, credential fallback, dashboard-link policy, or rollback behavior. Exact-head CI is green, including both Windows builds, the full test job, setup/connect, network-recovery and revocation-recovery E2E lanes, repository hygiene, and the advanced setup gate.

Accordingly, the strongest accurate proof is: runtime_proven for the unchanged authentication path at afc911, plus code_proven source equivalence and test_proven exact-head validation at 653135. This does not claim that a binary built from 653135 itself was installed or exercised.

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:

  • both authoritative Core state and the local trust marker were placed in the initial untrusted state;
  • the approved shared fallback credential remained retained;
  • the supported UI action reconnected through that fallback;
  • Core accepted gateway.auth.allowTailscale=true;
  • the local marker converged to true;
  • fallback material remained present after adoption;
  • rollback restored the original boolean state and the Companion remained running;
  • a separate visual readback showed the Companion Connected, with no update modal or visible error.

The receipt SHA-256 is 77FAE217592B1BDE1B88778370C11217DFF874BF7611E1AC32C255BCAC2D169D.

Receipt provenance note: the hashed receipt's prHead metadata repeats the same mistaken 653135 label; treat that field as superseded by this correction. The observed runtime values are unchanged, and the installed candidate provenance is afc911 within combined build 00a61d3.

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 afc911 and exact, reviewable source/test equivalence for the localization-only current head. The maintainer decision about the legacy tailnet authorization boundary remains intentionally open.

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 12, 2026
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@TheAngryPit
TheAngryPit force-pushed the codex/tailscale-legacy-upgrade-20260807 branch from 653135c to b51aa91 Compare August 17, 2026 18:31
@clawsweeper clawsweeper Bot removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the stale label Nov 29, 2026
TheAngryPit and others added 2 commits November 30, 2026 20:53
Reapply the complete PR openclaw#1128 delta from ae660ef on upstream main 3670fcd.

Co-authored-by: bkudiess <bakudies@microsoft.com>
@TheAngryPit
TheAngryPit force-pushed the codex/tailscale-legacy-upgrade-20260807 branch from ae660ef to 6eabf15 Compare November 30, 2026 21:10
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Nov 30, 2026
@github-actions github-actions Bot removed the stale label Dec 1, 2026

TheAngryPit commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Note

🤖 Codex responding on behalf of TheAngryPit

Update for head 4ad63347780dfc1d300b011324662dc05e305786.

The previous Core/CLI job exposed a blocked session-file send that surfaced TaskCanceledException after the dispatch deadline. The fix maps that deadline to TimeoutException, and the added regression test confirms that caller cancellation still propagates as cancellation and the connection remains usable.

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 v2026.11.10-alpha.28 x64 installer against GitHub's SHA-256 digest and confirmed a valid OpenClaw Foundation Authenticode signature. That establishes the starting installer for the previous-version rehearsal. The actual upgrade with WSL2 and Gateway-managed foreground Serve is still outstanding.

The new x64 CI artifact was built from test merge 0166d7b with this PR head as a parent. It has release identity, and Get-AuthenticodeSignature reports NotSigned. A production-signed package containing this head is still needed to exercise the signed update path.

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

Copy link
Copy Markdown
Contributor Author

Note

🤖 Codex responding on behalf of TheAngryPit

I verified the x64 publish-smoke artifact for 4aa9dc317dbbc49143763ec60dbfea62f1f56799. The DLL identifies test merge f86b868f, and the tray executable's Authenticode status is NotSigned. The signed v2026.11.3 stable x64 installer is verified and available as the starting point. CI payload

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.

@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

This branch has not been deployed

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

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants