Repository navigation
Say new work belongs in rt.mutate(), not that every writer uses it (#1042) - #1049
Merged
Merged
Conversation
…1042) The 1027 fragment and core-host.md both claimed that a change made outside a request goes through `mutate()`. Nothing in core/src calls it (definition at store.js:494, export at :578, zero call sites), and the writers still change `rt.state` inline and call `save()` — delivery.js:116, :198 and the six saves in agents.js. save() claims the lock, so they are safe on the next write, but they do not adopt the other host's state first. Both pages now say what is true: new work belongs in `rt.mutate(fn)`, and the docs name what the remaining inline writers do and where the migration is tracked (#1048). No code change; the fragment the 0.2.8 cut reads is honest.
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner: Dev2
Reviewer: Reviewer
Fixes #1042
Tip SHA: 1923282
Base: 1d5b5a5
This is the wording half of #1042 (Triage's option 2), landed before the 0.2.8 cut so the notes do not claim a migration that has not shipped. The migration itself is #1048, and the fragment now says what is true instead.
Reproduce
changelog.d/1027-takeover-on-next-write.fixed.mdon1d5b5a5fends:and
docs/subsystems/core-host.md:116says the same ("…a change made outside a request (a plugin, a scheduled task, a delivery) goes throughrt.mutate(fn)…"). On the same tree:agents.jsadds six moreawait rt.save()sites (:96, :114, :133, :147, :178, :182). Those are safe on the next write becausesave()claims the free lock (#1027), but they do not adopt the other host's state first, so the sentence was describing a state of the code that is not shipped. #1042 was opened exactly because the release notes read this fragment.What changed
Two files, wording only:
changelog.d/1027-takeover-on-next-write.fixed.md— the last sentence becomes: "New work that changes the state outside a request belongs inrt.mutate(fn), which follows what the other host left before applying the change, so neither side's work is lost." That is true of the entry (store.js:494) without claiming the existing writers use it.docs/subsystems/core-host.md:116— same correction, plus one sentence naming what the remaining inline writers do today ("safe on the next write —save()claims the free lock — but they do not adopt first, so a write from a window that was read-only can miss what the other host left") and pointing at Move the remaining inline state writers onto rt.mutate() #1048.No code, no test, no patch change:
core/is untouched, sods-bot-patchescannot move.What I ran
At
19232821:Red without the source change
Documentation has no runnable red. What stands in: the claim is countable —
grep -rn "rt\.mutate(" core/srcreturns 0 matches on the base and the tip, so the base sentence was false when read against its own tree, and the new sentence is false-proof in the other direction (it says "belongs in", which the definition atstore.js:494makes true). Written here rather than claimed as a passing test.Not run
ds-bot-patches check: nocore/file in the diff, so no patch section can have drifted. Move the remaining inline state writers onto rt.mutate() #1048's acceptance is where that check belongs, and it says the patches must be regenerated withgenerate, not hand-edited.Risk
mutate()", which is true whether or not Move the remaining inline state writers onto rt.mutate() #1048 lands before the cut. Had we kept the old sentence, the notes would have promised adopt-before-change for delivery and agents today.