Skip to content

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

test(ci): cover boundary checker edge cases

Steven Enamakel6906c2711e02
diff --git a/scripts/__tests__/embed-contract-boundary.test.mjs b/scripts/__tests__/embed-contract-boundary.test.mjs
index 5fa18a1fbe..0291816ae8 100644
--- a/scripts/__tests__/embed-contract-boundary.test.mjs
+++ b/scripts/__tests__/embed-contract-boundary.test.mjs
@@ -1,28 +1,54 @@
-import test from 'node:test';
-import assert from 'node:assert/strict';
-import { copyFileSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
-import { tmpdir } from 'node:os';
-import { dirname, resolve } from 'node:path';
-import { spawnSync } from 'node:child_process';
+import test from "node:test";
+import assert from "node:assert/strict";
+import {
+ copyFileSync,
+ mkdirSync,
+ mkdtempSync,
+ rmSync,
+ writeFileSync,
+} from "node:fs";
+import { tmpdir } from "node:os";
+import { dirname, resolve } from "node:path";
+import { spawnSync } from "node:child_process";
function check(files) {
- const root = mkdtempSync(resolve(tmpdir(), 'embed-contract-boundary-'));
+ const root = mkdtempSync(resolve(tmpdir(), "embed-contract-boundary-"));
try {
- mkdirSync(resolve(root, 'scripts/ci'), { recursive: true });
- mkdirSync(resolve(root, 'scripts/lib'), { recursive: true });
- const bridge = 'vendor/tinyagents/crates/tinyagents-harness/src/providers/claude_code/bridge.rs';
+ mkdirSync(resolve(root, "scripts/ci"), { recursive: true });
+ mkdirSync(resolve(root, "scripts/lib"), { recursive: true });
+ const bridge =
+ "vendor/tinyagents/crates/tinyagents-harness/src/providers/claude_code/bridge.rs";
mkdirSync(dirname(resolve(root, bridge)), { recursive: true });
- writeFileSync(resolve(root, bridge), 'struct ChatMessage { pub(crate) role: String, pub(crate) content: String, }\n');
- copyFileSync(new URL('../ci/check-agent-runtime-boundary.mjs', import.meta.url), resolve(root, 'scripts/ci/check-agent-runtime-boundary.mjs'));
- for (const helper of ['runtime-boundary-types.mjs', 'agent-sdk-contracts.mjs']) {
- copyFileSync(new URL(`../lib/${helper}`, import.meta.url), resolve(root, `scripts/lib/${helper}`));
+ writeFileSync(
+ resolve(root, bridge),
+ "struct ChatMessage { pub(crate) role: String, pub(crate) content: String, }\n",
+ );
+ copyFileSync(
+ new URL("../ci/check-agent-runtime-boundary.mjs", import.meta.url),
+ resolve(root, "scripts/ci/check-agent-runtime-boundary.mjs"),
+ );
+ for (const helper of [
+ "runtime-boundary-types.mjs",
+ "agent-sdk-contracts.mjs",
+ ]) {
+ copyFileSync(
+ new URL(`../lib/${helper}`, import.meta.url),
+ resolve(root, `scripts/lib/${helper}`),
+ );
}
- writeFileSync(resolve(root, 'scripts/ci/agent-runtime-boundary-baseline.json'), '[]\n');
+ writeFileSync(
+ resolve(root, "scripts/ci/agent-runtime-boundary-baseline.json"),
+ "[]\n",
+ );
for (const [path, source] of Object.entries(files)) {
mkdirSync(dirname(resolve(root, path)), { recursive: true });
writeFileSync(resolve(root, path), source);
}
- const result = spawnSync(process.execPath, [resolve(root, 'scripts/ci/check-agent-runtime-boundary.mjs')], { encoding: 'utf8' });
+ const result = spawnSync(
+ process.execPath,
+ [resolve(root, "scripts/ci/check-agent-runtime-boundary.mjs")],
+ { encoding: "utf8" },
+ );
assert.equal(result.error, undefined);
return { status: result.status, output: result.stdout + result.stderr };
} finally {
@@ -31,44 +57,72 @@ function check(files) {
}
const contracts = {
- 'crates/openhuman-embed/src/stream.rs': 'pub use tinyagents_harness::cancel::CancellationToken;\n',
- 'crates/openhuman-embed/src/config.rs': 'pub use tinytools::{\n DefaultEffect, Patterns, RuleEffect, Surface, ToolMatcher, ToolRule, ToolRules,\n};\n',
- 'crates/openhuman-embed/src/lib.rs': 'pub mod providers {\n pub use tinyinference_llm::message::MessageDelta;\n pub use tinyinference_llm::model::{\n ChatModel, DeferredHandle, DeferredStatus, ModelProfile, ModelRequest, ModelResponse,\n ModelStream, ModelStreamItem, ModelStreamMetadata,\n };\n pub use tinyinference_llm::{Error, Result};\n}\n',
+ "crates/openhuman-embed/src/stream.rs":
+ "pub use tinyagents_harness::cancel::CancellationToken;\n",
+ "crates/openhuman-embed/src/config.rs":
+ "pub use tinytools::{\n DefaultEffect, Patterns, RuleEffect, Surface, ToolMatcher, ToolRule, ToolRules,\n};\n",
+ "crates/openhuman-embed/src/lib.rs":
+ "pub mod providers {\n pub use tinyinference_llm::message::MessageDelta;\n pub use tinyinference_llm::model::{\n ChatModel, DeferredHandle, DeferredStatus, ModelProfile, ModelRequest, ModelResponse,\n ModelStream, ModelStreamItem, ModelStreamMetadata,\n };\n pub use tinyinference_llm::{Error, Result};\n}\n",
};
-test('Embed exposes the native provider and policy contracts without copying their owners', () => {
+test("Embed exposes the native provider and policy contracts without copying their owners", () => {
const result = check(contracts);
assert.equal(result.status, 0, result.output);
});
-test('the public contract allowance does not admit another export in an approved file', () => {
- const result = check({ ...contracts, 'crates/openhuman-embed/src/lib.rs': contracts['crates/openhuman-embed/src/lib.rs'].replace('ModelStreamMetadata,', 'ModelStreamMetadata, UnreviewedType,') });
+test("the public contract allowance does not admit another export in an approved file", () => {
+ const result = check({
+ ...contracts,
+ "crates/openhuman-embed/src/lib.rs": contracts[
+ "crates/openhuman-embed/src/lib.rs"
+ ].replace("ModelStreamMetadata,", "ModelStreamMetadata, UnreviewedType,"),
+ });
assert.equal(result.status, 1, result.output);
assert.match(result.output, /openhuman-upstream-reexport/);
});
-test('the same native contract remains forbidden outside its owning adapter', () => {
- const result = check({ 'crates/openhuman-core/src/other/mod.rs': contracts['crates/openhuman-embed/src/stream.rs'] });
+test("the same native contract remains forbidden outside its owning adapter", () => {
+ const result = check({
+ "crates/openhuman-core/src/other/mod.rs":
+ contracts["crates/openhuman-embed/src/stream.rs"],
+ });
assert.equal(result.status, 1, result.output);
assert.match(result.output, /openhuman-upstream-reexport/);
});
-test('Embed preserves its existing native tool, session and budget injection contracts', () => {
+test("Embed preserves its existing native tool, session and budget injection contracts", () => {
const result = check({
- 'crates/openhuman-embed/src/lib.rs': 'pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult};\n' +
- 'pub use tinyagents_session::port::{AgentStores, SessionStoreProvider};\n',
- 'crates/openhuman-embed/src/budget.rs': 'pub use tinyinference_llm::model::budget::{Budget, BudgetExceeded, BudgetSnapshot, CallBudget, Spend, SpendLimits};\n',
+ "crates/openhuman-embed/src/lib.rs":
+ "pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult};\n" +
+ "pub use tinyagents_session::port::{AgentStores, SessionStoreProvider};\n",
+ "crates/openhuman-embed/src/budget.rs":
+ "pub use tinyinference_llm::model::budget::{Budget, BudgetExceeded, BudgetSnapshot, CallBudget, Spend, SpendLimits};\n",
});
assert.equal(result.status, 0, result.output);
});
-test('native injection allowances reject expanded or core compatibility exports', () => {
+test("native injection allowances reject expanded or core compatibility exports", () => {
for (const files of [
- { 'crates/openhuman-core/src/agent/host_overrides.rs': 'pub use tinyagents_harness::cancel::CancellationToken;\n' },
- { 'crates/openhuman-embed/src/lib.rs': 'pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult, ToolRegistry};\n' },
- { 'crates/openhuman-core/src/tools/mod.rs': 'pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult};\n' },
- { 'crates/openhuman-core/src/storage/sessions/mod.rs': 'pub use tinyagents_session::port::{AgentStores, SessionStoreProvider};\n' },
- { 'crates/openhuman-embed/src/budget.rs': 'pub use tinyinference_llm::model::budget::{Budget, BudgetExceeded, BudgetSnapshot, CallBudget, Spend, SpendLimits, BudgetedModel};\n' },
+ {
+ "crates/openhuman-core/src/agent/host_overrides.rs":
+ "pub use tinyagents_harness::cancel::CancellationToken;\n",
+ },
+ {
+ "crates/openhuman-embed/src/lib.rs":
+ "pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult, ToolRegistry};\n",
+ },
+ {
+ "crates/openhuman-core/src/tools/mod.rs":
+ "pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult};\n",
+ },
+ {
+ "crates/openhuman-core/src/storage/sessions/mod.rs":
+ "pub use tinyagents_session::port::{AgentStores, SessionStoreProvider};\n",
+ },
+ {
+ "crates/openhuman-embed/src/budget.rs":
+ "pub use tinyinference_llm::model::budget::{Budget, BudgetExceeded, BudgetSnapshot, CallBudget, Spend, SpendLimits, BudgetedModel};\n",
+ },
]) {
const result = check(files);
assert.equal(result.status, 1, result.output);
@@ -76,7 +130,6 @@ test('native injection allowances reject expanded or core compatibility exports'
}
});
-
test("Embed preserves native persisted codecs without admitting core facades", () => {
const codecs = [
"pub use tinyagents_graph::todos::TodoList;",
@@ -89,7 +142,12 @@ test("Embed preserves native persisted codecs without admitting core facades", (
assert.equal(allowed.status, 0, allowed.output);
for (const files of [
{ "crates/openhuman-core/src/storage/sessions/mod.rs": codecs },
- { "crates/openhuman-embed/src/lib.rs": codecs.replace("AgentEvent, HarnessRunStatus", "AgentEvent, HarnessRunStatus, UnreviewedType") },
+ {
+ "crates/openhuman-embed/src/lib.rs": codecs.replace(
+ "AgentEvent, HarnessRunStatus",
+ "AgentEvent, HarnessRunStatus, UnreviewedType",
+ ),
+ },
]) {
const rejected = check(files);
assert.equal(rejected.status, 1, rejected.output);
@@ -118,11 +176,13 @@ test("task-local with_thread_id calls, imports, and declarations remain forbidde
});
test("Embed preserves the exact native dispatch-budget and observer contracts", () => {
- const budget = "pub use tinyagents_harness::cost::{\n" +
+ const budget =
+ "pub use tinyagents_harness::cost::{\n" +
" ControlledDispatchError, DispatchModelOptions, DispatchRefusal, DispatchRefusalReason,\n" +
" PhysicalDispatchAdmission, PhysicalDispatchPermit,\n" +
"};\n";
- const observer = "pub use tinyagents_harness::observability::{\n" +
+ const observer =
+ "pub use tinyagents_harness::observability::{\n" +
" PhysicalDispatchMetadata, PhysicalDispatchObserver, PhysicalDispatchOutcome,\n" +
" PhysicalDispatchStatus, PhysicalDispatchTerminal, PhysicalDispatchUsage,\n" +
"};\n";
diff --git a/scripts/__tests__/saas-ambient.test.mjs b/scripts/__tests__/saas-ambient.test.mjs
index b0cde05c18..9fc457e66e 100644
--- a/scripts/__tests__/saas-ambient.test.mjs
+++ b/scripts/__tests__/saas-ambient.test.mjs
@@ -11,12 +11,18 @@ import { fileURLToPath } from "node:url";
import { codeOf, compare, exempt, scan } from "../ci/check-saas-ambient.mjs";
-const repoRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "..");
+const repoRoot = path.join(
+ path.dirname(fileURLToPath(import.meta.url)),
+ "..",
+ "..",
+);
const script = path.join(repoRoot, "scripts", "ci", "check-saas-ambient.mjs");
const SRC = "crates/openhuman-core/src";
function run(files, baseline, args = []) {
- const root = fs.mkdtempSync(path.join(os.tmpdir(), "openhuman-saas-ambient-"));
+ const root = fs.mkdtempSync(
+ path.join(os.tmpdir(), "openhuman-saas-ambient-"),
+ );
for (const [rel, body] of Object.entries(files)) {
const abs = path.join(root, rel);
fs.mkdirSync(path.dirname(abs), { recursive: true });
@@ -27,13 +33,28 @@ function run(files, baseline, args = []) {
fs.mkdirSync(path.dirname(abs), { recursive: true });
fs.writeFileSync(abs, `${JSON.stringify(baseline, null, 2)}\n`);
}
- const result = spawnSync(process.execPath, [script, "--root", root, ...args], {
- encoding: "utf8",
- });
- const written = path.join(root, "scripts", "ci", "saas-ambient-baseline.json");
- const after = fs.existsSync(written) ? JSON.parse(fs.readFileSync(written, "utf8")) : null;
+ const result = spawnSync(
+ process.execPath,
+ [script, "--root", root, ...args],
+ {
+ encoding: "utf8",
+ },
+ );
+ const written = path.join(
+ root,
+ "scripts",
+ "ci",
+ "saas-ambient-baseline.json",
+ );
+ const after = fs.existsSync(written)
+ ? JSON.parse(fs.readFileSync(written, "utf8"))
+ : null;
fs.rmSync(root, { recursive: true, force: true });
- return { status: result.status, out: `${result.stdout}${result.stderr}`, after };
+ return {
+ status: result.status,
+ out: `${result.stdout}${result.stderr}`,
+ after,
+ };
}
test("flags every rule", () => {
@@ -44,13 +65,20 @@ test("flags every rule", () => {
"let h = tokio::task::spawn_blocking(|| 1);",
"std::thread::spawn(|| {});",
"let c = Config::load_or_init().await?;",
- "std::env::set_var(\"A\", \"b\");",
+ 'std::env::set_var("A", "b");',
"let h = dirs::home_dir();",
].join("\n"),
);
assert.deepEqual(
found.map((f) => f.rule),
- ["bare-spawn", "bare-spawn", "bare-spawn", "ambient-config", "env-mutation", "home-dir"],
+ [
+ "bare-spawn",
+ "bare-spawn",
+ "bare-spawn",
+ "ambient-config",
+ "env-mutation",
+ "home-dir",
+ ],
);
});
@@ -61,16 +89,22 @@ test("ignores comments, docs and the scoped helpers", () => {
"// tokio::spawn(fut) drops the scope",
"/// call Config::load_or_init() only in single-user code",
"spawn_scoped(async {});",
- "let s = \"// not a comment\"; tokio::spawn(f);",
+ 'let s = "// not a comment"; tokio::spawn(f);',
].join("\n"),
);
- assert.deepEqual(found.map((f) => f.rule), ["bare-spawn"]);
+ assert.deepEqual(
+ found.map((f) => f.rule),
+ ["bare-spawn"],
+ );
assert.equal(codeOf("a(); // tokio::spawn("), "a(); ");
});
test("counts repeated identical lines as separate occurrences", () => {
const found = scan("x.rs", "tokio::spawn(f);\ntokio::spawn(f);\n");
- assert.deepEqual(found.map((f) => f.occurrence), [1, 2]);
+ assert.deepEqual(
+ found.map((f) => f.occurrence),
+ [1, 2],
+ );
});
test("a moved line is not a new site, a new line is", () => {
@@ -85,23 +119,39 @@ test("passes on a matching baseline and skips test files and test support helper
const files = {
[`${SRC}/a.rs`]: "tokio::spawn(f);\n",
[`${SRC}/a_tests.rs`]: "tokio::spawn(f);\n",
- [`${SRC}/inference/provider/model_listing_test_support.rs`]: "tokio::spawn(f);\n",
- [`${SRC}/inference/provider/catalog_listing.rs`]: "Config::load_or_init();\n",
+ [`${SRC}/inference/provider/model_listing_test_support.rs`]:
+ "tokio::spawn(f);\n",
+ [`${SRC}/inference/provider/catalog_listing.rs`]:
+ "Config::load_or_init();\n",
[`${SRC}/core/runtime/spawn.rs`]: "tokio::spawn(f);\n",
};
const first = run(files, null, ["--write-baseline"]);
assert.equal(first.status, 0, first.out);
- assert.equal(first.after.length, 2, "only ordinary production sites are scanned");
+ assert.equal(
+ first.after.length,
+ 2,
+ "only ordinary production sites are scanned",
+ );
assert.deepEqual(
first.after.map(({ path, rule }) => ({ path, rule })),
[
{ path: `${SRC}/a.rs`, rule: "bare-spawn" },
- { path: `${SRC}/inference/provider/catalog_listing.rs`, rule: "ambient-config" },
+ {
+ path: `${SRC}/inference/provider/catalog_listing.rs`,
+ rule: "ambient-config",
+ },
],
);
const unbaselined = run(files, []);
- assert.equal(unbaselined.status, 1, "production ambient config reads still fail");
- assert.match(unbaselined.out, /ambient-config: crates\/openhuman-core\/src\/inference\/provider\/catalog_listing\.rs:1/);
+ assert.equal(
+ unbaselined.status,
+ 1,
+ "production ambient config reads still fail",
+ );
+ assert.match(
+ unbaselined.out,
+ /ambient-config: crates\/openhuman-core\/src\/inference\/provider\/catalog_listing\.rs:1/,
+ );
assert.doesNotMatch(unbaselined.out, /model_listing_test_support\.rs/);
const again = run(files, first.after);
assert.equal(again.status, 0, again.out);
@@ -109,7 +159,10 @@ test("passes on a matching baseline and skips test files and test support helper
});
test("fails on a new site and names the fix", () => {
- const { status, out } = run({ [`${SRC}/a.rs`]: "Config::load_or_init();\n" }, []);
+ const { status, out } = run(
+ { [`${SRC}/a.rs`]: "Config::load_or_init();\n" },
+ [],
+ );
assert.equal(status, 1);
assert.match(out, /ambient-config: crates\/openhuman-core\/src\/a.rs:1/);
assert.match(out, /load_config_with_timeout/);
@@ -117,7 +170,10 @@ test("fails on a new site and names the fix", () => {
test("fails on a fixed site still in the baseline", () => {
const baseline = scan(`${SRC}/a.rs`, "tokio::spawn(f);\n");
- const { status, out } = run({ [`${SRC}/a.rs`]: "spawn_scoped(f);\n" }, baseline);
+ const { status, out } = run(
+ { [`${SRC}/a.rs`]: "spawn_scoped(f);\n" },
+ baseline,
+ );
assert.equal(status, 1);
assert.match(out, /remove them/);
});
@@ -145,8 +201,14 @@ test("the runtime itself may read the ambient context", () => {
const finding = { rule: "ambient-context" };
assert.equal(exempt(`${SRC}/core/runtime/tenant.rs`, finding), true);
assert.equal(exempt(`${SRC}/storage/mod.rs`, finding), false);
- assert.equal(exempt(`${SRC}/core/runtime/spawn.rs`, { rule: "bare-spawn" }), true);
- assert.equal(exempt(`${SRC}/core/runtime/tenant.rs`, { rule: "bare-spawn" }), false);
+ assert.equal(
+ exempt(`${SRC}/core/runtime/spawn.rs`, { rule: "bare-spawn" }),
+ true,
+ );
+ assert.equal(
+ exempt(`${SRC}/core/runtime/tenant.rs`, { rule: "bare-spawn" }),
+ false,
+ );
});
test("a new CoreContext::current() in a tenant-keyed path fails the ratchet", () => {
@@ -166,6 +228,9 @@ test("a new CoreContext::current() in a tenant-keyed path fails the ratchet", ()
[],
);
assert.equal(regressed.status, 1);
- assert.match(regressed.out, /ambient-context: crates\/openhuman-core\/src\/web_chat\/ops\/state.rs:1/);
+ assert.match(
+ regressed.out,
+ /ambient-context: crates\/openhuman-core\/src\/web_chat\/ops\/state.rs:1/,
+ );
assert.match(regressed.out, /current_tenant/);
});
diff --git a/scripts/ci/check-agent-runtime-boundary.mjs b/scripts/ci/check-agent-runtime-boundary.mjs
index 57fd039dd4..40cfa2c5d9 100644
--- a/scripts/ci/check-agent-runtime-boundary.mjs
+++ b/scripts/ci/check-agent-runtime-boundary.mjs
@@ -480,7 +480,11 @@ function assertSelfTests() {
const policyExport = [{ text: "pub use tinytools::ToolPolicy;" }];
if (
!isEmbedContractExport(embedPath, policyExport, 0) ||
- isEmbedContractExport("crates/openhuman-core/src/lib.rs", policyExport, 0) ||
+ isEmbedContractExport(
+ "crates/openhuman-core/src/lib.rs",
+ policyExport,
+ 0,
+ ) ||
isEmbedContractExport(
embedPath,
[{ text: "pub use tinytools::{ToolPolicy, ToolRegistry};" }],
@@ -509,14 +513,20 @@ function assertSelfTests() {
"agent-runtime boundary self-test: embed tool injection contract must stay exact",
);
const stopExport = [
- { text: "pub use tinyagents_harness::middleware::{StopDecision, StopHook};" },
+ {
+ text: "pub use tinyagents_harness::middleware::{StopDecision, StopHook};",
+ },
];
if (
!isEmbedContractExport(embedPath, stopExport, 0) ||
isEmbedContractExport("crates/openhuman-core/src/lib.rs", stopExport, 0) ||
isEmbedContractExport(
embedPath,
- [{ text: "pub use tinyagents_harness::middleware::{StopDecision, StopHook, TurnState};" }],
+ [
+ {
+ text: "pub use tinyagents_harness::middleware::{StopDecision, StopHook, TurnState};",
+ },
+ ],
0,
)
)
diff --git a/scripts/ci/check-saas-ambient.mjs b/scripts/ci/check-saas-ambient.mjs
index 0cedfb71e1..def872af33 100644
--- a/scripts/ci/check-saas-ambient.mjs
+++ b/scripts/ci/check-saas-ambient.mjs
@@ -79,7 +79,8 @@ const AMBIENT_CONTEXT_EXEMPT_PREFIX = "crates/openhuman-core/src/core/runtime/";
/** Findings `rel` is exempt from. */
export function exempt(rel, finding) {
if (finding.rule === "bare-spawn") return BARE_SPAWN_EXEMPT.has(rel);
- if (finding.rule === "ambient-context") return rel.startsWith(AMBIENT_CONTEXT_EXEMPT_PREFIX);
+ if (finding.rule === "ambient-context")
+ return rel.startsWith(AMBIENT_CONTEXT_EXEMPT_PREFIX);
return false;
}
@@ -175,7 +176,9 @@ async function main() {
try {
baseline = JSON.parse(await readFile(baselinePath, "utf8"));
} catch (error) {
- console.error(`Unable to read ${relative(repoRoot, baselinePath)}: ${error.message}`);
+ console.error(
+ `Unable to read ${relative(repoRoot, baselinePath)}: ${error.message}`,
+ );
return 1;
}
@@ -190,13 +193,20 @@ async function main() {
console.error(`New SaaS ambient-state sites (${added.length}):`);
for (const f of added) {
const hint = RULES.find((r) => r.rule === f.rule)?.hint ?? "";
- console.error(` ${f.rule}: ${f.path}:${f.line}: ${f.text}\n -> ${hint}`);
+ console.error(
+ ` ${f.rule}: ${f.path}:${f.line}: ${f.text}\n -> ${hint}`,
+ );
}
}
if (stale.length) {
- console.error(`\nFixed sites still in the baseline (${stale.length}); remove them:`);
- for (const f of stale) console.error(` ${f.rule}: ${f.path}: ${f.text} [${f.occurrence}]`);
- console.error("\nTighten the baseline with --write-baseline once nothing new was added.");
+ console.error(
+ `\nFixed sites still in the baseline (${stale.length}); remove them:`,
+ );
+ for (const f of stale)
+ console.error(` ${f.rule}: ${f.path}: ${f.text} [${f.occurrence}]`);
+ console.error(
+ "\nTighten the baseline with --write-baseline once nothing new was added.",
+ );
}
return 1;
}