std.c.getenv() used instead of init.environ_map (~15 call sites)Files: src/main.zig:169,232,972,983
Severity: MEDIUM
Status: ✅ RESOLVED (Intentional Design)
Fixed the critical path in main.zig:
detectNested() now takes env: *const std.process.Environ.Map and uses env.get("SZN")mainInner passes init.environ_mapstd.c.getenv directly (tests don’t have access to init)Not fixed (intentional): log.zig and socket_path.zig still use std.c.getenv. These are library-level path resolution functions called from multiple contexts (server daemon, tests, client). Adding an env map parameter would require threading it through dozens of call sites for marginal benefit in a single-process daemon. The C runtime getenv is stable for the lifetime of a tmux-like process.