fix: #3034 audit residuals — correct the constitution renderer doc-comment (renderer NOT reconciled with committed MD, do not regenerate); pin the collapsed-thinking header assertion; align auth list's openai-codex credential source with auth status

Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
This commit is contained in:
Claude
2026-06-11 02:45:25 +00:00
parent 83ef677355
commit 2bbe25b7e4
3 changed files with 39 additions and 5 deletions
+12 -1
View File
@@ -994,7 +994,18 @@ fn auth_status_all_providers(store: &ConfigStore, secrets: &Secrets) -> Vec<Stri
let keyring_status = keyring_key.as_ref().map(|_| "set").unwrap_or("-");
let env_status = env_key.as_ref().map(|_| "set").unwrap_or("-");
let source = if config_key.is_some() {
let source = if provider == ProviderKind::OpenaiCodex {
// Keep the summary consistent with `auth status`: Codex auth is
// OAuth-file (or env token) based — config/keyring keys are not
// consulted for it.
if env_key.is_some() {
"env"
} else if oauth_file_present {
"oauth file"
} else {
"unset"
}
} else if config_key.is_some() {
"config"
} else if keyring_key.is_some() {
"keyring"
+7 -3
View File
@@ -281,9 +281,13 @@ fn load_handoff_block(workspace: &Path) -> Option<String> {
/// 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 ──
+20 -1
View File
@@ -4185,7 +4185,26 @@ mod tests {
.flat_map(|line| line.spans.iter().map(|span| span.content.as_ref()))
.collect::<String>();
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::<String>()
})
.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]