Skip to content

chore: reduce CI job count and database test overhead - #137352

Merged
steipete merged 1 commit into
mainfrom
codex/ci-reduce-typecheck-fanout-20260903
Sep 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-reduce-typecheck-fanout-20260903

Conversation

@steipete

@steipete steipete commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Common CI runs allocate six jobs to core test types and their central tail, repeating runner admission, checkout and setup. Three read-only database tests also use generic deep equality over entire file Buffers when their contract is exact byte preservation.

Why This Change Was Made

Run the same type workload on three jobs: pair original stripes 1+2 and 3+4, then run stripe 5 before the existing extensions/scripts/root tail. All 16 core graphs remain, with at most two compiler children per stripe and one builder per child. The fifth stripe retains its former standalone resource environment. Failed stripes stop their own row; independent rows continue. Pure Blacksmith and older-target full-check paths remain covered.

Use native Buffer equality for the three file comparisons. All seven existing Claw cases retain real database setup, missing-column scenarios, semantic assertions, complete byte comparison and cleanup. The workflow fixture reuses the canonical stripe-partition test instead of copying its inventory assertion.

User Impact

Developer CI uses three fewer type-check jobs and cheaper database assertions. In this native run, all type jobs finished by 5m37s. Overall non-Windows completion was 10m22s, so the wider latency target remains open.

Evidence

CI run 33767649105 passed 103 jobs, with 9 skipped, including all 50 selected compact Node jobs and both Windows jobs. Source was fb1d38e3846abd99bc68257d58f6f91933c7c11e; native checkout was merge be7a7f09b654a446011aca9acc460b50cf15a7c0 into 2074e04c27566a53459662236d35d20ecadb2819. The preflight checkout and Git commit parents both confirm that relation.

Type job Original stripes Body Whole job Finished after run start
Core 1 1+2 3m52s 4m21s 5m37s
Core 2 3+4 2m46s 3m12s 4m28s
Central 5 + extensions/scripts/root 2m52s 3m20s 4m36s

Each type job waited 41 seconds from creation to assignment and requested the existing blacksmith-32vcpu-ubuntu-2404 class. The executed shell retains --concurrency 2, and the unchanged compiler owner retains one builder per child. The central shell clears OPENCLAW_LOCAL_CHECK for stripe 5, then its tail retains 0. Type logs do not expose physical CPU/RAM, child peak concurrency or per-stripe clocks; the requested label is not a hardware measurement. All three bodies succeeded, reached post-job cleanup, and logged no orphan-process terminations. Serial composition introduces no additional overlapping compiler processes.

The two native Claw owner jobs preserve all seven exact case names. Package preview took 263ms; update planning and resume took 310ms and 316ms. Those Node jobs report 8 logical CPUs, 33,231,908,864 bytes total memory, two admitted plans and peak two; all planned child groups ended with exit 0. These measurements belong to the Node jobs, not the type jobs. The three affected local case bodies totalled 5.140s before and 0.953s after in one observation per selected file; reporter settings differed, so that comparison is not a controlled whole-CI benchmark.

Twenty focused workflow/type cases passed. The complete six-path changed gate passed in 184.1s, including all core/root type graphs, lint and dead-export checks; workflow validation, actionlint, zizmor and formatting passed. The first gate found an unnecessary object copy in the fixture; it was removed and the full gate rerun. Independent Codex review through P2 is scoped-clean.

This records the timing, resource-reporting limits and cleanup requested in the ClawSweeper review and rank-up move. No source-level finding remained. The separate remaining tail is the late-starting Node large-7 job, QA admission, and the real-Gateway UI job (135s build + 382s tests). Both Windows jobs passed; the final gate was green at 15m13s. Those remaining costs are being investigated without widening sharding.

Runtime production LOC: 0. Workflow: +14/-10. Tests/support: +192/-28, covering the changed profile/workload/failure boundaries. Docs: +12/-12; CI skill: +8/-0.

@steipete steipete self-assigned this Sep 3, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M maintainer Maintainer-authored PR labels Sep 3, 2026
@steipete
steipete marked this pull request as ready for review September 3, 2026 14:34
@clawsweeper

clawsweeper Bot commented Sep 3, 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 10:42 AM ET / 14:42 UTC.

ClawSweeper review

What this changes

The PR consolidates hosted core type-check stripes into three CI jobs and replaces three byte-preservation test assertions with native Buffer equality.

Merge readiness

⛔ Blocked before merge - 2 items remain

No source-level correctness defect was found. Keep this maintainer PR open until its exact-head hosted CI records the combined type-check jobs’ elapsed time, resources, and cleanup outcome.

Priority: P3
Reviewed head: fb1d38e3846abd99bc68257d58f6f91933c7c11e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The source partition and executable guards are sound; final confidence depends on the in-progress exact-head combined-job measurements.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its exact-head native CI timing and resource evidence remains a separate merge-risk check.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its exact-head native CI timing and resource evidence remains a separate merge-risk check.
Evidence reviewed 7 items Verified PR merge shape: The verified test merge has the pinned base and PR head as parents and changes exactly the six stated paths.
Workflow partition and fallback: The central row runs stripe 5 before the existing tail; the two hosted rows run stripes 1+2 and 3+4, while non-striped profiles retain the full check path.
Canonical stripe owner: The core runner defines 16 graphs, partitions stripes deterministically, bounds compiler children, and stops draining after a failure.
Findings None None.
Security None None.

How this fits together

GitHub Actions chooses a runner profile and splits type-check work between a central check job and hosted core-stripe jobs. Those results feed the aggregate CI gate that protects contributions and releases.

flowchart LR
A[Pull request or push] --> B[CI preflight]
B --> C[Runner profile]
C --> D[Central type-check job]
C --> E[Hosted core stripe jobs]
D --> F[Extensions scripts and root checks]
E --> G[Core type graphs]
F --> H[Aggregate CI gate]
G --> H
Loading

Before merge

  • Resolve merge risk (P1) - The three-job layout serializes two stripes per hosted row; its exact-head jobs were still running, so the stated latency target and resource/cleanup behavior have not yet been demonstrated on native CI capacity.
  • Complete next step (P2) - Record the exact-head combined type-check rows’ elapsed time, resource report, and cleanup result before merge.
Agent review details

Security

None.

PR surface

Tests +164, Docs +8, Config +4. Total +176 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 192 28 +164
Docs 2 20 12 +8
Config 1 14 10 +4
Generated 0 0 0 0
Other 0 0 0 0
Total 6 226 50 +176

Review metrics

Metric Value Why it matters
Production versus test LOC runtime production 0; CI workflow +14/-10; tests/test support +192/-28 The production change is limited to CI topology, while the added test support exercises the new profile, workload, and failure boundaries.

Merge-risk options

Maintainer options:

  1. Complete native CI measurement (recommended)
    Let the exact-head combined type-check rows finish and record elapsed time, resource reporting, and cleanup results before merge.

Technical review

Best possible solution:

Use the exact-head hosted results to confirm each combined row remains within its timeout with preserved resource and cleanup behavior, then keep this single canonical stripe layout.

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

Not applicable: this PR changes CI scheduling and test assertion mechanics rather than reporting a user-facing defect.

Is this the best way to solve the issue?

Yes. It reuses the canonical stripe runner and preserves its deterministic partition and fallback rather than adding parallel scheduling logic; native CI measurement is the remaining validation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1ad63b161427.

Labels

Label changes:

  • add P3: This is bounded CI efficiency maintenance without evidence of a current user-facing failure.
  • add merge-risk: 🚨 automation: Merging changes type-check job topology and may affect CI completion time or timeout behavior until exact-head native results finish.
  • 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 maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its exact-head native CI timing and resource evidence remains a separate merge-risk check.

Label justifications:

  • P3: This is bounded CI efficiency maintenance without evidence of a current user-facing failure.
  • merge-risk: 🚨 automation: Merging changes type-check job topology and may affect CI completion time or timeout behavior until exact-head native results finish.
  • 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 maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its exact-head native CI timing and resource evidence remains a separate merge-risk check.

Evidence

What I checked:

  • Verified PR merge shape: The verified test merge has the pinned base and PR head as parents and changes exactly the six stated paths. (be7a7f09b654)
  • Workflow partition and fallback: The central row runs stripe 5 before the existing tail; the two hosted rows run stripes 1+2 and 3+4, while non-striped profiles retain the full check path. (.github/workflows/ci.yml:3625, fb1d38e3846a)
  • Canonical stripe owner: The core runner defines 16 graphs, partitions stripes deterministically, bounds compiler children, and stops draining after a failure. (scripts/lib/tsgo-core-test-shards.mts:96, fb1d38e3846a)
  • Executable workflow coverage: The guard fixture executes extracted workflow shell bodies and checks the complete three-row stripe partition, fallback profiles, cleared core environment, tail commands, and row-local failure behavior. (test/scripts/ci-workflow-guards.test.ts:9630, fb1d38e3846a)
  • Read-only database invariant retained: Each changed assertion compares the complete Buffer captured before and after the read-only state path; the owner opens an existing database read-only and the package workflow calls that helper before reuse decisions. (src/claws/package-resume.test.ts:158, fb1d38e3846a)
  • Current-main comparison: Current main still uses the prior five hosted stripes and has no central fifth-stripe execution, so the PR is not redundant. (.github/workflows/ci.yml:3625, 1ad63b161427)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Gio Della-Libera: Raw commit 7774f9a adds src/claws/package-resume.test.ts:147 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7774f9a36c12; files: src/claws/package-resume.test.ts)

Rank-up moves

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

  • Publish the exact-head combined type-check timing, resource, and cleanup results after the hosted jobs complete.

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 cddda46 into main Sep 3, 2026
248 checks passed
@steipete
steipete deleted the codex/ci-reduce-typecheck-fanout-20260903 branch September 3, 2026 15:56
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 3, 2026
* refs/remotes/origin/main:
  fix(plugins): reject unverifiable pinned npm installs (#136725)
  improve(ui): lift sidebar section headers on hover and mark online owners (#136985)
  test(cron): reuse isolated run suite hooks (#137341)
  test(channels): reuse shared indexed call guards (#137350)
  fix(ui): sidebar header controls read misaligned after the + button lost its border (#137317)
  fix(qa-channel): preserve conversation kind for implicit actions (#137343)
  fix: target the source checkout in Control UI repair commands (#137354)
  chore: reduce CI job count and database test overhead (#137352)
  fix(ios): preserve chat live edge across keyboard transitions (#136660)
  refactor(control-ui): consolidate mention inbox requests (#137375)
  fix(openai): preserve ChatGPT HTTP status for retry pacing (#137146)
  fix(mcp): hide policy-denied plugin tools from ACP sessions [AI] (#136546)
  test(queue): reuse shared deferred fixtures (#137338)
  fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) (#137358)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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