fix(honcho): normalize session override paths#13333
Open
sgaofen wants to merge 1 commit into
Open
Conversation
13 tasks
Collaborator
|
Related to PR #13322 — same Honcho session override normalization fix. This PR supersedes it. |
Contributor
Author
|
Thanks for the related-PR note. I compared this with #13322: both fix normalized cwd lookup for Honcho session overrides. This PR keeps exact configured keys winning first and adds coverage for trailing separators, relative cwd spellings, and symlinked cwd spellings. #13322 also has tilde/redundant-segment coverage; I can fold that into this PR if maintainers want the combined surface here. Leaving this ready for review. |
19 tasks
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.
Fixes #13284.
Root cause:
Honcho session overrides checked the configured
sessionsmap only with the rawcwdstring. Equivalent directory spellings such as trailing slashes, relative paths, or symlinked paths missed the manual override and fell back to basename-derived sessions.Fix summary:
sessionskey lookup first so intentionally exact entries still win.Path(...).expanduser().resolve(strict=False)for both the requested cwd and configured session keys.Tests:
uv run --frozen --python 3.11 --extra dev pytest -o addopts= tests/honcho_plugin/test_client.py -qgit diff --check -- plugins/memory/honcho/client.py tests/honcho_plugin/test_client.py