Complete M16 action select circle parity
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-20 22:57:59 -04:00
parent fb5abd8e37
commit 6a0b980d75
368 changed files with 17417 additions and 117 deletions

View File

@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
import { buildTaskContext, contextSizeReport, CONTEXT_LIMITS, readIndexedTask, selectInputPaths } from "../../../tools/web/task-context-lib.mjs";
import { buildTaskContext, compactTaskContext, contextSizeReport, CONTEXT_LIMITS, readIndexedTask, selectInputPaths } from "../../../tools/web/task-context-lib.mjs";
test("current task context is bounded and follows the parent pointer", () => {
const bundle = buildTaskContext();
@@ -17,6 +17,20 @@ test("current task context is bounded and follows the parent pointer", () => {
assert.equal(report.totalTokens, report.sourceTokens + report.evidenceTokens);
assert.equal(report.evidenceTokens, bundle.context.inputSelection.totals.tokens);
assert.ok(report.totalTokens < CONTEXT_LIMITS.contextTokens);
assert.ok(report.serializedContextTokens <= CONTEXT_LIMITS.contextEnvelopeTokens);
assert.ok(report.estimatedContextTokens <= CONTEXT_LIMITS.contextTokens);
});
test("printed context reserves envelope space and omits verbose exclusion audit", () => {
const bundle = buildTaskContext();
const compact = compactTaskContext(bundle.context);
assert.equal(compact.inputSelection.excludedCount, bundle.context.inputSelection.excluded.length);
assert.deepEqual(compact.inputSelection.excludedReasons, {
EVIDENCE_BYTE_BUDGET: 3,
GENERATED_EVIDENCE_OUTPUT: 3,
});
assert.ok(!Object.hasOwn(compact.inputSelection, "excluded"));
assert.ok(contextSizeReport(bundle).serializedContextTokens <= CONTEXT_LIMITS.contextEnvelopeTokens);
});
test("the indexed task record remains available beside the compact card", () => {