Repository navigation
fix(test): prevent hosted release-check contract timeouts - #154335
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. |
|
Additional matching occurrence from #154193: CI run The executed merge used main The required CI gate on #154193 is awaiting the canonical repair rather than a timeout increase or an unchanged rerun. Its UI checks and current-head review passed. Update: the runtime-policy repair in #154307 has now landed. I have incorporated that canonical correction into the UI branch and its 14 release-check tests plus 42 UI tests pass. This PR’s matrix-work reduction remains separate; the UI lane is no longer waiting for it or taking over its landing. The original timeout observation above is retained without claiming its precise cause was proved. |
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 1:09 AM ET / 05:09 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR runs release-package contract variations through the existing validator in-process while retaining sparse-tooling import coverage and a real CLI tarball rejection. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, bounded optimization absent from current main. No introduced correctness or security defect was found; the reported measurements demonstrate reduced work without establishing that every hosted timeout is resolved. Priority: P2 Review scores
Verification
How this fits togetherRelease checking compares a packaged OpenClaw build with its target source declarations before accepting the package. These tests exercise worker artifacts and Gateway bootstrap metadata for current and historical release targets. flowchart TD
A[Target source declarations] --> C[Package bootstrap validator]
B[Prepared package files] --> C
D[Release-check CLI and tarball] --> C
E[In-process contract cases] --> C
C --> F[Accept valid bootstrap artifacts]
C --> G[Reject missing or malformed artifacts]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -3, Other +7. Total +4 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one production bootstrap validator, exercise its contract matrix cheaply, and retain the real sparse CLI boundary without changing deadlines or retry policy. Do we have a high-confidence way to reproduce the issue? No deterministic reproduction of the hosted timeout is established: the recorded baseline and candidate replays both passed. Source inspection does confirm the repeated subprocess work being removed. Is this the best way to solve the issue? Yes, for reducing test cost: the patch reuses the production validator and preserves a real CLI boundary without weakening validation or increasing deadlines. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 65485f6adee9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Run the frozen target worker and gateway contract matrix against prepared package directories through the existing release-check validator. Retain a sparse tooling import probe and one real CLI tarball rejection, without changing deadlines or retry policy. Testbox proof: original 31-file order passes before and after; release-check test time falls from 10.877s to 1.834s. Owner/sibling tests (50) and changed-file checks pass. Independent P1 review is clean.
f616cb3 to
260c7fa
Compare
|
F52 follow-up: the captured remaining wait is in #154567 removes that unnecessary npm inventory subprocess at the release-check owner by collecting paths and unpacked size during the existing strict tar extraction. It is based on the merged fixture refactor here and preserves the complete worker/gateway matrix and retained real CLI assertion. Proof: 20/20 paired replays of the full 31-file target shard and 32-file neighbour in the captured order on the same 2-CPU/8-GB class, 20/20 standalone runs at the eight-worker setting, and 115 sibling tests. The baseline captured one timeout in four paired attempts; the new guard fails deterministically on the original npm call. Changed-file checks, type-aware lint with its canary, formatting, diff checks, and P2 autoreview passed. Current-head CI also passed. No timeout increase, retry, or weakened assertion. |
…54335) Run the frozen target worker and gateway contract matrix against prepared package directories through the existing release-check validator. Retain a sparse tooling import probe and one real CLI tarball rejection, without changing deadlines or retry policy. Testbox proof: original 31-file order passes before and after; release-check test time falls from 10.877s to 1.834s. Owner/sibling tests (50) and changed-file checks pass. Independent P1 review is clean.
Related: #154006 (hosted timeout on head
4375dddb383fc13553c6a9ea1b92472c0764e45b). Maintainer-requested update-reliability repair.What Problem This Solves
Fixes release-check contract coverage timing out under hosted CI load: one case reached 120,048 ms while checking a tiny prepared package.
User Impact
No user-visible release or update behavior changes. CI keeps the same frozen-target validation coverage with far less subprocess work; deadlines and retry policy are unchanged.
Why This Change Was Made
The sparse fixture was already prepared once, but 16 contract variations each started the full release-check CLI and ran an offline npm tarball inspection. The existing target-aware bootstrap validation now accepts explicit target and package roots and remains the operation called by the real release checker. The matrix checks prepared directories in-process, with distinct target paths to prevent module-cache cross-talk. One sparse import probe and one real CLI/tarball rejection remain.
Coverage retains historical two-/three-file worker contracts, canonical-array precedence, missing current artifacts, malformed paths/arrays, targets without a worker producer, target-owned gateway metadata, and tooling-owned SDK fixture bytes. No configuration, schema, dependency, or installed-updater change.
Evidence
test/scripts/release-check.test.ts, core-tooling-9-hosted-3, job106191100823: 120,048 ms.tbx_01m30x1ebkrz5te6yach2nr30n: Node 24.19.0, lease workflow. The touched baseline files match the failing head exactly; comparison base is894fb140a22246bc1574d5b29fe61e10f77036de.node scripts/run-vitest.mjs --config test/vitest/vitest.tooling.config.ts test/scripts/release-check.test.ts --maxWorkers=1: 14.886 s → 3.288 s wall. Slow case 12.612 s → 1.623 s sparse boundary plus 0.153 s matrix. All 15 revised tests pass.node scripts/run-vitest.mjs test/scripts/release-check.test.ts test/scripts/check-cli-bootstrap-imports.test.ts: 2 files, 50 tests passed in 3.650 s wall.node scripts/check-changed.mjs -- scripts/release-check.ts test/scripts/release-check.test.tspassed on the Testbox, including script/test-root typechecks, both targeted lint lanes, formatting, erasability, dead-export scans, and package/architecture guards.git diff --checkpasses.The first temporary order-replay harness used an unsupported sequencer CLI shape and collected no tests; its configuration was corrected before recording ordered proof. PR CI timings are pending at author handoff.
Maintainer review disposition
ClawSweeper reviewed head
f616cb3171eaeddfab54537fcdbe89e082ba40eaat 2026-09-21 03:15 UTC (comment 5754918985). It reported no actionable correctness or security findings, no before-merge requirements, and no Rank-up moves; there is nothing to apply or skip. The independent Codex review of record is scoped-clean. Exact-head CI is green per the campaign REST check-runs gate. The recorded Testbox timings show reduced work; they do not establish deterministic elimination of every hosted timeout.