feat(core): resolve baseline from commits when no Git provider#332
Merged
Conversation
When a project has no remote content access (no Git provider connected), Argos can't compute the baseline server-side. Resolve it client-side: - Find the merge base between the build branch and its base branch. - Ask the new /baseline API to pick the closest commit (the merge base itself or an ancestor) that has an eligible baseline build, searching in growing batches (100, then 500 per request, up to 5000). - If none is found yet (the baseline build may still be processing), fall back to the merge base and send its parent commits so the server can resolve the baseline once that build completes. The batched search and the merge-base orchestration live in find-reference-commit.ts with dependency injection so they are unit tested. listParentCommits is merged into listAncestorCommits (the sole git commit-listing primitive). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add the /baseline path and findBaseline operation to the generated schema so the typed client can call the new endpoint. Scoped to the baseline endpoint only; it references existing schema types (Sha1Hash, Build, Error). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jsfez
approved these changes
Jul 1, 2026
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
When a project has no remote content access (no Git provider connected), Argos can't compute the baseline server-side. This adds client-side baseline resolution that leans on the new
/baselineAPI (argos#2322), which finds an eligible baseline build from a list of candidate commits.How
Resolution (
resolveBaseline) runs only whenhasRemoteContentAccessisfalseand no reference commit is explicitly configured:/baselineover[mergeBase, ...ancestors]for the closest commit (the merge base itself or an ancestor) that has an eligible baseline build. Searched in growing batches: 100, then 500 per request, up to 5000. That build's commit becomes the reference commit.referenceCommit = mergeBaseand send up to 300 parent commits so the server resolves the baseline asynchronously once that build completes.Notes
find-reference-commit.ts, so they're unit tested (no real git/network needed).listParentCommitsis merged intolistAncestorCommits— one git commit-listing primitive.parentCommits(which the server slices[0]off) is derived as[refCommit, ...ancestors].listAncestorCommits.Test plan
tsccleaneslint/prettiercleanvitest— 105 passed, 2 skipped🤖 Generated with Claude Code