You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[family] Env-inherited POSIX paths re-rendered to D:/ drive form break scripts that splice $HOME/$DIR into sed s:...:...: (nvm install.sh writes 'export NVM_DIR=""', webi bootstrap dies) #329
Found by ecosweep3 lane (installer family; carrier release build of 6106961). Consolidates a recurring real-world breaker; individual symptoms seen 3x this lane.
Mechanism
An env var exported in POSIX form (e.g. HOME=/d/..., or a script's own path) is imported/re-rendered by rubash in Windows drive form (D:/...). A drive-letter colon then collides with scripts that interpolate the path into a sed expression using : as the delimiter (a very common idiom because paths contain /):
PROFILE_INSTALL_DIR="$(nvm_install_dir |command sed "s:^$HOME:$HOME:")"# nvm install.sh:458echo"${my_abs}"| sed "s:^${my_rel}:~:"# webi bootstrap:138
sed reports unknown option to 's' and the pipeline yields EMPTY, so downstream strings are built from an empty variable.
Reproducers (artifacts under target/issue-suites/results/ecosweep3/inst/)
nvm install.sh (NVM_DIR sandboxed, local mirror clone): GNU writes export NVM_DIR="/mnt/d/…/nvm" into the profile and prints it in the instructions; rubash writes/prints export NVM_DIR="" + one extra stderr line /usr/bin/sed: -e expression #1, char 98: unknown option to 's' (gnu/nvm-install.out vs rub/nvm-install.out lines 11/16).
webi bootstrap (_webi/curl-pipe-bootstrap.tpl.sh): GNU completes the whole bootstrap (34 lines, installs ~/.local/bin/webi, rc=0); rubash stops after the welcome block (rc=1) with sed: char 101: unknown option to 's' at the template's line-138 shape.
(configure lane corollary: autoconf's unquoted $SED=/c/Program Files/Git/usr/bin/sed breaks for the SPACE half of the same class — that one is environment, not rubash.)
GNU behavior
bash keeps inherited POSIX paths verbatim (/mnt/d/...), and its own $HOME/$0 are POSIX-form, so the s:...:...: idiom never sees a colon-carrying path.
Suggested direction (engine decision, not prescribed)
Keep POSIX form for shell-visible values of inherited path-like env vars (rendering to drive form only at exec/CreateProcess boundaries), or at minimum exempt values containing / from the colon form. Related history: #175 (PATH startup form, fixed), #224 ($0 D:/-form vs $PWD /d/), ecosweep2 pitfall note (pwd-in-comsub D:/ form).
Captain decision pending: lane delivered a four-source decomposition (docs/issue329-path-form-policy-analysis.md). Source (a) is parent-layer conversion by the session shell — any Windows child sees D:/ forms regardless of rubash; (b) is our own inconsistent self-produced values. Recommendation A+C: unify OUR OWN produced paths to POSIX form + file the parent-layer export-boundary conversion upstream with the session-shell project; explicitly NOT re-rendering inherited drive-letter values (violates GNU byte-faithful import, needs path heuristics whose false positives are silent data corruption). Deciding.
B (re-rendering inherited drive-letter values) is rejected on principle: it violates GNU byte-faithful import semantics, requires path heuristics whose false positives are silent data corruption, and needs a re-conversion invariant across every exec site. The lane measured that inherited POSIX values already arrive as D:/ forms to ANY Windows child when the parent session shell exports them - that is the parent layer converting, not rubash.
A (self-produced paths unify to POSIX form) is approved as a follow-up work item: $PWD vs $(pwd) inconsistency, TMPDIR default backslash form, full-path $0 - each site has a clear owner and no GNU divergence. Filed for the next fix batch.
C (upstream filing) approved: the parent-session-shell export boundary conversion is the actual corruptor for the nvm/webi sed-colon family. Filing now; closing this issue with the decomposition report on record.
Activity
docs(#329): path-form rendering policy analysis - four-source decompo…
caomengxuan666 commentedon Sep 29, 2026
Captain decision pending: lane delivered a four-source decomposition (docs/issue329-path-form-policy-analysis.md). Source (a) is parent-layer conversion by the session shell — any Windows child sees D:/ forms regardless of rubash; (b) is our own inconsistent self-produced values. Recommendation A+C: unify OUR OWN produced paths to POSIX form + file the parent-layer export-boundary conversion upstream with the session-shell project; explicitly NOT re-rendering inherited drive-letter values (violates GNU byte-faithful import, needs path heuristics whose false positives are silent data corruption). Deciding.
caomengxuan666 commentedon Sep 29, 2026
CAPTAIN DECISION: adopt A + C, reject B.
B (re-rendering inherited drive-letter values) is rejected on principle: it violates GNU byte-faithful import semantics, requires path heuristics whose false positives are silent data corruption, and needs a re-conversion invariant across every exec site. The lane measured that inherited POSIX values already arrive as D:/ forms to ANY Windows child when the parent session shell exports them - that is the parent layer converting, not rubash.
A (self-produced paths unify to POSIX form) is approved as a follow-up work item:$PWD vs $ (pwd) inconsistency, TMPDIR default backslash form, full-path $0 - each site has a clear owner and no GNU divergence. Filed for the next fix batch.
C (upstream filing) approved: the parent-session-shell export boundary conversion is the actual corruptor for the nvm/webi sed-colon family. Filing now; closing this issue with the decomposition report on record.
fix(path): self-produced path values render POSIX form — $0, BASH, in…
test(cli): pin stdin-script $0 to the POSIX self-produced form (rubas…
[P0] fix(#537): PWD renders POSIX persona form unconditionally - reti…