fix(git): handle empty delta bundles - #408
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eea5414674
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
eea5414 to
31eab46
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31eab4636a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
31eab46 to
b6b76c9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6b76c906c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b6b76c9 to
0db068a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0db068a4a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0db068a to
e1fc498
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1fc498a74
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e1fc498 to
aecda48
Compare
joshfriend
left a comment
There was a problem hiding this comment.
startDeltaBundleFetch in the client only considers a 200 to be a success for fetching a delta bundle
aecda48 to
8e0a707
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e0a70710f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Verify an empty delta against fresh upstream refs before returning the no-content outcome. Keep ref inspection and bundle creation consistent so concurrent fetches cannot turn an empty delta into an arbitrary Git failure. Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a0a667-aa3c-7519-8f18-52fce84e7724
8e0a707 to
16e8a94
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16e8a94de0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| go func() { | ||
| defer build.release() | ||
| defer s.bundleBuilds.Delete(key) | ||
| publishCtx, cancel := context.WithDeadline(s.ctx, deadline) |
There was a problem hiding this comment.
Retain failed publications while the bundle is still in use
When the cache is a no-op backend or cacheBundle fails, this unconditional deletion removes the only discoverable copy as soon as the publication attempt ends, even if the owner or existing waiters are still streaming build.file. A request arriving during that streaming window therefore misses both the cache and bundleBuilds and regenerates the same expensive bundle under the fetch exclusion. Fresh evidence after the earlier cache-publication comment is that the generated result is now shared with existing waiters, but this deletion still prevents later concurrent callers from retaining it; delay deletion after publication failure until the active consumers release the build.
Useful? React with 👍 / 👎.
Cachew returns HTTP 204 only after an upstream fetch confirms that the snapshot needs no delta. Missing bases and failed fetches or bundle builds retain the normal Git fetch fallback.
Bundle builds hold the fetch lock and have a five-minute limit. Requests for the same bundle share one local build. Background builds continue after client disconnects, but stop on server shutdown. A waiting fetch is skipped only if another fetch succeeded.
Completed bundles stream to waiting clients while cache publication runs separately. Cache failures do not force current waiters to rebuild.
Generated with Amp