refactor(host-kit): accept only drive-absolute or plain UNC Windows destinations

Merged
TH
8d ago
+64-61

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_form instead of unnamed_entry (code stays INVALID_ARGS).
  • At the unit level only, scriptEntryName now refuses \\?\C:\dir\journey.ad and \\?\UNC\server\share\journey.ad (two table rows flip), plus \journey.ad and \\server\share.\journey.ad. Both routes already refused all four up front.
  • New refusal rows: \journey.ad, /journey.ad, and \\server\pipe\recorder at 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 audit passed on the first head. CI validates the head.

šŸ¤– Generated with Claude Code