From 1d172c60f1eabdfc009dfa2c73ed8d90474a67f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sun, 19 Apr 2026 19:31:03 -0400 Subject: [PATCH] Update phased-prompt tests for the rewritten awaiting-* scripts The ceo-phased-prompts and e2e-flows suites pinned the old "Awaiting Org Approval" heading and the now-deprecated "HIRES FIRST. STRATEGY APPROVAL LAST." shouting caps. The rewritten awaiting-org prompt reads "Awaiting Org Strategy Approval" and describes the server-enforced ordering by code (STRATEGY_BEFORE_HIRES) rather than by imperative prose. Update the expected-phrase assertions to match. --- .../autonomous-chain/ceo-phased-prompts.spec.ts | 13 +++++++------ .../integration/autonomous-chain/e2e-flows.spec.ts | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/integration/autonomous-chain/ceo-phased-prompts.spec.ts b/tests/integration/autonomous-chain/ceo-phased-prompts.spec.ts index 68938f21..34f68f88 100644 --- a/tests/integration/autonomous-chain/ceo-phased-prompts.spec.ts +++ b/tests/integration/autonomous-chain/ceo-phased-prompts.spec.ts @@ -25,13 +25,14 @@ describe("Step 2: CEO phased prompts", () => { const prompt = buildSystemPrompt(ctx); expect(prompt).toContain("Team Building Phase"); // The rewritten prompt uses "Design a minimal org" instead of the - // old "Design the Organization Structure" header. Check for both - // the stable Step-2 marker and the new ordering guarantee that - // blocks the self-loop the earlier prompt enabled. + // old "Design the Organization Structure" header. The hires-first + // rule is now server-enforced at /approvals with 409 codes, so the + // prompt describes the contract instead of begging the model. expect(prompt).toContain("Design a minimal org"); - expect(prompt).toContain("HIRES FIRST. STRATEGY APPROVAL LAST."); + expect(prompt).toContain("hires first, strategy approval last"); + expect(prompt).toContain("STRATEGY_BEFORE_HIRES"); expect(prompt).toContain("Submit org strategy"); - expect(prompt).not.toContain("Awaiting Org Approval"); + expect(prompt).not.toContain("Awaiting Org Strategy Approval"); expect(prompt).not.toContain("Goal Decomposition"); }); @@ -79,7 +80,7 @@ describe("Step 2: CEO phased prompts", () => { }); const prompt = buildSystemPrompt(ctx); - expect(prompt).toContain("Awaiting Org Approval"); + expect(prompt).toContain("Awaiting Org Strategy Approval"); expect(prompt).not.toContain("Team Building Phase"); expect(prompt).not.toContain("Goal Decomposition"); }); diff --git a/tests/integration/autonomous-chain/e2e-flows.spec.ts b/tests/integration/autonomous-chain/e2e-flows.spec.ts index bd6be668..c3c87998 100644 --- a/tests/integration/autonomous-chain/e2e-flows.spec.ts +++ b/tests/integration/autonomous-chain/e2e-flows.spec.ts @@ -61,7 +61,7 @@ describe("E2E: Full autonomous CEO cold start flow", () => { } as ApprovalRecord], }); const phase1Prompt = buildSystemPrompt(phase1Ctx); - expect(phase1Prompt).toContain("Awaiting Org Approval"); + expect(phase1Prompt).toContain("Awaiting Org Strategy Approval"); // 4. Board approves hires const hireApprovalCTO = shared.db.requestApproval({ @@ -278,7 +278,7 @@ describe("Review Fix: Org gate consistency (revision_requested)", () => { }); const prompt = buildSystemPrompt(ctx); - expect(prompt).toContain("Awaiting Org Approval"); + expect(prompt).toContain("Awaiting Org Strategy Approval"); expect(prompt).toContain("revision_requested"); }); });