fix: guard PR comment updates against stale concurrent writes#854
Merged
Conversation
Re-read the managed PR comment before update/delete so older runs do not overwrite newer comment state. Add focused race regression tests and rebuild dist.
🎉 Happy commit!
|
gh-counterPR gate
Repo dashboard
Reported by gh-counter |
Code Metrics Report
Details | | main (c70b583) | #854 (64e8d56) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 97.6% | 97.1% | -0.5% |
| Files | 7 | 7 | 0 |
| Lines | 170 | 177 | +7 |
+ | Covered | 166 | 172 | +6 |
- | Code to Test Ratio | 1:1.6 | 1:1.5 | -0.1 |
| Code | 714 | 780 | +66 |
+ | Test | 1180 | 1241 | +61 |
- | Test Execution Time | 1s | 2s | +1s |Code coverage of files in pull request scope (100.0% → 98.3%)
Reported by octocov |
gh-build-size
Reported by gh-build-size |
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
dist/**Why
Older overlapping action runs could delete or overwrite the current managed PR comment after a newer run had already produced the correct final state.
This keeps the existing duplicate-create cleanup while avoiding stale write races on the user-visible comment path.
Verification
bun run lintbun run testbun run buildNotes
dist/**was rebuilt to keep the published action artifact in sync.ajv/fast-uriwarning from upstream type exports.