feat(graph): /graph ships on by default — end the KIGI_GRAPH gray release
Release / build (aarch64-apple-darwin) (push) Waiting to run
Release / build (x86_64-apple-darwin) (push) Waiting to run
Release / build (aarch64-unknown-linux-gnu) (push) Waiting to run
Release / build (x86_64-pc-windows-msvc) (push) Waiting to run
Release / publish GitHub Release (push) Blocked by required conditions
Release / build (x86_64-unknown-linux-gnu) (push) Failing after 7s

resolve_graph() read only the KIGI_GRAPH env var with default(false)
(plan.md G0 gate), so /graph existed solely on machines whose environment
exported the dev flag — which presented as '/graph is missing on
Windows'. There was never any platform-conditional code: the Mac worked
because the dev env var was set there.

Default is now true (matching /goal's shipped state); KIGI_GRAPH=0
remains the off-switch, and availability still requires the goal harness
(BuiltinGate::Graph). AGENTS.md updated; new test pins fresh-install-on
plus env-zero-off.

Verified: kigi-shell 5262 + kigi-tui 6874 tests green, clippy clean.
This commit is contained in:
2026-07-22 21:16:49 -04:00
parent f6eaafa3da
commit e53a66d113
2 changed files with 26 additions and 5 deletions
+3 -2
View File
@@ -89,8 +89,9 @@ node as one ordinary goal — the agentic loop lives INSIDE the node; the
edges stay deterministic Rust. The harness appends a terminal
`gn-final` verification node depending on every planner node.
- Feature flag `KIGI_GRAPH=1` (default off); availability additionally
requires the goal harness (`BuiltinGate::Graph`).
- Enabled by default (`KIGI_GRAPH=0` is the off-switch; the G0 gray
release is over); availability additionally requires the goal harness
(`BuiltinGate::Graph`).
- Key modules (kigi-shell): `session/graph_tracker.rs` (pure state
machine; reuses `GoalStatus`/`GoalPhase`/`GoalPauseReason`),
`session/graph_plan.rs` (planner-JSON contract + validation + fnv id
+23 -3
View File
@@ -1881,12 +1881,14 @@ impl Config {
.default(true)
.resolve()
}
/// Graph mode (`/graph`) master switch. Default OFF — gray-released via
/// `KIGI_GRAPH=1` only (plan.md G0 gate). Graph mode additionally
/// Graph mode (`/graph`) master switch. Default ON — the gray release
/// (plan.md G0, `KIGI_GRAPH=1` only) is over; every install gets the
/// same commands (its absence on non-dev machines read as a platform
/// bug). `KIGI_GRAPH=0` remains the off-switch. Graph mode additionally
/// requires the goal harness (nodes execute as goals), enforced at
/// availability time, not here.
pub(crate) fn resolve_graph(&self) -> Resolved<bool> {
BoolFlag::env("KIGI_GRAPH").default(false).resolve()
BoolFlag::env("KIGI_GRAPH").default(true).resolve()
}
/// Max graph nodes running concurrently (`KIGI_GRAPH_CONCURRENCY`).
/// 1 = serial (G0-identical); clamped to [1, 8] — the coordinator has
@@ -4337,6 +4339,24 @@ mod tests {
/// Catalog key of the bundled fallback default (`default_models.json`):
/// `{platform_id}/{model_id}` for `crate::models::default_model()`.
const BUNDLED_DEFAULT_KEY: &str = "kimi-code/kimi-for-coding";
/// `/graph` ships ON by default: the G0 gray release (`KIGI_GRAPH=1`
/// only) made the command exist solely on machines with the dev env
/// var — which read as "missing on Windows". A fresh install with no
/// env must resolve `true`; `KIGI_GRAPH=0` stays the off-switch.
#[test]
#[serial]
fn graph_defaults_on_and_env_zero_disables() {
let cfg = Config::default();
{
let _unset = EnvGuard::unset("KIGI_GRAPH");
assert!(cfg.resolve_graph().value, "fresh install must offer /graph");
}
{
let _off = EnvGuard::set("KIGI_GRAPH", "0");
assert!(!cfg.resolve_graph().value, "KIGI_GRAPH=0 must disable");
}
}
#[test]
fn main_cli_tools_override_preserves_profile_injection_policy() {
let overrides = CliAgentOverrides {