refactor(host-kit): accept only drive-absolute or plain UNC Windows destinations
Merged
TH
8d ago+64+64+01234567890123456789-61-61-01234567890123456789
Summary
Stacked on #4745. One positive rule replaces the Windows deny-list (\\?\, \\.\, root-relative \x, GLOBALROOT, IPC shares) in both the volume check and scriptEntryName: a rooted path must be drive-absolute (X:\ā¦) or plain UNC (\\server\share\ā¦) outside the pipe, IPC$ and mailslot shares. Everything else is refused up front with windows_path_form and the existing hint. Reserved device names, forbidden characters, the stream : rule and NAME_MAX are unchanged. 6 files, including the ADR 0016 sentence.
Changes:
- IPC shares were already refused end to end. They now report
windows_path_forminstead ofunnamed_entry(code staysINVALID_ARGS). - At the unit level only,
scriptEntryNamenow refuses\\?\C:\dir\journey.adand\\?\UNC\server\share\journey.ad(two table rows flip), plus\journey.adand\\server\share.\journey.ad. Both routes already refused all four up front. - New refusal rows:
\journey.ad,/journey.ad, and\\server\pipe\recorderat all three publication boundaries.
entry-name.ts: 175 ā 169 lines (27 removed, 21 added). A single-caller helper folds into scriptEntryName so the eager-closure statement count stays flat.
Validation
At 388380b10a:
- Name table: every other row keeps its result.
- Old vs new rules over 4,564,560 generated Windows spellings: nothing newly accepted; end-to-end results identical.
eager-closure-budgets.test.ts: pass, no budget change (fixed after an earlier head failed it).- Unit suites: host-kit, remote, daemon (4549 tests). Typecheck and lint pass.
fallow auditpassed on the first head. CI validates the head.
š¤ Generated with Claude Code