Repository navigation
fix(process): normalize descendants of slash-spelled directory roots - #7803
Merged
morluto merged 2 commits intoOct 29, 2026
Merged
Conversation
A working directory or observation path ending in / or /. kept its trailing separator as the alias, so descendant paths never met the delimiter lookahead and stayed literal. Strip those spellings before building aliases and version the path normalization contract as v3. Fixes #7584 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
[Medium impact] The reviewed changes appear safe to merge; no blocking defect was established. SummaryThe PR normalizes descendants of directory roots spelled with a trailing
Reviews (2) · Last reviewed commit: "fix(process): normalize filesystem root ..." · Reviewed by Greptile |
HawkForge
marked this pull request as ready for review
October 28, 2026 14:00
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
2 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixes #7584.
With
normalization.paths: true, a selected observation directory spelled/dir/or/dir/.left its descendants literal./dir/item.txtstayed/dir/item.txtinstead of becoming<filesystem-root-0>/item.txt, while the same directory selected as/dirnormalized fine. A working directory spelled with a trailing slash had the same problem.Problem and expected behavior
Smallest trigger:
filesystem_observation_paths: ["/x/selected/"]and outputP=/x/selected/item.txt.createPathRulematches each selected path literally and then requires$,/, whitespace or a quote right after it. For/x/selected/the match ends after the slash, the next character isi, so the lookahead fails and the descendant is left alone./x/selected/.never occurs inside/x/selected/item.txtat all.Expected: the spelling of a selected directory doesn't change which output text gets its alias.
Change and scope
ProcessNormalization.ts: a smalldirectoryIdentityhelper strips trailing/and/.from the working directory and each observation path before they become aliases. A bare/and relative.stay as they are. The executable path and temporary root aren't touched.path-component-boundaries-v2to-v3because normalized text changes for these spellings, same as c74bc21 did for v2.docs/process-capture.mdmentions the new case.Not included: resolving
.., symlinks or relative paths against the working directory. Those aren't part of this report.The follow-up also normalizes descendants of a selected filesystem root
/, while leaving URL separators and HTML closing tags intact.Contract and boundary impact
createPathRuleinsrc/process/capture/ProcessNormalization.ts, consumed by normalized frames, rendered frames and samples.path_normalization_versionin the comparison contract is nowpath-component-boundaries-v3.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
capture-processbehavior; this only changes how its output is normalized)Evidence and regression coverage
src/process/capture/ProcessNormalization.test.ts:/selected/and/other/.roots plus a/work/working directory, with descendants and the bare slash spelling.tests/boundary/process/processCaptureNormalization.test.ts: actual PTY capture with an observation root ending in/, and the existing contract assertion updated to v3.1 failed | 23 passed). With it, all pass.slashcase, frame data becomesP=<filesystem-root-0>/item.txt, same as theplaincase.For evidence-bearing changes:
Validation performed
vitest run tests/boundary/process/processCaptureNormalization.test.ts src/process/capture/ProcessNormalization.test.ts src/domain/process— 140 passed, 2 skipped (Linux-only PID tests), macOS arm64same unit test file with the source fix reverted — the new test fails
oxfmt --check src tests/boundary/process docs/process-capture.md— cleanoxlinton the 4 changed TS files — exit 0, only the existingno-control-regexwarning atprocessScenario.ts:60Follow-up: focused normalization and PTY boundary tests — 35 passed, 2 Linux-only tests skipped;
npm run check:fastandgit diff --checkpassed (macOS).Compatibility, safety, and release
Author readiness
Human owner: @HawkForge
Before merge
type(scope): outcome.🤖 Generated with Claude Code