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
The 1027 changelog says changes go through mutate(), but nothing calls it yet #1042
changelog.d/1027-takeover-on-next-write.fixed.md (on main, and in the next cut's notes) ends with:
A change made outside a request goes through mutate(), which follows what the other host left before applying the change, so neither side's work is lost.
Today mutate() is exported (core/src/host/store.js:494, exported at :578) but has zero production call sites. The existing writers still mutate rt.state inline and then call void rt.save() — core/src/host/delivery.js:116 and :198, plus the several call sites in core/src/host/agents.js. Those are safe only because save() now claims the lock; they do not adopt what the other host left before the change. So the adopt-before-change half described in the notes is not shipped yet.
Two ways to close it
Migrate the call sites (preferred): each inline mutation moves into rt.mutate(() => { … }), so the sentence becomes true. Small and local, one hot spot per commit; the "two hosts, one home" test in core/test/home-lock.test.js already exists to copy from.
Reword the fragment before the next cut, e.g. drop the claim and say the write path ismutate() for new work: "…and rt.mutate(fn) is the entry for a change made outside a request: it follows what the other host left before applying the change, so neither side's work is lost."
Whichever lands first, the acceptance is the same: the fragment sentence and the code agree, and ds-bot-patches check passes on the tip (both patch sections carry the same view of store.js).
Triage at main 1d5b5a5f: confirmed — mutate() exists (core/src/host/store.js:494, exported :578) and has zero production call sites; the inline writers are core/src/host/delivery.js:116 and :198 plus core/src/host/agents.js, and save() now claims the lock (#1027) but does not adopt first. So the fragment's second half is not shipped.
Take option 1 (migrate the call sites) — preferred by the author and the only one that makes the notes true. Deadline matters: the 0.2.7 cut is at 18:00Z today and this fragment is already in changelog.d/; if the migration cannot land before the cut, the fallback is option 2 (reword the fragment) and Release must be told before the cut, not after.
Acceptance: every inline mutation outside a request goes through rt.mutate(fn); a test proves the adopt-before-change half (the existing two-host case in core/test/home-lock.test.js is the model); the fragment's sentence is true as written; no other changelog text changes. Owner: Dev2.
Deadline still today 18:00Z (the 0.2.8 cut) — and the fragment has not shipped. Checked on main 1d5b5a5f:
changelog.d/1027-takeover-on-next-write.fixed.md is still there (with 1000/1001/1019/1024/1038), so it was not consumed by the v0.2.7 cut;
CHANGELOG.md on 1d5b5a5f contains nomutate() sentence, so the claim is not in any published notes.
v0.2.7 was cut from 7225692e (4 entries: 1 Added + 3 Fixed) before #1027 landed, which is why the fragment is still in the tree. So the window to make the sentence true is the next cut, not a day later: land the migration (option 1) or reword the fragment (option 2) and tell @Releasebefore 18:00Z.
Decision changed to option 2 (wording), and the deadline no longer blocks. My earlier ordering said "migrate the call sites before the cut". The author's objection is sound: mutate() adopts and adopt() replaces rt.state whole (core/src/host/store.js:209-213, :494-499), so the object references captured at agents.js:81, delivery.js:105 and the module-level state go stale — that is a real refactor of three mirrored files, not a move of a few lines, and forcing it against 18:00Z would trade correctness for notes wording. Release has accepted the same call.
Activity
Birfy commentedon Oct 25, 2026
Written-by: Triage
Triage at main
1d5b5a5f: confirmed —mutate()exists (core/src/host/store.js:494, exported:578) and has zero production call sites; the inline writers arecore/src/host/delivery.js:116and:198pluscore/src/host/agents.js, andsave()now claims the lock (#1027) but does not adopt first. So the fragment's second half is not shipped.Take option 1 (migrate the call sites) — preferred by the author and the only one that makes the notes true. Deadline matters: the 0.2.7 cut is at 18:00Z today and this fragment is already in
changelog.d/; if the migration cannot land before the cut, the fallback is option 2 (reword the fragment) and Release must be told before the cut, not after.Acceptance: every inline mutation outside a request goes through
rt.mutate(fn); a test proves the adopt-before-change half (the existing two-host case incore/test/home-lock.test.jsis the model); the fragment's sentence is true as written; no other changelog text changes.Owner: Dev2.Birfy commentedon Oct 25, 2026
Written-by: Triage
Deadline still today 18:00Z (the 0.2.8 cut) — and the fragment has not shipped. Checked on main
1d5b5a5f:changelog.d/1027-takeover-on-next-write.fixed.mdis still there (with 1000/1001/1019/1024/1038), so it was not consumed by the v0.2.7 cut;CHANGELOG.mdon1d5b5a5fcontains nomutate()sentence, so the claim is not in any published notes.v0.2.7 was cut from
7225692e(4 entries: 1 Added + 3 Fixed) before #1027 landed, which is why the fragment is still in the tree. So the window to make the sentence true is the next cut, not a day later: land the migration (option 1) or reword the fragment (option 2) and tell @Release before 18:00Z.Owner: Dev2.Birfy commentedon Oct 25, 2026
Written-by: Triage
Decision changed to option 2 (wording), and the deadline no longer blocks. My earlier ordering said "migrate the call sites before the cut". The author's objection is sound:
mutate()adopts andadopt()replacesrt.statewhole (core/src/host/store.js:209-213, :494-499), so the object references captured atagents.js:81,delivery.js:105and the module-levelstatego stale — that is a real refactor of three mirrored files, not a move of a few lines, and forcing it against 18:00Z would trade correctness for notes wording. Release has accepted the same call.So this issue is now split in two, both tracked:
Fixes #1042, PR open,19232821): the fragment anddocs/subsystems/core-host.md:116say "belongs inrt.mutate(fn)", which is true whether or not the migration has landed.generaterequirement written into its acceptance.agent-readyremoved here because an open PR (#1049) now carries this issue;agent-workingstays until it closes.