Skip to content

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

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

feat: upgrade legacy managed Gateways to Tailscale auth#1128
TheAngryPit wants to merge 3 commits into
openclaw:mainfrom
TheAngryPit:codex/tailscale-legacy-upgrade-20260807

Conversation

@TheAngryPit

@TheAngryPit TheAngryPit commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where existing Companion-managed WSL Gateways remain token-backed for Dashboard access even after the operator explicitly adopts verified Tailscale identity authentication.

Closes #1117 only if maintainers approve the product and security boundary described there.

Why This Change Was Made

The Companion now offers a confirmation-gated migration for eligible active managed Gateways. It persists a durable trust marker, revalidates the authoritative Core policy, and requires live Tailscale readiness before generating a tokenless Dashboard URL. If readiness is unavailable, the existing approved browser credential remains available as fallback; without a fallback, the link fails closed.

This remains a thin Companion change. It adds no public Core API, alternate Gateway, automatic migration, credential deletion, installer change, or parallel recovery model.

User Impact

Operators can explicitly adopt Tailscale identity for an existing managed Gateway. Healthy Tailscale identity opens the Dashboard without a token in the URL. A transient readiness failure does not erase the durable opt-in or retained recovery credential.

Evidence

Exact current head: c2b6c59530c0e648f80c10f509b151075392133e
Exact upstream main parent: f8a8825ccbb441caaf51f5509102adb53aa1dbfc

  • Installed a side-by-side Dev Companion built from the exact head, paired it to the existing managed Gateway, and exercised the supported Connection UI.
  • The opt-in persisted TrustTailscaleAuth=true; Core reported gateway.auth.allowTailscale=true; the retained shared fallback credential remained present.
  • In a fresh Chrome Incognito window, using a Dashboard URL with no token parameter, the Gateway recorded an authenticated user identity at the exact launch time and served the Dashboard successfully. This is current-head end_to_end_proven evidence for the healthy tokenless branch.
  • The configuration-triggered Gateway restart briefly surfaced a raw transport error, then the Companion recovered automatically and completed a healthy handshake. That UX issue is tracked separately and is not hidden as proof for this PR.
  • The degraded-readiness fallback remains test_proven, not runtime_proven, on this host. The single production tailscaled instance owns both the local identity verifier and the reachable Tailscale Serve route. Stopping it would remove ingress as well as readiness and would not be an honest fallback test.

Change Type

  • Feature
  • Security hardening
  • Tests or validation

Scope

  • Tray or WinUI UX
  • Gateway, connection, or pairing
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

Fresh exact-head evidence:

  • Focused Tailscale readiness/upgrade tests: 37/37 passed.
  • Additional focused policy/wiring groups: 26/26 and 9/9 passed.
  • Full Tray suite: 2,537/2,537 passed.
  • Supported Dev build and installer creation succeeded and bound the installed payload to c2b6c595.
  • git diff --check: passed.
  • The full Connection suite had one deterministic timeout that reproduced on the clean parent baseline; the changed focused surface is green.
  • One unrelated Shared telemetry collection failure remained outside this change. It is not represented as a passing full-suite result.

Real Behavior Proof

  • Environment tested: Windows Companion Dev side-by-side against the operator's existing OpenClawGateway WSL distro and live Tailscale Serve path.
  • PR head or commit tested: c2b6c59530c0e648f80c10f509b151075392133e.
  • Exact steps: pair Dev Companion, confirm Tailscale identity adoption, wait for the supported Gateway restart and reconnect, then open the generated tokenless Dashboard URL in a fresh Incognito window.
  • Evidence after fix: durable trust marker and authoritative Core policy were true, fallback credential remained retained, live verifier invoked /usr/bin/tailscale status --json, and the Gateway recorded an authenticated Tailscale user for the private-window connection.
  • Observed result: the healthy branch authenticated tokenlessly and the Companion recovered after restart.
  • Screenshot or artifact links verified?: N/A. Sanitized runtime transcript is recorded in the contributor note.
  • Not verified or blocked: end-to-end fallback authentication while the local verifier is unavailable but the Dashboard ingress remains independently reachable.

Maintainer / Crabbox validation request

The remaining runtime gap should not block or destabilize a production host merely to manufacture a topology it does not have. If a maintainer or Crabbox user has a supported topology where Dashboard ingress remains reachable while the local WSL Tailscale verifier is unavailable, please validate this exact head:

  1. Start with an opted-in managed record and an approved retained browser credential.
  2. Make only the local readiness verifier unavailable while preserving reachable Dashboard ingress.
  3. Open Dashboard and confirm authenticated fallback, with the durable marker and Core configuration preserved.
  4. Restore readiness and confirm the next Dashboard open returns to tokenless identity automatically.

A redacted transcript containing branch selection, verifier classification, credential-fragment presence as a boolean, marker/config preservation, and final authentication outcome is sufficient. Do not include the URL, token, device key, Gateway ID, or raw credential material.

Security Impact

  • New permissions or capabilities?: No.
  • Secrets or tokens handling changed?: Yes. Existing approved browser credentials are retained and used only as fallback when live identity readiness is not proven.
  • New or changed network calls?: No public network API. The internal verifier runs managed WSL /usr/bin/tailscale status --json.
  • Command or tool execution surface changed?: Yes. One bounded, argument-list Tailscale status probe runs in the resolved managed distro with timeout and fail-closed handling.
  • Data access scope changed?: No.
  • Risk and mitigation: tailnet identity becomes an authorization path only after explicit confirmation, authoritative Core revalidation, and live readiness. Credentials are not deleted; unavailable readiness falls back or fails closed.

Compatibility and Migration

  • Backward compatible?: Yes.
  • Config or environment changes?: Yes. Explicit adoption persists the existing Core allow setting and a durable Companion record marker.
  • Migration needed?: No automatic migration. Existing users opt in through the supported Connection UI.

Review Conversations

  • Contributor-owned review findings addressed.
  • Remaining product/security policy and topology-specific runtime proof are left explicitly for maintainer judgment.

@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. Reviewed August 21, 2026, 5:09 PM ET / 21:09 UTC.

ClawSweeper review

What this changes

This PR adds a confirmation-gated upgrade for eligible managed Tailscale gateways that enables verified Tailscale dashboard identity while retaining shared-credential fallback.

Merge readiness

Blocked until stronger real behavior proof is added - 6 items remain

Keep open. Current main still lacks the legacy managed-gateway upgrade path, but this feature changes an authorization boundary and the supplied Tailscale runtime proof is not from the reviewed head.

Priority: P1
Reviewed head: 1ebebfa81e3c547c5fe33030b8f210cfd8efc1ac
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation has substantial focused coverage, but merge readiness is capped by the missing current-head proof for the central authorization behavior.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The supplied current-head QR/bootstrap run proves the latest compatibility correction, but the central Tailscale adoption and token-free dashboard flow is only claimed for an earlier head; add a redacted current-head run and keep private endpoints and credentials out of it. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The supplied current-head QR/bootstrap run proves the latest compatibility correction, but the central Tailscale adoption and token-free dashboard flow is only claimed for an earlier head; add a redacted current-head run and keep private endpoints and credentials out of it. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current main does not implement the legacy upgrade: Current main contains setup-time Tailscale trust configuration, but no GatewayRecord trust marker, upgrade service, or connection-manager enable/revalidate methods for existing managed gateways.
Proposed authorization transaction: The branch adds the explicit upgrade transaction and its Core revalidation path.
Architecture ownership: The architecture ledger names GatewayDashboardLinkService as the authoritative owner for revalidation, browser-credential fallback, and fail-closed URL policy.
Findings None None.
Security Needs attention Approve Tailscale dashboard authorization: Persisting the trust marker permits token-free dashboard URLs after revalidation, so maintainers must explicitly accept verified Tailscale identity as an authorization path for existing managed gateways.

How this fits together

The Windows Companion persists managed gateway records and produces dashboard URLs from tray and local MCP entry points. The change coordinates a Core configuration grant, a local trust marker, WSL Tailscale readiness checks, and credential fallback.

flowchart LR
A[Managed gateway record] --> B[User confirms adoption]
B --> C[Core authorization setting]
C --> D[Persisted trust marker]
D --> E[Dashboard link service]
E --> F[Live WSL Tailscale check]
F -->|ready| G[Token-free dashboard]
F -->|not ready| H[Shared credential fallback or error]
Loading

Decision needed

Question Recommendation
Should an explicitly opted-in existing managed gateway be allowed to authorize dashboard access through verified Tailscale identity? Approve the bounded opt-in: Allow the confirmation-gated migration with Core revalidation and retained shared-credential fallback.

Why: This is a deliberate expansion of the supported dashboard authorization boundary, not a correctness choice that tests can settle.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The supplied current-head QR/bootstrap run proves the latest compatibility correction, but the central Tailscale adoption and token-free dashboard flow is only claimed for an earlier head; add a redacted current-head run and keep private endpoints and credentials out of it. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve security concern: Approve Tailscale dashboard authorization - Persisting the trust marker permits token-free dashboard URLs after revalidation, so maintainers must explicitly accept verified Tailscale identity as an authorization path for existing managed gateways.
  • Resolve merge risk (P1) - Merging would make verified Tailscale identity an authorization path for existing managed dashboards, which requires an explicit security-policy decision.
  • Resolve merge risk (P1) - The central token-free Tailscale flow lacks inspectable after-fix runtime proof from the reviewed head; the latest proof covers only the corrected QR/bootstrap compatibility path.
  • Complete next step (P2) - A maintainer must decide the authorization boundary, and the contributor must supply current-head proof for the central flow before merge.

Findings

  • [medium] Approve Tailscale dashboard authorization — src/OpenClaw.Connection/GatewayTailscaleAuthUpgrade.cs:233
Agent review details

Security

Needs attention: No supply-chain change was found, but the PR deliberately expands a dashboard authorization boundary and needs explicit maintainer approval.

Review metrics

Metric Value Why it matters
Changed surface 33 files, +2,886 / -46 lines The change spans persisted gateway state, Core RPCs, WSL readiness, tray UI, local MCP, localization, and tests.
Production versus tests production +1,258 / -44, tests +1,626 / -2 The substantial test investment supports the broad implementation surface, but does not replace current-head real behavior proof.

Merge-risk options

Maintainer options:

  1. Approve after current-head proof (recommended)
    Accept the bounded identity authorization path only after a redacted current-head run demonstrates adoption and token-free dashboard authentication.
  2. Pause for authorization policy
    Keep the PR open or close it if maintainers do not want Tailscale identity to become a supported legacy-dashboard authorization path.

Technical review

Best possible solution:

Approve or decline the legacy-gateway authorization policy explicitly, then require one redacted current-head Tailscale adoption run that shows Core and local-state convergence plus token-free dashboard authentication.

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

Not applicable: this PR adds a new supported authorization path rather than reporting a current bug. The central current-head runtime flow has not been demonstrated in the supplied evidence.

Is this the best way to solve the issue?

Unclear pending maintainer policy approval. The service extraction follows the architecture ledger, but maintainers must decide whether the legacy identity authorization path should exist.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: The PR changes dashboard authorization for existing managed gateway users.
  • merge-risk: 🚨 compatibility: It adds persisted trust state and changes dashboard credential inclusion for upgraded records.
  • merge-risk: 🚨 auth-provider: It conditionally substitutes Tailscale identity for shared-token dashboard authentication.
  • merge-risk: 🚨 security-boundary: It expands the identities that can be authorized to access an existing dashboard.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The supplied current-head QR/bootstrap run proves the latest compatibility correction, but the central Tailscale adoption and token-free dashboard flow is only claimed for an earlier head; add a redacted current-head run and keep private endpoints and credentials out of it. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [medium] Approve Tailscale dashboard authorization — src/OpenClaw.Connection/GatewayTailscaleAuthUpgrade.cs:233
    Persisting the trust marker permits token-free dashboard URLs after revalidation, so maintainers must explicitly accept verified Tailscale identity as an authorization path for existing managed gateways.
    Confidence: 0.95

What I checked:

Likely related people:

  • Barbara Kudiess: Introduced the current-main PairOperatorStep managed-record path that this PR extends with durable Tailscale trust state. (role: recent adjacent contributor; confidence: medium; commits: b37307cbd51f; files: src/OpenClaw.SetupEngine/PairOperatorStep.cs, src/OpenClaw.SetupEngine/TailscaleSetupSteps.cs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted current-head adoption run showing local/Core convergence and a token-free dashboard authentication result.
  • Obtain an explicit maintainer decision on the legacy Tailscale authorization boundary.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

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

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-10T12:22:31.736Z sha 653135c :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-12T10:20:52.807Z sha 653135c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-12T12:24:05.454Z sha 653135c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T18:36:53.823Z sha b51aa91 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-18T08:49:04.788Z sha c2b6c59 :: needs real behavior proof before merge. :: [P3] Localize the new Tailscale dashboard copy
  • reviewed 2026-08-18T11:57:29.355Z sha e34272f :: needs real behavior proof before merge. :: [P2] Centralize the Dashboard credential decision | [P3] Localize the new Tailscale Dashboard copy
  • reviewed 2026-08-19T15:25:41.845Z sha bd8ab21 :: needs real behavior proof before merge. :: [P1] Preserve the QR/bootstrap dashboard URL contract | [P2] Move dashboard credential policy out of App | [P3] Localize the new Tailscale dashboard copy
  • reviewed 2026-08-19T18:24:45.870Z sha bac278a :: needs real behavior proof before merge. :: [P1] Preserve the QR/bootstrap dashboard URL contract | [P3] Localize dashboard authentication errors

@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

Copy link
Copy Markdown
Contributor Author

Exact-head evidence for b51aa91e449aa94250866c84b802b563668d7e7a, rebased onto upstream/main fc9add75eda78daf548d80a55ffb64e63b159961:

  • GatewayTailscaleAuth focused Connection tests: 37/37 passed.
  • GatewayDashboardLink focused Tray tests: 6/6 passed.
  • Shared: 3,703 passed, 32 skipped; Tray: 2,478 passed.
  • Supported five-project build and git diff --check: passed.
  • The internal live verifier runs /usr/bin/tailscale status --json; tokenless URLs require BackendState=Running plus a non-empty Self.DNSName, otherwise the approved browser fallback is used and no fallback fails closed.

Proof is code_proven/test_proven only for this corrected head; no runtime, install, or live-Tailscale proof is claimed. The #1117 product/security decision remains maintainer-owned.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 17, 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 exact_review_queue).
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. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed 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. proof: sufficient Contributor real behavior proof is sufficient. labels Aug 17, 2026
@TheAngryPit
TheAngryPit force-pushed the codex/tailscale-legacy-upgrade-20260807 branch from b51aa91 to c2b6c59 Compare August 18, 2026 08:45
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

Current-head runtime proof and bounded remaining ask

The PR branch is now rebuilt as one exact commit, c2b6c59530c0e648f80c10f509b151075392133e, directly on current upstream main f8a8825ccbb441caaf51f5509102adb53aa1dbfc.

Current-head production-path evidence:

  • Side-by-side Dev Companion installed and paired through the supported flow.
  • Explicit Tailscale identity adoption persisted the durable trust marker and authoritative Core policy while retaining the approved fallback credential.
  • After the expected Gateway restart and automatic reconnect, a fresh Chrome Incognito window opened a URL with no token parameter.
  • At that exact launch time, the Gateway recorded an authenticated Tailscale user and served the Dashboard. The healthy tokenless branch is therefore end_to_end_proven on this head.

The remaining negative-readiness branch is deliberately reported as test_proven, not runtime_proven. On this production topology, the same tailscaled instance owns both the local readiness surface and Tailscale Serve ingress. Stopping it removes the route as well as the verifier, so doing that would not exercise authenticated fallback and would disrupt the working production path without producing honest evidence.

Maintainer or Crabbox-user request: if you have a supported topology where Dashboard ingress remains reachable while the local WSL Tailscale verifier is unavailable, could you run the four-step fallback/recovery check now documented in the PR body? A redacted transcript with boolean credential-fragment presence, marker/config preservation, and authentication outcome is enough. Please do not include URLs, tokens, Gateway identifiers, or credential values.

This limitation is a topology-specific proof gap, not a request to weaken the safety checks or to block the larger current-main validation picture.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 18, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@TheAngryPit
TheAngryPit force-pushed the codex/tailscale-legacy-upgrade-20260807 branch from c2b6c59 to e34272f Compare August 18, 2026 11:51
@TheAngryPit
TheAngryPit force-pushed the codex/tailscale-legacy-upgrade-20260807 branch from e34272f to bd8ab21 Compare August 19, 2026 15:21
@clawsweeper clawsweeper Bot added P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 19, 2026
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

Exact-head follow-up for 1ebebfa81e3c547c5fe33030b8f210cfd8efc1ac (base b37307cbd51f26eb926e980d96554e9cab71db7d). This addresses the two actionable review findings without deciding the separate maintainer-owned Tailscale product/security policy.

What changed

  • Preserved the established non-Tailscale QR/bootstrap contract: the dashboard URL is generated without embedding a credential.
  • Kept explicitly opted-in Tailscale links fail closed when identity revalidation fails and no approved shared browser credential is available.
  • Routed both dashboard-policy errors through localization and added keys for all five supported locales.
  • Updated the real QR-only E2E assertion so it no longer encodes the regression.

Validation

  • Failed first: BuildAsync_TokenFreeBootstrapRequest_PreservesDashboardUrl returned Success=false before the fix; the localization injection test also failed to compile before the production constructor accepted the localizer.
  • build.ps1: PASS (46 documentation files; Shared, CLI, WinNodeCli, SetupEngine, WinUI).
  • Focused dashboard/localization tests: 13 passed, 0 failed.
  • Shared tests: 3703 passed, 32 environment-only skipped, 0 failed.
  • Tray tests: 2633 passed, 0 skipped, 0 failed.
  • Full-branch autoreview against the exact base: TruffleHog clean, 155031-byte bundle, no accepted/actionable findings, patch correct (0.99).

Real behavior proof

ExternalLike_QrOnlyFreshTray_RequiresExplicitDeviceApproval passed 1/1 against a disposable loopback-only WSL Gateway (official OpenClaw 2026.6.34, protocol v4) and an isolated Tray profile:

  • a real Gateway setup code was applied through app.connection.applySetupCode;
  • the fresh record had no shared gateway token and retained only bootstrap recovery material while explicit device approval was pending;
  • app.dashboard.url succeeded with a non-null URL, usesSharedGatewayToken=false, hasTokenQuery=false, and no token= substring;
  • the pending device request was rejected through the Connection-page path;
  • official uninstall exited 0, and the disposable distro, temp roots, candidate Tray processes, and proof listeners were absent afterward.

Proof hashes: WinUI executable 49F136EC4CA707EF54A776F12FBA3466A815DC8C2244403CEC4D36D2137EEED5; QR-only Tray log BA868BC8F60645BCAE1DB9A8F7F8225A102F9EA40AC71E95CC5283F5192A90B0; setup log 539793560B712A493ECA971AF4F17C8EC86B99064F1BF250B1D831287C2FF2F0; uninstall log 8801E37309E6FBEBF5A55F47BF3F30963D1BA376D9A484BFC7CD588E62320959.

The remaining question is the maintainers' intended policy for enabling verified Tailscale dashboard identity; this follow-up deliberately leaves that decision explicit.

@clawsweeper please re-review the exact head.

@TheAngryPit

Copy link
Copy Markdown
Contributor Author

CI follow-up for exact head 1ebebfa81e3c547c5fe33030b8f210cfd8efc1ac:

  • Build and Test run 32526717884 completed with 6 successful checks, 6 intentional skips, and one failed check.
  • The only failure was the unchanged accessibility screenshot test NativeToolIdentityScreenshotProofTests.SyntheticNativeRows_RenderTrustedIdentitySafeInputAndTruthfulFallback timing out while waiting 10 seconds for ChatComposerInput.
  • In the same CI job, the ordinary ChatPage accessibility scan subsequently found the same marker and passed after 12 seconds; all other 20 accessibility tests passed.
  • A fresh local rerun of the exact failed test against the exact PR head passed 1/1. Its test body took 17 seconds and the complete invocation took about 30 seconds.
  • The contributor account cannot rerun the failed GitHub Actions job (Must have admin rights to Repository).

This is evidence of an unrelated timing-sensitive UI test gate, not a failure of the dashboard-link behavior changed by this PR. Maintainer action requested: rerun failed jobs. The PR remains honestly CI-red until that rerun passes; no timeout/harness change has been mixed into this dashboard/auth patch.

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

Labels

merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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.

fix: allow existing managed Tailscale gateways to adopt tailnet identity safely

2 participants