Repository navigation
Delete the duplicated fallback system prompt once PromptAssembler is the only prompt path - #1334
Conversation
… prompt path (closes #1327) Production inference always wires a `PromptAssembler` (daemon `replace_engine` → `new_with_assembler`). The only `None`-assembler path is the daemon's no-op/idle service, whose `NoOpInferenceEngine` returns `NoModelLoaded` before any inference runs — so the inline `fallback_system_prompt()` was dead-but-drifting duplication of the graph-seeded TOOL STRATEGY / RESPONSE RULES. - Delete `fallback_system_prompt()` and its inline rule duplication from `prompt_templates.rs`, plus the three tests asserting on it. - Make `EMERGENCY_FALLBACK_PROMPT` (`prompt_assembler.rs`) `pub(crate)` and use it for the agent loop's non-assembler branch — the genuine safety net, not a duplicate of the seeded rules. - Update doc comments referencing the removed function. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Code Review — PR #1334Review Type: Initial Review Requirements Check (Issue #1327)
📝 All six acceptance criteria met. Code Review FindingsNo critical, important, or blocking issues. Architecture & correctness — The change correctly collapses a known, documented duplication. The selection order (test override → assembler → emergency) is preserved; only the final arm changed from a content-duplicating function to the canonical Visibility choice — 🟢 Behavioral note (non-blocking) — 🟢 The emergency arm now drops Documentation — 🟢 Doc comments updated consistently across all three files (module doc in Nitpicks
Recommendation: APPROVENet-positive, atomic change that removes acknowledged technical debt with zero behavioral risk to live inference. The correctness-critical claim (the 🤖 Generated with Claude Code |
… prompt path (closes #1327) (#1334) Production inference always wires a `PromptAssembler` (daemon `replace_engine` → `new_with_assembler`). The only `None`-assembler path is the daemon's no-op/idle service, whose `NoOpInferenceEngine` returns `NoModelLoaded` before any inference runs — so the inline `fallback_system_prompt()` was dead-but-drifting duplication of the graph-seeded TOOL STRATEGY / RESPONSE RULES. - Delete `fallback_system_prompt()` and its inline rule duplication from `prompt_templates.rs`, plus the three tests asserting on it. - Make `EMERGENCY_FALLBACK_PROMPT` (`prompt_assembler.rs`) `pub(crate)` and use it for the agent loop's non-assembler branch — the genuine safety net, not a duplicate of the seeded rules. - Update doc comments referencing the removed function. Co-authored-by: Michael Libio <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Closes #1327