Synced from monorepo
Changes: - Non-blocking coding-data sharing upsell banner - Consolidate remediation in Doctor - Auto mode defers fail-closed gate asks to the classifier - Coalesce marketplace list fetches - Allow removing a marketplace source by name - Contain hung git marketplace sources (timeouts, non-blocking refresh, unbrick modal) - Label failed workspace RPCs with error_kind - Drop redundant explicit tonic/prost deps from xai-grok-shell - Report real exit codes for completed background shells - Narrow the date-rollover reminder to date-bearing templates - Wire toolOverrides through the session and agent - Security: Bash(git:*) allowlist matches whole command chain by prefix - Split prompt-trigger telemetry and record classifier provenance - Raise connectors-manager timeout to 60s - Auto classifier honors recorded approvals for repeat actions - Apply doctor fixes in the TUI - Auto-mode classifier timeouts prompt instead of silently denying - Scope subagent completion drains to the owning session - Add the toolOverrides wire types - Set client_identifier=grok-agent-sdk - Accept both spellings of the workspace-teleport kill switch - Persist one-shot occurrence journal - Stop turns that poll the exact same tool call 16x in a row - Copy compaction checkpoint files when forking sessions - Auto-focus permission prompt from scrollback - Esc cancels the running turn in non-vim and minimal modes - List Ctrl+Z undo and redo in keyboard shortcuts - Out-of-process macOS mic capture - Show active auth mode on session-info - Install the npm binary under $GROK_HOME - Remove hover/click dead zones between dashboard items - Route startup warnings to doctor - Document [feedback.user] author identity config - Extend bang command timeout - Close combine-queued edit-hold race - Integrate relocation recovery - Expose privacy notice rollout flag - Break harness discovery ref cycle so connections can idle-evict - Shift/Alt+Enter inserts newline when editing a queued prompt - Gate project Claude permissions on folder trust - Echo response.create.event_id on response.created - Toast when session creation fails from disk full - Add shared test process lifecycle - Enable dynamic workflows by default - Add relocation transaction state machine - Add shared test sandbox - Surface auth failures on model-switch compact - Persist durable scheduler expiry - Confirm before removing extensions-modal items - Re-run compact and prompt after login when compact hit expired auth - Recap sends hosted tools under backend search
This commit is contained in:
parent
3af4d5d398
commit
a5727c5960
482 changed files with 37627 additions and 13402 deletions
|
|
@ -0,0 +1,25 @@
|
|||
use std::ffi::OsStr;
|
||||
|
||||
use xai_grok_pager_pty_harness::{EnvOp, oauth_credential_ops};
|
||||
|
||||
#[test]
|
||||
fn set_and_remove_operations_have_one_typed_surface() {
|
||||
let key = OsStr::new("FEATURE_FLAG");
|
||||
let value = OsStr::new("enabled");
|
||||
let operations: [EnvOp<'_>; 4] = [
|
||||
EnvOp::set("FEATURE_FLAG", "enabled"),
|
||||
EnvOp::remove("XAI_API_KEY"),
|
||||
EnvOp::set_os(key, value),
|
||||
EnvOp::remove_os(key),
|
||||
];
|
||||
|
||||
assert!(matches!(operations[0], EnvOp::Set(_, _)));
|
||||
assert!(matches!(operations[1], EnvOp::Remove(_)));
|
||||
assert!(matches!(operations[2], EnvOp::Set(_, _)));
|
||||
assert!(matches!(operations[3], EnvOp::Remove(_)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn oauth_credential_operations_remove_the_api_key() {
|
||||
assert_eq!(oauth_credential_ops(), [EnvOp::remove("XAI_API_KEY")],);
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ use std::path::{Path, PathBuf};
|
|||
use std::time::Duration;
|
||||
|
||||
use anyhow::{Context, Result, bail};
|
||||
use xai_grok_pager_pty_harness::{ContentController, PtyHarness, keys, pager_binary};
|
||||
use xai_grok_pager_pty_harness::{ContentController, PtyExitPoll, PtyHarness, keys, pager_binary};
|
||||
|
||||
const ROWS: u16 = 50;
|
||||
const COLS: u16 = 120;
|
||||
|
|
@ -75,11 +75,13 @@ async fn run() -> Result<()> {
|
|||
// graceful teardown (incl. the show-cursor restore) for the assertions below.
|
||||
first.update(Duration::from_secs(10));
|
||||
|
||||
let code = first.wait_exit_code(Duration::from_secs(10));
|
||||
let exit = first
|
||||
.wait_exit_code(Duration::from_secs(10))
|
||||
.context("wait for double-Ctrl+C exit")?;
|
||||
assert_eq!(
|
||||
code,
|
||||
Some(0),
|
||||
"double Ctrl+C should exit via the graceful quit (exit 0), got {code:?}"
|
||||
exit,
|
||||
PtyExitPoll::Exited(0),
|
||||
"double Ctrl+C should exit via the graceful quit (exit 0), got {exit:?}"
|
||||
);
|
||||
assert!(
|
||||
terminal_restored(&first, pre),
|
||||
|
|
@ -156,11 +158,13 @@ async fn run_sigint() -> Result<()> {
|
|||
|
||||
// Pre-fix the SIGINT handler called std::process::exit(130); routing it
|
||||
// through the graceful quit exits 0 — the deterministic Part-B regression catch.
|
||||
let code = first.wait_exit_code(Duration::from_secs(10));
|
||||
let exit = first
|
||||
.wait_exit_code(Duration::from_secs(10))
|
||||
.context("wait for SIGINT exit")?;
|
||||
assert_eq!(
|
||||
code,
|
||||
Some(0),
|
||||
"real SIGINT should route through the graceful quit (exit 0), got {code:?}"
|
||||
exit,
|
||||
PtyExitPoll::Exited(0),
|
||||
"real SIGINT should route through the graceful quit (exit 0), got {exit:?}"
|
||||
);
|
||||
assert!(
|
||||
terminal_restored(&first, pre),
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ async fn scroll_up_from_follow_bottom_then_back_down() -> Result<()> {
|
|||
for _ in 0..30 {
|
||||
harness.inject_keys(keys::PGUP)?;
|
||||
harness.update(Duration::from_millis(35));
|
||||
if !harness.is_running() {
|
||||
if !harness.is_running()? {
|
||||
bail!("pager exited while PageUp scrolling");
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ async fn scroll_up_from_follow_bottom_then_back_down() -> Result<()> {
|
|||
for _ in 0..35 {
|
||||
harness.inject_keys(keys::PGDN)?;
|
||||
harness.update(Duration::from_millis(35));
|
||||
if !harness.is_running() {
|
||||
if !harness.is_running()? {
|
||||
bail!("pager exited while PageDown scrolling");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue