pending.nvim/lua/pending/sync
Barrett Ruth 36a5025198 fix(gtasks): prevent concurrent push/pull from racing on the store
Problem: `push` and `pull` both run via `oauth.async`, so issuing them
back-to-back starts two coroutines that interleave at every curl yield.
Both snapshot `build_id_index` before either has mutated the store,
which can cause push to create a remote task that pull would have
recognized as already linked, producing duplicates on Google.

Solution: guard `with_token` with a module-level `_in_flight` flag set
before `oauth.async` is called so no second operation can start during
a token-refresh yield. A `pcall` around the callback guarantees the
flag is always cleared, even on an unexpected error.
2026-03-06 15:53:43 -05:00
..
gcal.lua fix(sync): replace cryptic sigil counters with readable output (#86) 2026-03-06 13:26:23 -05:00
gtasks.lua fix(gtasks): prevent concurrent push/pull from racing on the store 2026-03-06 15:53:43 -05:00
oauth.lua fix(oauth): resolve re-auth deadlock and improve flow robustness 2026-03-06 15:43:52 -05:00