fix(core): fetch from remote on pool reuse when resolve is remote#923
Merged
fix(core): fetch from remote on pool reuse when resolve is remote#923
Conversation
Pool reuse with `resolve: remote` was silently serving stale data. resetSlot() used `git reset --hard <ref>` which only resets to the local branch, never contacting the remote. Now it does `git fetch origin <ref>` + `git reset --hard FETCH_HEAD` so the pool slot reflects the current remote state at eval start. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
e0c026c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://989c4a3a.agentv.pages.dev |
| Branch Preview URL: | https://fix-pool-resolve-remote.agentv.pages.dev |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
resolve: remotewas silently serving stale data —resetSlot()usedgit reset --hard <ref>which only resets to the local branch, never contacting the remotegit fetch --depth <N> origin <ref>+git reset --hard FETCH_HEADso the pool slot reflects the current remote state at eval startresolve: localbehavior unchanged — fast local reset, no network callsRed/Green verification
RED (main): Second eval run with
resolve: remoteshowsexisting=truewith no fetch — stale localmainbranch served silently.GREEN (this branch): Second eval run fetches from origin before resetting, confirmed by
FETCH_HEADfile written during pool reuse. Unit test verifies source repo advances fromv1tov2and the pool slot picks upv2on reuse.Test plan
resolve: remotepool reuse fetches latest commitresolve: localpool reuse does NOT fetch (preserves fast behavior)workspace-multi-repoexample eval🤖 Generated with Claude Code