Summary
tui::app::tests::changes_widget_end_to_end_on_real_git_repo ends with a whole-screen assertion:
assert!(!frame2.contains('●'), "{frame2}");
The intent is "no agent-edit dot without agent edits", but ● is also the header auth inventory's Available-state dot (auth_dot_char in ui_header.rs renders ● openrouter when OpenRouter credentials exist). The scan is over the entire frame, so the test fails on any machine whose ambient env makes has_openrouter_credentials() true, e.g. a JCODE_OPENROUTER_ALLOW_NO_AUTH gateway profile or a saved key.
Repro
JCODE_OPENROUTER_ALLOW_NO_AUTH=1 cargo test -p jcode-tui --lib -- --test-threads=1 \
tui::app::auth::tests changes_widget_end_to_end_on_real_git_repo
Fails on current master (verified at 2df1f77): the auth tests write compat credentials into the shared test home, the changes widget's second frame then renders ● openrouter in the header, and the whole-screen scan trips. Each test passes alone; the pair fails. CI never sees it because the CI env has no credentials.
Fix
Scope the no-dot scan to the Changes widget's file rows, same direction as #1556 for other whole-screen scans:
let changes_rows: Vec<&str> = frame2.lines()
.filter(|l| ["src/lib.rs", "new.rs", "logo.bin", "new_name.rs", "gone.txt"]
.iter().any(|f| l.contains(f)))
.collect();
assert!(changes_rows.iter().all(|l| !l.contains('●')), "{frame2}");
Verified green locally with ambient credentials set.
Related: #978 (ambient env breaking tests on machines with provider profiles).
Summary
tui::app::tests::changes_widget_end_to_end_on_real_git_repoends with a whole-screen assertion:The intent is "no agent-edit dot without agent edits", but
●is also the header auth inventory's Available-state dot (auth_dot_charinui_header.rsrenders● openrouterwhen OpenRouter credentials exist). The scan is over the entire frame, so the test fails on any machine whose ambient env makeshas_openrouter_credentials()true, e.g. aJCODE_OPENROUTER_ALLOW_NO_AUTHgateway profile or a saved key.Repro
JCODE_OPENROUTER_ALLOW_NO_AUTH=1 cargo test -p jcode-tui --lib -- --test-threads=1 \ tui::app::auth::tests changes_widget_end_to_end_on_real_git_repoFails on current master (verified at 2df1f77): the auth tests write compat credentials into the shared test home, the changes widget's second frame then renders
● openrouterin the header, and the whole-screen scan trips. Each test passes alone; the pair fails. CI never sees it because the CI env has no credentials.Fix
Scope the no-dot scan to the Changes widget's file rows, same direction as #1556 for other whole-screen scans:
Verified green locally with ambient credentials set.
Related: #978 (ambient env breaking tests on machines with provider profiles).