install: stop persisting KIGI_GRAPH — the binary default is the product default
The README always shipped graph engineering enabled; the enablement was
delegated to installer env plumbing that diverged per platform:
install.sh exported KIGI_GRAPH=1 into shell rc (worked), install.ps1
wrote the User registry variable — which running Windows terminals (and
new tabs of an open Windows Terminal) never pick up, so /graph was
'missing on Windows' despite a successful install.
With resolve_graph() defaulting true in the binary (e53a66d), the env
writes are redundant complexity: drop them from both installers, keep
KIGI_GRAPH=0 as the documented opt-out (env still beats the default),
and correct the flag comment to tell this story instead of a
'gray release' one. Both scripts syntax-checked (sh -n / pwsh parser).
Installers are served from main (raw.githubusercontent), so this takes
effect for all new installs immediately — no retag needed; the running
v0.1.5 build already carries the binary-default fix.
This commit is contained in:
@@ -1881,12 +1881,15 @@ impl Config {
|
|||||||
.default(true)
|
.default(true)
|
||||||
.resolve()
|
.resolve()
|
||||||
}
|
}
|
||||||
/// Graph mode (`/graph`) master switch. Default ON — the gray release
|
/// Graph mode (`/graph`) master switch. Default ON in the binary: the
|
||||||
/// (plan.md G0, `KIGI_GRAPH=1` only) is over; every install gets the
|
/// README ships graph engineering enabled for every install, but the
|
||||||
/// same commands (its absence on non-dev machines read as a platform
|
/// old `default(false)` delegated enablement to installer env plumbing
|
||||||
/// bug). `KIGI_GRAPH=0` remains the off-switch. Graph mode additionally
|
/// (`install.sh` shell-rc export vs `install.ps1` registry write) — and
|
||||||
/// requires the goal harness (nodes execute as goals), enforced at
|
/// Windows terminals don't pick up freshly-written registry env, so
|
||||||
/// availability time, not here.
|
/// `/graph` went "missing on Windows". The product default lives HERE,
|
||||||
|
/// not in installers. `KIGI_GRAPH=0` is 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> {
|
pub(crate) fn resolve_graph(&self) -> Resolved<bool> {
|
||||||
BoolFlag::env("KIGI_GRAPH").default(true).resolve()
|
BoolFlag::env("KIGI_GRAPH").default(true).resolve()
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-9
@@ -149,15 +149,13 @@ try {
|
|||||||
Write-Host "Run 'kigi' to get started."
|
Write-Host "Run 'kigi' to get started."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Graph engineering ships enabled by default. Respect an explicit
|
# Graph engineering is enabled by default IN THE BINARY (resolve_graph
|
||||||
# user choice: only set the variable when it is not already defined
|
# defaults true) — no environment plumbing needed. The installer used
|
||||||
# (so a persisted opt-out of "0" survives reinstalls).
|
# to persist KIGI_GRAPH=1 into the User registry env, but running
|
||||||
$Graph = [Environment]::GetEnvironmentVariable("KIGI_GRAPH", "User")
|
# terminals (and new tabs of an open Windows Terminal) never pick up
|
||||||
if ($null -eq $Graph -or $Graph -eq "") {
|
# freshly-written registry variables, which made /graph "missing on
|
||||||
[Environment]::SetEnvironmentVariable("KIGI_GRAPH", "1", "User")
|
# Windows" while the shell-rc path worked on macOS/Linux. Opt out any
|
||||||
Write-Host "Enabled graph engineering (KIGI_GRAPH=1)."
|
# time with: [Environment]::SetEnvironmentVariable('KIGI_GRAPH','0','User')
|
||||||
Write-Host "Disable: [Environment]::SetEnvironmentVariable('KIGI_GRAPH','0','User')"
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
Remove-Item -Path $TmpDir -Recurse -Force -ErrorAction SilentlyContinue
|
Remove-Item -Path $TmpDir -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-8
@@ -209,7 +209,6 @@ case "${SHELL:-}" in
|
|||||||
*/zsh)
|
*/zsh)
|
||||||
RC_FILE="${ZDOTDIR:-$HOME}/.zshrc"
|
RC_FILE="${ZDOTDIR:-$HOME}/.zshrc"
|
||||||
PATH_LINE="export PATH=\"$BIN_DIR:\$PATH\""
|
PATH_LINE="export PATH=\"$BIN_DIR:\$PATH\""
|
||||||
GRAPH_LINE="export KIGI_GRAPH=1"
|
|
||||||
;;
|
;;
|
||||||
*/bash)
|
*/bash)
|
||||||
# macOS login shells read ~/.bash_profile; Linux reads ~/.bashrc.
|
# macOS login shells read ~/.bash_profile; Linux reads ~/.bashrc.
|
||||||
@@ -219,7 +218,6 @@ case "${SHELL:-}" in
|
|||||||
RC_FILE="$HOME/.bashrc"
|
RC_FILE="$HOME/.bashrc"
|
||||||
fi
|
fi
|
||||||
PATH_LINE="export PATH=\"$BIN_DIR:\$PATH\""
|
PATH_LINE="export PATH=\"$BIN_DIR:\$PATH\""
|
||||||
GRAPH_LINE="export KIGI_GRAPH=1"
|
|
||||||
;;
|
;;
|
||||||
*/fish)
|
*/fish)
|
||||||
# fish_add_path in config.fish is fish's own idempotent way
|
# fish_add_path in config.fish is fish's own idempotent way
|
||||||
@@ -228,12 +226,10 @@ case "${SHELL:-}" in
|
|||||||
mkdir -p "$FISH_CONF_DIR"
|
mkdir -p "$FISH_CONF_DIR"
|
||||||
RC_FILE="$FISH_CONF_DIR/config.fish"
|
RC_FILE="$FISH_CONF_DIR/config.fish"
|
||||||
PATH_LINE="fish_add_path $BIN_DIR"
|
PATH_LINE="fish_add_path $BIN_DIR"
|
||||||
GRAPH_LINE="set -gx KIGI_GRAPH 1"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
RC_FILE="$HOME/.profile"
|
RC_FILE="$HOME/.profile"
|
||||||
PATH_LINE="export PATH=\"$BIN_DIR:\$PATH\""
|
PATH_LINE="export PATH=\"$BIN_DIR:\$PATH\""
|
||||||
GRAPH_LINE="export KIGI_GRAPH=1"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -247,8 +243,8 @@ case ":$PATH:" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Graph engineering ships enabled by default. The KIGI_GRAPH guard makes
|
# Graph engineering is enabled by default IN THE BINARY (resolve_graph
|
||||||
# this idempotent AND respects an explicit user opt-out (an existing
|
# defaults true) — the installer no longer writes KIGI_GRAPH=1 into shell
|
||||||
# `export KIGI_GRAPH=0` line is left untouched). Disable any time with:
|
# rc files (per-shell env plumbing was fragile and diverged per platform).
|
||||||
|
# Disable any time with:
|
||||||
# echo 'export KIGI_GRAPH=0' >> <your shell rc>
|
# echo 'export KIGI_GRAPH=0' >> <your shell rc>
|
||||||
persist_line "$RC_FILE" "$GRAPH_LINE" "KIGI_GRAPH" "graph engineering (KIGI_GRAPH=1)"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user