Repository navigation
fix(results): push same-repo results to project origin, not a synthesized URL - #1502
Merged
Merged
Conversation
…ized URL resolveResultsRepoUrl() turned any non-URL value into `https://github.com/<value>.git`, so a same-repo results config (`repo_path: .`) collapsed to the malformed remote `https://github.com/..git`. Only expand genuine GitHub `owner/repo` shorthand and return local paths (including `.`) unchanged, and never let ensureResultsRepoRemote() rewrite an existing remote to a non-URL value, so same-repo results keep pushing to the project's real origin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deploying agentv with
|
| Latest commit: |
7f8baf8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://607d0525.agentv.pages.dev |
| Branch Preview URL: | https://fix-results-push.agentv.pages.dev |
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.
Problem
For a project whose results live in the same repo (
results.repo_path: .,remote: origin), clicking Push results (or auto-push) fails:Even after
git remote set-url origin <correct>, the push still targetshttps://github.com/..git— AgentV re-derives and rewrites the remote itself.Root cause
resolveResultsRepoUrl()synthesized a GitHub URL from any non-URL string:return \https://github.com/${repo}.git\`` (packages/core/src/evaluation/results-repo.ts). Withrepo_path: .,normalizeResultsConfigsetsrepo = '.', soresolveResultsRepoUrl('.')→https://github.com/+.+.git=https://github.com/..git. That value is then written viaensureResultsRepoRemote()(git remote set-url), clobbering the correctorigin.Fix (
packages/core/src/evaluation/results-repo.ts)resolveResultsRepoUrl()only expands genuine GitHubowner/reposhorthand (/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/); explicit URLs pass through; local paths (incl..) are returned unchanged.ensureResultsRepoRemote()refuses to rewrite an existing remote to a non-URL value, so same-repo results keep using the project's realorigin. Separate-repo (repo_url) behaviour is preserved.Validation
bun run --filter @agentv/core typecheck→ ✓bun test packages/core/test/evaluation/results-repo.test.ts→ 56 pass, 0 fail (3 new regression tests)