Skip to content

fix(setup): preserve configured channel when status refresh fails - #124383

Merged
steipete merged 2 commits into
mainfrom
fix/autoqa-refill-channel-setup-outcomes-v2
Aug 16, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/autoqa-refill-channel-setup-outcomes-v2

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users could complete channel configuration successfully but have the wizard report failure and skip persisting the configured state when the plugin's immediate follow-up status refresh failed.

Why This Change Was Made

The channel setup flow now treats only the observation after a completed configuration as fail-soft. It preserves the configured result, records status as unavailable, and shows sanitized diagnostic detail plus the exact openclaw channels status --channel <id> retry. The actual configure operation and cancellation path remain outside that recovery boundary and still fail normally.

This does not change config shape, defaults, provider or channel policy, the public CLI contract, plugin APIs, or security behavior. Invalid or empty --channel wizard handling is separate and intentionally excluded.

User Impact

Operators keep successfully configured channel state even when an optional status read is temporarily unavailable. They receive a visible, redacted explanation and a precise status retry command instead of a false setup failure.

Evidence

  • Pre-fix regression proof: the new focused case failed with controlled status failure at the unguarded post-configure status refresh.
  • Focused matrix: 94/94 tests passed across channel setup, setup prompts, channel add/configure, and built-CLI onboarding E2E.
  • Source-blind built CLI: normal success persisted; post-configure status failure exited zero, persisted config, redacted an injected credential, and printed the exact retry; the retry succeeded in a fresh process; configure failure and Ctrl-C cancellation remained nonzero and did not persist configuration.
  • Full build passed, including built plugin control-plane loads and Plugin SDK export checks.
  • Production types and test types passed.
  • check:changed, full lint, focused format check, runtime import-cycle check, and git diff --check passed.
  • Structured autoreview completed cleanly with no accepted/actionable findings.
  • Remote proof: https://github.com/openclaw/openclaw/actions/runs/31922677756
  • Production LOC: +17/-2 (net +15). Tests: +55/-0.
  • No changelog entry: normal PR changelog updates are release-generated.

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

@steipete steipete self-assigned this Aug 16, 2026
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 03:31
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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 15, 2026, 11:47 PM ET / August 16, 2026, 03:47 UTC.

ClawSweeper review

What this changes

The PR preserves completed channel configuration when the immediate post-setup status refresh fails, records status as unavailable, and gives the operator a sanitized retry command.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal maintainer merge: current main still lets the post-configuration status probe abort setup, while the revised head contains a narrowly scoped recovery and no blocking patch defect was found.

Priority: P2
Reviewed head: d1e06d124ff435d47f65caa202a9ac484a1b1a8c

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The revised small patch cleanly narrows the recovery boundary and has focused regression coverage plus reported built-CLI validation.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This is maintainer-authored work; the external-contributor proof gate does not apply, and the PR body additionally reports after-fix built-CLI evidence.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is maintainer-authored work; the external-contributor proof gate does not apply, and the PR body additionally reports after-fix built-CLI evidence.
Evidence reviewed 6 items Current-main behavior: Current main still awaits the post-result status refresh directly, so a plugin status error prevents setup from returning the successfully produced configuration.
Scoped repair at PR head: The head catches only refreshStatus after a non-paused configuration result; configuration and cancellation errors occur before this boundary and remain propagating.
Regression coverage: The focused test makes the initial status read succeed, fails the post-configuration refresh, and asserts returned configuration plus the visible retry note.
Findings None None.
Security None None.

How this fits together

Interactive channel setup obtains a configuration result from a channel plugin, refreshes its status for the setup UI, and returns the resulting configuration for persistence. Status is observational after successful configuration but remains operational for install, enable, removal, and cancellation paths.

flowchart LR
  A[Operator selects channel] --> B[Channel setup flow]
  B --> C[Plugin configuration]
  C --> D[Post-configuration status refresh]
  D --> E[Status note and selection state]
  C --> F[Returned configuration]
  F --> G[Onboarding persists configuration]
Loading

Before merge

  • Resolve merge risk (P1) - This intentionally changes setup compatibility: completed configuration now survives a failed status observation, so merge should wait for exact-head checks to finish successfully.
  • Complete next step (P2) - No repair lane is needed: the revised head addresses the prior scope concern; await normal exact-head CI and maintainer merge review.
Agent review details

Security

None.

PR surface

Source +15, Tests +55. Total +70 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 16 1 +15
Tests 1 55 0 +55
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 71 1 +70

Review metrics

Metric Value Why it matters
Production versus test LOC production +16/-1 (net +15); tests +55/-0 The production growth records unavailable status and an operator-visible retry after a completed configuration; the added test protects that failure boundary.
Setup recovery behavior 1 post-configuration status path changed The PR changes whether a transient status read can prevent configuration persistence.

Merge-risk options

Maintainer options:

  1. Accept the bounded setup recovery (recommended)
    Merge once exact-head checks pass, accepting that a successful configuration now remains usable when only its follow-up status observation fails.
  2. Pause if fail-fast status is required
    Do not merge if maintainers intend every post-configuration status probe to invalidate the completed setup result.

Technical review

Best possible solution:

Land the narrow post-configuration recovery once exact-head checks are green, while retaining fail-fast behavior for configuration, cancellation, install, enable, and removal paths.

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

Yes, from source: make the adapter's initial status read succeed, return a configuration result, then reject the next status read; current main rejects at the unguarded refresh while the head returns configuration with a retry note.

Is this the best way to solve the issue?

Yes. The recovery sits at the completed-result owner boundary, mirrors existing initial-status failure treatment, and leaves configuration and other lifecycle refresh failures fail-fast.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster 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:

  • P2: This is a bounded setup-path repair with visible operator impact but no demonstrated emergency condition.
  • merge-risk: 🚨 compatibility: Existing setup flows change from failing after a post-configuration status error to retaining the resulting channel configuration.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster 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 is maintainer-authored work; the external-contributor proof gate does not apply, and the PR body additionally reports after-fix built-CLI evidence.

Evidence

What I checked:

  • Current-main behavior: Current main still awaits the post-result status refresh directly, so a plugin status error prevents setup from returning the successfully produced configuration. (src/flows/channel-setup.ts:461, 4823b236a795)
  • Scoped repair at PR head: The head catches only refreshStatus after a non-paused configuration result; configuration and cancellation errors occur before this boundary and remain propagating. (src/flows/channel-setup.ts:462, d1e06d124ff4)
  • Regression coverage: The focused test makes the initial status read succeed, fails the post-configuration refresh, and asserts returned configuration plus the visible retry note. (src/flows/channel-setup.test.ts:974, d1e06d124ff4)
  • Sibling failure policy: Initial status collection already treats individual plugin status failures as unavailable status while preserving the configured-state fact, matching the intended distinction for an observational probe. (src/flows/channel-setup.status.ts:375, d1e06d124ff4)
  • Sensitive-error handling: The new note passes errors through the existing redacting formatter and terminal-text sanitizer before display. (src/infra/errors.ts:57, d1e06d124ff4)
  • Follow-up provenance: The current head is the follow-up commit that limits recovery to configure results after the earlier broad recovery attempt; it is not in a release tag because it remains an open PR branch. (src/flows/channel-setup.ts:462, d1e06d124ff4)

Likely related people:

  • steipete: Current-main blame attributes the surrounding result-application code to this contributor, who also authored the nearby status-failure isolation work and both commits in this PR. (role: recent area contributor; confidence: high; commits: eb13f5719f02, 6540e5ac79c4; files: src/flows/channel-setup.ts, src/flows/channel-setup.status.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 (1 earlier review cycle)
  • reviewed 2026-08-16T03:37:42.638Z sha 1b3cc9b :: needs maintainer review before merge. :: none

@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 16, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready update for head d1e06d124ff435d47f65caa202a9ac484a1b1a8c.

ClawSweeper's scope move was applied, not waived: fail-soft recovery moved from shared refreshStatus to applySetupResult. Only a status read after successful configuration is now non-fatal; install, enable, deletion, disable, configure failure, and cancellation paths remain strict.

Final proof:

  • 94/94 focused channel setup/add/configure/built-CLI tests passed on Blacksmith Testbox (tbx_01m04am47v1vz4akrcj3t17nwp, run 31924892579).
  • Full build passed, including built plugin control-plane loads and all Plugin SDK export checks.
  • check:changed passed with production/test types, changed-file lint/format, boundary/dead-code guards, and zero runtime value cycles.
  • Source-blind built CLI proof covered success, post-configure status failure with persisted state/redaction/exact retry, fresh-process retry, configure failure, and Ctrl-C cancellation.
  • Fresh structured autoreview completed cleanly with no accepted/actionable findings.
  • Exact-head CI run 31924853350 is green.
  • Native review artifacts validate READY FOR /prepare-pr with zero findings.
  • Production: +16/-1 (net +15). Tests: +55/-0. No changelog entry per normal PR policy.

Known proof gaps: none. Invalid/empty --channel wizard behavior remains explicitly out of scope.

@steipete
steipete merged commit a54caf0 into main Aug 16, 2026
187 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the fix/autoqa-refill-channel-setup-outcomes-v2 branch August 16, 2026 04:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 16, 2026
…enclaw#124383)

* fix(setup): preserve channel config on status failure

* fix(setup): limit status recovery to configure results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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.

1 participant