Skip to content

fix(onboarding): stop printing gateway token URLs - #124687

Merged
steipete merged 2 commits into
mainfrom
codex/autoqa-onboard-token-output
Aug 17, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/autoqa-onboard-token-output

Conversation

@steipete

@steipete steipete commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where classic onboarding could print a reusable Gateway token inside a dashboard URL, including through a dead headless SSH formatter path. Token-bearing terminal output is easy to retain in terminal transcripts, logs, recordings, and support bundles.

Why This Change Was Made

Classic onboarding now prints only the uncredentialed Control UI URL and the existing openclaw dashboard --no-open recovery command. The obsolete authenticated-URL builder, unused SSH token parameter, and token-specific onboarding copy are deleted. Maintainer security review explicitly accepts the token-free classic handoff because the published contract already promises a clean link and a short-lived dashboard bootstrap.

The separate dashboard command is unchanged. Its backward-compatible JSON url, short-lived one-time browserUrl, and browser pairing behavior remain covered. This PR is AI-assisted.

User Impact

Operators no longer receive reusable Gateway credentials in classic onboarding or headless SSH output. They still receive a plain dashboard URL and a supported recovery command. Dashboard integrations retain their structured JSON handoff.

Evidence

Exact head: bad68a070478b92f11594e984648d9aa0e64f65f, rebased onto origin/main 27cb5d021fd1f7d8dd408871645038318609ce0a.

  • Pre-fix synthetic-sentinel reproduction: the no-reusable-credential contract failed with both classicLeaks: true and sshLeaks: true (exit 42). No real credential was read or printed.
  • Source-blind operator validation: two real interactive classic QuickStart runs completed without printing the reusable sentinel, #token=, or reusable-token labels; both CLI help surfaces use the new handoff wording. Two isolated live dashboard probes retained the legacy structured URL fields and distinct one-time browserUrl shape without printing either synthetic sentinel or full URLs.
  • Focused onboarding/dashboard/CLI proof: 8 files across 4 Vitest shards, 236/236 tests passed.
  • pnpm check:changed: passed for the selected core, coreTests, and docs lanes, including formatting, typechecking, lint, dependency/boundary guards, dead exports, import cycles, and repository ratchets.
  • pnpm docs:list and pnpm check:docs: passed; 6,514 internal links checked with 0 broken links and 1,176 config examples validated.
  • Fresh exact-head Codex autoreview: clean, with no accepted/actionable findings.
  • Exact-head CI: run 32078160453 completed green; the repository watcher reported GREEN for this head.
  • LOC: production +3/-60 (net -57); tests +18/-23 (net -5); docs +1/-1 (net 0); total +22/-84 across 9 files.

Contributor credit is preserved: the first repair commit is authored by Amp ([email protected]), followed by Peter's maintainer cleanup commit.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S maintainer Maintainer-authored PR labels Aug 16, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. 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. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 7:11 PM ET / 23:11 UTC.

ClawSweeper review

What this changes

The PR removes reusable Gateway-token URLs from classic onboarding and SSH hints, while retaining the dashboard command’s structured handoff.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

The patch cleanly removes the reusable-token output from classic onboarding while preserving the separate dashboard JSON and one-time browser-pairing contracts. Keep it open for explicit maintainer acceptance of the intentional classic-handoff compatibility change.

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

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The patch is focused, net-negative, and owner-boundary aligned; the remaining blocker is a maintainer compatibility decision.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless records redacted exact-head interactive validation.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless records redacted exact-head interactive validation.
Evidence reviewed 6 items Current-main leak: Current main still constructs and prints a tokenized classic-onboarding URL when token authentication is selected.
Owner-boundary repair: The branch deletes the authenticated URL builder and emits only the advertised uncredentialed URL from classic finalization.
Regression coverage: The focused test drives token-authenticated classic finalization and asserts that prompt and runtime output exclude both the token and fragment marker.
Findings None None.
Security None None.

How this fits together

Classic onboarding collects Gateway settings and prints a final Control UI handoff in the terminal. The dashboard command is a separate recovery and integration path that emits structured data and creates one-time browser pairing links.

flowchart LR
A[Classic onboarding settings] --> B[Final onboarding output]
B --> C[Safe Control UI URL]
C --> D[Terminal handoff]
D --> E[Dashboard recovery command]
F[Dashboard integrations] --> G[Structured URL and one-time pairing]
Loading

Decision needed

Question Recommendation
Should classic onboarding stop supplying a reusable tokenized Control UI URL and require the plain URL plus configured credential or dashboard recovery command instead? Accept the token-free handoff: Merge the removal and retain openclaw dashboard --no-open as the supported recovery path.

Why: The patch removes a reusable credential from terminal output but intentionally changes established click-through behavior for existing operators.

Before merge

  • Resolve merge risk (P1) - Existing classic-onboarding users who relied on the automatically printed tokenized URL must instead authenticate through the plain URL or use openclaw dashboard --no-open; this intentional handoff change needs maintainer acceptance.
  • Complete next step (P2) - A maintainer must accept the intentional loss of the legacy tokenized classic click-through before merge; no mechanical repair is outstanding.
Agent review details

Security

None.

PR surface

Source -57, Tests -5, Docs 0. Total -62 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 7 3 60 -57
Tests 1 18 23 -5
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 22 84 -62

Review metrics

Metric Value Why it matters
Production versus regression delta production -57, tests -5, docs 0 The security repair deletes the token-output path rather than adding a parallel fallback.
Classic handoff change 1 existing terminal handoff changed; dashboard structured handoff retained Maintainers should explicitly assess the upgrade impact on operators who used the old click-through URL.

Merge-risk options

Maintainer options:

  1. Accept the token-free classic handoff (recommended)
    Merge with the explicit understanding that automatic tokenized click-through is removed and the dashboard command remains the recovery route.
  2. Define a transition path first
    Pause for a maintainer-approved non-reusable handoff if preserving frictionless upgrade behavior outweighs removing the legacy URL immediately.

Technical review

Best possible solution:

Adopt the token-free classic handoff while preserving the dashboard JSON and one-time browser-pairing contracts, with the dashboard command as the named recovery path.

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

Yes: current-main source builds and prints a #token= URL during classic finalization, and the PR body records a sentinel pre-fix run.

Is this the best way to solve the issue?

Yes: deleting the classic output builder at the final-output owner is the best repair; the remaining question is acceptance of the intentional compatibility change.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P1: The PR removes reusable Gateway credentials from a common onboarding terminal flow.
  • merge-risk: 🚨 compatibility: Classic onboarding no longer provides the tokenized URL some existing operators may rely on for automatic dashboard access.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless records redacted exact-head interactive validation.

Evidence

What I checked:

  • Current-main leak: Current main still constructs and prints a tokenized classic-onboarding URL when token authentication is selected. (src/wizard/setup.finalize.ts:774, beebeac11d42)
  • Owner-boundary repair: The branch deletes the authenticated URL builder and emits only the advertised uncredentialed URL from classic finalization. (src/wizard/setup.finalize.ts:760, bad68a070478)
  • Regression coverage: The focused test drives token-authenticated classic finalization and asserts that prompt and runtime output exclude both the token and fragment marker. (src/wizard/setup.finalize.test.ts:1538, bad68a070478)
  • Sibling contract retained: Dashboard JSON intentionally retains its structured URL contract, while browser delivery uses a one-time bootstrap URL; this branch does not alter that path. (src/commands/dashboard.ts:95, bad68a070478)
  • History and ownership: History and blame tie the final-output change to the current branch and show Peter Steinberger as a recurring owner of the onboarding/dashboard path. (src/wizard/setup.finalize.ts:760, bad68a070478)
  • Submitted validation: The PR body records exact-head interactive classic-onboarding and dashboard probes, focused Vitest coverage, changed-lane checks, documentation checks, and green exact-head CI. (bad68a070478)

Likely related people:

  • steipete: Recent merged history and the current branch repeatedly cover final onboarding and dashboard recovery behavior. (role: recent onboarding and dashboard contributor; confidence: high; commits: b438b9605f33, ad53d4419ea4, bad68a070478; files: src/wizard/setup.finalize.ts, src/commands/onboard-helpers.ts, src/commands/dashboard.ts)
  • Shakker: Recent history includes Control UI access and pairing work on the retained dashboard handoff boundary. (role: adjacent Control UI access contributor; confidence: medium; commits: c56ad42525af; files: src/commands/dashboard.ts, src/commands/control-ui-handoff.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-16T16:36:26.825Z sha 2050585 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T23:01:08.752Z sha bad68a0 :: needs maintainer review before merge. :: none

@steipete steipete self-assigned this Aug 17, 2026
@steipete
steipete force-pushed the codex/autoqa-onboard-token-output branch from 2050585 to bad68a0 Compare August 17, 2026 22:54
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes labels Aug 17, 2026
@steipete
steipete marked this pull request as ready for review August 17, 2026 22:54
@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 17, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer security review accepts the token-free classic handoff on exact head bad68a070478b92f11594e984648d9aa0e64f65f.

The defect was the classic final-output owner constructing and printing a reusable #token= URL; an unused SSH formatter could construct the same secret-bearing URL. This branch deletes both producers, keeps the plain Control UI URL and openclaw dashboard --no-open recovery guidance, and leaves dashboard JSON plus the one-time browser bootstrap unchanged.

Proof:

ClawSweeper rank-up/merge-risk move: explicitly accepted. The published dashboard contract already promises clean onboarding output and a short-lived browser bootstrap; preserving the reusable click-through would preserve the credential leak. No config, protocol, permission, or authentication-policy surface changes.

@steipete
steipete merged commit 44e8b6f into main Aug 17, 2026
301 of 302 checks passed
@steipete
steipete deleted the codex/autoqa-onboard-token-output branch August 17, 2026 23:23
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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.

2 participants