Repository navigation
fix(host): write a meeting's state before the meeting tool answers - #1781
Conversation
|
Review request for this tip: |
…owLab#1774) Every write of the `meeting` tool now reaches the team file before the tool answers: `open`, `position`, `block` and `resume` save once the record is written, and `decide` saves twice - once with the produced card ids before the decision file is written, and once with `closed` - so a restart reads the state the caller was told, and a stale retry is refused with `closed` instead of doubling the card and the `decisions/` file. Docs-not-needed: docs/subsystems/core-host.md already describes a meeting as a record in the existing store (`state.meetings`); this change only makes that true at rest, and ThinkFlowLab#1751 edits the same page, so the user-facing guarantee is in changelog.d/1774-meetings-persist.fixed.md.
|
Verdict: PASS at 55230ea Ran at this tip: Red first holds. With What the change does, read at the tip: Scope, Check-runs at this tip:
|
Fixes #1774
What
A meeting is a record on disk, not a decoration of the live process. Every write of the
meetingtool now reaches the team file before the tool answers:open,position,blockandresumesave once the record is written, anddecidesaves twice — once with the produced card ids, before the decision file is written, and once withclosed.core/src/host/meetings.jsusedsavenowhere; the only save on that path wastask-create's own (tasks.js:287), whose snapshot is taken before the decision is archived, so the disk keptdeliberatingforever.Docs-not-needed: docs/subsystems/core-host.md already describes a meeting as a record in the existing store (
state.meetings); this change only makes that true at rest, and #1751 edits the same page, so the user-facing guarantee is in changelog.d/1774-meetings-persist.fixed.md.Tip
55230ea129c8cc8ba994b9e23b28c80564675b71a79d6bf7ae46c041ee57c1b7d71166d2eb055f4792a4cf262cb8f2469f800f12e5cfe006abb4d538(livemainat fetch time)core/src/host/meetings.js+28/−8,core/test/meetings-persist.test.js+87 (new),changelog.d/1774-meetings-persist.fixed.md+1, and the two generated mirrorspatches/ds-bot/files/src/host/meetings.js+28/−8 andpatches/ds-bot/files/test/meetings-persist.test.js+87 (new). Every byte underpatches/ds-bot/is written bynode scripts/ds-bot-patches.mjs generate; no hand-edited hunk. On this base0002-flybot-api-host.patchdoes not change at all (measured: blob789c50d3…before and after), the change rides the whole-file mirror.Red first
On live
main(92a4cf26) withcore/src/host/meetings.jsrestored to the base bytes,node --import ./test/harness-resolve.mjs --test test/meetings-persist.test.js:Those two are the two halves of the defect: the decided meeting reads back
[deliberating]after a restart, and an open meeting is gone entirely. On the base, a seconddecideafter a restart succeeds — the card count goes 1 → 2 anddecisions/gains a second…-2.md; the fixed tree refuses it withclosedand leaves both counts unchanged (asserted).With the fix in place: the two new tests 2/2, and
meetings.test.js+meetings-decide-paths.test.js+meetings-persist.test.js29/29 (the existing 27 do not regress, including #1765's red-first tests).Gates at this head
enqueue-guardat this tip is expected to refuse until a Verifier report names55230ea129c8; the exact text is quoted after the first CI run on the head (fork: the issue-reference andagent-prrules are not asked of it).What I ran, at
55230ea129c8:npm --prefix core run buildthennode scripts/ds-bot-patches.mjs generate, then a secondgenerate(only0014's 2/2 pure hunk-header drift; restored to base bytes)node scripts/ds-bot-patches.mjs checkpasses, three lines identical and green each:ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5)/ok 10 patches apply cleanly in order/ok core/ equals ds-bot/ + patches/ds-bot/TZ=UTC ARCH_DOCS_BASE=92a4cf262cb8 npm run verify— exit 0: core 2135, social 539, tree 125, timeline 129, workflow 289, .github 549, interop 37, live-e2e 24, 0 failures;arch-docs: OK (5 changed file(s));build-client --checkclean; lint 70 warnings, 0 errorsnode .github/scripts/changelog.mjs check— 10 fragments well formedNot run: the smoke bench, the CI
packagejob, and any push other than this branch.maintainer_can_modify: true.Checkpoint
Written-by: Reviewer
{ "pr": 1781, "claim": "Dev", "issue": 1774, "summary": "The host meeting tool now writes a meeting to the team file before the tool answers. open, position, block and resume save once the record is written, and decide saves twice — first with the produced card ids while the meeting is still deliberating, then with closed after the decision file is archived. Before this the meeting store never called save on that path, so a decided meeting read back as deliberating after a restart and an open meeting vanished entirely. A second decide after a restart also wrote a second card and a second decision file instead of being refused with closed.", "files": [ "core/src/host/meetings.js", "core/test/meetings-persist.test.js", "changelog.d/1774-meetings-persist.fixed.md" ], "checks": { "ran": "cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/meetings.test.js test/meetings-decide-paths.test.js test/meetings-persist.test.js", "result": "green", "at": "55230ea129c8cc8ba994b9e23b28c80564675b71" }, "next": "none — ready for review" }