Repository navigation
fix(ci): keep ready PR checks alive after delayed draft events - #138482
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: blocked before merge. Reviewed September 4, 2026, 4:02 PM ET / 20:02 UTC. ClawSweeper reviewWhat this changesThe PR gives passive draft pull-request events isolated CI concurrency groups so they cannot displace ready-for-review checks, and repairs a Control UI browser test that was cancelling its own observed imports. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 2 items remain Keep this MEMBER-authored, protected PR open. The focused workflow change is not on current main, source review found no actionable introduced defect, and the ordinary exact-head CI gate is still incomplete. Priority: P2 Review scores
Verification
How this fits togetherGitHub Actions assigns a workflow run to its concurrency group before individual jobs skip draft pull requests; the group determines whether ready CI is preserved. The Control UI E2E suite opens browser pages against a mock Gateway, gathers script and browser failures, then asserts route-specific startup behavior. flowchart LR
A[Pull request event] --> B[CI concurrency admission]
B --> C[Draft job gate]
C --> D[Ready CI checks]
E[Control UI browser pages] --> F[Script and browser diagnostics]
F --> G[Route assertions]
G --> D
Before merge
Agent review detailsSecurityNone. PR surfaceTests +315, Docs +5, Config +6. Total +326 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the admission distinction in the workflow owner, keep the browser test’s real failure detection intact, and merge only after the exact-head CI gate confirms the intended event ordering. Do we have a high-confidence way to reproduce the issue? No high-confidence independent replay was possible in this review sandbox. Source establishes the admission-before-job-gate path, and the PR supplies focused before/after Testbox evidence for the reported ordering and E2E failure. Is this the best way to solve the issue? Yes, based on the inspected owner boundaries: concurrency grouping is the correct place to prevent pre-job displacement, and retaining the browser documents fixes the test-owned cancellation without filtering genuine failures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f63c90aad26b. LabelsLabel 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
HistoryReview history (1 earlier review cycle)
|
Isolate passive draft no-op events before workflow admission so they cannot replace pending or running ready CI. Preserve converted_to_draft cancellation, explicit manual cancellation, newer-head supersession, main parity groups, and isolated manual dispatches. Keep downstream sweeper recovery unchanged. Add YAML-driven admission regressions and non-auto-merge sweeper boundary coverage; update the CI concurrency documentation. Related: #137213, the merged selected-tool guidance repair whose CI incident motivated this investigation. The delayed draft event subtype is unproven; this change repairs CI admission, not selected-tool guidance. Validation: six pre-fix admission failures; 18 admission cases pass after the fix. Full workflow guard, watcher, and sweeper suites: 631 passed, two existing Linux-only skips. Changed checks, workflow sanity, and independent P0-P2 precommit review passed.
Repair the settings-layout failure inherited by PR #138482 from current main. The probe replaced documents while idle script imports were still observed, so navigation-generated ERR_ABORTED events could fail otherwise healthy boots. Keep all three documents alive through assertions and capture each owned page before cleanup. Preserve real HTTP, connection, console, and script failures. Linux native shard 5/6: 298 passed / 1 reproduced failure before, 299 passed after; injected HTTP 503 and connection failures remain fatal. No application behavior, timeouts, runner policy, permissions, or cache policy changed.
494d3e4 to
bf43255
Compare
|
@clawsweeper re-review The admission rule is unchanged, but the candidate now includes a bounded repair for the UI test that failed the first CI merge build. Current head: The original cold-start probe reused one document across three reloads. Linux reproduction recorded an outgoing Blacksmith Testbox proof: original shard 5/6 298 passed / 1 reproduced failure, repaired shard 299/299 passed, final focused file 6/6 passed. Injected HTTP 503 and connection failures still fail. The PR body records source identity, environment/order differences, and the original CI log's missing error-detail limitation. The lease is stopped. Fresh combined Codex autoreview has no actionable P0–P2 findings; integrated local admission tests, UI tests, and changed checks passed. The ordinary exact-head CI gate remains mandatory. The +6 workflow lines still encode the single admission-owner distinction; this blocker repair adds only tests/support. The base refresh was needed because the newly inherited test was absent from the previous PR head, not to chase unrelated main movement. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready evidence for CI 33913547937, attempt 1, completed success at 2026-09-04 20:17:45 UTC. The required openclaw/ci-gate is SUCCESS. The runner queue cleared normally; no cancellation, retry, backend/routing/cache adjustment, or bypass was used. This completes the remaining step and rank-up move in the latest ClawSweeper review. Fresh independent Codex review of the combined candidate found no actionable P0–P2 findings. Both repairs act at the lifetime owner. Workflow admission now isolates passive draft no-ops before job gates, while preserving deliberate conversion-to-draft/manual cancellation and legitimate newer-head supersession. The browser test keeps its three cold-boot documents alive until assertions finish rather than ignoring real script failures. No application UI behavior or CI timeout changed or increased; the existing fixture timeout policy is reused. Observed proof:
Exact local validation after integration: node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts -t 'CI workflow admission' --reporter=dotnode scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/settings-layout.e2e.test.ts --reporter=dotnode scripts/check-changed.mjs --base 0062f2b127bbbdc9fd7db65c679066a11101b6c3 -- .github/workflows/ci.yml docs/ci.md test/scripts/ci-workflow-guards.test.ts test/scripts/pr-ci-sweeper.test.ts ui/src/e2e/settings-layout.e2e.test.ts ui/src/e2e/control-ui-e2e-suite.test-support.tsgit diff --check 0062f2b127bbbdc9fd7db65c679066a11101b6c3...bf43255171977520e704bdd67f535eb88c52551bAll passed, along with workflow sanity/actionlint/Zizmor validation as recorded in the PR evidence. Production/application delta is zero; workflow policy is +7/−1 (net +6, including comments/layout), tests/support +426/−111, docs +7/−2. The admission distinction cannot be moved into downstream job predicates because GitHub replaces pending work before those predicates run. Limits remain explicit: the historical webhook subtype/payload and original narration-chunk transport error were not recovered. Linux reproduction used a sibling idle chunk on four CPUs/~16 GB, not identical original 32-vCPU hardware/cache parity. Ancillary workflow admission, sweeper final draft revalidation, and diagnostic retention/shard-index provenance remain separately tracked. No claim that those are fixed here. Proceeding through the repository-native Testbox-gated prepare and merge flow; this comment records readiness, not a completed merge. |
|
Merged via squash.
|
) Isolate passive draft PR admission before job and scope eligibility while retaining ordinary supersession, deliberate draft conversion cancellation, and existing manual/push policies. Add actual-expression event-order regressions across nine ancillary workflows. Fixes #138571 (passive draft events displacing ready ancillary validation). Main CI admission is independently tracked in #138482; restricted security workflows and Periphery publication ordering remain outside this repair.
Wait for finite ancestor and shadow-host motion before proof capture while retaining strict geometry, image-byte continuity and recording pixels. Extend the existing browser fixtures to prove readiness without stopping perpetual descendant animation. The duplicate Settings CI repair was absorbed from main via #138482; retain its cold-document coverage and failure diagnostics unchanged.
Integrate main 65417df after GitHub reported conflicts that prevented PR CI from starting. Keep #137424's canonical agent validation cache and recreated-schema repair. Selective fixture retirement clears only its released root, including closed-path validation and unopened failure latches. A real two-root regression fails on the global reset before the integration. Keep #138482's three independent cold browser documents and joined cleanup. Remove redundant request maps and phase tracking without weakening startup-copy, network-error or provider-page assertions. Preserve upstream exact Gateway resolver ownership for queued replies, local-tool admission and dashboard builders enabled after startup. Refs #136146, #136145. Protected metadata acceptance, the refused ClawSweeper input review and final-head hosted CI remain separate gates. Local verification on tree 9822ba9603385482b037d857a5e052205c545681: 441 passing tests across 16 files; four existing platform-specific skips. This includes both real Node shutdown modes, agent recreation in one Gateway, queued-reply restart recovery, 20 browser cases, and all eight fixture lifecycle cases. The native subprocess finishes in 75.849s under its unchanged 90s deadline. All 237 changed paths were verified. Review also found a native UI context mock missing main's new pages() diagnostic API. The original close-failure case reproduces replacement of its body error by TypeError. An eight-line fixture correction models the retained closed page; all 12 native UI ownership cases pass with original assertions and deadlines. Final tree: 439fd8a. Full applicable repository checks passed before the final fixture-only correction; focused checks passed after it. Fresh independent Codex review of the complete candidate finished all ten passes with zero actionable P0-P2 findings, with the final source verified.
* fix(ui): preserve proof recordings during screenshots Capture recording-safe viewport pixels and crop element PNGs outside the browser while preserving capture gates, readiness, and functional assertions. Move initial Logs reads to the connection lifecycle and fence delayed scroll completion to the request epoch. Retain negative controls, finalized recording-pixel proof, 289 capture scenarios, and focused Logs owner/browser evidence in the PR. * test(ui): keep disabled proof capture inert Resolve viewport locators only in the enabled recording branch and model Page.video() in the existing non-recording capture fixture. Retain the disabled-gate and owner-directory assertions, including no Page access before capture is enabled. The failing CI test reproduces locally before this change. Afterward, 13 unit/retention cases and 26 browser caller scenarios pass; all 641 frames in eight finalized recordings decode without padding flags. * test(ui): wait for proof presentation ancestors Wait for finite ancestor and shadow-host motion before proof capture while retaining strict geometry, image-byte continuity and recording pixels. Extend the existing browser fixtures to prove readiness without stopping perpetual descendant animation. The duplicate Settings CI repair was absorbed from main via #138482; retain its cold-document coverage and failure diagnostics unchanged.
Preserve native run and capture artifacts per temporary-sync invocation, retain the source checkout on preservation failure, and use the canonical CI shard index in UI failure reports. Fixes #138650 (failure captures lost during temporary sync cleanup). Related: #138482 (CI admission keeps ready PR checks alive). Diagnostic tooling only; no backend, scheduling, cache, permission, or product-runtime changes.
…law#138482) Keep useful ready-for-review CI alive when a passive draft event arrives late. GitHub applies workflow concurrency before job-level draft checks, so a draft no-op could replace pending validation and then skip every job. Isolate those no-ops by run ID while preserving converted_to_draft and manual cancellation, legitimate newer-head supersession, main parity groups, and manual dispatch isolation. Keep sweeper recovery unchanged and document the admission boundary. Related: openclaw#137213, the merged selected-tool guidance repair whose CI incident motivated this work. The exact historical delayed-event subtype remains unproven; this change repairs CI admission, not selected-tool guidance. The first CI attempt also exposed an inherited settings-layout browser test that replaced documents while observing their idle imports. Keep three cold-boot documents alive through assertions and capture all fixture-owned pages before teardown. Preserve genuine HTTP, connection, script, console, and page failures rather than excluding ERR_ABORTED. No application UI behavior or CI timeout changed or increased; reuse the existing fixture timeout policy. Validation: six admission failures before the fix, 18/18 afterward; full guard/watcher/sweeper suites 631 passed with two existing Linux-only skips on macOS. Hosted draft-origin replay skipped 31 jobs with zero steps without cancelling ready CI. Linux Testbox reproduced the browser failure (298 passed / 1 failed), then passed 299/299; HTTP 503 and connection-fault controls remained fatal. Local changed gates, workflow sanity, and independent P0-P2 review passed. Exact-head CI33913547937 attempt1 and required openclaw/ci-gate passed on bf43255. Application production delta is zero; workflow policy +7/-1 (net +6, including comments/layout), tests/support +426/-111, docs +7/-2. No runner backend/routing/cache, auth, budget, or permission changes. Ancillary admission, sweeper final draft-state revalidation, and diagnostic retention/provenance remain separately tracked. Evidence: openclaw#138482 (comment) CI: https://github.com/openclaw/openclaw/actions/runs/33913547937
…claw#138572) Isolate passive draft PR admission before job and scope eligibility while retaining ordinary supersession, deliberate draft conversion cancellation, and existing manual/push policies. Add actual-expression event-order regressions across nine ancillary workflows. Fixes openclaw#138571 (passive draft events displacing ready ancillary validation). Main CI admission is independently tracked in openclaw#138482; restricted security workflows and Periphery publication ordering remain outside this repair.
* fix(ui): preserve proof recordings during screenshots Capture recording-safe viewport pixels and crop element PNGs outside the browser while preserving capture gates, readiness, and functional assertions. Move initial Logs reads to the connection lifecycle and fence delayed scroll completion to the request epoch. Retain negative controls, finalized recording-pixel proof, 289 capture scenarios, and focused Logs owner/browser evidence in the PR. * test(ui): keep disabled proof capture inert Resolve viewport locators only in the enabled recording branch and model Page.video() in the existing non-recording capture fixture. Retain the disabled-gate and owner-directory assertions, including no Page access before capture is enabled. The failing CI test reproduces locally before this change. Afterward, 13 unit/retention cases and 26 browser caller scenarios pass; all 641 frames in eight finalized recordings decode without padding flags. * test(ui): wait for proof presentation ancestors Wait for finite ancestor and shadow-host motion before proof capture while retaining strict geometry, image-byte continuity and recording pixels. Extend the existing browser fixtures to prove readiness without stopping perpetual descendant animation. The duplicate Settings CI repair was absorbed from main via openclaw#138482; retain its cold-document coverage and failure diagnostics unchanged.
…8651) Preserve native run and capture artifacts per temporary-sync invocation, retain the source checkout on preservation failure, and use the canonical CI shard index in UI failure reports. Fixes openclaw#138650 (failure captures lost during temporary sync cleanup). Related: openclaw#138482 (CI admission keeps ready PR checks alive). Diagnostic tooling only; no backend, scheduling, cache, permission, or product-runtime changes.
Related: #137213 — selected-tool guidance repair; incident context only, not a change to that repair.
What Problem This Solves
Resolves a problem where a pull request marked ready for review can lose useful CI when a delayed draft event enters the same concurrency group and then skips its own jobs. Validation can remain unexecuted until a maintainer intervenes.
The motivating incident recorded readiness at 2026-09-03 09:23:46 UTC, followed by cancelled run 33738599936 and skipped successor 33738610679, both on
f730d467f2a9506e96204f388cdfdfa4945b90adwith zero executed steps. The first preflight annotation reports a higher-priority waiting request forCI-v7-137213; the timeline contains noconverted_to_draftevent. A delayed draft/opened event is a supported explanation, not an independently observed subtype or recovered payload.Why This Change Was Made
Workflow concurrency owns admission before job-level draft checks. Passive draft events now use a per-run group;
converted_to_draftstays in the existing PR group so intentionally returning to draft still cancels earlier validation.Only
concurrency.groupchanges in the parsed workflow. Triggers, cancellation conditions, job eligibility, runner routing, caches, permissions, and budgets remain unchanged. Normal newer-head supersession, main's two non-canceling parity slots, and manual isolation are preserved. There is no new admission job, API, dependency, or automatic recovery path. Changingcancel-in-progressalone would still replace pending work; SHA-keyed runnable groups would break cross-head supersession. See GitHub's concurrency contract.The first CI attempt also exposed a newly inherited main test failure from the quiet-progress/provider-copy integration. Its cold-start probe reused one browser page across three document reloads while counting every script failure. Linux reproduction showed an outgoing
/newidle import cancelled withnet::ERR_ABORTEDduring the test's own/chatnavigation. The bounded test repair keeps all three cold-boot pages alive through final assertions, separates startup/settings script capture, and retains genuine request, HTTP, console, and page failures. Existing fixture-owned failure capture now records all owned pages before teardown. No application UI behavior or CI timeout was changed or increased; the test reuses the existing fixture timeout policy.User Impact
Ready-for-review CI survives passive draft events arriving late without weakening deliberate cancellation. The PR CI sweeper implementation is unchanged: cancelled/skipped CI remains attached, and its auto-merge revival policy is not broadened.
The related browser test no longer manufactures failures by replacing a document whose imports it is still observing. It now preserves useful failure details instead of only a script URL. General stale non-draft ordering, repeated draft-toggle ordering, ancillary workflow admission, and the sweeper's final draft-state revalidation remain separate work. The CI pipeline documentation describes the admission boundary.
Evidence
Admission and hosted lifecycle
opened,reopened, andsynchronizedisplaced pending/running ready CI. All 18 admission cases pass after the fix. These evaluate actual YAML, not source-string assertions.494d3e46cbe767bb7efa97d2d9a1ded0bc38e53e, draft-origin CI 33905830952 skipped; the 18:26:21 UTC ready transition admitted CI 33905890140. Replaying the draft-origin run at 18:28:07 produced attempt 2 with 31 skipped jobs and zero steps, while ready CI retained its original jobs/attempt and completed its security checks.Browser-test blocker: fail before, pass after
The failed CI merge was
da817a8aaca3a63b0edbe2133fc8098d6326935c, with main parent0062f2b127bbbdc9fd7db65c679066a11101b6c3. The PR was refreshed onto that exact base to repair the newly inherited test, not simply to chase main.Configured Blacksmith Testbox proof used lease
tbx_01m1pw9f8h0w8azyd6ejp38fmv, Actions run 33908290875, Node 24.19.0/Linux x64/system Chromium 144.0.7559.0:/newsidebar idle chunk aborted duringnavigate:chat.ERR_ABORTED, demonstrating why an error-code exclusion would hide genuine failures.The testbox exposed four CPUs/~16 GB; original CI advertised a 32-vCPU class. Original CI's Chromium version and prewarmed caches were not recorded. Membership and worker/route policies were preserved; file growth moved the repaired file from native ordering position 9 to 8. This is strong Linux evidence, not identical hardware/cache/order parity. The historical narration-chunk failure lacked error details; reproduction used a sibling idle chunk, so that historical transport cause remains unproven.
Local validation and review
Admission 18/18, settings-layout 6/6, all six-path changed gates, workflow sanity, formatting, lint, types, and
git diff --checkpassed after integration. Fresh independent review covers the combined candidate before publication. Exact-head CI 33913547937, attempt 1, completed success at 2026-09-04 20:17:45 UTC onbf43255171977520e704bdd67f535eb88c52551b; requiredopenclaw/ci-gateis SUCCESS. The temporary runner queue cleared without cancellation, retry, or policy changes. This satisfies the remaining exact-head gate requested by the latest ClawSweeper review.node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts -t 'CI workflow admission' --reporter=dotReview follow-through: retain the ordinary exact-head gate. The six net workflow lines encode the distinct admission rule in its sole owner; downstream job gates cannot absorb it. The test-only blocker repair adds no production code. Separate follow-up work records diagnostic artifact-retention/download and shard-index provenance gaps.
Size: workflow policy +7/−1 (net +6, including comments/layout); tests/support +426/−111 (net +315); docs +7/−2. No changelog, runtime API, runner, cache, auth, or permission change.