Repository navigation
test(doctor): focus outbound custody on nested maintenance - #154123
Conversation
Keep the real outer Doctor scope and inner outbound migration lock while avoiding unrelated state migration sweeps in the custody fixture. Assert specific disposal and acquisition causes alongside native writability and physical exclusion. Preserve completed and refused delivery-queue receipt coverage in the existing preparation suite. Keep every deadline unchanged.
|
🦞👀 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: needs maintainer review before merge. Reviewed September 20, 2026, 6:34 PM ET / 22:34 UTC. ClawSweeper reviewWhat this changesThe PR narrows Doctor’s outbound migration custody tests to nested maintenance, strengthens cleanup-error assertions, and preserves migration receipt coverage in the preparation suite. Merge readiness✅ Ready for maintainer review Keep open: this is a focused, useful test repair that current main has not adopted. No introduced correctness defect was found, and the maintainer-authored PR is protected from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherDoctor prepares legacy outbound messages while maintenance locks exclude competing writers. These tests check that plugin cleanup releases those locks only after resources settle and that migration receipts report success or refusal. flowchart TD
A[Legacy queued messages] --> B[Outer Doctor maintenance]
B --> C[Outbound migration lock]
C --> D[Plugin preparation and cleanup]
D --> E{Resources settled?}
E -->|Yes| F[Release physical exclusion]
E -->|No| G[Retain physical exclusion]
D --> H[Migration receipt]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +56. Total +56 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep physical-exclusion coverage at the nested maintenance boundary and receipt coverage at the migration orchestrator without increasing deadlines. Do we have a high-confidence way to reproduce the issue? No high-confidence reproduction of the original CI timeout was established in this read-only review; source confirms the repeated full-sweep workload, and the body reports successful validation after narrowing it. Is this the best way to solve the issue? Yes: exercising the existing outbound owner directly preserves nested lock and cleanup behavior, while the preparation suite retains orchestrator receipt coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0a9d65e3b7b6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Keep default loopback routing direct after canary readiness and assert that external requests still reach the proxy. Attribute readiness failures to the proxy only in explicit proxy mode. Keep the TUI client and proxy lifecycle in one module generation after mock resets, assert the full block-mode recovery message exactly once, and verify the inherited policy at Gateway WebSocket construction. Include the existing test-only outbound custody repair from c159663 (#154123), preserving nested maintenance, physical exclusion, native writability, failure causes, and migration receipts without longer budgets. Related: #153930
…154123) Keep the real outer Doctor scope and inner outbound migration lock while avoiding unrelated state migration sweeps in the custody fixture. Assert specific disposal and acquisition causes alongside native writability and physical exclusion. Preserve completed and refused delivery-queue receipt coverage in the existing preparation suite. Keep every deadline unchanged.
* fix(proxy): keep native runtime loopback requests direct In 9.4, 8169aac added the native Codex loopback inference relay while managed proxy routing still cleared NO_PROXY. Use Proxyline's shared bypass policy and supply loopback exclusions to native children. Explicit proxy/block modes remain unchanged. Doctor reports failed loopback probes with recovery commands. Fixes #153930. Reported by @eefreenyc. * fix(proxy): align loopback diagnostics and client regression coverage Keep default loopback routing direct after canary readiness and assert that external requests still reach the proxy. Attribute readiness failures to the proxy only in explicit proxy mode. Keep the TUI client and proxy lifecycle in one module generation after mock resets, assert the full block-mode recovery message exactly once, and verify the inherited policy at Gateway WebSocket construction. Include the existing test-only outbound custody repair from c159663 (#154123), preserving nested maintenance, physical exclusion, native writability, failure causes, and migration receipts without longer budgets. Related: #153930 * test(proxy): remove userinfo from Doctor fixture
…4013) * fix(proxy): keep native runtime loopback requests direct In 9.4, d6bd911 added the native Codex loopback inference relay while managed proxy routing still cleared NO_PROXY. Use Proxyline's shared bypass policy and supply loopback exclusions to native children. Explicit proxy/block modes remain unchanged. Doctor reports failed loopback probes with recovery commands. Fixes openclaw#153930. Reported by @eefreenyc. * fix(proxy): align loopback diagnostics and client regression coverage Keep default loopback routing direct after canary readiness and assert that external requests still reach the proxy. Attribute readiness failures to the proxy only in explicit proxy mode. Keep the TUI client and proxy lifecycle in one module generation after mock resets, assert the full block-mode recovery message exactly once, and verify the inherited policy at Gateway WebSocket construction. Include the existing test-only outbound custody repair from f5b7014 (openclaw#154123), preserving nested maintenance, physical exclusion, native writability, failure causes, and migration receipts without longer budgets. Related: openclaw#153930 * test(proxy): remove userinfo from Doctor fixture
What Problem This Solves
The Doctor custody fixture ran the entire migration sweep for each of four plugin cleanup cases inside one 90-second setup budget. That setup timed out in CI.
User Impact
Maintainers can check outbound migration custody without running unrelated migration sweeps. Production behavior and every deadline remain unchanged.
Why This Change Was Made
The test now keeps real outer Doctor maintenance and its final release, but runs the existing outbound migration directly inside that scope. The inner migration still owns its real lock, plugin inspection, and resource cleanup.
All four cases continue to open real SQLite resources and test a fresh competing connection after outer release. The assertions now identify the exact callback and retained errors, and the failed acquisition's plugin ID and message. The existing outbound preparation suite separately checks completed delivery receipts and a refused receipt after a registered resource disposer fails. Runtime code and all deadlines remain unchanged.
The custody test uses one isolated child for all four cases because retained inspection resources have no retryable release handle; process exit must release their remaining OS custody before temporary state is removed. This real boundary is necessary to detect lost physical exclusion.
Evidence
Twenty consecutive one-worker standalone runs passed (wall 14.03–43.70 seconds, median 24.63 seconds under concurrent host load). The corrected six-case preparation file passed in 41.18 seconds wall, with the added refusal case taking 0.95 seconds; its five-case baseline took 52.02 seconds wall. These wall measurements include transform/setup costs and are not a controlled speed comparison. All 35 selected lock and inspection sibling cases pass, and independent review through P2 is clean.
The original failed CI log is retained. Diagnostic traces located substantial work in imports and unrelated migration sweeps rather than native release; they do not identify the exact hosted stack at the 90-second deadline. Three Linux runs of the original 745-file selection passed through the maintained routes: each unit-fast run passed 9,484 cases, and the one file moved to another project by current main passed all four current cases three times. The complete selected static gate also passes. The Testbox environment run identifies the isolated environment; retained command receipts record both commands exiting successfully and completed lease cleanup.
Exact-head CI and normal native landing checks remain required.