Repository navigation
fix(test): stabilize native Gateway startup cancellation - #1606
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 2, 2026, 9:28 AM ET / 13:28 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR gives two native Gateway startup cancellation tests a 10-second startup deadline while preserving the dedicated 300 ms timeout regression. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful, focused test repair that current main does not contain. No introduced correctness defect was found, and the member-authored PR is protected from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherCompanion's native Gateway runtime starts and stops an owned Gateway process. These tests use a fake process host to verify cancellation, process cleanup, and restart rejection. flowchart TD
A[Test requests startup] --> B[Native Gateway runtime]
B --> C[Fake process host]
C --> D[Listener remains unavailable]
D --> E[Stop or dispose request]
E --> B
B --> F[Cancellation and cleanup assertions]
Before merge
Agent review detailsSecurityNone. Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep cancellation tests independent of the short timeout regression, preserving all cleanup assertions and completing the repository's Windows validation subset. Do we have a high-confidence way to reproduce the issue? No deterministic reproduction was established during this review. Source shows how scheduler delay beyond 300 ms can let timeout precede the test's stop or dispose request. Is this the best way to solve the issue? Yes. Separate cancellation-test deadlines preserve the existing assertions without weakening the dedicated timeout regression or changing production defaults. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d34c6cca13b4. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Includes the canonical fix from openclaw#1606 for the failed startup-disposal test. The Gateway-aligned alpha feature remains unchanged relative to main.
Summary
The failure in #1605 (fix(local-ai): make llama runtime validation deterministic) was a test race. The fake host signaled that startup had begun, but the test continuation could be delayed beyond the shared 300 ms startup timeout. The runtime then correctly reported
TimeoutExceptionbefore the test calledDisposeAsync.Required proof pools
Validation
Current head
74be31f2:git diff --check: passeddotnet test tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj --no-restore --filter "FullyQualifiedName~NativeGatewayRuntimeTests": 56 passed, 0 failed.agents/skills/autoreview/scripts/autoreview --mode local): clean, no accepted/actionable findingsBuild and Test / Core and CLI tests: passed in 9m35s on Windows, including the full Connection suiteBuild and Test / CI Gate (targeted): passedThe repository's full local Windows closeout remains unavailable on this macOS host: it cannot execute
build.ps1or the Windows API portions of Shared and Tray tests, and targeted CI did not select the unchanged Tray lane. Two Azure Crabbox native-Windows provisioning attempts also failed before a run URL was created:azure, leasecbx_6296db2e5b5a, commandcrabbox warmup --provider azure --target windows --windows-mode normal --keep --idle-timeout 90m --ttl 240m --timing-json: blocked by low-priority quota and eastus capacityazure, leasecbx_d6dda4b87712, commandcrabbox warmup --provider azure --target windows --windows-mode normal --class standard --keep --idle-timeout 90m --ttl 240m --timing-json: blocked by eastus capacityRun URLs are unavailable because neither lease reached ready state.
Real behavior proof
The current-head full
NativeGatewayRuntimeTestsclass passes 56/56. The two affected cancellation tests also passed 30 repeated process-level runs while the dedicated 300 ms timeout regression remained unchanged.UI, MCP, and gateway invocation proof are not applicable because this PR changes only test timing. Rubber-duck review was skipped for the same reason.