Summary
Concurrent updates to the same route silently clobber each other (last-write-wins). Add a version field and reject stale writes so lost updates become impossible.
Why this matters
Lost updates corrupt route state under concurrency. OCC is the standard, lock-free fix and makes conflicts explicit to clients.
Requirements
- Add a monotonic
version to the route model, returned on every read.
- Require the client's expected
version on update; bump it atomically on success.
- Reject a mismatched version with
409 version_conflict including the current version.
- All existing update paths go through the guarded write.
Technical guidance
- Do the compare-and-set atomically at the store layer, not in the handler.
- Return the fresh version in both success and conflict responses so clients can retry.
Edge cases — each must have a test
Acceptance criteria
Out of scope
- Field-level/merge conflict resolution
- Historical version audit trail
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.
Summary
Concurrent updates to the same route silently clobber each other (last-write-wins). Add a
versionfield and reject stale writes so lost updates become impossible.Why this matters
Lost updates corrupt route state under concurrency. OCC is the standard, lock-free fix and makes conflicts explicit to clients.
Requirements
versionto the route model, returned on every read.versionon update; bump it atomically on success.409 version_conflictincluding the current version.Technical guidance
Edge cases — each must have a test
Acceptance criteria
npm run lint,npm test, andnpm run buildall pass locallyCloses #<issue>Out of scope
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.