Repository navigation
refactor(host-kit): accept only drive-absolute or plain UNC Windows destinations - #4747
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
…estinations The Windows destination rules had grown into a deny-list of special forms: extended-length and device-namespace prefixes, root-relative paths, GLOBALROOT, and the pipe, IPC$ and mailslot shares. Replace it with one positive rule shared by the up-front volume check and scriptEntryName: a rooted Windows path is accepted only when it is drive-absolute (X:\...) or a plain UNC path (\\server\share\...) whose share is not pipe, IPC$ or mailslot. Every other rooted form is refused up front with windows_path_form. Reserved device names, forbidden characters, the stream colon rule and NAME_MAX stay as they were. The pipe, IPC$ and mailslot shares were already refused end to end; they now report windows_path_form instead of unnamed_entry. Two table rows that only the bare name rule accepted, the extended-length drive and UNC forms, become refusals; every publication path already refused them up front. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Windows shape predicate added one top-level declaration. Fold the single-caller name-length helper into scriptEntryName so the module carries the same number of top-level statements as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cd81a66 to
388380b
Compare
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 388380b. CI is green: all 14 checks pass. No conflicts. Merge the stacked base #4745 first. Not blocking, and you can take or leave both:
Behavior was checked through An independent second pass compared 156,282 Windows path spellings at the base and this head and found no newly accepted spelling. It points to the same trailing-dot share test gap noted above. |
Summary
Stacked on #4745. One positive rule replaces the Windows deny-list (
\\?\,\\.\, root-relative\x,GLOBALROOT, IPC shares) in both the volume check andscriptEntryName: a rooted path must be drive-absolute (X:\…) or plain UNC (\\server\share\…) outside thepipe,IPC$andmailslotshares. Everything else is refused up front withwindows_path_formand the existing hint. Reserved device names, forbidden characters, the stream:rule andNAME_MAXare unchanged. 6 files, including the ADR 0016 sentence.Changes:
windows_path_forminstead ofunnamed_entry(code staysINVALID_ARGS).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.\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 intoscriptEntryNameso the eager-closure statement count stays flat.Validation
At
388380b10a:eager-closure-budgets.test.ts: pass, no budget change (fixed after an earlier head failed it).fallow auditpassed on the first head. CI validates the head.🤖 Generated with Claude Code