Skip to content

fix(results): retry interrupted direct result pushes#1344

Merged
christso merged 1 commit into
mainfrom
test/av-fis-3-interrupted-sync-retry
Jun 10, 2026
Merged

fix(results): retry interrupted direct result pushes#1344
christso merged 1 commit into
mainfrom
test/av-fis-3-interrupted-sync-retry

Conversation

@christso

@christso christso commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remote result sync is intended to be remote-first and idempotent: from the user's perspective, retrying a failed publish should ensure the configured remote results repo contains the run artifacts. Local Git commits are only an implementation detail.

This PR fixes the interruption window where AgentV has already committed result artifacts in the local results-repo clone, but the push to the remote failed before GitHub received the commit. Before this fix, a user could see the initial push error, retry the same publish, and AgentV could treat the retry as a no-op because the artifacts were already committed locally—even though the remote was still missing the run.

On retry, directPushResults now detects that safe local-ahead state, verifies the ahead commit only contains AgentV results paths, and pushes the existing commit. Unsafe local-ahead states with non-results changes still block with an explicit error instead of being pushed blindly.

This keeps the expected recovery flow simple:

  1. First push fails and surfaces an error.
  2. User retries.
  3. AgentV ensures the remote gets the results, even if the local result commit already exists.

Verification

Red/green UAT:

  • Red before fix: bun test packages/core/test/evaluation/results-repo.test.ts -t interrupted failed with Expected: true / Received: false on the retry after a simulated rejected push.
  • Green after fix: bun test packages/core/test/evaluation/results-repo.test.ts -t interrupted passed.

Additional checks:

  • bun test packages/core/test/evaluation/results-repo.test.ts — 13 pass
  • bun run typecheck — pass
  • bunx biome check packages/core/src/evaluation/results-repo.ts packages/core/test/evaluation/results-repo.test.ts — pass
  • Pre-push hook also ran bun run typecheck and biome check . — pass

Post-Deploy Monitoring & Validation

  • Log/search terms: Results repo has non-results committed changes, Results repo push was rejected, non-fast-forward, and direct result push failures around directPushResults.
  • Healthy signal: rerunning a result publish after a transient push interruption leaves the results clone no longer ahead of origin/<base> and the remote contains the run artifact commit.
  • Failure signal: repeated publish retries return no-op while the results clone remains ahead, or remote result runs are missing after retry.
  • Validation window/owner: next production remote-sync dogfood run; AgentV maintainers should inspect Dashboard/CLI sync status and results repo history.
  • Rollback trigger: if retries begin pushing non-results commits or cause unexpected base-branch updates, revert this PR and require manual results repo cleanup before retrying publishes.

Compound Engineering
Codex

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 752ffd9
Status: ✅  Deploy successful!
Preview URL: https://0585422a.agentv.pages.dev
Branch Preview URL: https://test-av-fis-3-interrupted-sy.agentv.pages.dev

View logs

@christso christso merged commit 7184b2b into main Jun 10, 2026
8 checks passed
@christso christso deleted the test/av-fis-3-interrupted-sync-retry branch June 10, 2026 05:13
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