From 2bbe25b7e43f708c5b6dcc402c8cc6f217e05a4d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 02:45:25 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20#3034=20audit=20residuals=20=E2=80=94=20?= =?UTF-8?q?correct=20the=20constitution=20renderer=20doc-comment=20(render?= =?UTF-8?q?er=20NOT=20reconciled=20with=20committed=20MD,=20do=20not=20reg?= =?UTF-8?q?enerate);=20pin=20the=20collapsed-thinking=20header=20assertion?= =?UTF-8?q?;=20align=20auth=20list's=20openai-codex=20credential=20source?= =?UTF-8?q?=20with=20auth=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5 --- crates/cli/src/lib.rs | 13 ++++++++++++- crates/tui/src/prompts.rs | 10 +++++++--- crates/tui/src/tui/history.rs | 21 ++++++++++++++++++++- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 09452784..ba2fbbba 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -994,7 +994,18 @@ fn auth_status_all_providers(store: &ConfigStore, secrets: &Secrets) -> Vec Option { /// Core: task execution, tool-use rules, output format, toolbox reference, /// "When NOT to use" guidance, sub-agent sentinel protocol. /// -/// Rendered from `prompts/constitution.yaml` via `render_constitution.py`. -/// The YAML is the source of truth; the markdown is the compiled artifact. -/// Run `python3 render_constitution.py > constitution.md` to regenerate. +/// `prompts/constitution.yaml` + `render_constitution.py` exist as the +/// intended generation pipeline, but the renderer is NOT yet reconciled +/// with this committed markdown (#3015): it emits a much shorter document, +/// bakes the default model id over the `{model_id}` placeholder, and +/// duplicates the Authority Recap that `compose` appends at runtime. Do +/// NOT regenerate this file from the renderer until that gap is closed — +/// edit the markdown directly and mirror structural changes into the YAML. pub const BASE_PROMPT: &str = include_str!("prompts/constitution.md"); // ── Embedder prompt overrides ── diff --git a/crates/tui/src/tui/history.rs b/crates/tui/src/tui/history.rs index b192a39c..b99f1d99 100644 --- a/crates/tui/src/tui/history.rs +++ b/crates/tui/src/tui/history.rs @@ -4185,7 +4185,26 @@ mod tests { .flat_map(|line| line.spans.iter().map(|span| span.content.as_ref())) .collect::(); assert!(text.contains("Full reasoning in Ctrl+O")); - assert!(text.contains("reasoning")); + // Pin the actual header shape ("… reasoning done") — a bare + // `contains("reasoning")` is already satisfied by the Ctrl+O + // affordance line above and would never fail on its own. + let header = lines + .first() + .map(|line| { + line.spans + .iter() + .map(|span| span.content.as_ref()) + .collect::() + }) + .unwrap_or_default(); + assert!( + header.starts_with(REASONING_OPENER), + "header opens with the dotted opener: {header:?}" + ); + assert!( + header.contains("reasoning done"), + "header carries the reasoning title and done status: {header:?}" + ); } #[test]