Skip to content

fix(core): fetch from remote on pool reuse when resolve is remote#923

Merged
christso merged 2 commits intomainfrom
fix/pool-resolve-remote
Apr 3, 2026
Merged

fix(core): fetch from remote on pool reuse when resolve is remote#923
christso merged 2 commits intomainfrom
fix/pool-resolve-remote

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Apr 3, 2026

Summary

  • 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 does git fetch --depth <N> origin <ref> + git reset --hard FETCH_HEAD so the pool slot reflects the current remote state at eval start
  • resolve: local behavior unchanged — fast local reset, no network calls

Red/Green verification

RED (main): Second eval run with resolve: remote shows existing=true with no fetch — stale local main branch served silently.

GREEN (this branch): Second eval run fetches from origin before resetting, confirmed by FETCH_HEAD file written during pool reuse. Unit test verifies source repo advances from v1 to v2 and the pool slot picks up v2 on reuse.

Test plan

  • New unit test: resolve: remote pool reuse fetches latest commit
  • New unit test: resolve: local pool reuse does NOT fetch (preserves fast behavior)
  • All 1349 existing core tests pass
  • Pre-push hooks pass (build, typecheck, lint, test, validate)
  • Manual RED/GREEN with workspace-multi-repo example eval

🤖 Generated with Claude Code

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>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 3, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: e0c026c
Status: ✅  Deploy successful!
Preview URL: https://989c4a3a.agentv.pages.dev
Branch Preview URL: https://fix-pool-resolve-remote.agentv.pages.dev

View logs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@christso christso merged commit e81559a into main Apr 3, 2026
4 checks passed
@christso christso deleted the fix/pool-resolve-remote branch April 3, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant