Skip to content

ci: speed up wrapper tests and fix CI artifact and cleanup failures - #5514

Merged
sxlijin merged 4 commits into
canaryfrom
sam/wrapper-ci-linux-fast
Nov 4, 2026
Merged

sxlijin merged 4 commits into
canaryfrom
sam/wrapper-ci-linux-fast

Conversation

@sxlijin

@sxlijin sxlijin commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Changes

The last successful wrapper run took about 44 minutes overall; even Linux x64 GNU took 10m25s, including roughly eight minutes repeating ~270 tests across four candidates. Run one native x86_64-unknown-linux-gnu job on blacksmith-16vcpu-ubuntu-2404, remove the platform planning job and unused Windows/musl setup, and give the job a ten-minute budget.

Use an explicit ci test profile with 52 tests per self-update-enabled candidate and 48 per disabled candidate. Preserve both Rust and packed BAML implementations and both self-update variants, covering selection, bootstrap/offline use, archive integrity and safety, recovery/concurrent installs, management/config preservation, JSON status, stdio delegation, self-update, and telemetry privacy/opt-out. The exhaustive suite remains the default local invocation. The same focused gate checks exact release archives; release artifact production is unchanged.

Make the cargo timings (merged) and sccache stats (merged) artifact merge steps best-effort with continue-on-error: true. Artifact aggregation or cleanup failures, such as the observed DeleteArtifact 404, no longer turn successful test runs into failed CI.

Resolve the latest canary nightly-release switch by guarding the wrapper test steps with inputs.enabled, keeping the single Linux job successful as a no-op when disabled so downstream release jobs still run.

Fix an existing HTTP server restart test that failed twice in compiler CI: await cancelled serving tasks before reusing the listener, close each client connection to prevent stale pooled-connection reuse, and cancel both tasks on early exits. This preserves the restart assertion and removes the fixed 100ms cleanup delay.

Testing

  • Workflow lint and pre-commit checks passed for the changed files.
  • Final Linux wrapper CI passed in 5m18s including setup, builds, all four candidates, and cleanup. All 200 tests passed: Rust 52, Rust no-self-update 48, BAML 52, BAML no-self-update 48.
  • Compiler, CLI, and snapshot CI passed all 1,838 tests, including the full runtime corpus that previously hit the HTTP restart race.
  • All 12 HTTP server tests passed locally, plus 320 restart cycles across 32 concurrent tasks in a temporary stress test. The full newer corpus is validated by CI with its matching compiler.
  • Installer bootstrap compatibility passed in Linux CI.
  • CodeRabbit approved the final changes with no requested changes.

Additional Notes

Updated against canary a2ff141306. Baseline: https://github.com/BoundaryML/baml/actions/runs/41756082102.

Summary by CodeRabbit

  • Tests

    • Automated wrapper testing now runs a focused set of end-to-end checks on Linux, while the full suite remains available for broader coverage.
    • Wrapper test runs support selecting a named test profile, and an optional filter remains available to narrow the selected tests.
    • CI and release wrapper test gates now cover Linux only; release artifacts continue to follow the full platform contract.
  • Chores

    • Diagnostic artifact merging no longer causes the Cargo test workflow to fail if it encounters an error.

@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
developer-docs Ready Ready Preview Nov 4, 2026 3:38pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The wrapper test runner accepts named BAML test profiles. The reusable workflow runs the ci profile on x86_64-unknown-linux-gnu. Cargo artifact-merge failures no longer fail the workflow. The HTTP server cancellation test awaits task completion before re-serving.

Changes: Wrapper test gate

Layer / File(s) Summary
Define and pass the CI profile
baml_language/wrapper_tests/baml.toml, baml_language/wrapper_tests/run, baml_language/wrapper_tests/README.md
The ci profile selects specified wrapper end-to-end tests. The runner accepts --profile and forwards its value to baml-cli test. The README describes the profile coverage and notes that the full suite runs without a profile.
Run the profile on the Linux target
.github/workflows/wrapper-tests.reusable.yaml, baml_language/wrapper_tests/README.md
The reusable workflow runs on blacksmith-16vcpu-ubuntu-2404 with the x86_64-unknown-linux-gnu target. Test steps require inputs.enabled; artifact downloads require both inputs.enabled and inputs.release_candidates. The test command uses --profile ci. The README describes the CI and release wrapper gates.

Cargo artifact merges

Layer / File(s) Summary
Allow artifact-merge failures
.github/workflows/cargo-tests.reusable.yaml
The cargo timings and sccache stats artifact-merge steps now continue if their merge actions fail.

HTTP server cancellation test

Layer / File(s) Summary
Await cancellation before re-serving
baml_language/crates/baml_tests/baml_src/ns_http_server/http_server.baml
The test awaits the first serving task’s cancellation before serving again. It sets Connection: close on requests and applies deferred cancellation to both serving tasks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

  • BoundaryML/baml#5425: Adds the shared wrapper E2E harness and reusable conformance workflow used by this profile.
  • BoundaryML/baml#5422: Adds the BAML-native wrapper and release-candidate integration tested by this workflow.
  • BoundaryML/baml#5515: Changes enablement and release-gate behavior in the same wrapper test workflow.

Suggested reviewers: hellovai, aaronvg, 2kai2kai2

Merge Risk: Minimal · up to 0a2b9

No merge-blocking risk was identified; wrapper CI intentionally covers a focused Linux profile.

Security architecture risk: Low · up to ad4db

Release validation now relies on a smaller Linux-only check while other platforms remain distributed. Selected test failures still block wrapper publishing, and no exploitable defect or increased publishing privilege was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The changed checkout action executes in a test job with read-only repository permissions and optional compiler-cache credentials in its environment. Publishing write permission remains in a separate downstream job. The external checkout implementation and effective cache-credential scope were not assessed.

Trust Boundaries and Controls

  • observed — The new profile value crosses into the test process through an argv array rather than shell expansion. Undefined profiles are rejected, and candidate return codes remain authoritative for the runner result.

Resilience and Maintainability Implications

  • inferred — The shortened timeout can interrupt validation but does not create a successful-test bypass: the test command remains gating, and wrapper publication requires the downstream aggregate gate. This does not guarantee fixture cleanup after forced interruption.
Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main changes: speeding up wrapper tests and preventing CI artifact and cleanup failures from failing the workflow.
Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the Linux gate,
And picks a profile neat and straight.
The tests now wait for tasks to cease,
While merge steps fail in quiet peace.
I nibble carrots, hop away,
And leave the CI green today.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 40dad7e9-c3e8-4227-baea-4fa18b950578
Commits

Reviewing files that changed from the base of the PR and between ad4dbe9 and 0a2b93d.

Files selected for processing: 1
  • baml_language/crates/baml_tests/baml_src/ns_http_server/http_server.baml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Binary size checks failed

❌ 2 violations · ✅ 1 passed

⚠️ Please fix the size gate issues or acknowledge them by updating baselines.

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 64.3 MB 27.3 MB file 73.1 MB -8.8 MB (-12.0%) OK
❌ packed-program Linux 🔒 39.1 MB 16.0 MB file 29.2 MB +9.9 MB (+34.0%) FAIL
❌ bridge_wasm WASM 25.9 MB 🔒 7.6 MB gzip 5.7 MB +2.0 MB (+35.0%) FAIL

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.

Details & how to fix

Violations:

  • packed-program (Linux) file_bytes: 39.1 MB exceeds limit of 30.1 MB (exceeded by +9.0 MB, policy: max_file_bytes)
  • packed-program (Linux) file_delta_pct: +34.0% exceeds limit of 3.0% (exceeded by +31.0pp, policy: max_delta_pct)
  • bridge_wasm (WASM) gzip_bytes: 7.6 MB exceeds limit of 5.9 MB (exceeded by +1.8 MB, policy: max_gzip_bytes)
  • bridge_wasm (WASM) gzip_delta_pct: +35.0% exceeds limit of 3.0% (exceeded by +32.0pp, policy: max_delta_pct)

Add/update baselines:

.ci/size-gate/wasm32-unknown-unknown.toml:

[artifacts.bridge_wasm]
file_bytes = 25864291
gzip_bytes = 7645141

.ci/size-gate/x86_64-unknown-linux-gnu.toml:

[artifacts.packed-program]
file_bytes = 39058648
gzip_bytes = 16018700

Generated by cargo size-gate · workflow run

@sxlijin sxlijin changed the title ci: keep wrapper tests focused on one large Linux runner ci: streamline wrapper tests and tolerate timing merge failures Nov 4, 2026
@sxlijin
sxlijin enabled auto-merge November 4, 2026 13:40
@sxlijin
sxlijin added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 4, 2026
@sxlijin sxlijin changed the title ci: streamline wrapper tests and tolerate timing merge failures ci: speed up wrapper tests and fix CI artifact and cleanup failures Nov 4, 2026
@sxlijin
sxlijin added this pull request to the merge queue Nov 4, 2026
Merged via the queue into canary with commit 8df529f Nov 4, 2026
99 checks passed
@sxlijin
sxlijin deleted the sam/wrapper-ci-linux-fast branch November 4, 2026 16:25

This branch was successfully deployed

1 active deployment
Preview – developer-docs — 0a2b93d8 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant