Skip to content

fix(onboarding): recovery hints target the wrong Gateway - #129577

Merged
steipete merged 3 commits into
mainfrom
codex/qa-onboarding-scoped-gateway-repair-hints-20260825
Aug 26, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/qa-onboarding-scoped-gateway-repair-hints-20260825

Conversation

@steipete

@steipete steipete commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators running noninteractive onboarding under an active profile or container were told to repair or restart the default Gateway instead of the scoped Gateway that actually failed.

Why This Change Was Made

The existing onboarding diagnostic owner now formats every generated recovery command through the canonical profile/container-aware command formatter. Consolidating equivalent recovery branches keeps all six failure classifications, caller-provided hints, human output, and JSON output intact without increasing production code.

User Impact

Recovery commands copied from onboarding now target the correct selected profile or container, including container-over-profile precedence, instead of modifying an unrelated default Gateway.

Evidence

  • Authentic pre-fix owner regressions failed for both active profile and active container selection.
  • Regression coverage now exercises all six health-failure classifications, both not-listening recovery commands, profile/container precedence, human/JSON parity, and the actual onboarding-to-daemon failure path.
  • Focused onboarding and sibling doctor suites: 36 tests passed.
  • Targeted type-aware lint, formatting, and independent whole-change review passed.
  • Production LOC: +6/-6, net 0; meaningful real-owner regressions are test-only growth.
  • A pre-existing main CI lint failure was repaired by deduplicating identical archived-transcript fixtures in the memory-host test (test-only +4/-14); targeted lint passes, and all 40 memory tests plus 36 onboarding/doctor tests pass.

@clawsweeper

clawsweeper Bot commented Aug 25, 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 25, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 6:54 AM ET / 10:54 UTC.

ClawSweeper review

What this changes

The PR makes noninteractive onboarding recovery hints include the active profile or container so copied repair commands target the Gateway that failed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer handling. Current main still emits unscoped recovery commands, while this PR applies the existing profile/container formatter at the correct diagnostics owner and adds focused coverage; exact-head CI is still running and the branch is behind main.

Priority: P2
Reviewed head: 19a84ea6a78a5f92d8107c14bbb138cd556f5ec7
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-neutral owner-boundary repair with meaningful regression coverage and no actionable review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository context identifies this as a member-authored PR, so the external-contributor real-behavior-proof gate does not apply; the PR body additionally reports focused regression runs.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository context identifies this as a member-authored PR, so the external-contributor real-behavior-proof gate does not apply; the PR body additionally reports focused regression runs.
Evidence reviewed 6 items Current-main behavior: Current main still returns literal unscoped Doctor and Gateway recovery commands for all health-failure classifications.
Owner-boundary repair: The PR changes the generic recovery-hint owner to use the existing command formatter while preserving classification, caller-hint precedence, redaction, and human/JSON rendering.
Canonical scope contract: The existing formatter validates container hints, gives a container precedence over a profile, and inserts the selected root option without duplicating an explicit flag.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

$ node scripts/run-node.mjs --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 99.26 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.6s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 11.7s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 2998ms (slowest: built plugin control-plane loads 2437ms)

OpenClaw 2026.8.1 (19a84ea) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console (silent|fatal|error|warn|info|debug|trace)
  --no-color           Disable ANSI colors
  --profile ‹name›     Use a named profile (isol
… output truncated …

Assertions:

  • PASS expect_output: Usage: openclaw [options] [command]

How this fits together

Noninteractive onboarding probes Gateway health and emits human or JSON recovery guidance when that probe fails. Operators copy those commands into Doctor or Gateway actions, which must retain the profile or container selected for onboarding.

flowchart LR
A[Noninteractive onboarding] --> B[Gateway health probe]
B --> C[Failure classification]
C --> D[Recovery command formatter]
D --> E[Human or JSON diagnostic]
E --> F[Operator repair command]
Loading

Decision needed

Question Recommendation
After exact-head CI completes on a refreshed merge result, should this maintainer-owned onboarding repair be merged? Merge after green exact-head CI: Keep the canonical formatter-based repair and merge once the refreshed branch is clean and all required checks succeed.

Why: The patch is technically bounded and appears correct, but the maintainer label and member attribution require explicit human merge handling.

Before merge

  • Resolve merge risk (P1) - The branch is behind current main and its exact-head CI is still in progress, so the final merge result needs a refreshed green gate.
  • Complete next step (P2) - The remaining action is maintainer merge handling after the current-main refresh and exact-head CI gate, not an automated repair.
Agent review details

Security

None.

PR surface

Source 0, Tests +77. Total +77 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 6 6 0
Tests 2 99 22 +77
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 105 28 +77

Review metrics

Metric Value Why it matters
Production versus test LOC production +6/-6 (net 0); tests +99/-22 The behavior repair is absorbed into the existing diagnostic owner; the additional lines are focused regression coverage plus an unrelated test-fixture deduplication.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/onboard-non-interactive.gateway.test.ts, migration/backfill/repair: src/commands/onboard-non-interactive/local/output.ts, serialized state: packages/memory-host-sdk/src/host/session-files.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the single generic recovery-hint path and merge it only after a refreshed exact-head CI result confirms the current-main integration.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the single generic recovery-hint path and merge it only after a refreshed exact-head CI result confirms the current-main integration.

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

Yes, from source: current main's generic recovery owner emits unscoped literals, while the existing formatter demonstrably adds the active profile or container. This read-only review did not execute the failing path.

Is this the best way to solve the issue?

Yes. Reusing the canonical scope formatter at the single generic recovery-hint owner avoids duplicating profile/container policy and covers every classification that shares the defect.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded defect in recovery guidance for scoped noninteractive onboarding, without evidence of data loss, security exposure, or runtime unavailability.
  • 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 repository context identifies this as a member-authored PR, so the external-contributor real-behavior-proof gate does not apply; the PR body additionally reports focused regression runs.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame attributes the recovery-hint owner to Peter Steinberger, and this PR maintains that same onboarding path. (role: recent area contributor; confidence: medium; commits: 9c8393f3a636, 19a84ea6a78a; files: src/commands/onboard-non-interactive/local/output.ts, src/commands/onboard-non-interactive.gateway.test.ts)
  • Sally O'Malley: History identifies the container-targeting feature commit as relevant context for the formatter contract used by this repair. (role: container-targeting contributor; confidence: medium; commits: 91adc5e718eb; files: src/cli/command-format.ts)

Rank-up moves

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

  • Refresh against current main and obtain a green exact-head CI result before merging.

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-25T19:41:27.941Z sha 8d3ba11 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-25T21:19:06.385Z sha 8d3ba11 :: needs maintainer review before merge. :: none

@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. and removed 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. labels Aug 25, 2026
@steipete
steipete merged commit 51e2dfe into main Aug 26, 2026
137 checks passed
@steipete
steipete deleted the codex/qa-onboarding-scoped-gateway-repair-hints-20260825 branch August 26, 2026 11:12
@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

commands Command implementations maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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.

1 participant