Skip to content

fix(ci): keep Matrix chunk tests aligned with inventory - #118917

Merged
vincentkoc merged 2 commits into
mainfrom
fix/matrix-test-chunk-regression
Aug 3, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/matrix-test-chunk-regression

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

Related: #118892

What Problem This Solves

Fixes an issue where the tooling test suite fails after Matrix gains more than 120 test files because eight assertions assume the 40-file process limit always produces exactly three chunks.

Why This Change Was Made

The extension-runner and full-suite planner tests now derive the expected Matrix process count from the current test inventory and the existing 40-file limit. Runtime chunking remains unchanged; only brittle test expectations are repaired.

User Impact

There is no runtime user impact. Main and contributor PR CI remain green as Matrix test coverage grows.

Evidence

  • Before: the extension-runner and full-suite planner suites failed 8 assertions because 121 files produce four balanced chunks: [31, 30, 30, 30].
  • After: OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs test/scripts/test-extension.test.ts test/scripts/test-projects.test.ts passed 422/422 tests.
  • oxfmt --check, type-aware oxlint, and git diff --check passed.
  • The regression is current-main only and is not present in v2026.7.2-beta.7 or v2026.7.1.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 3, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 20:03
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 4:09 PM ET / 20:09 UTC.

ClawSweeper review

What this changes

The PR changes Matrix test-planning assertions to calculate the expected number of bounded test processes from the current Matrix test inventory while retaining the 40-file limit checks.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this focused maintainer PR open. Its base revision had 121 Matrix test files while the planner limits Matrix processes to 40 files, so the three-process assertions were brittle; current main has fallen back to 118 files and happens to pass again, but the proposed inventory-derived assertions prevent the same CI regression when the suite grows. No blocking patch defect found.

Priority: P3
Reviewed head: a12a98efc42a76185d999b452c11a5b8a1cabfc1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned test repair with no blocking correctness or security concern found.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-authored, test-only PR; the external-contributor real-behavior-proof gate does not apply. Its body nevertheless records a focused after-fix test command and result.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored, test-only PR; the external-contributor real-behavior-proof gate does not apply. Its body nevertheless records a focused after-fix test command and result.
Evidence reviewed 5 items Current planner contract: The shared extension planner assigns Matrix a 40-file process limit and splits a plain Matrix run into balanced chunks based on the discovered working-tree inventory.
Brittle assertions on current main: Both affected test suites still assert exactly three Matrix plans/chunks, while also asserting the same 40-file upper bound; those cardinality checks do not follow the planner’s inventory-based chunking rule.
Source-proven base regression: The PR base contains 121 tracked Matrix test files, which requires four chunks under the 40-file limit; the PR changes all affected Matrix count assertions to use the corresponding ceiling calculation.
Findings None None.
Security None None.

How this fits together

OpenClaw’s test planners route Matrix extension tests into bounded one-shot Vitest processes because the non-isolated suite shares module state within each process. The extension runner and full-suite planner consume the same Matrix inventory and produce CI run plans.

flowchart LR
  A[Matrix test files] --> B[Test inventory]
  B --> C[Matrix process planner]
  C --> D[40-file process limit]
  D --> E[Balanced test chunks]
  E --> F[Extension runner tests]
  E --> G[Full-suite planner tests]
  F --> H[CI test execution]
  G --> H
Loading

Before merge

  • Complete next step (P2) - This protected maintainer PR has a bounded valid repair and needs ordinary maintainer landing review after its current CI checks finish.
Agent review details

Security

None.

PR surface

Tests +26. Total +26 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 40 14 +26
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 40 14 +26

Review metrics

Metric Value Why it matters
Production versus test delta production +0, tests +26 net The PR changes only test expectations; its added code is limited to deriving assertions from the existing Matrix inventory and process-limit contract.

Root-cause cluster

Relationship: canonical
Canonical: #118917
Summary: This PR owns the distinct brittle Matrix process-count assertions; the linked state-isolation fix is adjacent but addresses a different test failure mode.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Land the test-only generalization after the current PR checks complete so Matrix CI assertions continue to match the planner whenever the tracked suite crosses another 40-file boundary.

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

No on the inspected current main: it has 118 tracked Matrix tests, so three chunks still match the 40-file limit. The PR base provides a high-confidence source reproduction because its 121 Matrix tests require four chunks while the assertions require three.

Is this the best way to solve the issue?

Yes. Replacing only the brittle cardinality expectations with an inventory-derived count preserves the existing 40-file and balanced-chunk invariants without changing runtime test planning.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 317320a95eaa.

Labels

Label changes:

  • add P3: This is a contained CI-test robustness repair with no runtime user or upgrade impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-authored, test-only PR; the external-contributor real-behavior-proof gate does not apply. Its body nevertheless records a focused after-fix test command and result.

Label justifications:

  • P3: This is a contained CI-test robustness repair with no runtime user or upgrade impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-authored, test-only PR; the external-contributor real-behavior-proof gate does not apply. Its body nevertheless records a focused after-fix test command and result.

Evidence

What I checked:

  • Current planner contract: The shared extension planner assigns Matrix a 40-file process limit and splits a plain Matrix run into balanced chunks based on the discovered working-tree inventory. (scripts/lib/extension-test-plan.mjs:72, 317320a95eaa)
  • Brittle assertions on current main: Both affected test suites still assert exactly three Matrix plans/chunks, while also asserting the same 40-file upper bound; those cardinality checks do not follow the planner’s inventory-based chunking rule. (test/scripts/test-extension.test.ts:186, 317320a95eaa)
  • Source-proven base regression: The PR base contains 121 tracked Matrix test files, which requires four chunks under the 40-file limit; the PR changes all affected Matrix count assertions to use the corresponding ceiling calculation. (test/scripts/test-projects.test.ts:3238, a12a98efc42a)
  • Current-main status and provenance: Current main has 118 tracked Matrix test files, so the exact-three assertions currently pass by coincidence. Blame attributes the hard-coded Matrix expectations to the same recent Matrix planning work in commit 9acbbd8. (test/scripts/test-projects.test.ts:4655, 9acbbd805cce)
  • Related work is distinct: The merged related Matrix PR fixed temporary-state isolation, not inventory-based process-count expectations, so it does not supersede this PR. (extensions/matrix/src/test-runtime.test.ts:1, ef478c14b1e2)

Likely related people:

  • steipete: Commit 9acbbd8 introduced the Matrix process-limit path and the exact-three assertions now being generalized. (role: introduced the affected Matrix planning assertions; confidence: high; commits: 9acbbd805cce, ef478c14b1e2; files: scripts/lib/extension-test-plan.mjs, test/scripts/test-extension.test.ts, test/scripts/test-projects.test.ts)

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.

@vincentkoc
vincentkoc merged commit 5150670 into main Aug 3, 2026
140 of 146 checks passed
@vincentkoc
vincentkoc deleted the fix/matrix-test-chunk-regression branch August 3, 2026 20:13
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…outing-20260803

* origin/main: (34 commits)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  fix(ci): keep Matrix chunk tests aligned with inventory (#118917)
  fix(tts): preserve hidden speech answers when synthesis fails (#118690)
  test(gateway): add HTTP API QA coverage (#118809)
  test(qa): cover Control UI sessions and cron (#118838)
  fix(macos): preserve native command ownership and consent (#118914)
  test(qa): cover OpenClaw exec process lifecycle (#118819)
  test(ui): cover diagnostic operator flows (#118837)
  fix(search): propagate cancellation through provider-owned requests (#118895)
  test(gateway): cover loopback and LAN access (#118824)
  refactor(channels): own the lifecycle status contract in SDK patch factories (#118795)
  test(ui): add guarded config QA coverage (#118814)
  fix(feishu): fence external collaboration tool results (#118877)
  test(qa): cover Plugin SDK import topology (#118878)
  test(qa): register external app SDK proof (#118829)
  fix(gateway): expire temporal rows in cached session lists (#118875)
  test(matrix): isolate runtime state (#118892)
  ...
vincentkoc added a commit that referenced this pull request Aug 3, 2026
* commit 'efcced7207baa0b1b1db5e8e1836673a24212657':
  test(agents): prove process control roundtrip (#118843)
  test(qa): add memory redaction boundary coverage (#118916)
  fix(kilocode): model discovery overstates the usable context window (#118868)
  fix(media): isolate generated-provider text from delivery directives (#118780)
  test(gateway): add node control-plane QA coverage (#118784)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  fix(ci): keep Matrix chunk tests aligned with inventory (#118917)
  fix(tts): preserve hidden speech answers when synthesis fails (#118690)
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…te-dry-run-no-state-mutation

* commit '682f60ce56b37c5cd3205fdcbbf25b21d48708f2': (28 commits)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  fix(ci): keep Matrix chunk tests aligned with inventory (#118917)
  fix(tts): preserve hidden speech answers when synthesis fails (#118690)
  test(gateway): add HTTP API QA coverage (#118809)
  test(qa): cover Control UI sessions and cron (#118838)
  fix(macos): preserve native command ownership and consent (#118914)
  test(qa): cover OpenClaw exec process lifecycle (#118819)
  test(ui): cover diagnostic operator flows (#118837)
  fix(search): propagate cancellation through provider-owned requests (#118895)
  test(gateway): cover loopback and LAN access (#118824)
  refactor(channels): own the lifecycle status contract in SDK patch factories (#118795)
  test(ui): add guarded config QA coverage (#118814)
  fix(feishu): fence external collaboration tool results (#118877)
  test(qa): cover Plugin SDK import topology (#118878)
  test(qa): register external app SDK proof (#118829)
  fix(gateway): expire temporal rows in cached session lists (#118875)
  test(matrix): isolate runtime state (#118892)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
)

* test(matrix): derive extension process count

* test(matrix): align full-suite chunk expectations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant