Conversation
SummaryFixes filesystem-root cwd filtering: a root prefix ( Findings (all Non-blocking)
VerdictLooks good — small, correct boundary fix with strong cross-path test coverage. |
This branch has not been deployed
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.
What does this PR do?
A
cwd_prefix="/"filter currently matches the root session but misses sessions under/repoor/repo/src:_cwd_prefix_clauseappends another separator and produces the SQL LIKE pattern//%. A stored backslash root has the same issue. The shared predicate affects rich session lists, counts, workspace resume and prune previews/actions.Append a separator only when the prefix does not already end in that separator, then apply the existing LIKE escaping. Ordinary paths, drive roots, and literal
%/_characters keep their existing behavior.Related issue
Found on main
6e2b8e070d28b1a3381a3fb290b6b8d6cce13cef. No matching issue. Checked existing PRs around_cwd_prefix_clause, root filters and workspace filtering. #78927 fixed wildcard escaping; this preserves that fix and handles the remaining root-directory boundary case.Type of change
How was this tested?
Two invariant tests use real temporary
SessionDBfiles. Listing in both order modes, counts and workspace resume must select the same directory and descendants. Pruning must agree with its preview and preserve out-of-scope rows and messages. Windows-style paths are database values; the tests do not fake the host OS.test_hermes_state.py, viascripts/run_tests.shwith retries disabled.git diff --checkand compatibility-pointer check passed.A broader
test_hermes_state.pyrun exposed an existing FTS query-count assertion failure, reproduced unchanged on the unpatched base. Its separate process-inspection sandbox error passed outside the sandbox. No live session database was modified; the full repository suite was not run.Checklist