Synced from monorepo
Synced from monorepo Changes: - Report invalid MCP server config instead of failing startup - Keep completed terminal output when the gateway connection is lost - Show a duration-only detail view for single-task task output - Don't let a stale registry turn counter hide local sessions - Raise the file-descriptor soft limit on Linux and log effective limits at startup - Stop aborting when HTTP client construction fails - Make session thread and runtime spawn failures recoverable - Fix main-prompt paste parity in the question freeform input - Fire SessionEnd hooks on /exit and headless quit - Embed the deployment-config signing public key - Repaint paste-chip background on inline panel inputs - Security: prevent acceptEdits from auto-approving agent writes into the always-trusted global hook root - Fix stacked "Worked for" markers so parks render as status and turns close with exactly one marker - Parse hooks from config files - Add a remote kill-switch for managed-config signature verification - Security: fix workspace file-reference resolution bypassing workspace filesystem confinement Source-Revision: d02693a856a54f1030695b36b91d276e96b30b23
This commit is contained in:
parent
6e38642082
commit
47348d13ec
138 changed files with 7283 additions and 5796 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "xai-grok-pager-bin"
|
||||
version = "0.2.111"
|
||||
version = "0.2.112"
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
authors = ["xAI"]
|
||||
|
|
|
|||
|
|
@ -1416,25 +1416,24 @@ async fn run_agent_command(
|
|||
}
|
||||
}
|
||||
}
|
||||
/// Raise the per-process file descriptor soft limit on macOS.
|
||||
/// Raise the per-process fd soft limit toward the hard limit.
|
||||
///
|
||||
/// macOS has a conservative default soft `RLIMIT_NOFILE` (256) that is easily
|
||||
/// exceeded by parallel directory walking + file copying in worktree creation,
|
||||
/// stdio MCP servers, tool subprocesses, and async runtime sockets.
|
||||
/// Default soft limits (256 macOS, commonly 1024 Linux) are easily exceeded:
|
||||
/// each session thread's runtime costs ~3 fds, and a wide parallel subagent
|
||||
/// wave adds spawn-burst transients — a 1024 limit fails with EMFILE under a
|
||||
/// ~100-session wave. Targets 65536 on Linux (hard limits typically >= 1M)
|
||||
/// and 8192 on macOS (`kern.maxfilesperproc` is often ~10k). No known
|
||||
/// in-tree `select(2)` users (Rust std/tokio use epoll/kqueue); residual
|
||||
/// third-party `FD_SETSIZE` risk is accepted — the prior 8192 cap already
|
||||
/// exceeded FD_SETSIZE.
|
||||
///
|
||||
/// We raise the soft limit toward the hard limit, capped at 8192 to stay below
|
||||
/// `FD_SETSIZE` (1024 on macOS) safety boundaries in any C dependency that may
|
||||
/// still use `select(2)` -- Rust std + tokio use `kqueue`, but vendored C code
|
||||
/// can corrupt the stack if it select()'s on an fd >= FD_SETSIZE. 8192 also
|
||||
/// keeps fork-time fd-table iteration cheap for any child that does
|
||||
/// "close all fds up to rlim_cur" on exec.
|
||||
///
|
||||
/// Best-effort: silently ignores all errors (process limits can be tightened by
|
||||
/// containers/cgroups and we should never block startup on a non-essential
|
||||
/// optimization).
|
||||
#[cfg(target_os = "macos")]
|
||||
/// Best-effort: never blocks startup (containers/cgroups may pin limits).
|
||||
#[cfg(unix)]
|
||||
fn raise_fd_limit() {
|
||||
#[cfg(target_os = "macos")]
|
||||
const TARGET: libc::rlim_t = 8192;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
const TARGET: libc::rlim_t = 65536;
|
||||
unsafe {
|
||||
let mut rlim = libc::rlimit {
|
||||
rlim_cur: 0,
|
||||
|
|
@ -1454,7 +1453,7 @@ fn raise_fd_limit() {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
#[cfg(not(unix))]
|
||||
fn raise_fd_limit() {}
|
||||
/// Single audit point for the `Command::Dashboard` soft-subcommand.
|
||||
/// Sets `GROK_OPEN_DASHBOARD_AT_STARTUP=1` if the user asked for
|
||||
|
|
|
|||
Loading…
Reference in a new issue