Skip to content

fix(qa): overlap prebuilt profile evidence producers - #124483

Closed
RomneyDa wants to merge 1 commit into
openclaw:mainfrom
RomneyDa:fix/qa-profile-timeout-evidence
Closed

RomneyDa wants to merge 1 commit into
openclaw:mainfrom
RomneyDa:fix/qa-profile-timeout-evidence

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Aug 16, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Full QA profile runs build the private runtime before execution, but child E2E Vitest processes could still enter global setup and clean/rebuild shared packages/ai/dist. Audited script producers then remained in a long post-flow tail even when the workflow had already established immutable built output.

Original failed evidence: https://github.com/openclaw/openclaw/actions/runs/31810966137

Changes

  • Mark the profile shard execution as a prebuilt-dist consumer after the private QA runtime build.
  • Partition audited parallelSafe producers into at most three tasks and schedule them with flow/native work under the existing global weighted concurrency budget.
  • Keep unmarked producers, Docker candidate preparation, and fail-fast script work serialized.
  • Preserve the non-prebuilt execution order for other callers.

Validation

  • Blacksmith Testbox focused Vitest: suite-launch.runtime.test.ts plus ci-workflow-guards.test.ts — 183 passed.
  • pnpm check:workflows passed on the pre-split head.
  • Path-scoped pnpm check:changed passed on the pre-split head.
  • Autoreview clean.
  • Current-main split: git diff --check passed; repository-configured actionlint passed.
  • Exact-head pull-request CI is running after the branch rewrite.

LOC

  • Runtime/workflow: +26/-16, net +10. The positive delta establishes the prebuilt activation boundary and bounded scheduler overlap.
  • Tests: +79/-5, net +74.

Split Follow-up

The separate 140-minute operational timeout budget is in #125303. Land this owner-boundary and bounded-overlap PR first, then evaluate the independent timeout headroom.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 10, 2026, 3:47 AM ET / 07:47 UTC (Revision 11).

ClawSweeper review

What this changes

The PR lets audited QA evidence scripts run alongside flow and native tests when the workflow has already built the runtime, while retaining exclusive execution for other scripts.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 3 items remain

The scheduler overlap remains useful beyond the prepared-runtime repair already on main, but one introduced failure path fabricates failed results for completed scripts. This maintainer-owned PR should remain open.

Priority: P2
Reviewed head: 9b33cb825c48b0d589cfb350b261c44ab8199c55

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The bounded scheduler reuse is useful, but incorrect failure attribution prevents merge readiness.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored internal QA change. Reported focused tests exercise scheduler ordering with mocked producers; no after-fix full-profile execution is claimed, and the author explicitly documents the trusted-ref restriction.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored internal QA change. Reported focused tests exercise scheduler ordering with mocked producers; no after-fix full-profile execution is claimed, and the author explicitly documents the trusted-ref restriction.
Evidence reviewed 9 items Pinned introduction boundary: The verified merge-base-to-head patch introduces only QA launcher, workflow, and associated test changes. Codex files are base-only changes; the reviewed scheduling behavior does not depend on the Codex runtime or protocol. The supplied test merge is stale and was not used to infer removal of main-branch behavior.
Introduced ordering exposes incorrect failure attribution: Audited scripts now finish in concurrentPartitionResults before Docker preparation. Its catch still passes every scriptScenarios entry to capturePartitionFailure, and aggregation appends those failures alongside completed results. A successful gateway-smoke plus failed Docker preparation therefore produces both pass and fail results for gateway-smoke.
Tests cover the two paths separately: The added overlap test exercises successful Docker preparation; the existing preparation-failure test leaves prebuilt mode disabled. Neither covers preparation failure after an audited script completed. The adjacent rejection test establishes preservation of successful sibling evidence as an existing expectation.
Findings 1 actionable finding [P2] Restrict preparation failures to scripts that have not run
Security None None.

How this fits together

QA Lab turns selected scenarios into scheduled flow, native-test, and script tasks. Their results feed evidence artifacts and reports used by CI and maturity checks.

flowchart TD
  A[Selected QA scenarios] --> B[Suite scheduler]
  C[Prebuilt runtime setting] --> B
  B --> D[Flows and native tests]
  B --> E[Audited script partitions]
  D --> F[Docker preparation and exclusive scripts]
  E --> F
  F --> G[Combined evidence and report]
Loading

Before merge

  • Restrict preparation failures to scripts that have not run (P2) - With prebuilt mode enabled, this addition completes audited scripts before Docker preparation. If preparation then rejects, the catch at lines 1330–1334 still creates failures for every script, including completed ones. Selecting gateway-smoke and docker-npm-onboard-channel-agent therefore publishes both a pass and a fabricated Docker-preparation failure for gateway-smoke. Scope the failure projection to unstarted scripts and cover this combined path. This is a late discovery: the relevant code is unchanged from the earlier reviewed head.
  • Resolve merge risk (P1) - Prebuilt overlap can contaminate completed script evidence with an unrelated Docker-preparation failure; the combined failure path lacks regression coverage.
  • Complete next step (P2) - Repair Docker-preparation failure attribution and add regression coverage proving completed audited scripts retain exactly their original results.

Findings

  • [P2] Restrict preparation failures to scripts that have not run — extensions/qa-lab/src/suite-launch.runtime.ts:1173
Agent review details

Security

None.

PR surface

Source +9, Tests +74, Config +1. Total +84 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 25 16 +9
Tests 2 79 5 +74
Docs 0 0 0 0
Config 1 1 0 +1
Generated 0 0 0 0
Other 0 0 0 0
Total 4 105 21 +84

Review metrics

Metric Value Why it matters
Production versus test growth Production/workflow net +10; tests net +74 Production growth reuses the existing partitioner and scheduler to add a bounded prebuilt execution mode; test growth protects ordering.
Scheduling activation 1 existing environment setting enabled; at most 3 audited script partitions The workflow activates overlap without increasing the existing global concurrency budget.

Merge-risk options

Maintainer options:

  1. Preserve completed evidence (recommended)
    Limit Docker-preparation failure attribution to pending script tasks and verify that completed audited results remain unchanged.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Scope Docker-preparation failure attribution to script tasks that have not executed, preserving non-prebuilt and fail-fast behavior. Add a regression where an audited script completes before Docker preparation rejects, asserting one accurate result per scenario and no false failure for the completed script.

Technical review

Best possible solution:

Keep bounded overlap in the existing scheduler, preserve main's native preparation, and restrict preparation-failure results to scripts that have not run; the small production growth supports that distinct scheduling boundary.

Do we have a high-confidence way to reproduce the issue?

Yes, from the PR source: enable prebuilt mode, complete gateway-smoke, then reject Docker candidate preparation for a selected Docker scenario; aggregation appends a false failure for gateway-smoke. This was not executed in the read-only review.

Is this the best way to solve the issue?

Not yet: reusing the weighted scheduler is appropriate, but failure attribution must follow the new execution phases. Increasing the workflow timeout would not repair either ownership or inaccurate evidence.

Full review comments:

  • [P2] Restrict preparation failures to scripts that have not run — extensions/qa-lab/src/suite-launch.runtime.ts:1173
    With prebuilt mode enabled, this addition completes audited scripts before Docker preparation. If preparation then rejects, the catch at lines 1330–1334 still creates failures for every script, including completed ones. Selecting gateway-smoke and docker-npm-onboard-channel-agent therefore publishes both a pass and a fabricated Docker-preparation failure for gateway-smoke. Scope the failure projection to unstarted scripts and cover this combined path. This is a late discovery: the relevant code is unchanged from the earlier reviewed head.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 924381f9f8b3.

Labels

Label changes:

  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored internal QA change. Reported focused tests exercise scheduler ordering with mocked producers; no after-fix full-profile execution is claimed, and the author explicitly documents the trusted-ref restriction.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a bounded QA infrastructure improvement with an actionable evidence-attribution defect.
  • merge-risk: 🚨 automation: The new ordering can publish false script failures after Docker preparation fails, misleading CI evidence consumers.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored internal QA change. Reported focused tests exercise scheduler ordering with mocked producers; no after-fix full-profile execution is claimed, and the author explicitly documents the trusted-ref restriction.

Evidence

What I checked:

  • Pinned introduction boundary: The verified merge-base-to-head patch introduces only QA launcher, workflow, and associated test changes. Codex files are base-only changes; the reviewed scheduling behavior does not depend on the Codex runtime or protocol. The supplied test merge is stale and was not used to infer removal of main-branch behavior. (extensions/qa-lab/src/suite-launch.runtime.ts:1173, 9b33cb825c48)
  • Introduced ordering exposes incorrect failure attribution: Audited scripts now finish in concurrentPartitionResults before Docker preparation. Its catch still passes every scriptScenarios entry to capturePartitionFailure, and aggregation appends those failures alongside completed results. A successful gateway-smoke plus failed Docker preparation therefore produces both pass and fail results for gateway-smoke. (extensions/qa-lab/src/suite-launch.runtime.ts:1331, 9b33cb825c48)
  • Tests cover the two paths separately: The added overlap test exercises successful Docker preparation; the existing preparation-failure test leaves prebuilt mode disabled. Neither covers preparation failure after an audited script completed. The adjacent rejection test establishes preservation of successful sibling evidence as an existing expectation. (extensions/qa-lab/src/suite-launch.runtime.test.ts:2307, 9b33cb825c48)
  • Owner and execution contracts: The CLI passes selected scenarios into runQaSuite and reports its persisted summary. The test-file runner executes scenarios sequentially within each partition; the existing weighted scheduler bounds concurrent partitions. Scenario-pack guidance limits parallelSafe scripts to independently owned mutable state and prohibits shared-output rebuilds. (extensions/qa-lab/src/test-file-scenario-runner.ts:602, 9b33cb825c48)
  • Current main and latest-release overlap: Current main prepares the native runtime before concurrent tasks and marks native children prebuilt, but retains the post-flow audited-script tail. The same distinction is present in v2026.9.3. Thus the central rebuild hazard has a shipped repair, while this PR's scheduling overlap remains distinct. (extensions/qa-lab/src/suite-launch.runtime.ts:1344, 1391f7cd2d40)
  • Merged related repair: GitHub verifies fix(qa): preserve prepared runtime during suites #130345 as merged at ff68e65. Its body and patch cover native-child rebuild prevention and script-owned Docker candidate preparation, not audited-script overlap. GitHub commit metadata identifies RomneyDa as the author. (extensions/qa-lab/src/suite-launch.runtime.ts, ff68e65caaa3)

Likely related people:

  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a failing-then-passing regression for Docker preparation rejecting after an audited script completes, and repair the failure projection.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-21T03:00:10.585Z sha 9b33cb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-22T20:44:36.977Z sha 9b33cb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-22T20:58:44.009Z sha 9b33cb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-22T22:15:15.568Z sha 9b33cb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-22T22:56:56.005Z sha 9b33cb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-29T03:12:43.751Z sha 9b33cb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-29T03:21:40.097Z sha 9b33cb8 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-03T06:28:08.727Z sha 9b33cb8 :: blocked before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/qa-profile-timeout-evidence branch from 978a312 to b5da4fa Compare August 17, 2026 14:40
@RomneyDa RomneyDa changed the title fix(qa): finish full profile evidence runs fix(qa): overlap prebuilt profile evidence producers Aug 17, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 17, 2026
@RomneyDa
RomneyDa force-pushed the fix/qa-profile-timeout-evidence branch from b5da4fa to 9b33cb8 Compare August 21, 2026 02:53
@RomneyDa

Copy link
Copy Markdown
Member Author

Rebased and refreshed onto current main at exact head 9b33cb825c48b0d589cfb350b261c44ab8199c55.

  • Focused launcher + workflow proof: pnpm exec vitest run extensions/qa-lab/src/suite-launch.runtime.test.ts test/scripts/ci-workflow-guards.test.ts --config vitest.config.ts — 179 passed, 2 skipped. This covers the prebuilt overlap, preserved exclusive unsafe-script phase, bounded parallel scheduling, and the workflow opt-in.
  • Formatting and git diff --check clean. Exact committed branch autoreview found no P0/P1 issue and judged the patch correct (0.90).
  • Production LOC: suite-launch.runtime.ts +25/-16 (net +9), justified by the prebuilt scheduling boundary and generic bounded partitioning; tests +79/-5; workflow +1.
  • Fresh exact-head CI is now running after the push.

The secret-bearing qa-profile-evidence.yml trust gate intentionally accepts only main ancestors, release tags, or release-branch heads (.github/workflows/qa-profile-evidence.yml validation); this open PR head cannot be dispatched as a trusted exact-head full-profile run without weakening/bypassing that boundary. I am therefore treating the full aggregate artifact as the named maintainer-only disposition item, not changing the trust policy in this PR.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper-recovery-stuck rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper-recovery-stuck rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 21, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 3, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 10, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

Closing this as superseded, without merge.

The original failure was real: run 31810966137 exhausted the 110-minute child deadline while concurrent QA work also exposed missing shared @openclaw/ai/dist modules. #124612 subsequently moved the full profile to eight isolated weighted shards plus a canonical aggregate, which solved the capacity/artifact-completion path. That means aggregate evidence can now be finalized; it does not imply every later all profile was a strict zero-failure pass.

#130345 then repaired the shared-dist ownership issue more narrowly: native children consume the suite-prepared runtime, and script-owned Docker lanes use scheduler-owned candidate preparation. That supersedes this PR's workflow-wide prebuilt flag.

The remaining cross-phase parallelSafe script overlap has not been proven necessary after sharding. The current exact-head ClawSweeper review also identifies a high-confidence P2: if an audited script passes before Docker preparation rejects, this head can append a second, fabricated failure for that same script. With the original capacity and dist ownership problems addressed on main, carrying that unproven overlap and contradictory-evidence risk is not warranted.

@RomneyDa RomneyDa closed this Sep 10, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper could not start a re-review for this item.

Reason: re-review requires an open issue or PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant