Repository navigation
feat(path): resolve raw paths through existing prefixes - #349
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 16, 2026, 9:43 AM ET / 13:43 UTC (Revision 8). ClawSweeper reviewWhat this changesAdds physical path-prefix resolution and Windows path anchoring, alongside ZIP metadata validation, compressed-read cancellation checks, and sibling-filename hardening, with documentation, benchmarks, and tests. Merge readiness⛔ Blocked before merge - 5 items remain The resolver remains a distinct capability absent from main and v0.12.0. No concrete introduced correctness defect was found, but the expanded branch has not satisfied its recorded proof and performance conditions. Priority: P2 Review scores
Verification
How this fits togetherfs-safe supplies filesystem primitives to Node.js applications handling untrusted paths. The resolver returns an existing physical prefix and unresolved suffix; the accompanying archive and staging changes validate inputs before member selection or file publication. flowchart TD
A[Raw filesystem path] --> B[Physical prefix traversal]
B --> C[Existing prefix and raw suffix]
D[Archive bytes] --> E[Name and kind admission]
E --> F[Member selection or guarded extraction]
G[Producer filename] --> H[Validated staging and publication]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land independently validated archive and filename prerequisites, then retain the additive observational resolver with explicit compatibility documentation and fulfilled consumer-proof conditions. Do we have a high-confidence way to reproduce the issue? Not applicable to the central feature request; source inspection establishes that existing ancestor helpers do not preserve the requested raw suffix semantics. No introduced defect was reproduced. Is this the best way to solve the issue? Yes for the resolver itself: an additive observation API preserves existing helpers' contracts. The complete stacked branch still depends on satisfying the separately recorded compatibility and performance conditions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2374204cc8d0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
f97dc77 to
f080834
Compare
Bind ZIP physical entry names and kinds to decoder metadata before callbacks or member selection, rejecting ambiguous interpretations consistently.
af9b7ab to
ccbb42e
Compare
Stop zstd and bzip2 compressed-input refills after cancellation while retaining decoded-output and complete archive validation.
Sanitize fallback filenames and validate completed sibling callback components before producers run, retaining bounded names and Windows device-name rejection.
Add resolvePathPrefixSync for physical traversal through existing prefixes with a raw missing suffix, preserving dangling aliases and propagating ambiguous resolution failures.
ccbb42e to
6bbb13d
Compare
Add resolvePathPrefixSync to resolve raw paths through existing filesystem prefixes while retaining the unresolved suffix. The helper preserves physical symlink traversal, rejects non-directory traversal, and propagates ambiguous resolution errors. Its result is an observation, not filesystem authorization.
Windows input handling preserves drive-relative and current-drive-root-relative forms without erasing raw dot/parent traversal. Valid namespace drive roots are adapted at filesystem dispatch, including exact roots and immediately missing children. Guarded Root file opens retain their existing stream-alias rejection.
The package builds, all 82 focused prefix, raw-path, and Root-boundary tests pass (21 platform skips), and docs/package validation passes. Fresh independent review through P2 is clean. Complete platform CI passed on the final PR head.