The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(ci): pool coverage profiles and clean release examples
Steven Enamakel9aec7a93a3d8
diff --git a/docs/ci-self-hosted.md b/docs/ci-self-hosted.mdindex 5260b21c3d..1072e09f79 100644--- a/docs/ci-self-hosted.md+++ b/docs/ci-self-hosted.md@@ -133,6 +133,13 @@ for any commit without posting it.- Coverage runs each selected package/feature set once through nextest, whichfails when the selected suite has no tests. Process-per-test isolation andnextest resource groups retain external-resource serialization.+ All private instrumented checks use `LLVM_PROFILE_FILE_NAME=openhuman-%8m.profraw`:+ LLVM's locked merge pool bounds raw profiles to eight files per binary,+ including the auxiliary gates, Tauri, and storage configurations.+ - After all offline examples succeed, Cargo removes their completed+ release-profile outputs from `target/ci-private-build`. The Linux fleet+ example is the only release invocation in this plan. Debug/coverage outputs+ and Tinymold's store remain available for later checks and cache saving.- Cargo registry, pnpm store, and content-based frontend caches remain on theslot cache disk. Rust output caching uses Tinymold alone.- VM sizing is a supervisor setting; it is not assumed by the lane scheduler.diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjsindex ad5da2b29f..b5f7723ff8 100644--- a/scripts/__tests__/self-hosted-lanes.test.mjs+++ b/scripts/__tests__/self-hosted-lanes.test.mjs@@ -946,15 +946,29 @@ test("nextest validation helpers arm Rust validation and script regressions on ttest("private coverage pools profiles for every Rust configuration without changing hosted or ordinary builds", () => {for (const plan of plans()) {const coverage = [];- for (const lane of plan.lanes) for (const check of lane.checks) {- const env = { ...lane.env, ...check.env };- if (check.name === "rust-core-coverage" || check.run.includes("cargo llvm-cov nextest")) {- coverage.push(check.name);- assert.equal(env.LLVM_PROFILE_FILE_NAME, plan.profile === "ex63" ? "openhuman-%8m.profraw" : undefined, `${plan.profile}:${check.name}`);- } else if (/cargo (?:build|clippy|check|test|nextest run)/.test(check.run)) {- assert.equal(env.LLVM_PROFILE_FILE_NAME, undefined, `${plan.profile}:${check.name} is uninstrumented`);+ for (const lane of plan.lanes)+ for (const check of lane.checks) {+ const env = { ...lane.env, ...check.env };+ if (+ check.name === "rust-core-coverage" ||+ check.run.includes("cargo llvm-cov nextest")+ ) {+ coverage.push(check.name);+ assert.equal(+ env.LLVM_PROFILE_FILE_NAME,+ plan.profile === "ex63" ? "openhuman-%8m.profraw" : undefined,+ `${plan.profile}:${check.name}`,+ );+ } else if (+ /cargo (?:build|clippy|check|test|nextest run)/.test(check.run)+ ) {+ assert.equal(+ env.LLVM_PROFILE_FILE_NAME,+ undefined,+ `${plan.profile}:${check.name} is uninstrumented`,+ );+ }}- }if (plan.profile === "ex63") assert.equal(coverage.length, 8);}});@@ -962,24 +976,41 @@ test("private coverage pools profiles for every Rust configuration without changtest("private release cleanup follows successful examples and names only the ordinary release profile", () => {for (const plan of plans()) {const lint = plan.lanes.find((lane) => lane.name === "rust-lint");- const cleanupIndex = lint.checks.findIndex((check) => check.name === "release-example-cleanup");- if (plan.profile === "hosted") { assert.equal(cleanupIndex, -1); continue; }- const examplesIndex = lint.checks.findIndex((check) => check.name === "embed-offline-examples");+ const cleanupIndex = lint.checks.findIndex(+ (check) => check.name === "release-example-cleanup",+ );+ if (plan.profile === "hosted") {+ assert.equal(cleanupIndex, -1);+ continue;+ }+ const examplesIndex = lint.checks.findIndex(+ (check) => check.name === "embed-offline-examples",+ );assert.equal(cleanupIndex, examplesIndex + 1);const cleanup = lint.checks[cleanupIndex];assert.equal(cleanup.when, true);assert.deepEqual(cleanup.needs, ["embed-offline-examples"]);- assert.equal(cleanup.run, "bash scripts/ci-cancel-aware.sh cargo clean --profile release --target-dir target/ci-private-build");- assert.doesNotMatch(cleanup.run, /ci-private-coverage|tinymold|--profile dev|rm /);+ assert.equal(+ cleanup.run,+ "bash scripts/ci-cancel-aware.sh cargo clean --profile release --target-dir target/ci-private-build",+ );+ assert.doesNotMatch(+ cleanup.run,+ /ci-private-coverage|tinymold|--profile dev|rm /,+ );}});test("failed offline examples block release cleanup while independent Rust validation continues", async () => {const plan = buildPlan({ profile: "ex63", areas: ALL, env: EX63_ENV });const lint = plan.lanes.find((lane) => lane.name === "rust-lint");- const cleanup = lint.checks.find((check) => check.name === "release-example-cleanup");+ const cleanup = lint.checks.find(+ (check) => check.name === "release-example-cleanup",+ );assert.ok(cleanup);- const out = fs.mkdtempSync(path.join(os.tmpdir(), "release-cleanup-dependency-"));+ const out = fs.mkdtempSync(+ path.join(os.tmpdir(), "release-cleanup-dependency-"),+ );try {fs.mkdirSync(path.join(out, "logs"));const checks = [@@ -987,7 +1018,15 @@ test("failed offline examples block release cleanup while independent Rust validcleanup,{ name: "independent", when: true, needs: [], run: "echo continued" },];- const result = await new Runner({ profile: "ex63", lanes: [{ name: "rust-lint", checks }] }, { out, maxParallel: 1 }).run();- assert.deepEqual(result[0].checks.map((check) => check.status), ["failure", "blocked", "success"]);- } finally { fs.rmSync(out, { recursive: true, force: true }); }+ const result = await new Runner(+ { profile: "ex63", lanes: [{ name: "rust-lint", checks }] },+ { out, maxParallel: 1 },+ ).run();+ assert.deepEqual(+ result[0].checks.map((check) => check.status),+ ["failure", "blocked", "success"],+ );+ } finally {+ fs.rmSync(out, { recursive: true, force: true });+ }});diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjsindex 0224081683..74f3170ec3 100644--- a/scripts/ci/self-hosted/lanes-plan.mjs+++ b/scripts/ci/self-hosted/lanes-plan.mjs@@ -152,6 +152,9 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {...rustEnv,CARGO_PROFILE_DEV_DEBUG: "0",RUST_MIN_STACK: "67108864",+ // Nextest forks per test. LLVM merges counters losslessly into eight+ // files per binary instead of retaining a separate file per process.+ ...(ex63 ? { LLVM_PROFILE_FILE_NAME: "openhuman-%8m.profraw" } : {}),...(!ex63 ? { CARGO_BUILD_JOBS: "1" } : {}),};const modulesDir = ex63@@ -594,6 +597,20 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {// retains prior instrumentation implicitly; each suite then writes its report.// Do not also pass --no-clean: the pinned cargo-llvm-cov rejects that pair.if (ex63) {+ const lintLane = lanes.find((lane) => lane.name === "rust-lint");+ const examplesIndex = lintLane.checks.findIndex(+ (check) => check.name === "embed-offline-examples",+ );+ // linux_fleet alone builds release artifacts. Once the complete examples+ // group succeeds, later checks need only debug and coverage products.+ // Cargo scopes this cleanup to the ordinary release profile, preserving+ // those other targets and the independent Tinymold compiler store.+ lintLane.checks.splice(examplesIndex + 1, 0, {+ name: "release-example-cleanup",+ when: core,+ needs: ["embed-offline-examples"],+ run: "bash scripts/ci-cancel-aware.sh cargo clean --profile release --target-dir target/ci-private-build",+ });// This target has cfg(not(coverage)): instrumentation makes its large// binary fail to link and would remove its deliberately small-stack test.// Run that distinct regression once in the ordinary build target, keeping