Repository navigation
fix(sources): match repositories by host and path across transports - #12
Merged
Merged
Conversation
A self-hosted forge usually serves SSH and HTTP on different ports, so ssh://git@h:2222/o/r and http://h:3000/o/r canonicalized apart: the relay woke no app and the forge credential was refused as a scope mismatch. Matching (routing, relay re-verification, provider scope and lookup) now uses host+path; source IDs keep the full canonical URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
A self-hosted forge usually serves SSH and HTTP on different ports, so
ssh://git@h:2222/o/r(the app'sgit:) andhttp://h:3000/o/r(forge credential / webhook payload) canonicalized apart. Effects: a verified push woke no app ("no app is connected to this repository yet"), and the forge credential was refused as a scope mismatch, leaving only the server poll timer to deploy.Matching now goes through
source.SameRepository(case-folded host + path, no scheme or port) in:RoutesFor)gitAppMatch)Policy) and lookup (CredentialRefFor)Unchanged: source IDs and webhook URLs (still keyed on the full canonical URL); the forge API base is still derived from the credential's HTTP(S) address, never an SSH port. A webhook only wakes the app's own poll, so a broader match cannot admit anything.
Tests:
TestSameRepositoryIgnoresTransport,TestRoutingMatchesAcrossTransports,TestProviderPolicyAcceptsSSHSourceOnAnotherPort, plus a CredentialRefFor case.Companion: useteploy/teploy-cli#48.
🤖 Generated with Claude Code