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
test(ci): cover storage-bypass lane and debt history checks
Steven Enamakel14548969a78e
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjsindex 7550bdb7d0..2c09f138ee 100644--- a/scripts/__tests__/self-hosted-lanes.test.mjs+++ b/scripts/__tests__/self-hosted-lanes.test.mjs@@ -231,6 +231,7 @@ test("untouched areas leave only the always-on gates", () => {"static:orch-ip-gate","static:feature-forwarding","static:crate-chain",+ "static:storage-bypass","static:module-pins","static:submodule-monotonic",]);@@ -267,6 +268,7 @@ test("the storage area arms only the storage-drivers lane, with the sqlite and f"static:orch-ip-gate","static:feature-forwarding","static:crate-chain",+ "static:storage-bypass","static:module-pins","static:submodule-monotonic",],@@ -675,3 +677,13 @@ test("module boundary policy and checker changes arm their own scripts lane", ()assert.ok(scripts.includes(`'${file}'`), `${file} must arm the scripts area`);}});+++test("storage-bypass runs under cancellation supervision in both profiles", () => {+ for (const profile of ["hosted", "ex63"]) {+ const plan = buildPlan({ profile, areas: NONE, env: profile === "ex63" ? EX63_ENV : {} });+ const check = plan.lanes.flatMap(lane => lane.checks).find(check => check.name === "storage-bypass");+ assert.equal(check.when, true);+ assert.equal(check.run, "bash scripts/ci-cancel-aware.sh node scripts/ci/check-storage-bypass.mjs");+ }+});diff --git a/scripts/__tests__/storage-bypass-debt.test.mjs b/scripts/__tests__/storage-bypass-debt.test.mjsindex 5986b4f4bd..da3abd5774 100644--- a/scripts/__tests__/storage-bypass-debt.test.mjs+++ b/scripts/__tests__/storage-bypass-debt.test.mjs@@ -1,6 +1,10 @@import assert from "node:assert/strict";import test from "node:test";-import { validateCoverageDebt, validateAllowances } from "../ci/storage-bypass-debt.mjs";+import { mkdtempSync, rmSync } from "node:fs";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { execFileSync } from "node:child_process";+import { validateCoverageDebt, validateAllowances, historicalFindings } from "../ci/storage-bypass-debt.mjs";import { compare, scan, CURATED_VENDOR_ROOTS } from "../ci/check-storage-bypass.mjs";const row = {rule: "json-write", path: "crates/openhuman-embed/src/state.rs", text: "tokio::fs::write(path, bytes);", occurrence: 1,@@ -57,3 +61,14 @@ test("curated vendor coverage excludes native drivers but not host adapter writetest("new serializer and helper rules ignore quoted and commented fixture text", () => {assert.deepEqual(scan("x.rs", 'let fixture = "serde_json::to_writer(file, value);";\n/* fn write_atomic(path) {} */'), []);});++test("missing canonical base history fails closed", () => {+ const root = mkdtempSync(join(tmpdir(), "storage-history-"));+ try {+ execFileSync("git", ["init"], { cwd: root, stdio: "ignore" });+ assert.throws(() => historicalFindings(root, { scan, withoutAllowed: (_, x) => x, isTestFile: () => false, CURATED_VENDOR_ROOTS: [] }));+ } finally { rmSync(root, { recursive: true, force: true }); }+});+test("quoted database opener examples do not count as host persistence", () => {+ assert.deepEqual(scan("crates/openhuman-embed/src/example.rs", 'let example = r#"OtherStore::open(root.join("cache.db"))"#;'), []);+});