Fix stale file read after patch causing empty diff content#178
Open
SteffenDE wants to merge 2 commits into
Open
Fix stale file read after patch causing empty diff content#178SteffenDE wants to merge 2 commits into
SteffenDE wants to merge 2 commits into
Conversation
Also ensure events are always handled in order.
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.
Also ensure events are always handled in order.
#167 fixed some diff errors, but there was still a race condition when using codex in full access mode, where the file was already updated when codex-acp read it, making the patch fail to apply and returning empty content:
codex-acp/src/CodexToolCallMapper.ts
Lines 294 to 297 in e698674
Additionally, because each event was processed individually, the
await readFilecould cause theitem/completedevent to be processed and sent astool_call_updatevia ACP before the initialtool_callwas sent.