Repository navigation
fix(test): await approval readiness and request cleanup - #155111
Conversation
Preserve the prepared-worker and publication flow while owning request continuations through fixture teardown. Co-authored-by: Peter Steinberger <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper re-review Current head: |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review The current head is 02ccd20. The final review covers canonical database-worker routing, a complete eligible-client context, and case-order-preserving test support extraction. Exact-head focused proof and normal CI are pending; the PR body records the prior failed surfaces. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs changes before merge. Reviewed September 21, 2026, 3:46 PM ET / 19:46 UTC. ClawSweeper reviewWhat this changesUpdates Gateway approval tests to await publication or acceptance and finish request cleanup before closing their SQLite fixtures. Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this remains a useful fixture-lifetime repair beyond current main. No blocking patch defect was found; the maintainer-authored work remains protected from cleanup. Priority: P2 Review scores
Verification
How this fits togetherGateway approval tests exercise request registration, reviewer delivery, and approval decisions against temporary SQLite state. Their shared fixture controls when requests finish and when that state can safely close. flowchart TD
A[Test request] --> B[SQLite approval registration]
B --> C[Publication or acceptance]
C --> D[Approval assertions and decision]
D --> E[Drain manager and join requests]
E --> F[Close database and remove fixture]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +765. Total +765 across 14 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep approval readiness and teardown in the shared fixture owner while preserving the existing policy, identity, and delivery assertions. Do we have a high-confidence way to reproduce the issue? Yes, at source level: main can close the fixture after manager drain while an outer request continuation remains active. The added held-continuation case targets that ordering; this read-only review did not execute it. Is this the best way to solve the issue? Yes. Extending the existing fixture and awaiting actual publication or acceptance addresses the owner boundary without lengthening polling deadlines or changing approval policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8c56f7239e98. LabelsLabel 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
|
|
Merged via squash.
|
* commit '3d4033fbe0aca10c9eec45a7c088540607181d79': (42 commits) fix(windows): prevent update readiness failures on fractional timeouts (#155051) fix(test): await approval readiness and request cleanup (#155111) test(update): preserve published plugin archives in survivor fixtures (#155093) fix(ci): recover security review from inconsistent file lists (#155129) fix(crabbox): skip unused startup and preserve provisioning waits (#154321) fix(qa-lab): refresh Control UI links on URL updates (#152397) fix(maintainer): recover locally refused auto-merge requests (#154988) test(ui): advance debug tray polling with the browser clock (#155091) fix(snapshot): preserve concurrently recovered backups (#155075) fix(anthropic): preserve context-window-limited responses (#155029) fix(ui): stop redundant actions crowding mobile session titles (#154493) test(gateway): compare large buffers with native assertions (#154351) chore(ci): resync pull request head after the Actions incident fix: join local provider child cleanup before releasing ownership fix(test): isolate MXC host environment fixtures fix(test): prevent Windows worker pipe inheritance test(update): use supported reasoning in live survivor probe (#155085) fix(firecrawl): omit impossible publication dates from search results (#155032) fix(sessions): order WAL recovery and join probe release fix(logs): retain severity and subsystem from JSON console records (#153890) ...
Use the newly landed request-tracking and publication fixtures from openclaw#155111 without parallel local helpers. Preserve the independently verified two-line identity deadline preparation fix and all runtime history semantics, authorization assertions, and deadlines. Co-authored-by: VACInc <[email protected]>
Bring in main through 267bb9d, including ff26aae (openclaw#155111), which replaces early approval fixture observations with the actual readiness and cleanup boundaries implicated in the failed CI shard. Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]>
Merge main at 5390275 to include ff26aae (#155111). The Cmd+K delta is patch-identical; 396 focused UI and approval tests pass on the integrated tree. No duplicate approval-test repair is added to this PR. Co-authored-by: vyctorbrzezowski <[email protected]>
) * fix(test): await approval readiness and request cleanup Preserve the prepared-worker and publication flow while owning request continuations through fixture teardown. Co-authored-by: Peter Steinberger <[email protected]> * fix(test): preserve async delivery mock types * fix(test): route approval fixtures through database workers --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes approval test failures when asynchronous SQLite registration outlives a readiness poll, and keeps the outer request owned when an assertion or test cancellation starts teardown.
User Impact
No runtime behavior changes. Gateway approval tests await their real readiness boundary and finish request cleanup before closing their database.
Why This Change Was Made
The shared fixture now owns the complete test body and tracked requests, drains the manager, joins their continuations, and then closes its database. RPC tests capture the actual first accepted response; node policy tests await the actual approval publication. The same flow covers all 19 node-helper calls, the approval RPC fixtures, and both signed-runtime suites while preserving policy, grant, reviewer, and expiry assertions.
This retains the prepared-worker/publication consolidation in dbb4025 and Peter Steinberger's request-lifetime contribution in #154977. That uneditable PR overlaps the newer mainline helper, so it cannot be landed unchanged without replacing the consolidation. This follow-up carries its remaining lifetime guarantee into the current helper and affected callers.
Product runtime delta: 0. Test/support delta: +764 net lines across 13 files, plus one test-infrastructure inventory entry, including six new cases covering held registration, both publication transports, accepted responses, injected registration failure, early completion, and delayed outer-handler cleanup. Existing test order and security assertions remain intact. Three contiguous delivery cases register from a sibling support module at their original position; the RPC helpers also move to a sibling module to meet the line-cap policy.
Evidence
490c2bc58e45ae9fbcd23250a39b16c7c78de9d3; that historical report remains exit 1. Targeted formatting andgit diff --checkpassed.490c2bc58e45ae9fbcd23250a39b16c7c78de9d3, all 11 targeted files passed typed lint, but the new regression ran in the thread project and four of six cases failed because shared SQLite requires the host broker. The remaining seven files did not run. Hosted CI also caught an incomplete typed context and growth in two over-cap files. The replacement enrolls the regression in the canonical forked database-worker project, constructs a complete context with an eligible client, and extracts support modules while preserving case order.02ccd2033ddea903c72458136b3403895965c500passed on the managed Testbox run: the previously failed core test-types stripe, typed lint for all 13 changed source/support files and the inventory file, canonical project ownership (154/154), and all eight standalone files below (352/352, no skips). All commands exited 0; 37 source/command/dependency hashes matched before and after proof. The one-shot box was disposed successfully.3034b3427a1dcf8b121b0bd8137e40f5cd102237, whose second parent is this exact head. All normal CI jobs completed: 82 succeeded and 18 were intentionally skipped; the required Actions gate passed. The separate combined CI/security publisher also recorded success at 20:02:10 UTC via run 35648426994. Final landing guards recheck the live head and required gates. The current-head ClawSweeper review found no code or security findings; its sole proof-publication move is satisfied by these results. Native landing gates remain pending. No product build is required for this test/test-infrastructure change.Each row is a separate
pnpm test <file> --maxWorkers=1command on the same freshly installed remote workspace. Monotonic wall time wraps the complete command, including startup, worker generation and teardown, and excludes lease allocation and installation. Later files may reuse caches; these are observed costs, not a comparative benchmark. Printed case sums exclude startup/teardown and are not file or command wall times.src/gateway/approval-fixture.test.tssrc/gateway/node-invoke-plugin-policy.private-transport.test.tssrc/gateway/server-methods/server-methods.test.tssrc/gateway/node-invoke-plugin-policy.test.tssrc/gateway/operator-approval-placement-grants.test.tssrc/gateway/worker-environments/computer-transport.test.tssrc/gateway/server-methods/exec-approval.agent-runtime.test.tssrc/gateway/server-methods/plugin-approval.agent-runtime.test.tsCodex contract reviewed at
414782450952a196bbb64b1605a458c2531c47b6:codex-rs/core/src/mcp_tool_call.rs:1204(awaited approval decision) and:1914(decision normalization). No Codex or approval-policy implementation changes.