Skip to content

ci: record resources for slow runtime test commands - #147254

Merged
steipete merged 1 commit into
mainfrom
codex/ci-runtime-resource-telemetry
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-runtime-resource-telemetry

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The real-Gateway UI and standalone startup-corpus CI commands lacked actual CPU, memory, worker-limit, and module-duration receipts. Those gaps made their slow runs difficult to compare reliably.

User Impact

Adds the existing native Vitest resource reporter to these two commands. This is observation-only: test selection, worker limits, runner routing, job counts, and deadlines stay unchanged.

Why This Change Was Made

Explicit reporter flags replace Vitest defaults, so each command preserves its current reporters before adding resource telemetry. Real-Gateway keeps verbose, GitHub Actions, and default; the runtime-config corpus keeps verbose and GitHub Actions. Frozen targets retain their source-owned reporter defaults and require no modern helper.

The reporter provides host memory/CPU availability, resolved worker/project metadata, module timing, and terminal results. It does not measure aggregate Chromium or native-child peak memory; that remains separate proof work before changing concurrency.

Evidence

  • All 569 workflow guards passed, with two existing skips. Executable command fixtures verify exact reporter arguments, unchanged file sets, frozen behavior, and existing error handling.
  • Workflow checks, targeted type/lint/format checks, and the core test boundary guard passed.
  • A native Vitest smoke passed two existing tests and emitted valid resource, project, module, and run receipts.
  • Parsed workflow comparison confirms only the two command bodies changed; the 28 UI files, two corpus files, and every other job field are preserved. Runner-registration delta is zero.
  • Independent P2 review completed all three partitions with no actionable findings.

Exact-head CI 34773610551 passed. The full real-Gateway workload emitted 33 valid native records and passed all 57 cases across 28 files in 422.078s on 8 CPUs with 30.95 GiB RAM. The standalone corpus passed 58 cases in 530.069s on 4 CPUs with 15.61 GiB RAM. These are observations, not a measured speedup from adding telemetry. The real-Gateway job separately spent 758s awaiting runner assignment and 623s executing, including 82.64s build and 88.53s desktop preparation/proof.

@steipete steipete self-assigned this Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 18:06
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 2:15 PM ET / 18:15 UTC.

ClawSweeper review

What this changes

Adds resource and timing output to two CI test commands while preserving their existing reporters and frozen-target behavior.

Merge readiness

✅ Ready for maintainer review

The PR remains useful: current main still omits resource reporting from these commands. No actionable correctness or security defect was found, and the protected maintainer contribution should continue through normal review.

Priority: P3
Reviewed head: 9a5d783e5d39e163c360ec3b60494699d93ec1c2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused reuse of existing telemetry with meaningful command-boundary coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer contribution; the body reports native reporter output, while full-workload measurements remain CI observations rather than demonstrated speedups.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer contribution; the body reports native reporter output, while full-workload measurements remain CI observations rather than demonstrated speedups.
Evidence reviewed 8 items Introduced command changes: The verified merge-base-to-head patch adds reporter arguments only to the two intended commands; test inventories, routing, permissions, worker limits, and deadlines are unchanged.
Existing reporter contract: The shared configuration uses verbose and GitHub Actions reporters in CI; the UI configuration additionally uses default. The existing resource reporter writes host, project, module, and run observations without changing scheduling.
Current-main necessity: Fetched main still invokes both test commands without the added reporter arguments. No supplied related item identifies a replacement fixing PR.
Findings None None.
Security None None.

How this fits together

CI invokes OpenClaw’s Vitest launcher for real-Gateway UI tests and startup-configuration tests. The existing resource reporter observes those runs and writes machine-readable diagnostics to job logs.

flowchart TD
  A[CI test job] --> B{Frozen target?}
  B -->|Yes| C[Source-owned reporter defaults]
  B -->|No| D[Existing reporters plus resource reporter]
  C --> E[Vitest test execution]
  D --> E
  E --> F[Test results and diagnostic logs]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +61, Config +11. Total +72 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 64 3 +61
Docs 0 0 0 0
Config 1 12 1 +11
Generated 0 0 0 0
Other 0 0 0 0
Total 2 76 4 +72

Review metrics

None.

Technical review

Best possible solution:

Keep telemetry in the existing Vitest reporter, preserving frozen-source defaults and using actual workload receipts to inform later performance changes.

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

Not applicable: this is a CI observability improvement; source inspection confirms the two commands currently lack the requested reporter.

Is this the best way to solve the issue?

Yes. Reusing the existing reporter at these invocation boundaries preserves normal output and avoids imposing modern helpers on frozen targets.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This improves CI diagnostics without changing product behavior, test coverage, or resource allocation.
  • 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: The ordinary external-contributor proof gate does not apply to this maintainer contribution; the body reports native reporter output, while full-workload measurements remain CI observations rather than demonstrated speedups.

Label justifications:

  • P3: This improves CI diagnostics without changing product behavior, test coverage, or resource allocation.
  • 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: The ordinary external-contributor proof gate does not apply to this maintainer contribution; the body reports native reporter output, while full-workload measurements remain CI observations rather than demonstrated speedups.

Evidence

What I checked:

  • Introduced command changes: The verified merge-base-to-head patch adds reporter arguments only to the two intended commands; test inventories, routing, permissions, worker limits, and deadlines are unchanged. (.github/workflows/ci.yml:2856, 9a5d783e5d39)
  • Existing reporter contract: The shared configuration uses verbose and GitHub Actions reporters in CI; the UI configuration additionally uses default. The existing resource reporter writes host, project, module, and run observations without changing scheduling. (scripts/lib/vitest-resource-reporter.mts:15, 9a5d783e5d39)
  • Current-main necessity: Fetched main still invokes both test commands without the added reporter arguments. No supplied related item identifies a replacement fixing PR. (.github/workflows/ci.yml:3121, e38a36f22d2a)
  • Executable workflow coverage: The extended fixtures capture actual shell argument expansion for current and frozen targets. Existing real-Gateway cases also preserve missing-config rejection, child exit propagation, and complete file selection. Tests were inspected, not executed, under this read-only review. (test/scripts/ci-workflow-guards.test.ts:12183, 9a5d783e5d39)
  • Prior area contribution: GitHub commit metadata identifies steipete as the author of the earlier startup-corpus coverage change; its workflow condition remains intact in this PR. (.github/workflows/ci.yml:3126, b137b10eabab)
  • Reporter history: Available main history identifies Vincent Koc’s Vitest migration and recent resource-reporting maintenance. Deeper local history inspection encountered unavailable objects, so no original feature-introduction claim is made. (scripts/lib/vitest-resource-reporter.mts:28, 533698353132)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit 0f8cf0f into main Sep 13, 2026
171 checks passed
@steipete
steipete deleted the codex/ci-runtime-resource-telemetry branch September 13, 2026 19:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'cf45ff4d6a9c13164463db860285a02c1c4f2e8c':
  test(macos): observe readiness cancellation and deadline ownership (#145056)
  fix(ci): route QA Profile Evidence to its run-status owner test (#147293)
  fix(install): preserve runtime links when Node validation fails (#147221)
  test(auto-reply): reuse memory session fixtures (#147262)
  fix: hide subagent sessions from Activity (#147253)
  ci: record resources for slow runtime test commands (#147254)
  fix(update): recognize FreeBSD boot identities in triage leases (#147243)
  refactor(active-memory): share closing tag line scan (#147031)
  fix: resume Settings autosave after Reload Config (#147136)
  fix(cli): keep conversation context after cancellation (#147139)
  fix(channels): make system-agent approval cards actionable (#147152)
  refactor: retain shared database handles until their last worker closes (#147246)
  refactor(slack): share workspace-qualified target resolution (#147024)
  refactor(msteams): remove duplicate quoted-table test (#147270)
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'ac59d5e09eb468dc23cf95e447608b57e71b52af': (176 commits)
  improve(gateway): avoid redundant startup preflight work (#147285)
  test(macos): observe readiness cancellation and deadline ownership (#145056)
  fix(ci): route QA Profile Evidence to its run-status owner test (#147293)
  fix(install): preserve runtime links when Node validation fails (#147221)
  test(auto-reply): reuse memory session fixtures (#147262)
  fix: hide subagent sessions from Activity (#147253)
  ci: record resources for slow runtime test commands (#147254)
  fix(update): recognize FreeBSD boot identities in triage leases (#147243)
  refactor(active-memory): share closing tag line scan (#147031)
  fix: resume Settings autosave after Reload Config (#147136)
  fix(cli): keep conversation context after cancellation (#147139)
  fix(channels): make system-agent approval cards actionable (#147152)
  refactor: retain shared database handles until their last worker closes (#147246)
  refactor(slack): share workspace-qualified target resolution (#147024)
  refactor(msteams): remove duplicate quoted-table test (#147270)
  fix(qa): bind coverage IDs to producer assertions (#144000)
  fix(linux): explain FreeBSD desktop setup prerequisites (#147211)
  fix(memory): split embedding batches rejected for an input array item cap (#139541)
  test: isolate timing metadata persistence from inherited settings (#147112)
  refactor(status): retire test-only helper publication (#147071)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
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: S 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