Summary
astrid init unconditionally appends an # Astrid OS + export PATH="<home>/bin:$PATH" block to the user's real ~/.zshrc — including when ASTRID_HOME points at a temporary or isolated home. The append guard keys on the exact path, so every distinct home appends a new block.
Observed on a real workstation: six accumulated # Astrid OS PATH blocks in ~/.zshrc, five pointing at long-dead temp dirs ($TMPDIR/…, session scratchpads) from isolated-home test runs, one legitimate (~/.astrid/bin).
Impact
- Dead PATH entries accumulate silently in the operator's shell rc (harmless to resolution, but real pollution of a file users care about).
- Any tooling that runs
astrid init in an isolated ASTRID_HOME (e2e suites, the installer's own verification, CI) mutates operator state outside the home it was told to use — surprising for a runtime whose stance is fail-closed isolation.
Expected
One (or more) of:
- Only append when the target is the default resolved home (
~/.astrid), never for an ASTRID_HOME override;
- and/or dedupe on the
# Astrid OS marker (replace the block) instead of exact-path grep;
- and/or an explicit
--no-profile / respect a ASTRID_NO_PROFILE env for automation.
Fail-secure default: an isolated home should leave zero footprint outside itself.
Summary
astrid initunconditionally appends an# Astrid OS+export PATH="<home>/bin:$PATH"block to the user's real~/.zshrc— including whenASTRID_HOMEpoints at a temporary or isolated home. The append guard keys on the exact path, so every distinct home appends a new block.Observed on a real workstation: six accumulated
# Astrid OSPATH blocks in~/.zshrc, five pointing at long-dead temp dirs ($TMPDIR/…, session scratchpads) from isolated-home test runs, one legitimate (~/.astrid/bin).Impact
astrid initin an isolatedASTRID_HOME(e2e suites, the installer's own verification, CI) mutates operator state outside the home it was told to use — surprising for a runtime whose stance is fail-closed isolation.Expected
One (or more) of:
~/.astrid), never for anASTRID_HOMEoverride;# Astrid OSmarker (replace the block) instead of exact-path grep;--no-profile/ respect aASTRID_NO_PROFILEenv for automation.Fail-secure default: an isolated home should leave zero footprint outside itself.