fix(results): retry interrupted direct result pushes#1344
Merged
Conversation
Deploying agentv with
|
| 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 |
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
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,
directPushResultsnow 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:
Verification
Red/green UAT:
bun test packages/core/test/evaluation/results-repo.test.ts -t interruptedfailed withExpected: true/Received: falseon the retry after a simulated rejected push.bun test packages/core/test/evaluation/results-repo.test.ts -t interruptedpassed.Additional checks:
bun test packages/core/test/evaluation/results-repo.test.ts— 13 passbun run typecheck— passbunx biome check packages/core/src/evaluation/results-repo.ts packages/core/test/evaluation/results-repo.test.ts— passbun run typecheckandbiome check .— passPost-Deploy Monitoring & Validation
Results repo has non-results committed changes,Results repo push was rejected,non-fast-forward, and direct result push failures arounddirectPushResults.origin/<base>and the remote contains the run artifact commit.