fix(tui): the header said "Every Code"; three upstream tests assumed OpenAI

The TUI header literal came across in the merge as upstream's own product
name. That is the most-looked-at string in the program:

  code-rs/tui/src/chatwidget.rs  "Every Code" -> "Hanzo Dev"

Regenerating snapshots proves the blast radius exactly — 34 snapshot files
changed, and the whole diff is 46 title lines plus 6 lines where the settings
overlay now reads "Model: ZEN5-Coder" instead of "Model: GPT-5.5". Nothing
else moved, which is the point of running them.

Two more prompts the .md sweep could not see because they live in Rust:
DEFAULT_PERSONALITY_HEADER (prepended to BASE_INSTRUCTIONS whenever a
personality is set, and it asserted "based on GPT-5" even for zen5-coder),
and the sample skill's restart hint.

Three tests arrived with the merge asserting upstream's defaults. Each is
given the provider or model it actually means to exercise, rather than having
its assertion weakened:

  app-server get_auth_status  - requires_openai_auth is false for the `hanzo`
                                provider, so the ChatGPT branch is dead by
                                design. Test now names `openai`.
  tui context_mode override   - 272k is the GPT-5 window; zen5-coder has none.
                                Test now names `gpt-5.5`.
  cli bash completion         - asserted `_code()` while CLI_COMMAND_NAME has
                                been "dev" since the rename. This one was red
                                before the merge too. Now asserts our name.

LLM.md's claim that codex-rs changes nothing a user runs was false until this
merge — `dev` used to compile ten crates out of it. Upstream finished the
migration; recorded what is actually left (one models.json via include_str!).

  cargo test -p {code-core,code-tui,code-cli,code-app-server,
                 code-exec,code-mcp-server,code-protocol} -- --test-threads=1
  1310 passed; 1 failed

The one failure is git_info::test_collect_git_info_with_remote, which asserts
a literal https remote. This machine rewrites it:

  [email protected]:.insteadof https://github.com/

  $ GIT_CONFIG_GLOBAL=/dev/null cargo test -p code-core --lib -- \
      git_info::tests::test_collect_git_info_with_remote
  test result: ok. 1 passed; 0 failed

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-06 00:08:26 -07:00
co-authored by Hanzo Dev
parent 23a7fe1109
commit daf458296f
40 changed files with 92 additions and 59 deletions
+8
View File
@@ -43,6 +43,14 @@ copy. A change that only edits `codex-rs/` changes nothing a user runs — this
the single easiest mistake to make here, and `.github/merge-policy.json` made it
for a long time (every glob pointed at `codex-rs/**`).
That sentence only became true with the v0.6.169 merge. Before it, building
`dev` compiled ten crates out of `codex-rs/` — they were real path
dependencies, so the "read-only mirror" was load-bearing. Upstream finished
the migration and the two workspaces are now separate. One thread remains:
`codex-rs/models-manager/models.json` is `include_str!`'d by
`code-version/src/lib.rs`, `core/src/model_family.rs` and
`core/src/agent_defaults.rs`. Deleting `codex-rs/` would not build.
**Why there is a test for all of this.** A one-time edit to a default is a
suggestion that lasts until the next merge. `code-rs/core/tests/hanzo_identity.rs`
asserts every row above and fails the build if any regresses. Upstream has no
@@ -1963,11 +1963,28 @@ mod tests {
) -> (
CodexMessageProcessor,
mpsc::UnboundedReceiver<crate::outgoing_message::OutgoingMessage>,
) {
make_processor_with_provider_for_tests(auth_manager, None)
}
/// `dev`'s default provider is `hanzo`, which sets `requires_openai_auth:
/// false` — so anything exercising the ChatGPT auth path has to ask for the
/// `openai` provider by name rather than rely on the default.
fn make_processor_with_provider_for_tests(
auth_manager: Arc<AuthManager>,
model_provider: Option<&str>,
) -> (
CodexMessageProcessor,
mpsc::UnboundedReceiver<crate::outgoing_message::OutgoingMessage>,
) {
let (outgoing_tx, outgoing_rx) = mpsc::unbounded_channel();
let outgoing = Arc::new(OutgoingMessageSender::new(outgoing_tx));
let overrides = ConfigOverrides {
model_provider: model_provider.map(str::to_string),
..ConfigOverrides::default()
};
let config = Arc::new(
Config::load_with_cli_overrides(Vec::new(), ConfigOverrides::default())
Config::load_with_cli_overrides(Vec::new(), overrides)
.expect("load default config"),
);
let conversation_manager = Arc::new(ConversationManager::new(
@@ -2061,7 +2078,8 @@ mod tests {
RefreshTokenError::permanent("refresh token already used"),
);
let (processor, mut outgoing_rx) = make_processor_with_auth_for_tests(auth_manager);
let (processor, mut outgoing_rx) =
make_processor_with_provider_for_tests(auth_manager, Some("openai"));
processor
.get_auth_status(
RequestId::Integer(42),
+5 -2
View File
@@ -1592,11 +1592,14 @@ mod tests {
use code_protocol::ThreadId;
#[test]
fn bash_completion_uses_code_command_name() {
fn bash_completion_uses_our_command_name() {
let mut buf = Vec::new();
write_completion(Shell::Bash, &mut buf);
let script = String::from_utf8(buf).expect("completion output should be valid UTF-8");
assert!(script.contains("_code()"), "expected bash completion function to be named _code");
assert!(
script.contains(&format!("_{CLI_COMMAND_NAME}()")),
"expected bash completion function to be named _{CLI_COMMAND_NAME}"
);
assert!(!script.contains("_codex()"), "bash completion output should not use legacy codex prefix");
}
+1 -1
View File
@@ -22,7 +22,7 @@ const GPT_5_1_INSTRUCTIONS: &str = include_str!("../gpt_5_1_prompt.md");
const GPT_5_2_INSTRUCTIONS: &str = include_str!("../gpt_5_2_prompt.md");
const GPT_5_1_CODEX_MAX_INSTRUCTIONS: &str = include_str!("../gpt-5.1-codex-max_prompt.md");
const GPT_5_2_CODEX_INSTRUCTIONS: &str = include_str!("../gpt-5.2-codex_prompt.md");
const DEFAULT_PERSONALITY_HEADER: &str = "You are Codex, a coding agent based on GPT-5. You and the user share the same workspace and collaborate to achieve the user's goals.";
const DEFAULT_PERSONALITY_HEADER: &str = "You are Hanzo Dev, a coding agent. You and the user share the same workspace and collaborate to achieve the user's goals.";
const LOCAL_FRIENDLY_TEMPLATE: &str =
"You optimize for team morale and being a supportive teammate as much as code quality.";
const LOCAL_PRAGMATIC_TEMPLATE: &str = "You are a deeply pragmatic, effective software engineer.";
@@ -27,7 +27,7 @@ Skills from {repo}:
Which ones would you like installed?
"""
After installing a skill, tell the user: "Restart Codex to pick up new skills."
After installing a skill, tell the user: "Restart Hanzo Dev to pick up new skills."
## Scripts
+5 -1
View File
@@ -30329,7 +30329,7 @@ Have we met every part of this goal and is there no further work to do?"#
// Title follows theme text color
spans.push(Span::styled(
"Every Code",
"Hanzo Dev",
Style::default()
.fg(crate::colors::text())
.add_modifier(Modifier::BOLD),
@@ -31598,10 +31598,14 @@ use code_core::protocol::OrderMeta;
let cfg_text = std::fs::read_to_string(&config_path).expect("read config");
let cfg = toml::from_str::<ConfigToml>(&cfg_text).expect("parse config");
// 272k is the GPT-5 family's context window. `dev` defaults to
// zen5-coder, which has no fixed window, so name the model this
// assertion is actually about rather than lean on the default.
let reloaded = Config::load_from_base_config_with_overrides(
cfg,
ConfigOverrides {
cwd: Some(code_home.path().to_path_buf()),
model: Some("gpt-5.5".to_string()),
..Default::default()
},
code_home.path().to_path_buf(),
@@ -2,7 +2,7 @@
source: tui/tests/bottom_spacer_clip_regression.rs
expression: output
---
| Every Code |
| Hanzo Dev |
with scroll offsets.
@@ -2,7 +2,7 @@
source: tui/tests/bottom_spacer_clip_regression.rs
expression: output
---
| Every Code |
| Hanzo Dev |
- Running commands
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: "&output"
---
+--------------------------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+--------------------------------------------------------------------------------------------+
+ Agents - Ctrl+A to close-------------------------------------------------------------------+
| Filter 1 All - 2 Running - 3 Failed - 4 Done - 5 Review Sort: ( Recent ▼ ) |
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: "frames.join(\"\\n---FRAME---\\n\")"
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -22,7 +22,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -41,7 +41,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -60,7 +60,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: "frames.join(\"\\n---FRAME---\\n\")"
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
- Running commands
@@ -16,7 +16,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
- Running commands
@@ -29,7 +29,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
- Running commands
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: "frames.join(\"\\n---FRAME---\\n\")"
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -22,7 +22,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -41,7 +41,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: "frames.join(\"\\n---FRAME---\\n\")"
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -22,7 +22,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -41,7 +41,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: "frames.join(\"\\n---FRAME---\\n\")"
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -22,7 +22,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -41,7 +41,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: frame
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: frame
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: "frames.join(\"\\n---FRAME---\\n\")"
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -21,7 +21,7 @@ expression: "frames.join(\"\\n---FRAME---\\n\")"
• Agents Enabled • Diagnostics Enabled API key
---FRAME---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• Hello! How can I help you today?
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
- Running commands
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: frame
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
• I can help with various tasks including:
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
- Writing code
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
- Running commands
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
- Writing code
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: scrolled
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
•
Here is another paragraph to expand height.
@@ -3,11 +3,11 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: closed
---
+------------------------------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+------------------------------------------------------------------------------------------------+
+Settings ▸ Overview-----------------------------------------------------------------------------+
| |
| › Model Model: GPT-5.5 (Medium) |
| › Model Model: ZEN5-Coder (Medium) |
| + Choose the language model used for new completions. |
| |
| Theme Theme: Light - Photon (16-color) · Spinner: Diamond |
@@ -3,11 +3,11 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: open
---
+------------------------------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+------------------------------------------------------------------------------------------------+
+Settings ▸ Overview-----------------------------------------------------------------------------+
| |
| › Model Model: GPT-5.5 (Medium) |
| › Model Model: ZEN5-Coder (Medium) |
| + Choose the language model used for new completions. |
| +----------------------------------------+ |
| Theme Theme|Settings Overview |mond |
@@ -3,13 +3,13 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: section_closed
---
+------------------------------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+------------------------------------------------------------------------------------------------+
+Settings ▸ Model--------------------------------------------------------------------------------+
| |
| › Model + Select Model & Reasoning --------------------------------------------+ |
| Theme | | |
| Updates | Current model: GPT-5.5 | |
| Updates | Current model: ZEN5-Coder | |
| Accounts | Reasoning effort: Medium | |
| Agents | | |
| Prompts | Mode Settings | |
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: section_open
---
+------------------------------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+------------------------------------------------------------------------------------------------+
+Settings ▸ Model--------------------------------------------------------------------------------+
| |
@@ -3,11 +3,11 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+------------------------------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+------------------------------------------------------------------------------------------------+
+Settings ▸ Overview-----------------------------------------------------------------------------+
| |
| › Model Model: GPT-5.5 (Medium) |
| › Model Model: ZEN5-Coder (Medium) |
| + Choose the language model used for new completions. |
| |
| Theme Theme: Light - Photon (16-color) · Spinner: Diamond |
@@ -3,11 +3,11 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+--------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+--------------------------------------------------------+
+Settings ▸ Overview-------------------------------------+
| |
| › Model Model: GPT-5.5 (Medium) |
| › Model Model: ZEN5-Coder (Medium) |
| + Choose the language model used for new comp... |
| |
| Theme Theme: Light - Photon (16-colo... |
@@ -3,11 +3,11 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+------------------------------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+------------------------------------------------------------------------------------------------+
+Settings ▸ Overview-----------------------------------------------------------------------------+
| |
| › Model Model: GPT-5.5 (Medium) |
| › Model Model: ZEN5-Coder (Medium) |
| + Choose the language model used for new completions. |
| |
| Theme Theme: Light - Photon (16-color) · Spinner: Diamond |
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
@@ -3,7 +3,7 @@ source: tui/tests/vt100_chatwidget_snapshot.rs
expression: output
---
+----------------------------------------------------------------------------+
| Every Code |
| Hanzo Dev |
+----------------------------------------------------------------------------+
› Can you gather details from the latest docs update?