Skip to content

fix(macos): keep tokenless native dashboards connected after route refresh - #160763

Merged
fuller-stack-dev merged 5 commits into
mainfrom
openclaw/macos-tokenless-route-followup-20260928
Sep 29, 2026
Merged

fuller-stack-dev merged 5 commits into
mainfrom
openclaw/macos-tokenless-route-followup-20260928

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Related: #159860

What Problem This Solves

Fixes: the macOS Primary dashboard becomes stuck reconnecting after a route refresh when its accepted native connection has a scoped device grant but no shared startup token or password.

User Impact

An already accepted native device keeps its dashboard across route refresh and recovery. Unavailable authority and revoked grants still refuse access; no pairing bypass or startup device-token export is introduced.

Why This Change Was Made

Both Primary route admission paths now recognize an accepted native binding, including an empty shared-credential projection. Missing authority remains distinct from accepted tokenless authority.

Evidence

  • Red: 59daee hosted run reproduces all three original failures: route revision and reconnect replace the page with an error; URL-only refresh skips the update.
  • After fix: ec3ac34 hosted run passes all three tokenless recovery cases, no startup device-token export, actual WebKit JavaScript challenge signing (signature verified with the native public key), and revoked-grant refusal. The new parameterized test took 62.970s under full-suite concurrency. Saved-profile reconnect also passes (6.631s), with both native hello device IDs checked.
  • That after-fix run remained failed overall: a third refusal fixture supplied an accepted empty binding while expecting rejection. The candidate corrects it to genuinely unavailable authority until acceptance, retaining the original native window and all recovery assertions.
  • Head 7c9f98f750fd CI passed the tokenless regression (71.083s), saved-profile reconnect (9.705s), and window ownership/refusal/recovery (0.799s). The 2,323-test / 272-suite default partition had one issue: the existing Aqua background test timed out polling document readiness. The new candidate uses the existing event-driven readiness helper with the same five-second timeout and an explicit native-command-ready assertion. Both appearances and all real WebKit rendering assertions remain unchanged. The scheduling cause is unproven; this is not a claim of flake eradication.
  • Exact-head CI for 33f463747a30: macOS Swift test job passed. The default partition passed 2,323 tests / 272 suites in 208.500s, including all three tokenless transitions (62.134s), saved-profile reconnect (9.759s), unavailable-authority/window recovery, and both Aqua background appearances (57.486s). Named and rendered partitions also passed (6 and 2 tests). Full CI passed, including the Swift package and macOS Node lanes and aggregate CI gate (9 successful jobs; 31 correctly scope-skipped; zero failures/cancellations).
  • All seven touched test files audited in full; distinct behavior retained, no tests skipped/deleted. The shared private-identity helper is consolidated, notification-started reconnect callbacks stay in their fixture identity scope, and temporary capture code is removed from the final candidate.
  • Local Swift syntax/format checks pass. Local strict file-length lint reports DashboardManager's pre-existing 1,534 non-comment lines; the production fix adds no lines. Hosted lint remains required. Final independent API-only review is clean for P0–P2 across the production change and all seven changed test files.

Native/WebKit execution uses disposable hosted macOS CI only. The transport responses and page are controlled fixtures, not a live deployed Gateway or operator desktop.

Before

Accepted native connection incorrectly rejected

After

Recovered hosted WebKit fixture

The after capture's transparent background is composited onto white; captured content is unchanged. Screenshots supplement the native signing assertions above.

Credit: Jason (Json), @fuller-stack-dev.

@fuller-stack-dev fuller-stack-dev self-assigned this Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 28, 2026 22:34
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 8:12 PM ET / September 29, 2026, 00:12 UTC (Revision 5).

ClawSweeper review

What this changes

The macOS dashboard now admits accepted tokenless native connections during route replacement and URL refresh, with WebKit recovery and refusal regression coverage.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Current main still rejects accepted tokenless native dashboards during Primary route refresh. This PR addresses both rejecting checks, and the prior review findings have been addressed. No new actionable patch defect is evident.

Priority: P1
Reviewed head: 33f463747a303983ad73572458b5d27b407464a2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The narrow production repair has strong native boundary evidence; the exact-head macOS test gate is still running.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed macOS route checks feed a real WebKit dashboard in the hosted native fixture. The reported before/after runs exercise revision, URL and reconnect transitions, with after-fix signing and revoked-grant refusal; the inspected images corroborate visible recovery. The final head changes only test readiness, and no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed macOS route checks feed a real WebKit dashboard in the hosted native fixture. The reported before/after runs exercise revision, URL and reconnect transitions, with after-fix signing and revoked-grant refusal; the inspected images corroborate visible recovery. The final head changes only test readiness, and no stored-data contract changes.
Evidence reviewed 9 items Introduced production change: The branch adds accepted-native-binding admission to both Primary route checks; the merge-base-to-head diff attributes these two changes to this PR.
Current main still needs the repair: Current main retains the original rejecting guards; DashboardManager has no change between the merged native-auth feature and fetched main.
Accepted binding contract: An accepted native binding is represented by a non-nil credential projection, including an empty map; dashboard configuration first requires that projection's socket lease to be current.
Findings None None.
Security None None.

How this fits together

The macOS dashboard manager turns Gateway route and native connection state into a WebKit dashboard document. The document asks the native app to sign Gateway authentication challenges before the web UI connects.

flowchart LR
A[Gateway route update] --> C[Dashboard admission]
B[Accepted native connection] --> C
C --> D[WebKit dashboard]
D --> E[Native challenge signer]
E --> F[Gateway authorization]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Other +199. Total +199 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 8 234 35 +199
Total 8 234 35 +199

Review metrics

Metric Value Why it matters
Native regression cost 3 route cases; 71.083s on the prior hosted head The costly WebKit suite exercises the authorization boundary that the two production checks change.

Root-cause cluster

Relationship: canonical
Canonical: #160763
Summary: This PR is the focused follow-up for a route-refresh gap in the merged native-dashboard authentication work; the separate Apple refactor explicitly leaves this repair here.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Land the focused route admission repair with its native WebKit regression coverage while retaining the existing final challenge and revocation checks.

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

Yes. The pre-fix hosted WebKit run reports failure for the three route transitions, and current main retains the rejecting guards; this read-only review did not execute macOS tests.

Is this the best way to solve the issue?

Yes. Using the existing accepted-binding predicate in both route checks is a narrow repair, while the native bridge remains responsible for live challenge authorization.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P1: An accepted macOS native dashboard can lose its usable connection during route refresh.
  • merge-risk: 🚨 security-boundary: The route checks admit a tokenless WebKit document based on native authority, so final challenge and grant refusal behavior matters at merge.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed macOS route checks feed a real WebKit dashboard in the hosted native fixture. The reported before/after runs exercise revision, URL and reconnect transitions, with after-fix signing and revoked-grant refusal; the inspected images corroborate visible recovery. The final head changes only test readiness, and no stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed macOS route checks feed a real WebKit dashboard in the hosted native fixture. The reported before/after runs exercise revision, URL and reconnect transitions, with after-fix signing and revoked-grant refusal; the inspected images corroborate visible recovery. The final head changes only test readiness, and no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-28T22:41:35.189Z sha b5eedd1 :: needs changes before merge. :: [P1] Repair both Primary route checks before landing the new regression | [P2] Remove the temporary snapshot loop from the routine regression
  • reviewed 2026-09-28T23:05:39.044Z sha 59daee8 :: needs changes before merge. :: [P1] Implement tokenless route admission in both manager branches | [P2] Remove the temporary snapshot loop from the regression
  • reviewed 2026-09-28T23:46:10.091Z sha 7c9f98f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T23:54:25.336Z sha 7c9f98f :: needs changes before merge. :: none

@clawsweeper clawsweeper Bot added the rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. label Sep 28, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Final candidate: 7c9f98f750fd1d01dc677ca8cd83d5853c263bdc. Both Primary route admission checks now accept validated tokenless native bindings, unavailable-authority fixtures are corrected, and temporary screenshot instrumentation is removed. Independent API-only review is clean for P0–P2. The preceding hosted run passed the real three-transition WebKit signing/revocation regression and saved-profile reconnect; final exact-head CI is running. Inspected before/after images and precise evidence are in the PR body.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@fuller-stack-dev
fuller-stack-dev merged commit 9a75b9b into main Sep 29, 2026
110 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the openclaw/macos-tokenless-route-followup-20260928 branch September 29, 2026 00:27
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…fresh (openclaw#160763)

* test(macos): reproduce tokenless Primary dashboard route rejection

* test(macos): isolate tokenless route regression fixtures

* fix(macos): keep accepted tokenless dashboards connected

* test(macos): preserve unavailable dashboard window authority

* test(macos): await dashboard document readiness events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant