From 4087dde780148b02741b70be6f60430cd67f79aa Mon Sep 17 00:00:00 2001 From: root Date: Fri, 24 Apr 2026 14:06:24 -0500 Subject: [PATCH] execution_loop: update stale test assertion to match current prompt format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pre-existing failure I've been noting across this session — `executor_prompt_includes_surfaced_candidates` expected the substring "W-1 Alice Smith" but the prompt format was intentionally changed (probably in a Phase 38/39 commit) to separate doc_id from name so the executor doesn't conflate `doc_id` (vector-index key) with `workers_500k.worker_id` (integer PK). Current prompt format (line 1178 in build_executor_prompt): - name="Alice Smith" city="Toledo" state="OH" (vector doc_id=W-1) The prompt body explicitly instructs the model NOT to conflate the two IDs — the format separation is the mechanism enforcing that instruction. The OLD test assertion predated that separation. Assertion now checks the semantic contract (both tokens present, any order) instead of the exact old concatenation. Workspace test result after this commit: 343 passed, 0 failed, 0 warnings (both lib + tests). This is the last stale-test hole from the phase-audit sweep — it popped up during the 41-commit push but I was leaving it as pre-existing-unrelated. J called it: sitting broken for hours is worse than a one-line assertion update. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/gateway/src/execution_loop/mod.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/gateway/src/execution_loop/mod.rs b/crates/gateway/src/execution_loop/mod.rs index e3da7b7..0da0f66 100644 --- a/crates/gateway/src/execution_loop/mod.rs +++ b/crates/gateway/src/execution_loop/mod.rs @@ -1547,8 +1547,15 @@ mod tests { ]; let p = build_executor_prompt(&req, &[], &log); assert!(p.contains("CANDIDATES SURFACED SO FAR")); - assert!(p.contains("W-1 Alice Smith")); - assert!(p.contains("Toledo, OH")); + // Prompt format deliberately separates name from doc_id now — + // the line reads `name="Alice Smith" ... (vector doc_id=W-1)` + // so the executor prompt explicitly tells the model NOT to + // conflate doc_id with workers_500k.worker_id. Assertion was + // expecting the old concatenated format; update to match the + // semantic contract (both tokens present, any order). + assert!(p.contains("Alice Smith")); + assert!(p.contains("W-1")); + assert!(p.contains("Toledo")); } #[test]