Repository navigation
perf(test): admit isolated Gateway readers to the existing worker pool - #146550
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: needs maintainer review before merge. Reviewed September 13, 2026, 1:48 AM ET / 05:48 UTC (Revision 5). ClawSweeper reviewWhat this changesAllows eleven additional isolated Gateway browser fixtures to share the existing test worker pool and adds safe failure-state summaries to CI logs. Merge readiness✅ Ready for maintainer review This remains a useful, supported optimization absent from current main. The earlier scheduling-guard finding is resolved, and no blocking correctness or security findings remain. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s browser test runner prepares Gateway and Control UI artifacts, then schedules isolated fixtures within a shared worker limit. Its diagnostic helper captures failed browser waits for CI troubleshooting. flowchart TD
A[Prepared Gateway and UI artifacts] --> B[Readiness and generation checks]
B --> C[Fixture allowlist]
C --> D[Serial fixtures]
C --> E[Shared two-worker pool]
D --> F[Browser assertions]
E --> F
F --> G[Results and safe failure diagnostics]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +258, Docs 0. Total +258 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the single audited scheduling allowlist and shared diagnostic owner, preserving isolated fixture state, complete coverage, and the existing worker budget. Do we have a high-confidence way to reproduce the issue? Not applicable as a product bug reproduction: this is test infrastructure optimization, supported by a controlled real-Gateway scheduling comparison and focused diagnostic checks. Is this the best way to solve the issue? Yes. Extending the existing audited allowlist and failure-capture helper preserves ownership and avoids new workers, duplicate schedulers, or runtime configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c23e1b27abd8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
a7b6cbd to
e4722f4
Compare
a625386 to
f976fcb
Compare
f976fcb to
05bc18d
Compare
|
I’m taking responsibility for following this canonical scheduling prerequisite through review, required checks and landing for #145043. I will preserve the existing branch and contributor attribution, not create a competing scheduler. Current head: Next: finish the exact-head review/check reconciliation, resolve any actionable findings through the supported maintainer path, and verify the merge SHA before bringing the relevant canonical behavior into #145043. I will recheck the branch head and active-writer state before any source change. If you have unpushed edits or another live branch writer, please identify that boundary here. |
|
Merged via squash.
|
Integrate the scoped changes from canonical #146550 and #146664 and only the MCP cache assertion from #146667. Preserve the reviewed admitted preview lifetime changes and document shared output reuse. Co-authored-by: Peter Steinberger <[email protected]>
openclaw#146550) * perf(test): admit isolated Gateway readers to the existing worker pool * test: align Gateway scheduling and sandbox cache expectations * test(ui): retain safe Gateway failure state in CI logs
) * fix(update): prevent stale Codex migrations from blocking upgrades * test(update): preserve historical child validation coverage * test(update): narrow the readiness fixture to supported lanes * fix(doctor): migrate retained state before retiring plugin locators * test(update): align finalization fixtures with migration completion * fix(doctor): preserve safe repairs before plugin convergence * fix(ui): repair picker cursor and static check regressions * test(ui): align picker and account flows with current contracts * test: bind post-plugin Doctor fixtures and retain Windows cleanup ownership * fix(tooling): settle Windows npm shim descendants before cleanup * test: await lazy Inbox panel and provision desktop SSH runtime Join the panel module after opening before asserting top-layer ownership. Provision only an absent CI privsep runtime directory; refuse unsafe paths without normalizing them and verify the newly created directory. * fix: settle npm Windows Job resources before sandbox cleanup Join the owned root and pipe EOF within the existing cleanup budget. Preserve command deadlines, single-attempt removal and original errors. * test: split reasoning normalization from thinking suite * test: synchronize catalog assertions and expose workspace failures Wait for catalog publication before terminal assertions and distinct recovery. Wait for the model trigger to be enabled before the real browser click. Reject the retention barrier when a fixture upload fails so the original outcome assertion can surface the initiating error instead of timing out. Keep provider routing, production behavior, assertions and deadlines unchanged. * test: expose pre-upload workspace reconciliation failures * perf: trim cold Bash and catalog worker imports * test: compile source cache helper inside catalog worker fixture * fix: bound SDK report memory and isolate UI proof timing Deduplicate shared declaration sections without retaining all repeated keys. Keep the complete evaluated SDK surface and unchanged child memory limit. Await host and nested sandbox layout within one existing polling deadline. Disable unrelated startup update checks in the real-Gateway catalog fixture. * test(ui): reuse admitted prebuilt previews * test(ui): compose landed Gateway qualification fixes Integrate the scoped changes from canonical #146550 and #146664 and only the MCP cache assertion from #146667. Preserve the reviewed admitted preview lifetime changes and document shared output reuse. Co-authored-by: Peter Steinberger <[email protected]> * test: isolate admitted preview ownership and catalog build identity Keep borrowed UI output fixture-owned and match default mock Gateway build identity to the served client while retaining explicit stale-build scenarios. Capture catalog startup failure diagnostics before context teardown. Carry the exact routing fixture loader/command-recorder correction from Peter Steinberger's canonical #146810 at e62d242. No unrelated canonical changes imported. * test(ui): bind catalog refreshes to their test owner * test(ui): preserve browser failure diagnostics * fix: keep Doctor convergence effect guard synchronous Align the startup adapter with the synchronous post-core convergence and plugin lifecycle lease refusal contract. Both production callers already use synchronous guards. This annotation-only correction resolves the current pull-request CI no-misused-promises failure without runtime changes. * fix: complete shared schema under current Doctor authority Use the existing checkpoint-required shared-schema migration step only for the shipped post-install IPC and compatibility handoff. Preserve maintenance authority, schema fences, publication policy and plugin/agent deferral. Cover real v16 state, old-driver publication and guarded refusals. Revalidate optional delegated executor/requester authority before maintenance effects and immediately before the synchronous shared-schema writer. Preserve original refusal identity and grantless shipped-driver support. Repair the existing refusal fixture to enter post-core maintenance and clear unused one-shot contribution mocks between cases. Accept only the typed post-install Doctor advisory in the survivor success assertion; preserve failed-core-step and plugin-convergence refusals. * test: call synchronous convergence guard directly Remove the obsolete await from the private-root containment fixture. The guard is synchronous; production code and refusal assertions remain unchanged. Retain CI34799045580 core1 failure as the red evidence. * test: respect cloud row clocks and plugin admission retries Give each cloud reconciliation fixture transition a current timestamp. Honor only the explicit retryable plugin-admission busy response, with a 30-second bound and retained observations. Keep all lifecycle and channel identity assertions; change no runtime code or CI timeout policy. * fix(doctor): preserve planned references through early repair Unpublished source successor for #145043. Retains original contributor ancestry, all 38 withdrawals, and the prior pending composition. Contextual supplier 7f5a90b source provenance is retained in the companion recovery record. Three exact owner contracts still block whole-composition qualification. * fix(config): retain acquisition environment through Doctor writes Narrowly integrate published supplier 3b2140f with its exact authored-value and paired-write regressions. Preserve the retained Doctor APIs and current-main composition. Source review is scoped clean; native, exact-head CI and installed acceptance remain separate. * test(doctor): distinguish deferred and post-core load diagnostics Preserve no-execution and structured-advisory behavior for shipped-parent deferral while covering actual post-core plugin failures. Main diagnostics remain intact for standalone and writable-parent lint calls. * fix(doctor): complete state migration after install-record repair Use the validated post-convergence repair config for core state migrations while retaining source locators for plugin migrations. This prevents startup from repairing retired install records and then refusing unfinished workspace state. Cover the real startup child, archived bytes, and SQLite setup state. * test(update): match current deferred plugin warnings * test(doctor): distinguish readers from staging workers Observe real child requests so the fixture requires one reusable reader while separately checking balanced staging lifetimes and clean native closure for every child. --------- Co-authored-by: Peter Steinberger <[email protected]>
…claw#145043) * fix(update): prevent stale Codex migrations from blocking upgrades * test(update): preserve historical child validation coverage * test(update): narrow the readiness fixture to supported lanes * fix(doctor): migrate retained state before retiring plugin locators * test(update): align finalization fixtures with migration completion * fix(doctor): preserve safe repairs before plugin convergence * fix(ui): repair picker cursor and static check regressions * test(ui): align picker and account flows with current contracts * test: bind post-plugin Doctor fixtures and retain Windows cleanup ownership * fix(tooling): settle Windows npm shim descendants before cleanup * test: await lazy Inbox panel and provision desktop SSH runtime Join the panel module after opening before asserting top-layer ownership. Provision only an absent CI privsep runtime directory; refuse unsafe paths without normalizing them and verify the newly created directory. * fix: settle npm Windows Job resources before sandbox cleanup Join the owned root and pipe EOF within the existing cleanup budget. Preserve command deadlines, single-attempt removal and original errors. * test: split reasoning normalization from thinking suite * test: synchronize catalog assertions and expose workspace failures Wait for catalog publication before terminal assertions and distinct recovery. Wait for the model trigger to be enabled before the real browser click. Reject the retention barrier when a fixture upload fails so the original outcome assertion can surface the initiating error instead of timing out. Keep provider routing, production behavior, assertions and deadlines unchanged. * test: expose pre-upload workspace reconciliation failures * perf: trim cold Bash and catalog worker imports * test: compile source cache helper inside catalog worker fixture * fix: bound SDK report memory and isolate UI proof timing Deduplicate shared declaration sections without retaining all repeated keys. Keep the complete evaluated SDK surface and unchanged child memory limit. Await host and nested sandbox layout within one existing polling deadline. Disable unrelated startup update checks in the real-Gateway catalog fixture. * test(ui): reuse admitted prebuilt previews * test(ui): compose landed Gateway qualification fixes Integrate the scoped changes from canonical openclaw#146550 and openclaw#146664 and only the MCP cache assertion from openclaw#146667. Preserve the reviewed admitted preview lifetime changes and document shared output reuse. Co-authored-by: Peter Steinberger <[email protected]> * test: isolate admitted preview ownership and catalog build identity Keep borrowed UI output fixture-owned and match default mock Gateway build identity to the served client while retaining explicit stale-build scenarios. Capture catalog startup failure diagnostics before context teardown. Carry the exact routing fixture loader/command-recorder correction from Peter Steinberger's canonical openclaw#146810 at e62d242. No unrelated canonical changes imported. * test(ui): bind catalog refreshes to their test owner * test(ui): preserve browser failure diagnostics * fix: keep Doctor convergence effect guard synchronous Align the startup adapter with the synchronous post-core convergence and plugin lifecycle lease refusal contract. Both production callers already use synchronous guards. This annotation-only correction resolves the current pull-request CI no-misused-promises failure without runtime changes. * fix: complete shared schema under current Doctor authority Use the existing checkpoint-required shared-schema migration step only for the shipped post-install IPC and compatibility handoff. Preserve maintenance authority, schema fences, publication policy and plugin/agent deferral. Cover real v16 state, old-driver publication and guarded refusals. Revalidate optional delegated executor/requester authority before maintenance effects and immediately before the synchronous shared-schema writer. Preserve original refusal identity and grantless shipped-driver support. Repair the existing refusal fixture to enter post-core maintenance and clear unused one-shot contribution mocks between cases. Accept only the typed post-install Doctor advisory in the survivor success assertion; preserve failed-core-step and plugin-convergence refusals. * test: call synchronous convergence guard directly Remove the obsolete await from the private-root containment fixture. The guard is synchronous; production code and refusal assertions remain unchanged. Retain CI34799045580 core1 failure as the red evidence. * test: respect cloud row clocks and plugin admission retries Give each cloud reconciliation fixture transition a current timestamp. Honor only the explicit retryable plugin-admission busy response, with a 30-second bound and retained observations. Keep all lifecycle and channel identity assertions; change no runtime code or CI timeout policy. * fix(doctor): preserve planned references through early repair Unpublished source successor for openclaw#145043. Retains original contributor ancestry, all 38 withdrawals, and the prior pending composition. Contextual supplier 7f5a90b source provenance is retained in the companion recovery record. Three exact owner contracts still block whole-composition qualification. * fix(config): retain acquisition environment through Doctor writes Narrowly integrate published supplier 3b2140f with its exact authored-value and paired-write regressions. Preserve the retained Doctor APIs and current-main composition. Source review is scoped clean; native, exact-head CI and installed acceptance remain separate. * test(doctor): distinguish deferred and post-core load diagnostics Preserve no-execution and structured-advisory behavior for shipped-parent deferral while covering actual post-core plugin failures. Main diagnostics remain intact for standalone and writable-parent lint calls. * fix(doctor): complete state migration after install-record repair Use the validated post-convergence repair config for core state migrations while retaining source locators for plugin migrations. This prevents startup from repairing retired install records and then refusing unfinished workspace state. Cover the real startup child, archived bytes, and SQLite setup state. * test(update): match current deferred plugin warnings * test(doctor): distinguish readers from staging workers Observe real child requests so the fixture requires one reusable reader while separately checking balanced staging lifetimes and clean native closure for every child. --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Eleven isolated real-Gateway fixtures still run serially despite having their own mutable state, and failed CI runs can lose the browser state needed to diagnose readiness failures.
User Impact
The complete Gateway workload uses the existing two-worker pool more efficiently, with no added jobs or shards. Failed waits emit bounded, safe status/count summaries before artifact writes; raw credentials, IDs, URLs, frames, draft contents and body text stay out of those summaries. Runtime behavior, configuration and deadlines are unchanged.
Why This Change Was Made
Admit the eleven audited fixtures through the existing allowlist and update its independent native discovery guard. Fixtures retain private HOME, state, ports and cleanup; built UI bytes are read-only and lifetime-owned by the invocation or prepared Gateway child. Four conditional fixtures remain serial. Ordinary local and frozen-target execution keep their existing paths.
The shared failure-capture owner records Gateway/document readiness and composer state, and can summarize already-recorded model/auth responses. Quota capture supplies those observations without an extra RPC. Original errors survive screenshot or storage failures.
Evidence
A controlled AWS Linux baseline/candidate/reversal ran genuine original scheduling commits
b137b10e/a7b6cbdf/b137b10e. All arms passed the same 28 files and 56 cases, with matching case multisets and two workers.Test execution improved 19.72% against the controls' mean; control spread was 0.94%. This is same-host evidence with eight usable CPUs, 33.09 GB RAM, Node 24.19.0, pnpm 12.3.4 and managed Chromium, not a Blacksmith or eight-minute CI forecast. Sampled summed RSS was 8.57/8.77/8.33 GB and includes shared pages. Available cgroup OOM counters did not increase; the root counter was unavailable. Generation/source verification, child joins and scratch cleanup passed; all 112 archived evidence members were independently verified, and both temporary machines are released. Earlier failed browser/observer setup attempts are retained separately.
The native guard protects all 29 discovered files, including desktop resize, with 24 parallel and five serial. CI proves desktop resize separately and selects the other 28. All 56 configuration/readiness owner checks and 12 real-loopback HTTP checks pass. The failure-capture owner has nine passing checks, including actual DOM extraction, missing-versus-empty model results, safe-label/status projection, non-disclosure, repeated artifact retention, screenshot/storage failures and original-error preservation. Actual recorded quota frames also passed through the real summary implementation.
Scoped gates and independent P2 reviews passed. The final seven changed files match the reviewed bytes after refresh onto main
004332fc; the equivalent MCP assertion repair is now on main through #146667 and is no longer duplicated here. Runtime LOC is unchanged; scheduling/diagnostic support is +129 and tests net +129, with documentation net unchanged.Full CI on the preceding head
f976fcb3passed in run 34737598229, attempt 2. All 28 Gateway files and 56 cases passed in 412.55 seconds on attempt 1. Twelve Node jobs initially never acquired runners and executed zero steps; the existing failed-only hosted fallback passed all twelve without code changes. Exact-head CI for the refreshed05bc18dccandidate passed on attempt 1 in run 34740944573, with all 101 jobs successful or skipped. Its full Gateway suite passed all 28 files and 56 cases in 424.03 seconds. The job also passed separate real desktop resize checks over both Node and SSH; total assigned job time was 10m14s. No test retry was needed on this head.Integration history and limits: the original retained scheduler expectations and MCP cache assertion failed before their repairs. The catalog-request synchronization repair is now on main via #146644, so its equivalent local commit was dropped. The quota-recovery runtime repair is owned by #146691 and is included through the refreshed base. A separate browser-extension target-closure failure passed one unchanged hosted retry; its cause remains an identified follow-up. A local two-case Gateway diagnostic passed the original quota/approval assertions but failed its artifact-path contract, so that overall run remains failed and is not CI or timing proof. The later full Gateway run passed all 56 cases; the local diagnostic and unchanged browser retry are not timing or root-cause proof.