Skip to content

refactor(ci): centralize independent Node/Bun runtime planning - #198278

Merged
RomneyDa merged 12 commits into
mainfrom
openclaw/independent-runtimes-clean-alt
Nov 16, 2026
Merged

RomneyDa merged 12 commits into
mainfrom
openclaw/independent-runtimes-clean-alt

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Related: #197499 — superseded alternative. This PR retains the original implementation and contributor credit.

Problem and scope

Full manual validation currently executes Node then Bun inside one job. This change makes root-test and plugin-batch runtime results independently schedulable/retryable. It does not claim a measured FRV wall-time win yet; candidate qualification and queue-inclusive comparison are required before landing.

Simplification

  • Restore the existing Node planner and its tests byte-for-byte to merge base 5b750071d1d31b2af9c8d2e58d0f65da010845dc. Remove runtime-weighted repacking, special CLI stripes, executable-selection-to-packing helper, and temporary module-level timing context.
  • Use the existing complete-inventory compact plan once; the manifest expands only runtime membership supplied by the existing runtime owner. Retain exact Node exceptions, both-host/native Bun selections, runner classes, worker limits, deadline/failure/retry identities, and frozen-target capability fallback.
  • Restrict splitting to full manual validation. Daily/PR colocation and capacity remain unchanged. Keep all three UI jobs colocated: their three-slot cap offers no general extra runtime capacity and does not justify duplicate browser installation.
  • Keep necessary timing collector/refit/reader identity changes so a partial runtime cannot overwrite complete historical policy measurements. Remove duplicate timing/planner tests and all three PR-only test-line allowance files; ordinary test budget passes without allocation credit.

Historical rationale and actual wall-time evidence

Colocation was deliberate, not an accidental missed parallelism:

Observed FRV 43757970051, November 15 20:25:14–22:13:11 UTC: 6,477s total, target 2c173a37a48f850246ae2133aa5c02df2ae35953. Critical job 132948320578 queued 631s, ran 5,279s, with ~226s setup (including 141s build). Its test step ran Node 2,822.14s, then Bun 2,152.45s. Across 174 root jobs, maximum queue delay was 1,041s.

The 35m52s Bun overlap is only a single-job optimistic bound. Other npm/sealing barriers finished around 21:47, limiting the modeled whole-FRV gain to roughly 24–25 minutes even before extra setup, runner availability, packing changes and queue delay. Full-manual root cap remains 96 and plugin cap 12. Extra setup/capacity contention can erase or reverse the gain. No measured post-change FRV result yet; do not land on the theoretical bound alone.

Size and proof

Compared with previous 8d6aa41fb654f728ed841acab56617e63ff5233f:

  • Implementation/workflows: net −232 LOC; now +250/−64 = +186 net versus merge base (previous +500/−82 = +418).
  • Tests: net −330 LOC; now +415/−18 = +397 net versus merge base (previous +747/−20 = +727).
  • Documentation counted separately. No allocation/baseline relaxation.

Current cleanup head: 62d9307fcfaf82be12b6ea54f1387cb6f3d70969. Proof:

  • 1,039 workflow/planning tests pass (150.05s wrapper), including full inventory, frozen-target capability fallback, unchanged daily/PR caps and production output-size guards. An initial two-test failure caught an over-broad cap change; fixed in production, not by weakening assertions.
  • Timing reader suite: 109 tests pass; runtime/plugin focused suites pass. Existing independent runner/refit/refresh contracts retained; superseded repacker-only assertions removed.
  • Actual production-manifest comparison: daily/PR matrices byte-identical; full dual root 168→158 and full Bun 168→102, UI stays 3; emitted matrices below GitHub's 256-row limit.
  • Actual config/glob/runtime-owner multiset comparison passes all four full-inventory scenarios: hybrid and GitHub × bun-all and dual-all. Each preserves exactly 15,905 / 31,727 file-runtime selections respectively, including multiplicity; zero missing, added or opaque selections. GitHub root rows are 177→113 (Bun) /176 (dual); hybrid 168→102/158. No planner target-only jobs are omitted.
  • Targeted TypeScript, lint/format, pinned actionlint/zizmor/Git-owner guards, diff check and ordinary test-line ratchet pass (+397/400, allocation credit 0).
  • Production UI build/precompression succeeds (1,058 finalized sidecars), startup initial JS is within budget. The build’s report-only mode reports existing asset overages; a separate enforcing asset check exits 1: largest JS 558.9/558.7 KiB, largest CSS 57.8/56.9 KiB, chat boot 21/20 requests, plus aggregate byte overages. Missing UI/native translations are also recorded. No UI source or baseline edits.

Candidate-owned diagnostic helper dry-run passes with C=Q=62d9307fcfaf82be12b6ea54f1387cb6f3d70969 and trusted P=ce49266c9a0791c969f49c49110061f509aaada3; no remote dispatch/ref was created. Actual FRV fanout is held by the enforcing asset-budget failure under the release preflight rule, not by an assumed unmerged-candidate prohibition. Mock-factory preflight passes at this exact candidate. Fresh hosted ClawSweeper requested in comment #198278 (comment). Exact-head CI, hosted ClawSweeper, and candidate FRV evidence remain required. Separate local independent review was explicitly waived by the requester. Not yet RFR.

Worked on by

RomneyDa and others added 8 commits November 12, 2026 03:28
Preserve runtime coverage and per-runner budgets while separating scheduling, retries, and timing samples. Pack full dual-runtime dispatch within existing per-runtime caps.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 8f0a7349-68f9-4cc5-a0c1-86dca2d4207e
Retain expensive main and full-dispatch inventory runs as one-off PR evidence. Prune duplicated policy and gate assertions and a symmetric retry case while retaining boundary regressions.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 28e10137-9d09-4a5d-b003-3ba0b58796e6
OpenClaw-Publication: 3d20c655-bb75-4456-ae34-99e9ea99ba6a
Keep runtime membership in its owner and name matrix jobs at the manifest boundary. Reuse one subset projection for primary and hosted-retry cost estimates.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 935489fb-7adb-460c-b7e0-22afd6399be5
@clawsweeper

clawsweeper Bot commented Nov 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 docs Improvements or additions to documentation scripts Repository scripts size: XL labels Nov 13, 2026
@RomneyDa
RomneyDa marked this pull request as ready for review November 13, 2026 13:21
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR schedules Node and Bun root-test and plugin-batch work independently during full manual validation while preserving runtime membership and separating timing feedback.

Example: Full Release Validation uses dual-all and the Bun leg fails.

  • Before: Node and Bun execute sequentially in one job, coupling their retry.
  • After: Separate (node) and (bun) jobs allow the failed Bun job to be retried independently.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is coherent and materially simpler, with reported production-planner coverage; full manual scheduling qualification remains unresolved.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored CI-only change needs no end-user demonstration; supplied manifest comparisons and focused tests support inventory preservation without establishing hosted scheduling performance.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Release operators cannot schedule or retry one runtime independently while Node and Bun share a job.
Reason: The maintainer-authored direction provides independent results and retries while preserving daily/PR placement and UI colocation.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this maintainer-authored PR open. The simplified implementation has no identified correctness blocker, and its explicit qualification hold remains appropriate.

Priority: P2
Reviewed head: 62d9307fcfaf82be12b6ea54f1387cb6f3d70969

Before merge

  • Resolve merge risk - Before merge, the PR owner must qualify the candidate's full manual root/plugin scheduling and compare queue-inclusive duration and setup cost against the current balancing implementation; duplicated setup and shared capacity can erase the expected benefit.

Findings

None.

Tests

  • Low-value test test/scripts/ci-test-runtime.test.ts: Remove the final test's valid-selector loop and reference-identity assertion: they mirror the filter helper and duplicate the executor-level runtime selection coverage; retain invalid-selector validation.
Agent review details

How this fits together

CI manifests turn selected test inventories and runtime policy into matrix jobs; shard and plugin executors consume those jobs, and timing collectors feed measurements back into planning.

flowchart TD
  A[Selected test inventory] --> B[Existing compact planner]
  B --> C[Runtime membership owner]
  C --> D[Node matrix jobs]
  C --> E[Bun matrix jobs]
  D --> F[Existing CI gate]
  E --> F
  D --> G[Runtime timing feedback]
  E --> G
Loading

Technical review

Best possible solution:

Keep runtime membership in its existing owner and land the simplified split only after the recorded scheduling qualification succeeds.

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

This is a scheduling improvement rather than a broken product contract; the base source establishes sequential runtime execution.

Is this the best way to solve the issue?

The simplified approach appropriately reuses the existing compact planner, runtime membership policy, executors, and timing owners without adding a competing packer.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Complete candidate qualification (recommended)
    The PR owner completes the full-validation comparison before lifting the existing hold.
  2. Retain current colocation
    Pause the scheduling change if the comparison cannot establish acceptable duration and resource cost.

Provenance checked

  • Runtime job colocation changes intended behavior with a stated reason (a94962e: Qualified Bun execution reused existing worker slots, retained Node preparation, and isolated runtime caches and timings.)
  • Full Node-before-Bun validation changes intended behavior with a stated reason (fa86f99: Dispatch trials retained complete coverage through sequential runtime passes, a plugin phase barrier, and doubled deadlines.)
  • Timing-policy isolation keeps the original intent (7f4c635: Partial runtime observations must not overwrite complete daily-Bun or combined release measurements.)
  • Runner validation and terminal outcomes keeps the original intent (18adeb3: Invalid shard settings fail before preparation, while existing execution owners preserve failure propagation and settlement.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit fa86f99 adds scripts/lib/ci-test-runtime.mts:600 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fa86f99a19fa; files: scripts/lib/ci-test-runtime.mts)
  • Vincent Koc: Raw commit 7ecd67c adds scripts/lib/ci-test-runtime.mts:508 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7ecd67ccfd51; files: scripts/lib/ci-test-runtime.mts)

PR surface

Tests +397, Docs +16, Config +15, Other +171. Total +599 across 23 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 11 415 18 +397
Docs 1 41 25 +16
Config 2 23 8 +15
Generated 0 0 0 0
Other 9 227 56 +171
Total 23 706 107 +599

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Internal runtime selector 1 new environment variable: OPENCLAW_CI_TEST_RUNTIME=node|bun The workflows use this selector to restrict execution without replacing the existing runtime coverage policy.

Root-cause cluster

Relationship: canonical
Canonical: #198278
Summary: This PR carries forward the independent-runtime implementation from the closed alternative.

Members:

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

Labels

Label changes:

  • remove status: 👀 ready for maintainer look: Current PR status no longer selects a status label.

Label justifications:

  • P2: This is a bounded CI scheduling improvement with no demonstrated urgent product regression.
  • merge-risk: 🚨 automation: The diff changes release-validation matrix expansion, execution selection, job identities, and timing feedback; ordinary PR CI does not exercise the full manual scheduling path.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-13T13:42:08.282Z sha 23c15ec :: needs changes before merge. :: [P2] Teach timing readers to consume the split-runtime identities
  • reviewed 2026-11-15T22:56:59.029Z sha 209793c :: needs maintainer review before merge. :: none
  • reviewed 2026-11-15T23:07:59.138Z sha 8d6aa41 :: needs maintainer review before merge. :: none

Reviewed November 15, 2026, 7:13 PM ET / November 16, 2026, 00:13 UTC (Revision 4).

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 15, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 15, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 16, 2026
@RomneyDa
RomneyDa merged commit 44522c4 into main Nov 16, 2026
149 of 152 checks passed
@RomneyDa
RomneyDa deleted the openclaw/independent-runtimes-clean-alt branch November 16, 2026 02:33
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
…law#198278)

* improve(ci): run Node and Bun checks independently

Preserve runtime coverage and per-runner budgets while separating scheduling, retries, and timing samples. Pack full dual-runtime dispatch within existing per-runtime caps.

Co-authored-by: RomneyDa <[email protected]>

* improve(ci): run Node and Bun checks independently

OpenClaw-Publication: 8f0a7349-68f9-4cc5-a0c1-86dca2d4207e

* test(ci): keep inventory qualification out of recurring checks

Retain expensive main and full-dispatch inventory runs as one-off PR evidence. Prune duplicated policy and gate assertions and a symmetric retry case while retaining boundary regressions.

Co-authored-by: RomneyDa <[email protected]>

* Publish openclaw/publish-independent-runtime-ci

OpenClaw-Publication: 28e10137-9d09-4a5d-b003-3ba0b58796e6

* fix(ci): isolate runtime selection in test fixtures

Co-authored-by: RomneyDa <[email protected]>

* Publish openclaw/publish-independent-runtime-ci

OpenClaw-Publication: 3d20c655-bb75-4456-ae34-99e9ea99ba6a

* refactor(ci): centralize independent runtime planning

Keep runtime membership in its owner and name matrix jobs at the manifest boundary. Reuse one subset projection for primary and hosted-retry cost estimates.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>

* refactor(ci): centralize independent Node/Bun runtime planning

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 935489fb-7adb-460c-b7e0-22afd6399be5

* test(ci): fix runtime feedback fixture lint

* test(ci): isolate node volume fixture from runtime selection

* refactor(ci): simplify full-validation runtime jobs

---------

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 17, 2026
Backport #198278 (44522c4) to the signed v2026.11.5 baseline. Preserve existing runner placement, packaging prerequisites, and compact planning.

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
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 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. scripts Repository scripts size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant