You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Zcode store-drift repair can overwrite a route transferred during its health probes #63
Category I (routing ownership), p2. Found while fixing #13; not included in that change (PR #62).
Mechanism (source-level, master 9d4bda8e5)
repairSharedStoreDrift in src/zcode/native.ts reads the shared store's current origin once, then awaits up to two health probes and, on one branch, replacement discovery. After those awaits it calls routeZcodeConfig or unrouteZcode without re-reading who owns the store.
If another process re-routes the store to a live instance during those awaits, the repair can overwrite that route with this process's origin or a replacement, or revert it to direct. This is the same read, await, write shape as #13, on the watchdog's repair path instead of the exit path.
What is and is not known
Source-level finding only. No reproduction has been run and no outage is known.
The repair only proceeds when the origin it first read was dead, so the window needs a second process to re-route within the probe and discovery time.
Suggested reproduction and fix
Use the probe and findReplacement seams to re-point a scratch store to a third, live origin during the awaits; assert the store is left byte-identical on each of the three write paths (re-point to self, re-point to replacement, revert to direct). Re-check ownership before each write, as #62 does for the exit handoff.
A full fix for both paths needs the ownership check inside the locked write; see the limits section of PR #62. Keep that as its own decision.
Activity
test(zcode): drift-repair tests report runtime info to servers they o…
Merge pull request #73 from anuzzolilli-oss/2026-11-15_zcode-drift-re…