Skip to content

fix(ci): speed up literal test inventory selection - #204529

Merged
vincentkoc merged 1 commit into
mainfrom
fix/ci-literal-inventory-matching-20261124
Nov 24, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/ci-literal-inventory-matching-20261124

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

CI's unit-fast inventory measurement times out at 120 seconds on the scheduled main lane. The selector repeatedly compiles glob patterns even when an unscoped candidate is already an exact literal member of the selected inventory.

User Impact

CI spends less time projecting test inventories. Test ownership, exclusions, command-line filtering, and existing time limits stay unchanged.

Why This Change Was Made

Use exact membership for plain repository-relative paths in unscoped selections. Keep scoped paths, absolute paths, and wildcard patterns on the existing matcher; apply exclusions and CLI filters after either inclusion path. No cache or new runtime setting is added.

Evidence

  • Scheduled-main failure: https://github.com/openclaw/openclaw/actions/runs/45356603923/job/138316697344 .
  • Existing workload: pnpm test test/scripts/ci-node-test-volume.test.ts -t 'measures unit-fast inventory under dual-all' --maxWorkers=1.
  • Diagnostic baseline: the workload passed locally in 29.855 seconds. A separate CPU-profiled run took 43.702 seconds; glob matching accounted for 42.516 of 50.648 sampled seconds including setup. This is diagnosis, not a before/after benchmark.
  • Native focused proof at c1e5a4bcc7148940964de1d71b6fb87e3ce09747: all 51 selector/runtime tests pass (5.11s Vitest, 7.02s runner). Targeted typecheck, lint, format, and whitespace checks pass. Independent local autoreview of the complete change against b9ef0d7fca28cfea8dec4472d4527d98c40d7ba2 completed P0–P2 with no findings.
  • Native PR qualification supplied its own frozen dependency installation. Normal PR CI is the remaining broad proof.

Measurement acceptance rule

Before benchmark sampling: run the unchanged workload serially on baseline and candidate, alternating five samples each, on the same host and runtime. Use a fresh process for every sample and the filesystem already warmed by diagnostics; do not claim cold-filesystem results. Record host load, test duration and process peak memory. Accept only with identical assertions passing, lower median and p95 duration, at least 20% lower warm median, and no greater than 20% peak-memory regression. Any threshold failure remains unresolved; no timeout increase or retry will be used to claim a win.

Measured result

The acceptance rule passed on an Apple M5 Max (18 cores), using the same native checkout and frozen dependencies. The two changed files alternated between the exact base and candidate contents; the candidate was restored after each run and the checkout is clean. All ten runs passed the unchanged workload.

Metric Baseline Candidate
Median test time 38.001s 11.673s
Conservative p95 test time (maximum of five) 42.956s 12.820s
Median command elapsed 43.682s 18.4s
Median peak RSS 768 MiB 700.9 MiB
Maximum peak RSS 867.6 MiB 799.4 MiB

Test times in seconds, alternating baseline/candidate: baseline [38.263, 42.956, 38.001, 35.952, 34.930]; candidate [12.820, 12.601, 11.612, 11.673, 9.693]. Starting one-minute host load ranged from 5.65 to 9.84. This is local macOS evidence; hosted Linux timing remains unmeasured.

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review ended

ClawSweeper stopped reviewing this revision because the pull request closed.

View the workflow run.

@vincentkoc vincentkoc self-assigned this Nov 24, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 24, 2026 09:24
@vincentkoc
vincentkoc enabled auto-merge (squash) November 24, 2026 09:24
@vincentkoc
vincentkoc merged commit 7868e06 into main Nov 24, 2026
161 checks passed
@vincentkoc
vincentkoc deleted the fix/ci-literal-inventory-matching-20261124 branch November 24, 2026 09:35
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Nov 24, 2026
* commit '391dea93e0a97fff97f9f3d5e94eac992b247b09': (21 commits)
  test(update): cover maintenance release before conversion (#204548)
  fix(ci): control memory pressure in cron rearm fixture (#204543)
  fix: align release workflow tests with retained evidence
  test(ui): open the Settings drawer by keyboard before the Escape check (#204539)
  fix(ci): avoid redundant globs for literal test inventories (#204529)
  fix(pr): retain protected resources after native squash merges (#204496)
  fix(ui): show the check mark on the custom ask_user answer (#199999)
  chore(ui): refresh control ui locales (#204542)
  fix(update): build Git releases only once (#204512)
  fix(ci): avoid repeated full-inventory matching (#204525)
  test(ci): align exec completion fixtures with process instances (#204507)
  test(update): replace mocked JSON routing with child proof (#204527)
  fix(slack): reject system events with an unresolved conversation type (#204444)
  test(agents): distinguish the source-session root (#204524)
  perf(ai): keep Responses tool history checkpointed across turns (#204519)
  feat(zai): add GLM-5.4 as the Coding Plan default (#204522)
  ci: cover unscheduled test files daily and fail when a test has no scheduled lane (#204472)
  fix(ci): model a distinct FRV job retry in CLI fixtures (#204517)
  improve(ui): defer sign-in controls until needed (#204484)
  test(agents): assert the prepared MCP hook prompt (#204508)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant