M2 audit: excise the Computer Hub stack — Kigi's last remote-cloud surface
Removed root-and-branch for the zero-egress guarantee (the hub was xAI's remote-workspace/cloud-sandbox service): - Crates deleted: kigi-computer-hub-core, kigi-computer-hub-sdk, kigi-computer-hub-mcp-adapter, kigi-workspace-client (hub-proxied workspace RPC client), and kigi-tracing (its sole network path was the OTLP gRPC exporter; zero consumers remained). kigi-tracing-macros (purely local) stays. - kigi-workspace: every hub surface deleted — hub server/channel/auth, HITL-over-hub permissions, donation/metrics pumps, file upload RPCs, hub tool-snapshot merge (resolve pipeline is MCP-only now), WorkspaceOps::Proxy. Local worktrees, sessions, leader IPC, MCP, and the ACP permission prompt path are untouched; LocalRegistry re-homed into kigi-tool-runtime on the existing ToolDyn types so in-process tool dispatch is unchanged. - kigi-shell: leader workspace-exposure control surface (incl. the wss://computer-hub... URL), [hub] config, ObservabilityBridge, hub WebSocket proxy, dead OTLP config knobs. ClientMode::Headless (never constructed) removed. - kigi-tui/bin: hidden `kigi workspace` command removed (`kigi worktree` stays). - Renames: --xai-api-base-url → --api-base-url / KIGI_API_BASE_URL / [endpoints] api_base_url (serde alias keeps old configs working; the flag feeds BYOK/custom-endpoint routing, not main inference); grok_version → kigi_version in inspect/models-cache/trace metadata (old caches self-heal via version-mismatch refetch). - Dependency tree: dropped fastrace*, opentelemetry-otlp/http/proto, tokio-tungstenite from the workspace; fixed the 4 real useless_format violations the fastrace lint allowance was masking and removed the allowance. - marketplaceAllowlist kept: it gates the LOCAL plugin-marketplace feature, not an xAI service. Known §9 leftover (deliberate, for the M3 sweep): the BYOK default base URL string. Gates: workspace check/clippy 0/0, fmt, deny ok; suites green (workspace 1042, shell 4918, tui 6634, tools 2608, tool-runtime 47, mcp 154).
This commit is contained in:
@@ -432,7 +432,7 @@ fn git_rebase_refresh_storm_e2e() {
|
||||
unsafe {
|
||||
std::env::set_var("KIGI_SHARE_DIR", kigi_home.path());
|
||||
std::env::set_var("KIGI_CODE_BASE_URL", server.url());
|
||||
std::env::set_var("KIGI_XAI_API_BASE_URL", server.url());
|
||||
std::env::set_var("KIGI_API_BASE_URL", server.url());
|
||||
std::env::set_var("XAI_API_KEY", "test-key-for-ci");
|
||||
std::env::set_var("KIGI_TELEMETRY_ENABLED", "false");
|
||||
std::env::set_var("KIGI_FEEDBACK_ENABLED", "false");
|
||||
|
||||
@@ -626,7 +626,7 @@ async fn full_session_load_e2e() {
|
||||
std::env::set_var("KIGI_INSTRUMENTATION", "log");
|
||||
std::env::set_var("KIGI_INSTRUMENTATION_LOG", &instr_log);
|
||||
std::env::set_var("KIGI_CODE_BASE_URL", server.url());
|
||||
std::env::set_var("KIGI_XAI_API_BASE_URL", server.url());
|
||||
std::env::set_var("KIGI_API_BASE_URL", server.url());
|
||||
std::env::set_var("XAI_API_KEY", "test-key-for-ci");
|
||||
std::env::set_var("KIGI_TELEMETRY_ENABLED", "false");
|
||||
std::env::set_var("KIGI_FEEDBACK_ENABLED", "false");
|
||||
|
||||
@@ -1330,7 +1330,7 @@ async fn test_headless_managed_config_byok_sends_authorized_requests() {
|
||||
r#"
|
||||
[endpoints]
|
||||
deployment_key = "test-deployment-key"
|
||||
xai_api_base_url = "{url}"
|
||||
api_base_url = "{url}"
|
||||
|
||||
[model.kigi-build]
|
||||
api_backend = "responses"
|
||||
|
||||
@@ -137,7 +137,7 @@ async fn leader_soak_churning_clients_no_leaks_no_zombies() {
|
||||
unsafe {
|
||||
std::env::set_var("KIGI_SHARE_DIR", kigi_home.path());
|
||||
std::env::set_var("KIGI_CODE_BASE_URL", server.url());
|
||||
std::env::set_var("KIGI_XAI_API_BASE_URL", server.url());
|
||||
std::env::set_var("KIGI_API_BASE_URL", server.url());
|
||||
std::env::set_var("XAI_API_KEY", "test-key-for-ci");
|
||||
std::env::set_var("KIGI_TELEMETRY_ENABLED", "false");
|
||||
std::env::set_var("KIGI_FEEDBACK_ENABLED", "false");
|
||||
|
||||
@@ -16,7 +16,7 @@ use kigi_workspace::permission::types::{
|
||||
};
|
||||
use kigi_workspace::permission::{
|
||||
AccessKind, ClientType, Decision, PermissionCommand, PermissionHandle, PermissionState,
|
||||
spawn_permission_manager, spawn_permission_manager_with_hub,
|
||||
spawn_permission_manager,
|
||||
};
|
||||
use serial_test::serial;
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
@@ -221,6 +221,7 @@ async fn run_actor_test_full<F, Fut>(
|
||||
vec![],
|
||||
initial_yolo,
|
||||
None,
|
||||
true,
|
||||
);
|
||||
body(handle, gw, cwd).await;
|
||||
})
|
||||
@@ -357,7 +358,7 @@ async fn policy_ask_suppresses_mcp_tool_allowlist() {
|
||||
|
||||
let (gw, _gw_task) = fake_gateway();
|
||||
// Gate OFF so the `ask` rule stays a hard floor over the grant.
|
||||
let (handle, _events) = spawn_permission_manager_with_hub(
|
||||
let (handle, _events) = spawn_permission_manager(
|
||||
make_session_id(),
|
||||
gw.sender.clone(),
|
||||
cwd.clone(),
|
||||
@@ -368,7 +369,6 @@ async fn policy_ask_suppresses_mcp_tool_allowlist() {
|
||||
false,
|
||||
None,
|
||||
false, // remember_tool_approvals
|
||||
None,
|
||||
);
|
||||
|
||||
// Script an outright reject so we can confirm the prompt fires.
|
||||
@@ -408,7 +408,7 @@ async fn policy_ask_suppresses_mcp_server_allowlist() {
|
||||
|
||||
let (gw, _gw_task) = fake_gateway();
|
||||
// Gate OFF so the `ask` rule stays a hard floor over the grant.
|
||||
let (handle, _events) = spawn_permission_manager_with_hub(
|
||||
let (handle, _events) = spawn_permission_manager(
|
||||
make_session_id(),
|
||||
gw.sender.clone(),
|
||||
cwd.clone(),
|
||||
@@ -419,7 +419,6 @@ async fn policy_ask_suppresses_mcp_server_allowlist() {
|
||||
false,
|
||||
None,
|
||||
false, // remember_tool_approvals
|
||||
None,
|
||||
);
|
||||
|
||||
gw.expected.send(("reject-once".to_string(), None)).unwrap();
|
||||
@@ -463,6 +462,7 @@ async fn policy_deny_takes_precedence_over_mcp_allowlist() {
|
||||
vec![],
|
||||
false,
|
||||
None,
|
||||
true,
|
||||
);
|
||||
|
||||
// Do NOT script a response: a policy Deny must short-circuit
|
||||
|
||||
Reference in New Issue
Block a user