Repository navigation
fix: refresh run snapshots after concurrent publication - #145
Merged
Merged
Conversation
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.
Concurrent
jury replyor finding commands can read different event-log snapshots and finish their atomic renames in reverse order. The older command then leavesrun.jsonmissing newer completed replies or finding updates, even thoughevents.ndjsonis correct. Two synchronized real-CLI regressions fail on merged master and pass with this change.Centralize event publication: fold the log, replace the snapshot atomically, then reread the log and retry if it changed. Review, console startup, reply and finding publishers all use the helper. Errors still propagate and temporary snapshots are cleaned up.
Validation on
a51178c1e78256a795720807b8d8d7c2795bc88d:node --test test/run-publication.test.js test/runs.test.js test/cli-commands.test.js: 22 passed.node scripts/ci-check.mjs test: 309 passed, exit 0.node scripts/ci-check.mjs test:package: 55 packaged files and installed CLI checks passed, exit 0, including the concurrent-publication regressions.The fix converges to the current log after concurrent publishers complete successfully. It does not make the event append and snapshot write a crash-atomic transaction; a killed publisher can still require a subsequent publication. No provider sessions or credentials are involved in the deterministic regressions.
Actual executed command: