Repository navigation
[D] Invalidate recon ETags on webhook projection - #22
Conversation
Prevents a cached GitHub ETag for an older stable release from 304-masking recon after a missed delete of a later release that a webhook had projected.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR fixes a reconciliation correctness edge case in the Worker’s GitHub Releases pipeline by invalidating per-repository reconciliation ETags after a webhook projection mutates local state, preventing a later 304 response from masking a missed delete/unpublish.
Changes:
- Extend
markReleaseWebhookSuccessto optionally clear a specific repository’s cached reconciliation ETag. - Pass the repository ID from the GitHub release webhook handler only when the projection kind is
upsertordelete. - Add targeted regression tests covering the “304-mask after missed delete” scenario and the ETag clearing behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| worker/src/release-reconciliation.test.ts | Adds an end-to-end regression test ensuring reconciliation does not send If-None-Match after a webhook upsert/delete invalidates the repo ETag. |
| worker/src/release-ops-state.ts | Updates webhook success marker to optionally delete a repo’s cached reconciliation ETag while recording webhook success time. |
| worker/src/release-ops-state.test.ts | Adds a unit test asserting a repository ETag is removed on webhook projection success. |
| worker/src/github-release-webhook.ts | Wires repository-scoped ETag invalidation into webhook processing for upsert/delete projections only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 095baa779c
ℹ️ 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".
Invalidate repository ETags on the webhook critical path before markProcessed, and merge recon ETag updates into the live map so concurrent invalidations are not restored.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7badbfaa3
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Follow-up to Phase D: webhook projection that upserts/deletes a repository now clears that repository's reconciliation ETag.
Why
Sequence that left wrong local state:
observedAton BFix
markReleaseWebhookSuccess(store, at, repositoryId)drops the per-repo ETag when projection kind is upsert/delete.Tests
npm run test:node— 108 pass including explicit 304-mask regression.