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
centralize strict Windows verbatim-path conversion for only valid DOS and UNC namespaces
update inspect normalization, LSP URI rendering, batch-shim execution, and bridge root identity to preserve unsupported namespaces such as \\?\Volume{GUID}\
add regression coverage for malformed and unsupported namespace spellings
Validation
cargo fmt --all -- --check
cargo test -p agent-file-tools --lib windows_path
cargo test -p agent-file-tools --lib windows_extended_
bun x @biomejs/biome check packages/aft-bridge/src/project-identity.ts
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Fixes Windows extended-length path normalization so only valid DOS and UNC namespaces lose their \\?\ prefix; unsupported namespaces like \\?\Volume{GUID}\ are now preserved instead of being corrupted.
Centralizes strict verbatim-prefix conversion in windows_path for inspect normalization, LSP URI rendering, batch-shim execution, and bridge root identity.
Rejects malformed spellings (dot components, incomplete UNC) and unsupported namespaces rather than stripping their prefix; LSP URI conversion now errors on preserved verbatim paths instead of emitting a bogus UNC URI.
Adds regression coverage in Rust and bridge TypeScript tests.
Written for commit a7049db. Summary will update on new commits.
This PR centralizes strict Windows verbatim-path normalization and prevents unsupported or malformed namespaces from being corrupted by indiscriminate prefix removal.
Converts only valid extended-length DOS-drive and UNC paths.
Preserves unsupported namespaces such as volume GUID paths.
Reuses the normalization behavior across inspection, LSP URI handling, batch command execution, and bridge project identity.
Adds Rust and TypeScript regression coverage for supported and preserved path forms.
Confidence Score: 5/5
The PR appears safe to merge, with no outstanding correctness or repository-rule violations.
The previously reported LSP concern was manually resolved after the author documented that URL parsing rejects the malformed representation, and the bridge coverage concern is fully addressed by the new injectable-platform regression tests. No new actionable failure remains.
Important Files Changed
Filename
Overview
crates/aft/src/windows_path.rs
Introduces the shared strict converter for valid DOS and UNC verbatim paths while preserving unsupported or malformed namespaces.
crates/aft/src/lsp/position.rs
Routes URI path normalization through the shared converter and covers unsupported volume namespaces.
crates/aft/src/windows_command.rs
Uses the shared conversion before invoking batch shims and preserves paths that cannot be converted safely.
packages/aft-bridge/src/project-identity.ts
Mirrors strict Windows project-root normalization and exposes an injectable platform for portable testing.
Reviewed against the CI verdict. Greptile's P1 (\\?\Volume{GUID}\ becoming a bogus file://?/... URI) is contradicted by the matrix: the new windows_extended_volume_path_is_not_misrepresented_as_a_file_uri test ran in the Windows libtest lane and passed, so the preserved verbatim spelling does error out of path_to_uri rather than parsing as UNC - you can resolve that thread with that pointer. The P2 (no win32 coverage for project-identity.ts) is fair: one small test with a DOS, a UNC, a preserved Volume{} and a malformed spelling, asserting the pool key matches the Rust policy, would let the bridge side drift-guard the same rule. The four cubic threads are the same two findings restated. Once the threads are resolved (and that test is in, if you agree), this merges - the matrix is green and #303 is approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
\\?\Volume{GUID}\Validation
cargo fmt --all -- --checkcargo test -p agent-file-tools --lib windows_pathcargo test -p agent-file-tools --lib windows_extended_bun x @biomejs/biome check packages/aft-bridge/src/project-identity.tsNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes Windows extended-length path normalization so only valid DOS and UNC namespaces lose their
\\?\prefix; unsupported namespaces like\\?\Volume{GUID}\are now preserved instead of being corrupted.windows_pathfor inspect normalization, LSP URI rendering, batch-shim execution, and bridge root identity.Written for commit a7049db. Summary will update on new commits.
Closes #303
Greptile Summary
This PR centralizes strict Windows verbatim-path normalization and prevents unsupported or malformed namespaces from being corrupted by indiscriminate prefix removal.
Confidence Score: 5/5
The PR appears safe to merge, with no outstanding correctness or repository-rule violations.
The previously reported LSP concern was manually resolved after the author documented that URL parsing rejects the malformed representation, and the bridge coverage concern is fully addressed by the new injectable-platform regression tests. No new actionable failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Input[Windows path] --> Validate{Valid verbatim DOS or UNC?} Validate -->|Yes| Convert[Remove verbatim namespace safely] Validate -->|No| Preserve[Preserve original namespace] Convert --> Consumers[Inspect, LSP, commands, bridge identity] Preserve --> ConsumersReviews (2): Last reviewed commit: "fix(windows): reject malformed verbatim ..." | Re-trigger Greptile