fix(core): serialize config store mutations#719
Conversation
Greptile SummaryThis PR fixes a lost-update race in the config store where concurrent
Confidence Score: 5/5Safe to merge — the mutex correctly serializes all write operations, unique temp filenames eliminate concurrent file collisions, and the regression test validates the merged state end-to-end. The promise-chain mutex is implemented correctly: No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(core): serialize public config write..." | Re-trigger Greptile |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Summary
Root cause
setAdapterConfig()anddeleteAdapterConfig()independently read and rewrote the same config file. Concurrent calls could read the same snapshot and the last rename would silently discard another mutation.Validation
corepack pnpm vitest run packages/core/srccorepack pnpm --filter @profullstack/sh1pt-core typecheckgit diff --check