Complete M16 action select circle parity
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user