Skip to content

fix(polling): preserve independent local saves while requests are pending - #5772

Open
duongynhi000005-oss wants to merge 2 commits into
tscircuit:mainfrom
duongynhi000005-oss:fix/polling-preserve-concurrent-saves-5619
Open

duongynhi000005-oss wants to merge 2 commits into
tscircuit:mainfrom
duongynhi000005-oss:fix/polling-preserve-concurrent-saves-5619

Conversation

@duongynhi000005-oss

Copy link
Copy Markdown

Summary

  • Record only the polling batch's FILE_UPDATED and FILE_DELETED changes in updates instead of cloning state.fsMap before awaiting file requests.
  • Apply those updates with a functional set((currentState) => ...) merger against the latest currentState.fsMap so concurrent local saves (upsertFile) that finish while /events/list or /files/get requests are pending are preserved.
  • Add regression tests verifying that concurrent local updates and additions are preserved while either the event list or file content request is pending.

Fixes #5619
/claim #5619

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
runframe Ready Ready Preview Oct 26, 2026 4:22am UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@duongynhi000005-oss

Copy link
Copy Markdown
Author

Still relevant: #5619 is open and this is the only PR addressing it. Branch is mergeable with all checks green. Happy to adjust the approach if you prefer a different merge strategy for the polling updates.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@duongynhi000005-oss

Copy link
Copy Markdown
Author

Still actively tracking this fix (#5619 — preserving independent local saves while polling requests are pending). Branch is CLEAN and all checks are passing. Happy to make any adjustments on review!

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

This branch was successfully deployed

1 active deployment
Preview — 7e2a3b75 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polling overwrites independent local saves while requests are pending (repro + patch)

2 participants