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:
2026-07-22 21:22:16 -04:00
parent e53a66d113
commit 10149f50dd
3 changed files with 20 additions and 23 deletions
+7 -9
View File
@@ -149,15 +149,13 @@ try {
Write-Host "Run 'kigi' to get started."
}
# Graph engineering ships enabled by default. Respect an explicit
# user choice: only set the variable when it is not already defined
# (so a persisted opt-out of "0" survives reinstalls).
$Graph = [Environment]::GetEnvironmentVariable("KIGI_GRAPH", "User")
if ($null -eq $Graph -or $Graph -eq "") {
[Environment]::SetEnvironmentVariable("KIGI_GRAPH", "1", "User")
Write-Host "Enabled graph engineering (KIGI_GRAPH=1)."
Write-Host "Disable: [Environment]::SetEnvironmentVariable('KIGI_GRAPH','0','User')"
}
# Graph engineering is enabled by default IN THE BINARY (resolve_graph
# defaults true) — no environment plumbing needed. The installer used
# to persist KIGI_GRAPH=1 into the User registry env, but running
# terminals (and new tabs of an open Windows Terminal) never pick up
# freshly-written registry variables, which made /graph "missing on
# Windows" while the shell-rc path worked on macOS/Linux. Opt out any
# time with: [Environment]::SetEnvironmentVariable('KIGI_GRAPH','0','User')
} finally {
Remove-Item -Path $TmpDir -Recurse -Force -ErrorAction SilentlyContinue
}