Skip to content

fix(ci): prepare verified Bun before parity checks - #195155

Merged
vincentkoc merged 2 commits into
mainfrom
perf/ci-lint-bun-reuse-20261108
Nov 8, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
perf/ci-lint-bun-reuse-20261108

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

CI parity checks can fail while independently staging pinned Bun inside lint or formatting, even after the shared runtime download recovery landed.

User Impact

Affected jobs prepare the verified Bun runtime once before parity checks. A failed preparation stops dependent checks without repeating the download; both engines, selected tests, and required gates remain enabled.

Why This Change Was Made

Reuse the existing setup action across lint, docs formatting, and boundary checks. Mixed jobs prepare Bun only for the tasks that consume it. Independent docs checks still run after a preparation failure. No new jobs, runner sizes, cache publishers, or dependencies.

This includes the docs/boundary reader patch from #195154 and builds on landed #195139.

Evidence

  • Current selector CI fails hosted extension lint after two subshards independently stage Bun. The changed-lint step lasts 61.10s before failure. The nested resolver hides the underlying staging error; this is not classified as another HTTP504.
  • Existing recorded CI also exposes the same missing preparation in docs and boundary parity. Whole lint durations are not attributed to download overhead.
  • Three focused workflow guards pass at 0617ab1f22bc (1.18s Vitest; 199 unrelated cases unselected). They cover consumer selection, failed setup, retained independent docs checks, and protected cache publication. Earlier owning-file proof passed 193 cases with 8 existing skips before the final lint-reader addition.
  • Tooling typecheck, scoped lint, formatting, complete workflow/actionlint/zizmor checks, and exact-base test-line ratchet pass. The 100 added test lines have explicit allocations; production delta is 44 added/4 removed workflow lines, with no new runtime code.
  • Independent review of the complete f89b123d7fee..0617ab1f22bc range found no findings. Full-range local ClawSweeper review also found no actionable correctness or security findings (confidence 0.91).
  • Normal exact-head CI 42472246880 passed. The previously failing extension stripe prepared verified Bun in 3s, ran all eight selected lint subshards successfully, and emitted no late one-time staging messages. Boundary parity also passed. Docs formatting was not selected by this PR, so its direct proof remains the focused workflow guards.
  • Blacksmith recorded 32 successful paid jobs, 112 rounded runtime-minutes and $0.68 list-price usage, with zero failed/cancelled/rerun spend. This is the cost of one qualification run, not a matched savings estimate.

@vincentkoc vincentkoc self-assigned this Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR prepares verified Bun once per lint job and prevents lint consumers from retrying staging after preparation fails.

Example: The check-lint-extensions-1 job runs several lint parity checks.

  • Before: Parity consumers independently attempt Bun staging and can repeat failed release downloads.
  • After: The job prepares Bun through the shared action, and parity consumers reuse OPENCLAW_BUN_PATH.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused and source-consistent implementation with useful condition regressions; successful execution of the changed Actions path remains unobserved.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored CI PR is outside the ordinary contributor proof gate; supplied validation covers workflow conditions, while the linked incident demonstrates the prior failure rather than successful after-fix runtime reuse.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: CI lint jobs repeatedly attempt Bun preparation during release-download failures instead of consuming the shared prepared runtime.
Reason: The maintainer-authored direction addresses recorded CI failures without changing lint coverage, runtime pins, or runner allocation.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a concrete CI setup problem still present on main; no actionable introduced defect was found.

Priority: P2
Reviewed head: 43b6117944c98e1358b97c924c9a40bd4ab9c8e8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supplied evidence does not show an Actions lint job successfully reusing the prepared Bun executable and suppressing consumer retries after setup failure.
Agent review details

How this fits together

GitHub Actions selects lint workloads, prepares their Node and Bun runtimes, and runs oxlint and Bun against the same inputs to compare diagnostics.

flowchart TD
  A[Selected lint workload] --> B[Node setup]
  B --> C[Shared Bun setup]
  D[Verified release asset cache] --> C
  C --> E[Prepared executable path]
  E --> F[Oxlint and Bun parity]
  F --> G[Required check result]
Loading

Technical review

Best possible solution:

Reuse the existing verified Bun setup and executable override while retaining both lint engines and independent failure collection.

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

Source shows parity clearing CI and reaching local staging without a prepared executable override; the linked incident records failed lint jobs, but no target code was executed during this review.

Is this the best way to solve the issue?

The patch uses the existing runtime owner and changes only consumer wiring and setup prerequisites, making it a focused repair rather than another resolver or cache.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Lint engine parity keeps the original intent (a3f44fb: Compare Bun and oxlint diagnostics on identical prepared inputs while retaining oxlint in CI.)
  • Independent check continuation keeps the original intent (a372ae2: Collect independent failures while preserving actual setup, plan, and artifact prerequisites.)
  • Shared central lint keeps the original intent (f9f5dcb: Reuse core lint setup and run central formatting and scripts lint even after a core lint failure.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit f9f5dcb adds .github/workflows/ci.yml:4076 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f9f5dcb7b5be; files: .github/workflows/ci.yml)
  • Peter Steinberger: Raw commit a3f44fb adds scripts/lib/lint-parity.mts:41 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a3f44fb8a9f6; files: scripts/lib/lint-parity.mts)

PR surface

Tests +67, Config +26, Other +2. Total +95 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 67 0 +67
Docs 0 0 0 0
Config 1 29 3 +26
Generated 0 0 0 0
Other 1 2 0 +2
Total 3 98 3 +95

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.

Labels

Label changes:

  • add P2: Repeated Bun staging can fail or delay lint jobs during release-download outages, with no demonstrated application-runtime impact.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Repeated Bun staging can fail or delay lint jobs during release-download outages, with no demonstrated application-runtime impact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

Reviewed November 8, 2026, 4:56 AM ET / 09:56 UTC.

@vincentkoc
vincentkoc force-pushed the perf/ci-parity-bun-reuse-20261108 branch from 115c1d2 to 7baf6f0 Compare November 8, 2026 10:14
@vincentkoc
vincentkoc force-pushed the perf/ci-lint-bun-reuse-20261108 branch from 43b6117 to 0617ab1 Compare November 8, 2026 10:36
@vincentkoc vincentkoc changed the title fix(ci): reuse verified Bun across lint parity checks fix(ci): prepare verified Bun before parity checks Nov 8, 2026
@vincentkoc
vincentkoc changed the base branch from perf/ci-parity-bun-reuse-20261108 to main November 8, 2026 10:36
@vincentkoc
vincentkoc marked this pull request as ready for review November 8, 2026 10:37
@vincentkoc
vincentkoc enabled auto-merge (squash) November 8, 2026 10:40
@steipete

steipete commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

This also covers the boundary-shard failure on #195091: check-additional-boundaries failed in lint:no-chained-type-assertions with OPENCLAW_LINT_TOOL=bun: could not stage the pinned fork, from a cold stage outside setup-test-bun.

Two small gaps remain for cold stagers after this lands. Both are outside this diff, so they could go in a follow-up:

  1. The API fallback in scripts/stage-openclaw-bun.sh calls api.github.com without credentials. On shared runner egress IPs, the 60-requests-per-hour unauthenticated limit can run out while the web route keeps returning 504. Each fallback stage costs four calls: the tag lookup plus three assets. Sending Authorization: Bearer $GH_TOKEN when it's set, with the token passed into setup-test-bun, would remove that limit for CI.
  2. resolvePinnedBun (scripts/lib/pinned-bun.mts) runs the stager with stdio: "pipe" and keeps only the first line of the error message. That drops the stager's own stderr, the WARN … trying the GitHub asset API line and curl's HTTP status, so a failure can't be told apart from a 504 or a rate-limit 403. Appending the last few stderr lines to the reason would make the next one diagnosable.

@vincentkoc
vincentkoc merged commit ea133a4 into main Nov 8, 2026
130 of 134 checks passed
@vincentkoc
vincentkoc deleted the perf/ci-lint-bun-reuse-20261108 branch November 8, 2026 10:51
vincentkoc added a commit that referenced this pull request Nov 8, 2026
…tooling-lint-selection-20261108

* commit 'b0e90e6a4b359fff7756698067fdce4758b1907b': (38 commits)
  fix(android): Talk button demands a realtime provider on a native Talk setup (#191194)
  chore: trace first-run Gateway work and verify later replies (#195185)
  fix(knowledge): keep deleted messages out of reply previews (#195126)
  fix(agents): preserve streamed replies across Gateway restarts (#195164)
  perf(ci): reuse SDK transport path boundaries (#195180)
  fix(sandbox): avoid pauses for unchanged command checkpoints (#195120)
  fix(test): make retention checks portable across runtimes (#195091)
  fix(knowledge): clarify temporal kind filters (#194995)
  improve: reduce Gateway allocation while draining SQLite receipts (#195129)
  fix: reduce streaming CPU after reply and voice directives (#195145)
  fix: reduce Markdown reparsing during streamed tool-call checks (#195161)
  fix: restore the main dead-export gate (#195158)
  improve(ci): pack small UI selections into fewer jobs (#195107)
  fix(muse): quota and sign-in failures end with no reply (#195148)
  fix: allow first release push with shipped patch bytes (#195174)
  fix(ci): narrow single-config tooling selections (#195147)
  fix(packaging): reject incompatible prepublish plugin cohorts (#195152)
  fix(ci): prepare verified Bun before parity checks (#195155)
  fix: Incognito agent turns stall before execution (#195005)
  fix: credentialed search and speech providers work without picking a provider (#195169)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
* fix(ci): reuse verified Bun across lint parity checks

* fix(ci): reuse verified Bun for docs and boundary parity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

2 participants