Symptom
Field test (Windows, 2026-07-24): freshly installed, connected environment — doctor says
✔ Connected to tracebloc
✔ Ready to run training
— yet the bare tracebloc home screen says, on the same machine, seconds apart:
⚠ No secure environment on this machine yet — run the installer to set one up.
Root cause — detection-source divergence
Home's verdict hangs entirely on the ActiveClientNamespace pointer in ~/.tracebloc/config.json:
internal/cli/home.go:463 — provisioned = p.ActiveClientNamespace != "".internal/cli/home.go:491-493 — the env probe short-circuits to localNoReleasebefore any kubeconfig/cluster I/O when the binding isn't applied; internal/cli/clustertarget.go:174-178 leaves it unapplied when the pointer is empty.home.go:322-327 then classifies → homeNoEnv → the warning at home.go:735-736.
The pointer has exactly one writer: tracebloc client create (internal/cli/client.go:397 → setActiveClient, client.go:763-767). The Windows installer never runs client create (it still uses the legacy manual Client-ID flow — see the companion installer ticket), so on Windows the pointer is never written and home reports "no environment" forever.
doctor doesn't depend on the pointer: internal/cli/doctor.go:167-186 calls bindActiveClientNamespace but ignores .applied, loads the kubeconfig, and discovers the release in the resolved namespace — hence the contradiction.
Fix
Give home a doctor-style fallback: when signed in but the pointer is empty, still run the bounded kubeconfig probe; if a tracebloc release is discovered in the resolved (non-shared) namespace, render the real state (homeOffline/live) instead of homeNoEnv. Respect the deliberate ownership gate for shared clusters (home.go:479-492 comment) — the fallback should only adopt an unambiguous local single-client release, and can offer "run tracebloc client use" otherwise.
Also (small, Windows): tb alias detection never matches
tbAliasAvailable (home.go:652-663) + aliasStatus (delete.go:465-493) only accept a symlink literally named tb, but install.ps1:192-198 installs the alias as tb.cmd, a regular file (symlinks need admin on Windows). So every remedy/example on Windows echoes tracebloc instead of tb. Accept the tb.cmd shim on Windows.
Acceptance
Symptom
Field test (Windows, 2026-07-24): freshly installed, connected environment —
doctorsays— yet the bare
traceblochome screen says, on the same machine, seconds apart:Root cause — detection-source divergence
Home's verdict hangs entirely on the
ActiveClientNamespacepointer in~/.tracebloc/config.json:internal/cli/home.go:463—provisioned = p.ActiveClientNamespace != "".internal/cli/home.go:491-493— the env probe short-circuits tolocalNoReleasebefore any kubeconfig/cluster I/O when the binding isn't applied;internal/cli/clustertarget.go:174-178leaves it unapplied when the pointer is empty.home.go:322-327then classifies →homeNoEnv→ the warning athome.go:735-736.The pointer has exactly one writer:
tracebloc client create(internal/cli/client.go:397→setActiveClient,client.go:763-767). The Windows installer never runsclient create(it still uses the legacy manual Client-ID flow — see the companion installer ticket), so on Windows the pointer is never written and home reports "no environment" forever.doctordoesn't depend on the pointer:internal/cli/doctor.go:167-186callsbindActiveClientNamespacebut ignores.applied, loads the kubeconfig, and discovers the release in the resolved namespace — hence the contradiction.Fix
Give home a doctor-style fallback: when signed in but the pointer is empty, still run the bounded kubeconfig probe; if a tracebloc release is discovered in the resolved (non-shared) namespace, render the real state (
homeOffline/live) instead ofhomeNoEnv. Respect the deliberate ownership gate for shared clusters (home.go:479-492comment) — the fallback should only adopt an unambiguous local single-client release, and can offer "runtracebloc client use" otherwise.Also (small, Windows):
tbalias detection never matchestbAliasAvailable(home.go:652-663) +aliasStatus(delete.go:465-493) only accept a symlink literally namedtb, butinstall.ps1:192-198installs the alias astb.cmd, a regular file (symlinks need admin on Windows). So every remedy/example on Windows echoestraceblocinstead oftb. Accept thetb.cmdshim on Windows.Acceptance
tb.cmdinstalled, home/doctor examples usetb.