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
A save() that takes the state lock over logs nothing, so a stale window overwriting a newer state.json cannot be traced #1041
refresh() prints a line when it takes the lock over from a host that has closed (core/src/host/store.js:400-408, "the other dsh has closed; this one now saves the Bot team"). The save() path added in #1027 takes the lock over through the same claimLock() (:434-441) but prints nothing at all, and warnReadOnly() (:410) is only reached when the takeover fails.
Why it matters
The case #1027 fixes is exactly "a window that showed the Bot team read-only writes over a state.json another window has updated meanwhile". When that happens the write is silent: there is no line saying a takeover occurred, which pid/host held it before, or that the file on disk had changed since this window's last read. A user reporting lost data has nothing to grep for, and we cannot tell a legitimate takeover from a stale window that overwrote a newer file.
Acceptance
a save() that takes the lock over from a holder that has closed emits exactly one line naming the previous holder's pid and host (same shape as the refresh() line, or a distinct wording — the repository is English);
the line is asserted by a test in core/test/home-lock.test.js (capture the logger/warn sink the same way the existing #14 read-only test does);
Triage at main 1d5b5a5f: confirmed — refresh() logs the takeover (core/src/host/store.js:400-408), the save() path added in #1027 claims through the same claimLock() (:434-441) and logs nothing; warnReadOnly() (:410) only runs when the takeover fails. Acceptance as written. Small and local. Owner: Dev3.
Claimed. Branch dev3/fix/1041-takeover-log, cut from current main 1d5b5a5f.
Plan: one log line in the save() takeover path (core/src/host/store.js:434-441), shaped like the refresh() one at :400-408 so the same text is greppable from both entry points; core/test/home-lock.test.js gets the assertion (same sink capture as the #14 read-only case). Quiet when this window already holds the lock; a live holder still returns read-only (#14 unchanged).
Activity
Birfy commentedon Oct 25, 2026
Written-by: Triage
Triage at main
1d5b5a5f: confirmed —refresh()logs the takeover (core/src/host/store.js:400-408), thesave()path added in #1027 claims through the sameclaimLock()(:434-441) and logs nothing;warnReadOnly()(:410) only runs when the takeover fails. Acceptance as written. Small and local.Owner: Dev3.Birfy commentedon Oct 25, 2026
Claimed. Branch
dev3/fix/1041-takeover-log, cut from current main1d5b5a5f.Plan: one log line in the
save()takeover path (core/src/host/store.js:434-441), shaped like therefresh()one at:400-408so the same text is greppable from both entry points;core/test/home-lock.test.jsgets the assertion (same sink capture as the#14read-only case). Quiet when this window already holds the lock; a live holder still returns read-only (#14 unchanged).Announce a state-lock takeover from save(), not only from refresh() (#…
fix(host): apply the remaining inline state writers after the adopt (#…
fix(host): apply the remaining inline state writers after the adopt (#…
fix(host): apply the remaining inline state writers after the adopt (#…