Skip to content

fix(pairing): allow node bootstrap startup - #600

Merged
vincentkoc merged 1 commit into
masterfrom
fix-bootstrap-node-startup-gate
May 30, 2026
Merged

vincentkoc merged 1 commit into
masterfrom
fix-bootstrap-node-startup-gate

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • let node-mode startup proceed when the active gateway registry record still has a bootstrap setup-code token
  • keep shared/operator-token records from bypassing node setup without a stored node token
  • add startup setup tests for active vs inactive bootstrap gateway records

Validation

  • git diff --check
  • not run locally: ./build.ps1 / dotnet test because this mac worktree has no pwsh or dotnet; draft PR CI is the validation surface

Context

Crabbox alpha.12 install/signing verified, but fresh setup-code node bootstrap created a per-gateway identity file without exchanging/storing a node token. Startup was entering onboarding first because node mode ignored the registry bootstrap token, and onboarding could reset node mode before the connection manager connected.

@clawsweeper

clawsweeper Bot commented May 30, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed May 30, 2026, 3:28 AM ET / 07:28 UTC.

Summary
The branch lets node-mode startup skip onboarding when the active gateway registry record still has a bootstrap token and adds active/inactive bootstrap coverage in StartupSetupState tests.

Reproducibility: no. live high-confidence reproduction was run. Source inspection shows current master returns setup-required whenever node mode lacks a stored node token, before considering an active registry bootstrap token.

Review metrics: 2 noteworthy metrics.

  • Diff size: 2 files changed, +42/-1. The PR is narrow, but both files sit on the startup/pairing path.
  • Required validation: 0 of 3 repo-required commands reported run. AGENTS.md requires build, shared tests, and tray tests before completion.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Run ./build.ps1, shared tests, and tray tests before marking the draft ready.
  • [P2] Add or link a Windows startup smoke showing active-bootstrap node startup and recovery for stale credentials.

Mantis proof suggestion
A visible desktop startup proof would materially help confirm the onboarding and connection-state behavior that unit tests cannot fully show. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify Windows tray startup with node mode and an active bootstrap gateway skips onboarding, starts gateway/node pairing, and routes stale credentials to Connection settings.

Risk before merge

  • [P1] The PR body reports only git diff --check; the repository-required build, shared tests, and tray tests are still pending before this draft should be marked ready.
  • [P1] The startup gate will now treat an active bootstrap token as setup-satisfying, so stale or expired active bootstrap records need a Windows smoke to confirm users still get a visible recovery path instead of a confusing failed startup state.

Maintainer options:

  1. Validate fresh and upgrade startup (recommended)
    Before merge, verify fresh setup-code node bootstrap, inactive bootstrap, shared-token-without-node-token, and stale active-bootstrap startup behavior on Windows.
  2. Accept the bootstrap shortcut
    Maintainers can intentionally accept that active bootstrap records suppress onboarding as long as failed bootstrap connection states remain visible and recoverable.
  3. Keep draft until smoke proof exists
    If the stale-bootstrap recovery path is not clear, keep the PR draft or pause it until the startup UX is demonstrated.

Next step before merge

  • [P2] Human review should decide readiness after the draft has the required Windows validation and startup smoke proof; there is no narrow automated repair to make on this PR now.

Security
Cleared: No concrete security or supply-chain concern found; the diff does not change credential storage, resolver precedence, dependencies, workflows, or secret handling.

Review details

Best possible solution:

Land this after Windows build/tests and a fresh setup-code startup smoke confirm active bootstrap records skip onboarding while shared-token and stale-credential cases still route users back to Connection settings.

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

No live high-confidence reproduction was run. Source inspection shows current master returns setup-required whenever node mode lacks a stored node token, before considering an active registry bootstrap token.

Is this the best way to solve the issue?

Yes, the proposed fix is narrow and matches the existing credential resolver boundary. The remaining issue is merge readiness: Windows validation and startup proof are still needed for this draft.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 5aeb8f6bcbde.

Label changes

Label changes:

  • add P1: The PR targets a broken fresh setup-code node bootstrap flow that can block the core pairing/startup workflow for real installs.
  • add merge-risk: 🚨 compatibility: Changing the startup setup gate can alter how existing saved bootstrap records behave on upgrade.
  • add merge-risk: 🚨 auth-provider: The merge relies on registry bootstrap credentials to drive node startup before a stored node token exists.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member-authored draft PR; the PR body still notes that local Windows validation was not run.

Label justifications:

  • P1: The PR targets a broken fresh setup-code node bootstrap flow that can block the core pairing/startup workflow for real installs.
  • merge-risk: 🚨 compatibility: Changing the startup setup gate can alter how existing saved bootstrap records behave on upgrade.
  • merge-risk: 🚨 auth-provider: The merge relies on registry bootstrap credentials to drive node startup before a stored node token exists.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member-authored draft PR; the PR body still notes that local Windows validation was not run.
Evidence reviewed

What I checked:

Likely related people:

  • Vincent Koc: Recently landed bootstrap reconnect hardening across GatewayConnectionManager, GatewayRecord, gateway clients, and tests, and this PR continues that pairing path. (role: recent area contributor; confidence: high; commits: 64b650cb3313, 026dfd68e3c6; files: src/OpenClaw.Connection/GatewayConnectionManager.cs, src/OpenClaw.Connection/GatewayRecord.cs, tests/OpenClaw.Connection.Tests/GatewayConnectionManagerTests.cs)
  • Scott Hanselman: Recent hardening pass touched GatewayConnectionManager, App startup, SettingsManager, and related tests in the connection/setup surface. (role: recent adjacent contributor; confidence: medium; commits: 0d4fcbd50ad5; files: src/OpenClaw.Connection/GatewayConnectionManager.cs, src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs)
  • Mike Harsh: Introduced the current GatewayConnectionManager-centered node ownership and removed legacy node connector fallbacks that this startup path now relies on. (role: historical feature owner; confidence: medium; commits: 0816eb0eefc0, dec0549829c0; files: src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Connection/GatewayConnectionManager.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added 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. P1 Urgent regression or broken agent/channel workflow affecting real users now. 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. labels May 30, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review May 30, 2026 07:36
@vincentkoc
vincentkoc merged commit 4351d6a into master May 30, 2026
25 checks passed
@vincentkoc
vincentkoc deleted the fix-bootstrap-node-startup-gate branch May 30, 2026 07:36
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. P1 Urgent regression or broken agent/channel workflow affecting real users now. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant