Synced from monorepo
Changes: - Detect the herdr multiplexer - Mark /gboom as non-production code - Bound peak memory when loading a large session - Add a subagent lifecycle soak bounding threads, fds, and heap - Stream inherited replay to bound fork memory - Copy full plan from plan approval with y - Stop armed signature verification from deleting the managed-deny smoke policy - Add source-tagged terminal version telemetry - Show the UI instantly and fetch models and settings in the background - Session test helpers - computer_reason on the ConversationHistoryDone trailer
This commit is contained in:
parent
47348d13ec
commit
b41c75a578
92 changed files with 9410 additions and 3788 deletions
|
|
@ -0,0 +1,64 @@
|
|||
// Per-test-case module for the `pty_e2e` integration test crate.
|
||||
#[allow(unused_imports)]
|
||||
use super::common::*;
|
||||
|
||||
/// 1a. **Embedded mode (`--no-leader`) boots without hanging on a blocked backend.**
|
||||
///
|
||||
/// Enterprise deployments set `[cli] use_leader = false` and point at their own
|
||||
/// backend, often with the grok.com proxy blocked. A TCP listener that accepts
|
||||
/// but never replies stands in for that endpoint, so every startup HTTP call
|
||||
/// stalls until the client's own bounded timeout fires. The welcome screen must
|
||||
/// render anyway; a hang here means some boot path went unbounded.
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
#[ignore]
|
||||
async fn embedded_mode_boots_without_hanging_on_blocked_backend() {
|
||||
// Accept connections but never respond, holding the streams open.
|
||||
let listener = std::net::TcpListener::bind("127.0.0.1:0").expect("bind");
|
||||
let addr = listener.local_addr().expect("addr");
|
||||
std::thread::spawn(move || {
|
||||
let mut held = Vec::new();
|
||||
for stream in listener.incoming() {
|
||||
match stream {
|
||||
Ok(s) => held.push(s),
|
||||
Err(_) => break,
|
||||
}
|
||||
}
|
||||
});
|
||||
let base = format!("http://{addr}/v1");
|
||||
|
||||
let home = tempfile::tempdir().expect("home");
|
||||
let grok_home = home.path().join(".grok");
|
||||
std::fs::create_dir_all(&grok_home).unwrap();
|
||||
let env = [
|
||||
("HOME", home.path().to_str().unwrap()),
|
||||
("GROK_HOME", grok_home.to_str().unwrap()),
|
||||
("XAI_API_KEY", "test-key-for-ci"),
|
||||
("GROK_CLI_CHAT_PROXY_BASE_URL", base.as_str()),
|
||||
("GROK_XAI_API_BASE_URL", base.as_str()),
|
||||
("GROK_TELEMETRY_ENABLED", "false"),
|
||||
("GROK_FEEDBACK_ENABLED", "false"),
|
||||
("GROK_TRACE_UPLOAD", "false"),
|
||||
];
|
||||
|
||||
let binary = pager_binary().expect("resolve pager binary");
|
||||
let mut harness = PtyHarness::new_inherited_env(
|
||||
&binary,
|
||||
DEFAULT_ROWS,
|
||||
DEFAULT_COLS,
|
||||
&["--no-leader"],
|
||||
&env,
|
||||
None,
|
||||
)
|
||||
.expect("spawn pager");
|
||||
|
||||
// 30s exceeds the sum of the bounded startup fetches (auth + settings +
|
||||
// catalog, ~5s each), so a timeout here means an unbounded wait, not a
|
||||
// slow one.
|
||||
harness
|
||||
.wait_for_text(WELCOME_SCREEN_SENTINEL, Duration::from_secs(30))
|
||||
.expect("embedded welcome must render despite the blocked backend (boot went unbounded)");
|
||||
let screen = harness.screen_contents();
|
||||
assert!(!screen.contains("panicked"), "panic on screen:\n{screen}");
|
||||
|
||||
harness.quit().expect("clean quit");
|
||||
}
|
||||
|
|
@ -17,6 +17,8 @@ mod auto_compact_top_row;
|
|||
mod basename_path_demo_pty;
|
||||
#[path = "pty_e2e/doubled_lines_out_of_band_repro.rs"]
|
||||
mod doubled_lines_out_of_band_repro;
|
||||
#[path = "pty_e2e/embedded_mode_boots_without_hanging_on_blocked_backend.rs"]
|
||||
mod embedded_mode_boots_without_hanging_on_blocked_backend;
|
||||
#[path = "pty_e2e/initial_prompt_positional_auto_submits.rs"]
|
||||
mod initial_prompt_positional_auto_submits;
|
||||
#[path = "pty_e2e/input_echoes_at_idle_prompt.rs"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue