fix: bound code queue cli noise

This commit is contained in:
Codex
2026-05-23 01:56:59 +00:00
parent 774c32515e
commit 7ea2f77b70
9 changed files with 286 additions and 61 deletions
+5
View File
@@ -142,6 +142,10 @@ export function runCodeQueueCliSteerContract(): JsonRecord {
assertCondition(fetchMethod === "POST", "non-dry-run should POST", { fetchMethod });
assertCondition(fetchPrompt === "send this", "non-dry-run should send raw prompt in body", { fetchPrompt });
assertCondition(nestedRecord(success, ["steer"]).accepted === true, "successful steer should report accepted=true", success);
const successJson = JSON.stringify(success);
assertCondition(nestedRecord(success, ["steer"]).promptOmitted === true, "successful steer should mark prompt omitted", success);
assertCondition(!successJson.includes("send this"), "successful steer must not echo prompt text", success);
assertCondition(!successJson.includes("promptPreview"), "successful steer must not include promptPreview", success);
assertReason(codexSteerTaskForTest("direct_task", ["p"], () => ({ ok: false, exitCode: 1, stderrTail: "Cannot connect to the Docker daemon" })), "backend-core-unreachable", null);
assertReason(codexSteerTaskForTest("direct_task", ["p"], () => ({ ok: false, status: 404, body: { ok: false, error: "microservice not found: code-queue" } })), "code-queue-microservice-unregistered", 404);
@@ -164,6 +168,7 @@ export function runCodeQueueCliSteerContract(): JsonRecord {
"dry-run does not call stable proxy helper",
"dry-run prompt preview is bounded",
"non-dry-run uses stable proxy helper",
"successful steer confirms write without echoing prompt",
"steer failure classification is JSON-consumable",
],
};