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,7 +1,15 @@
import { buildTaskContext, contextSizeReport } from "./task-context-lib.mjs";
import { buildTaskContext, compactTaskContext, contextSizeReport } from "./task-context-lib.mjs";
const index = process.argv.indexOf("--task");
const task = index >= 0 ? process.argv[index + 1] : undefined;
const bundle = buildTaskContext(task);
const report = contextSizeReport(bundle);
process.stdout.write(`${JSON.stringify({ ...bundle.context, size: report }, null, 2)}\n`);
if (!report.withinBudget) {
// Never send an oversized task package to the caller. The compact command
// is the first boundary before remote transport, so fail closed here and
// leave the detailed audit to check-task-context/context-governance.
process.stderr.write(`task-context-over-budget task=${bundle.context.task} contentTokens=${report.totalTokens} envelopeTokens=${report.serializedContextTokens}/${report.reservedEnvelopeTokens} estimatedTokens=${report.estimatedContextTokens}\n`);
process.exitCode = 1;
} else {
process.stdout.write(`${JSON.stringify({ ...compactTaskContext(bundle.context), size: report }, null, 2)}\n`);
}