Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ci): serialize private lanes after failures and unset rustc wrapper

Steven Enamakel5fadc524c68b
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjs
index 2d1c362262..917efbe80e 100644
--- a/scripts/__tests__/self-hosted-lanes.test.mjs
+++ b/scripts/__tests__/self-hosted-lanes.test.mjs
@@ -431,10 +431,23 @@ test("private gates-off, storage, and Tauri execute equivalent coverage suites w
assert.equal(checks["tauri-coverage"].env.CARGO_BUILD_TARGET_DIR, "target/ci-private-coverage");
});
-test("private runner serializes lanes even when parallelism is requested", () => {
- const plan = { ...stubPlan(), profile: "ex63" };
- assert.equal(new Runner(plan, { out: "unused", maxParallel: 8 }).maxParallel, 1);
- assert.equal(new Runner({ ...plan, profile: "hosted" }, { out: "unused", maxParallel: 8 }).maxParallel, 8);
+test("private runner serializes independent lanes after failures even when parallelism is requested", async () => {
+ const out = fs.mkdtempSync(path.join(os.tmpdir(), "lanes-private-"));
+ fs.mkdirSync(path.join(out, "logs"));
+ const check = (name, run) => ({ name, run, when: true, needs: [] });
+ const plan = { profile: "ex63", lanes: [
+ { name: "first", checks: [check("fails", "exit 1"), check("continues", "echo continued")] },
+ { name: "second", checks: [check("independent", "echo independent")] },
+ ] };
+ const runner = new Runner(plan, { out, maxParallel: 8 });
+ assert.equal(runner.maxParallel, 1);
+ const lanes = await runner.run();
+ assert.equal(lanes[0].checks[0].status, "failure");
+ assert.equal(lanes[0].checks[1].status, "success");
+ assert.equal(lanes[1].checks[0].status, "success");
+ assert.ok(Date.parse(lanes[1].checks[0].start) >= Date.parse(lanes[0].checks[1].end));
+ assert.equal(new Runner({ ...plan, profile: "hosted" }, { out, maxParallel: 8 }).maxParallel, 8);
+ fs.rmSync(out, { recursive: true, force: true });
});
test("area flags are read strictly from CI_AREA_*", () => {
diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjs
index 9e8339ac72..8d69b45d6a 100644
--- a/scripts/ci/self-hosted/lanes-plan.mjs
+++ b/scripts/ci/self-hosted/lanes-plan.mjs
@@ -512,14 +512,13 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {
run: "cargo clippy --manifest-path crates/openhuman-app/Cargo.toml -- -D warnings",
},
{
- // llvm-cov's RUSTFLAGS mode with the linker flag cleared, as in
- // ci-lite. ci-lite also clears RUSTC_WRAPPER because its container
- // config installs sccache; on ex63 covEnv sets no compiler wrapper.
+ // Hosted keeps ci-lite's wrapper-free RUSTFLAGS instrumentation.
+ // The private plan below uses the Cargo target linker and nextest.
name: "tauri-coverage",
when: areas.rustTauri,
env: { ...covEnv },
run:
- (ex63 ? "unset RUSTFLAGS" : "unset RUSTFLAGS RUSTC_WRAPPER") +
+ "unset RUSTFLAGS RUSTC_WRAPPER" +
" && cargo llvm-cov clean --manifest-path crates/openhuman-app/Cargo.toml" +
" && cargo llvm-cov --no-rustc-wrapper --manifest-path crates/openhuman-app/Cargo.toml" +
" --lcov --output-path ci-out/lcov/lcov-tauri.info",
@@ -584,6 +583,10 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {
},
];
+ // Coverage replaces each existing plain suite only for the private profile.
+ // Preserve the original package, features, target list, and libtest substring
+ // filters; union those filters in nextest's expression syntax. --no-clean
+ // retains prior instrumentation, while every suite writes its own report.
if (ex63) {
for (const lane of lanes) {
if (!["rust-gates-off", "storage-drivers"].includes(lane.name)) continue;
@@ -685,7 +688,7 @@ export function validatePlan(plan) {
* @typedef {object} Lane
* @property {string} name
* @property {Check[]} checks
- * @property {string|null} [targetDir] CARGO_TARGET_DIR for this lane
+ * @property {string|null} [targetDir] Cargo build.target-dir for this lane
* @property {object} [env]
* @property {number} [nice]
* @property {number} [heavy] compiles the core crate; priority for a