Repository navigation
fix(sdk): parse git URLs consistently across schemes and suffixes - #6379
Merged
Merged
Conversation
Closed
75 of 86 tasks
VascoSch92
approved these changes
Nov 2, 2026
VascoSch92
enabled auto-merge (squash)
November 2, 2026 17:52
onatozmenn
added a commit
to onatozmenn/software-agent-sdk
that referenced
this pull request
Nov 3, 2026
Keep main's .git suffix handling from OpenHands#6379 in parse_extension_source and drop the duplicate shorthand test, since both already landed on main. Co-authored-by: openhands <openhands@all-hands.dev>
1 of 5 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.
HUMAN:
Fixed the git URL parsing from #6348. I reviewed the diff and the tests; every accepted source should parse to the same repository regardless of how its URL is spelled.
AGENT:
Why
Three URL spellings were mis-parsed:
ssh://git@host:2222/org/repo.gitwas not recognised as a git URL at all (is_git_urlknewuser@host:pathbut not thessh://scheme), so a standard clone URL was rejected as unparseable.github:owner/repo.gitgained a second suffix (repo.git.git), because the shorthand appended.gitunconditionally.https://github.com/owner/repo.git/also gained a second suffix, becausenormalize_git_urlchecked.gitbefore stripping the trailing slash.Summary
ssh://inis_git_url..gitsuffix before adding one in thegithub:shorthand, and strip the trailing slash before the suffix check innormalize_git_url.test_parse_ssh_scheme_url,test_parse_github_shorthand_with_git_suffixandtest_parse_https_url_with_git_suffix_and_trailing_slashfrom theworktree-test-edge-casesbranch (commit f2fcf6e) without theirxfail(strict=True)markers, per the [Bug]: Edge-case tests expose ~70 bugs across the SDK, agent server, tools and workspaces #6348 menu's acceptance criteria.Issue Number
Part of #6348 (menu sub-items: "is_git_url does not recognise the ssh:// scheme", "the github: shorthand appends .git unconditionally", "normalize_git_url checks the .git suffix before stripping a trailing slash")
How to Test
Before this change all three fail (two produce
repo.git.git, one rejects the URL); after, all three pass andtests/sdk/extensions/is 166 passed.tests/sdk/git/has 21 pre-existing failures on Windows at this commit (git diff CRLF handling), identical with and without this change.ruff check/formaton the touched files are clean.Type
Notes
None.