Add completion notices for ultra runs

This commit is contained in:
alex committed 2026-11-30 17:21:35 +00:00
1 parent a867d9460a
commit d7f345ac04
8 files changed
+610 -4

No files matched your search

+13 -1
View File
@@ -1,6 +1,6 @@
import assert from "node:assert/strict";
import test from "node:test";
import { readMaxWorkflowItems, readMaxWorkers, readUltraEnabled } from "../src/config.ts";
import { readMaxWorkflowItems, readMaxWorkers, readUltraEnabled, readUltraNotify } from "../src/config.ts";
test("worker configuration defaults to 16 and accepts only integers from 1 through 32", () => {
assert.deepEqual(readMaxWorkers(undefined), { value: 16 });
@@ -37,3 +37,15 @@ test("ultra defaults on, disables only on an explicit off, and warns on invalid
assert.match(result.warning ?? "", /PI_SUBAGENT_ULTRA/);
}
});
test("ultra notices default on, disable only on an explicit off, and warn on invalid values", () => {
assert.deepEqual(readUltraNotify(undefined), { value: true });
assert.deepEqual(readUltraNotify(""), { value: true });
assert.deepEqual(readUltraNotify("on"), { value: true });
assert.deepEqual(readUltraNotify("off"), { value: false });
for (const invalid of ["0", "false", "OFF", " maybe", "disabled"]) {
const result = readUltraNotify(invalid);
assert.equal(result.value, true);
assert.match(result.warning ?? "", /PI_SUBAGENT_ULTRA_NOTIFY/);
}
});