Repository navigation
improve: reduce isolated Gateway CI test time - #154366
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 21, 2026, 1:55 PM ET / 17:55 UTC (Revision 12). ClawSweeper reviewWhat this changesThe branch increases isolated Gateway CI workers on sufficiently provisioned runners, preserves conservative fallbacks, keeps the session-history benchmark on Node, and updates regression coverage and documentation. Merge readiness✅ Ready for maintainer review The optimization remains useful and is not implemented on fetched main. No blocking correctness or security defect was found; the resource guards and recorded native measurements support the bounded change. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s CI planner groups tests into runner jobs and passes execution limits to the shard launcher. The launcher checks available resources before starting test processes, affecting feedback time and peak memory. flowchart TD
A[Test inventory and timing history] --> B[CI job planner]
B --> C[Packed test groups and limits]
C --> D[Shard launcher]
E[Runner resources and execution mode] --> D
D --> F{Eligible serial host?}
F -->|Yes| G[Up to eight Gateway workers]
F -->|No| H[Two-worker fallback]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +172, Docs +34, Config +1, Other +31. Total +238 across 12 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the existing planner and executor as the policy owners, with resource-qualified parallelism, conservative timing floors, and unchanged test coverage. Do we have a high-confidence way to reproduce the issue? Not applicable as a product-bug reproduction: this is CI optimization, supported by source inspection and recorded controlled runtime measurements; no execution was performed in this review. Is this the best way to solve the issue? Yes: extending the existing group limits and executor admission is a narrow solution that preserves inventory, neighboring worker policies, and conservative estimates. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6d65c8b7f229. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
5e5a352 to
0ea879a
Compare
94ed74b to
3cdd292
Compare
0d13246 to
ca11faf
Compare
5b9b499 to
276d696
Compare
Admit up to eight workers for the Gateway isolated/database-worker cohort only on roomy serial self-hosted jobs, with a 28 GiB memory floor and the existing two-worker fallback. Preserve sibling caps, timing history, coverage and matrix budgets.
Use the upstream synthetic Gateway fixture for recipient and worker-cap assertions after rebase. Keep the fixture isolated from the changing project inventory and preserve every placement and execution-policy assertion.
Keep the upstream settled serial row, prediction, inventory, and neighboring packing assertions while checking the measured Gateway and unmeasured sibling worker limits at their group owner.
Retain the observed-failing Node process and SQLite lifecycle benchmark in the existing Node-required runtime partition. Preserve the complete test, profiles, assertions, and deadline, with routing coverage for bun-compatible and dual policies.
276d696 to
e8a1475
Compare
* commit '8a26ae487b5fb9b72ea2c12bf384e9c776659429': (154 commits) fix(ui): preserve skill group expansion when filtering (#150911) test(gateway): consolidate server history and lifecycle fixtures (#155063) test(codex): select HTTP fallback in native finalizer fixtures (#155008) improve: reduce isolated Gateway CI test time (#154366) test(gateway): await approval registration acknowledgments fix(workboard): explain blocked-card claim recovery (#154990) perf(agents): consolidate exec target policy tests (#155060) perf(config): consolidate environment test fixtures (#155062) fix(ui): keep the chat rail anchored through composer resize fix: recovery tests wait for committed outcomes (#154995) fix(codex): keep inference bursts from failing turns (#154945) fix(memory): keep generated REM reflections out of promotion rankings (#154994) fix(sqlite): reclaim scratch files when storage is full (#154937) test(cli): spawn the compiled Doctor entry in the output process test (#155055) fix(update): distinguish config validation execution failures (#154892) test(doctor): await session cleanup before deleting fixture state fix(update): report unavailable service inspection accurately (#154896) test(gateway): observe plugin approval response completion perf(msteams): reduce file-consent test scaffolding (#155050) fix(ui): retain saved permissions during delayed startup reads (#154982) ...
|
Merged via squash.
|
* ci: use measured Gateway test worker limits Admit up to eight workers for the Gateway isolated/database-worker cohort only on roomy serial self-hosted jobs, with a 28 GiB memory floor and the existing two-worker fallback. Preserve sibling caps, timing history, coverage and matrix budgets. * test(ci): preserve measured Gateway placement expectations * test: identify compiler lifetimes across PID reuse * test(ci): respect proof tiers in Gateway policy coverage * test(ci): retain synthetic Gateway placement ownership Use the upstream synthetic Gateway fixture for recipient and worker-cap assertions after rebase. Keep the fixture isolated from the changing project inventory and preserve every placement and execution-policy assertion. * test(ci): preserve Gateway caps through dense packing Keep the upstream settled serial row, prediction, inventory, and neighboring packing assertions while checking the measured Gateway and unmeasured sibling worker limits at their group owner. * ci: keep session history benchmark on Node Retain the observed-failing Node process and SQLite lifecycle benchmark in the existing Node-required runtime partition. Preserve the complete test, profiles, assertions, and deadline, with routing coverage for bun-compatible and dual policies. Co-authored-by: Peter Steinberger <[email protected]>
Related: #154108
What Problem This Solves
The isolated Gateway CI cohort inherited a two-worker ceiling even on runners with eight available CPUs, leaving the recurring slow job underutilized.
User Impact
No product behavior changes. Eligible CI jobs can finish this cohort sooner, at the cost of higher peak memory and slightly more aggregate CPU. Smaller runners retain the two-worker fallback. Current hosted CI has exercised that fallback; the historical benchmark below is not a whole-pipeline saving claim.
Why This Change Was Made
Give only the measured Gateway isolated/database cohort eight workers when its job runs serially on a current-target self-hosted allocation with at least eight available CPUs and 28 GiB RAM. Enforce that resource floor in the existing executor. Hosted, frozen, overlapping, and smaller allocations retain two workers; ordinary Gateway server tests and other cohorts keep their existing policies.
Preserve every selected file, runtime partition, runner class, matrix cap, packing budget and conservative timing floor. Main's latest packing integration retains its 500-second parallel budget, 360-second settled serial Gateway row, and ordinary singleton two-worker ceiling. Group-level assertions now require the measured Gateway cohort's eight-worker cap and the neighboring groups' two-worker caps. The Gateway cohort remains on Node under every runtime policy.
The upstream compiler fixture repair uses PID plus process start time because Windows can reuse a joined child's PID; this PR retains its same-process negative control. The session-history benchmark stays in the existing Node-required partition after its Bun-parent invocation timed out. No benchmark profiles, assertions, deadlines or coverage are reduced. The precise Bun timeout cause remains unproved; this is conservative runtime admission under the existing policy for observed Bun failures.
Evidence
Candidate
e8a147530aafe41ef04bbdef4cf88abad37f4cb0builds on main11e376cd584f4f37fc0ea75131cc071b1951b62b. The final rebase is patch-identical and includes the two main-owned CI repairs described below. The necessary conflict resolution preserves main's measured full-CLI worker policy, tooling worker estimates and auto-reply timing identities alongside the isolated Gateway policy. A second necessary integration adopts main's stronger compiler-lifetime implementation fromb541b50c6686unchanged; only the existing same-process negative control is retained using main's field name. The other six commits are patch-identical across that integration. Independent P2 reviews of the worker change and subsequent substantive repairs are clean. Final exact-head CI remains the landing gate.bb3a9b0f40e1passed in 68.72 seconds and matched that main planner for inventory, placement, predicted cost and all non-target workers; GitHub plans were byte-identical. Push/PR Node rows: Blacksmith 46/108, hybrid 41/105, GitHub 51/112, within existing caps. At that source, main/PR isolated inventories retained 160/159 files using the canonical lifecycle-proof filter.39b3aa10677c, eight CPUs and 30.95 GiB: fixed 2/8/8/2-worker runs passed the same 114 files. Wall times were 481.535 / 225.123 / 225.151 / 474.459 seconds: midpoint 478.0 to 225.1 seconds (-52.9%). Eight-worker peak aggregate RSS was 20.70 GiB and midpoint CPU cost rose 8.1%. Benchmark run.34962e6bd20e: all 130 selected files accounted for, 129 passed and one platform skip; 2,787 tests passed and two existing skips. Actual eight-worker execution took 347.766 seconds, peaked at 20.36 GiB aggregate RSS, and left no surviving descendants or OOM kills. Native proof. Later mainline application changes mean these are source-bound results, not renewed current-source performance claims.processStartTime/isMainThreadimplementation inb541b50c6686; this branch adopts it unchanged and retains the same-process control. All three transform cases passed after this integration in 12.36 seconds.CI 35593175124 tested head
48d06e3evia merge32300921466aand failed the benchmark plus one Control UI test. The historical UI failure has an accepted maintainer exception for this landing; its cause remains unresolved: Chromium passed button actionability and scrolling, then stalled during the input action or its post-action renderer check; a separate renderer read also timed out while the browser stayed connected. An exact-source replay of original Linux shard 2/12 passed all 52 files and 242 tests in 482.84 seconds with unchanged deadlines, including the failed case in 1.723 seconds. This is nonreproduction, not a UI fix. One additional instrumented Linux replay passed all 20 question/settings cases and retained renderer profiles and DOM markers without reproducing the stall. Prior-head CI 35599061782 subsequently passed the same 430-pixel case and both required gates. No UI source change, weakened assertion, timeout increase, or retry workaround is included; the failed run and the unresolved cause remain documented.Earlier CI integration failures have owning repairs: planner fixtures now respect main's lifecycle-proof tier while retaining full main coverage, and upstream
103115f2f0b1drains agent/shared-state work and asserts settled custody before fixture deletion. This PR preserves that upstream repair unchanged. Earlier complete CI 35586833825 passed, but reported only two CPUs/about 8 GB for the Gateway tail and therefore proves fallback behavior, not eight-worker activation.The next integration, CI 35627759300, exposed two concrete main-owned fixture defects, both repaired on main before this fresh publication. In
c1224ba09be81aca92ad8478ed49ebc541919cbb, the async-question assertion now selects transcript content: the old page-wide lookup also matched the intentional screen-reader announcement. All 15 current browser cases passed in 44.48 seconds; scoped lint and P2 review passed. In11e376cd584f4f37fc0ea75131cc071b1951b62b, the hosted-lifecycle fixture waits for actual approval publication and existing queue settlement after persistence moved into a worker. Its original 47-file order reproduced the first-case failure while 1,476 tests passed; all nine lifecycle cases passed after repair in 56.93 seconds cold wall, with every authority, host, lane and audit assertion preserved. Fresh P2 review and scoped lint passed. No production behavior, test deadlines or coverage changed. These failures are distinct from the accepted historical Chromium stall.