Repository navigation
fix: preserve isolated capability in clawctl error responses - #164
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 7, 2026, 9:41 PM ET / October 8, 2026, 01:41 UTC (Revision 9). ClawSweeper reviewWhat this changesThe branch preserves isolated-session capability metadata in clawctl operational error JSON and strengthens managed and NativeAOT regression coverage. Example: Companion probes status while another process holds the session lifecycle lock
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 2 items remain This PR remains useful: current main omits capability metadata from operational exceptions, and real before/after evidence demonstrates the bounded repair. No actionable patch defect was found; the expressly reserved maintainer proof-sufficiency choice remains unresolved. Priority: P2 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Windows package’s clawctl command reports package capabilities and manages the isolated session used by OpenClaw. Companion consumes its JSON responses to detect support before invoking explicit setup and checking readiness. flowchart TD
A[Companion onboarding] --> B[Package-qualified status probe]
B --> C[Session lifecycle operation]
C --> D[Operational exception]
D --> E[JSON error with package capability]
E --> F[Existing explicit setup]
F --> G[Success and readiness checks]
G --> H[Continue onboarding]
Technical reviewBest possible solution: Keep capability reporting consistent at the existing error producer, preserve readiness and credential checks, and investigate the original Store incident separately. Do we have a high-confidence way to reproduce the issue? Yes for the bounded producer defect: current-main source omits integration in operational failures, and the inspected real package transcript demonstrates the contention trigger. The original Store incident’s root cause remains unconfirmed. Is this the best way to solve the issue? Yes for the operational-error case: repairing the existing JSON producer preserves the established capability contract without adding provisioning logic or weakening readiness checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bb3c7d1d4c85. Provenance checked
TestingProof path: shipped entry point. Added test files: 2. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (8 earlier review cycles)
|
|
Addressed the review's owner decision. The maintainer explicitly accepted: "Accept bounded reproduction; keep original incident open." The accepted scope is the demonstrated operational-error contract defect: exact-base real lifecycle contention produces the reported unsupported-contract wizard error; the unchanged current PR head retains capability metadata and completes automatic onboarding under the same condition. This does not establish the original Spark incident's trigger or claim complete resolution of #1672. The issue remains open and Related, not Fixes. Updated the PR body to record that decision. The reviewed head remains @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Problem and outcome
Related: openclaw/openclaw-windows-node#1672
clawctl status --jsonnormally advertisesintegration.kind = isolated-session, version 1. Its operational exception boundary emits an error document without that package capability. Companion checks this capability before invoking package setup, so an exception can be misclassified as an unsupported package and prevent the existing automatic setup step.Retain the same immutable capability in operational error responses. Preserve
ok: false, the original error, command identity and nonzero exit code. Do not invent session readiness, listener ownership or credentials. Explicit package setup and all Companion success/credential checks remain unchanged.Maintainer reproduction gate accepted (2026-10-07). The maintainer explicitly decided: "Accept bounded reproduction; keep original incident open." The controlled real lifecycle-contention comparison satisfies the reproduction gate for this bounded producer-contract repair. This is not a confirmed root cause or complete fix of the original Store incident. Its failing JSON was not retained, and a clean same-version retest passed. The exact reported wizard error was reproduced on the exact base; the PR candidate completed automatic onboarding under the same condition. Original incident cause and spontaneous retained-state reproduction remain unknown. Issue #1672 remains open and Related, not Fixes. No merge is authorized.
Ownership and risk
Old and new owner:
ClawCtlJson.WriteFailure, the package-owned operational error envelope. No consumer workaround, new provisioning path, protocol version bump, package pin, or credential handoff change. Capability is not readiness or authorization.Required proof pools
None from the Windows-node inventory: this PR changes packaging's JSON producer only. Relevant packaging lanes: quality, Release tests, NativeAOT CLI, and installed native Companion onboarding in an isolated Windows environment.
Validation
Head:
c7d42f7.ProgramStartupTests.JsonOperationalFailurePreservesTheSelectedCommandAndIntegrationcases failed for missing integration metadata.dotnet test tests/OpenClaw.Launcher.Tests/OpenClaw.Launcher.Tests.csproj --configuration Release -p:EnableWindowsTargeting=true --no-restore --filter "FullyQualifiedName~JsonOperationalFailurePreservesTheSelectedCommandAndIntegration|FullyQualifiedName~ClawCtlReadinessOutputTests" --verbosity quiet.EnableWindowsTargeting=true pwsh -NoProfile -File scripts/Test-DotNetQuality.ps1passed, zero build warnings/errors, whitespace and style verification passed.pwsh -NoProfile -File scripts/Test-DocReferences.ps1: zero findings.git diff --check: passed.StartupWritesRecordsToTheSuppliedDiagnosticLog,UnavailableDiagnosticsWarnsOnceAndStillRunsTheCommand). Windows validation remains required; these are not reported as green or proven unrelated.scripts/Test-NativeAotCli.Tests.ps1: 29 native scenarios passed. Host validation job. The native JSON failure scenario now checks both setup and status errors retain capability and do not fabricate readiness/credentials. Both unsigned x64 and ARM64 package build jobs passed, and all required CI checks are green.azure, targetwindows, modenormal: HTTP 429cost_limit_exceeded, fleet active lease limit 21/20. No lease ID or run URL allocated; no remote test executed.Real behavior proof
The strengthened regression drives the real
Program.RunAsyncexception boundary with fixture-owned diagnostics. It proves the error producer preserves the integration contract without reporting success. This is not installed-package or visible wizard proof.Parallels platform and clean Store baseline proof: Only the disposable clone
Windows 11 issue1672 proofwas used. The original VM remains stopped and untouched.26200.9457; actual pinned MXC SDK 0.8.0 probe returnedisolationSessionAvailable=false.26340.9616, version 26H2; the same SDK's actual signed-in-userwxc-exec.exe --probereturned exit 0,isolationSessionAvailable=true.2026.9.803.0installed and launched through normal package activation with a fresh default profile. Store Gateway2026.9.800.0was installed by its wizard. Both packages:SignatureKind=Store,Status=Ok.clawctl setupwas run.clawctl status --json: exit 0,ok=true, integrationisolated-sessionversion 1, sessionrunning, aniso:sandbox ID, Node24.21.0, Gatewayrunning.beacce88d7864972df9e5fa9f453d06626d833f5; payload OpenClaw2026.9.8, commitfc23bc864e4553c2d215e479eeec47b67a0bf943.This proves real MXC session setup and native Gateway execution in Parallels. It is an unpatched current-Store baseline, not proof of PR #164. The original issue used Companion
2026.9.520.0, Gateway2026.9.701.0, Windows Enterprise28120.3151, and retained Gateway/session state. The clean current-version run did not reproduce that failure.Activation correction: The clone was unactivated when Insider
26340.9616was offered, downloaded and installed. The earlier activation-blocker diagnosis was wrong for this clone. Enrollment used the maintainer's Insider account and Windows' supported UI. No fake enrollment, safeguard bypass, key change, purchase, or new account was used.Current-head real lifecycle-contention comparison
Tested on the same Insider ARM64 clone with the same released Dev Companion
2026.9.803.4092, fresh separate tray profiles, actual pinned MXC SDK0.8.0, Node24.21.0, and OpenClaw payload commitfc23bc864e4553c2d215e479eeec47b67a0bf943.Used actual CI NativeAOT binaries and the repository's canonical local-package layout helper to register separate Developer Mode identities. No fake backend, patched SDK, manual
clawctl setup, Store package reset, or readiness/credential injection was used.bb3c7d1d4c8541649d9bd8e61cf1dbb0400ebfff0.1.836.1, SHA-256ebc5b0b35a7430964a80a733f0b4f2438d4b6cba32184f1578bbe88c02a6e261OpenClawFoundation.OpenClawGateway-issuebefore_rfcbke2p71se2ad32d0092fa445903ff7990b53ee573b23ff446b0.1.837.1, SHA-25628707acd36916f3468929979850c36e0d22f1adf1ab5a9cecccfd1ba682e8e36OpenClawFoundation.OpenClawGateway-issueafter_rfcbke2p71se2Verified merge parents are exact base
bb3c7d1and current PR headc7d42f7; layout node scripts/images/manifest are unchanged between them.For each run, the proof controller held the real package-scoped
Global\OpenClawSessionLifecycle_...mutex before selecting Set up gateway. It observed the actual qualifiedstatus --jsonprocess, held the mutex through its 30-second timeout, then released it three seconds after the process exited. Observed status lifetimes: base 30.124 seconds, PR 29.996 seconds. Base stopped at Prepare your Gateway profile with:The PR candidate proceeded without retry or manual setup after the same timeout. Actual UIAutomation diagnostics and focused Parallels screenshots captured the base error and current-head Connect your AI state.
After onboarding proof finished, repeated the real package-qualified producer call while holding each package's actual lifecycle mutex. Both returned exit 1,
ok=false, commandstatus, schema version1, error typecli_error, and the same real timeout message. Neither fabricatedsessionorcredentials. The only capability difference was:{ "base": {"integration": null, "hasSession": false, "hasCredentials": false}, "pr": {"integration": {"kind": "isolated-session", "version": 1}, "hasSession": false, "hasCredentials": false} }Error:
another OpenClaw process is changing the session and did not finish within 30 seconds.This is a controlled real reproduction of the reported UI symptom and proof that this PR fixes that operational-error case. It does not establish that lifecycle contention caused the original Spark incident, whose original failing JSON was not retained.
Not verified: original #1672 root cause and spontaneous reproduction on its exact OS/package/retained-state combination. This is outside the accepted bounded repair; keep the original incident open and unclaimed. The maintainer accepted the installed before/after evidence as satisfying this PR's reproduction gate.