Restore steps follow-ups from the PR #91 reviews: refusal codes, split restore block, sidecars, test pins #92
Labels
No labels
boundary:crosses
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/messages-mind-mcp#92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Findings from the two fresh reviews and the gate mutation pass of PR #91 (#87) at
45872a3. The security review found no blocker: no documented path starts sync with both stores absent. The correctness review raised two test-strength blockers (items 9 and 10). The operator ruled on 2026-11-16 to merge PR #91 and fix these here, because the documents already meet those rules and the merged text is safer than the text onmainbefore it. Line numbers are at45872a3.Should fix first (explicit documents)
docs/install-single-host.md§6). The docs say a Tombstone store file plus a non-zero exit means "the restore succeeded and only the sync pass failed". That is false when the Rebuild refused before it restored anything:rebuild-store-present(sync.py:812-813),tombstones-present(tombstones.py:261-262),sync-running, or a config refusal. A restart is still safe there, because the file is the original store, but the operator believes a Rebuild ran. Key the rule on the printed code: only a code from the sync pass after the restore (not a refusal code) means the restore succeeded.:117-122, install:201-208). The move is a#comment inside a block the lead-in says to run. Pasted whole, the Rebuild runs against stores still in place. Split the block at the move step: block 1 stops the agent, the move is a separate step with a concretemvinto a sibling directory, and block 2 runs the Rebuild. The restart block stays separate and gated.launchctl disableandlaunchctl bootoutwith&&, and add a check that the job is disabled and gone (for examplelaunchctl print-disabled gui/$(id -u)names it as disabled). Ifdisablefails silently,RunAtLoadstarts the job at the next login.journal_mode=DELETE(tombstones.py:123), so its sidecar is-journal. Only the Mirror uses WAL (store.py:244). Name the right sidecars for each store.:197says "Use that path as EXPORT", but the block passes--rebuild "<path>"(:207), and no text names<path>. Pasted unreplaced, the restore exits with a misleadingtombstones-unreadable(tombstones.py:286-290). Use one placeholder, set as a shell variable at the top of the block, and name it in the lead-in.messagesmind. Say which install putsmessagesmindon PATH, or point launchd installs to the install document's command shape.Test gaps
Mutants from the gate pass that survived (all tests passed):
config-validationsentence in the Stop section (H4a), the-wal/-shmsentence in the lock paragraph (H4d). Pin every copy, or keep one copy and link to it.FILEis the config file, …") deleted (H1h). Install §6 with the LaunchAgents cause repeated, or with "RunAtLoadstarts the agent again at the next login or restart." put back (H7a, H7b): the "each rule once" test counts only some rules. Make it fail on any repeated sentence in §6.lock = mirror.resolve().with_name(...),test_the_lock_is_keyed_on_the_mirror_path_as_the_config_writes_itpasses, because the alias is a file in the same directory and pytest'stmp_pathis already resolved. The suite still kills M7, throughtest_a_symlink_loop_at_the_mirror_path_is_retried_with_tombstones_unreadable. Alias the directory instead (aliasdir -> data, holdaliasdir/mirror.db) so the named test kills M7 on Linux and macOS.test_the_install_restore_blocks_use_the_checkout_interpreterdoes not assert that no block runs a baremessagesmindcommand, and checks only the variables it names, not every variable each block uses.launchctl enableandbootstrap; a plainmessagesmind sync … --onceor alaunchctl kickstartinserted before the Rebuild passes. The restart regex acceptstest -f … || true && …and; true. The READMEtest -ftarget is not pinned (test -f EXPORTpasses). The comment's position before the Rebuild line is not checked. The restart paragraph's position after the restore block is not checked.asia.groupthink.messagesmind.apior a wrong plist path passes.docker compose start sync" passes, and so does the same change for--replicas=1.--replicas=1is matched as a substring (--replicas=10passes).0").README.md#stop-the-sync; a broken bare(#stop-the-sync-agent)link passes. The SECURITY stop-rule sentence ("Stop the agent so that it stays stopped before you move a store or run a Rebuild") is pinned only in fragments.launchctl bootout …syncpin is also met by §9 Removal (install:296). Scope it to §6.^ replicas: 1$check is file-wide; scope it to the Deployment document.-wal/-shmwording (item 4) and the"<path>"placeholder (item 5); update them with the fix.Notes
.<export>.<hex>.tmpfile in the export directory; the docs describe only the restore temp file.fsyncon the export directory afteros.replace. A power loss can bring back the old export, which is still complete.lock.holdmakes the directory again with the shell's umask (sync.py:139), and thetmutilexclusion stays on the moved directory.source-replacedandrow-id-reusedtell the operator to move both stores aside. A plain sync with only the Mirror moved keeps the Tombstone store (sync.py:704-711). The security review also restored from a moved-aside live Tombstone store as EXPORT (exit 0). Decide which path to document; the shipped configs set no export path.<namespace>in the inlinekubectlcommands is parsed by the shell as a redirection; it fails safe. UseNAMESPACE.__import__("sys")in askipifreads better as a plainimport sys.Triage decisions (2026-11-16)
ready-for-agent.src/,.woodpecker/*ordocs/adr/*. If item 1 needs a new printed code, stop and ask.Acceptance criteria
Blocked by
Filed under: #87 merge gate, fresh reviews and gate mutation pass of PR #91 at
45872a3.⏸ SVD architect gate: dev/messages-mind-mcp#92 restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
standard· dispatch effortmediumRun:
20261116T044446Z-19f4bfb9Held because: CLEAN but 5 open risk(s) (1 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
launchctl print-disabled gui/$(id -u)prints"asia.groupthink.messagesmind.sync" => disabled. On the host, afterlaunchctl disable, runlaunchctl print-disabled gui/$(id -u) | grep -F '"asia.groupthink.messagesmind.sync"'and quote the output in the PR body. If it prints=> true, match both forms with grep -E '=> (disabled|true)'. [verification]Change: Mirror the PR #91 documents-test style in tests/test_sync_documents.py:598-851: sentence constants at :598-623, ```sh block discovery at :761 and the commands filter at :769-771. Rewrite those tests in place. Use section-scoped helpers (README ### sections, and install §6 via test_layout.py:240-241 install_sections()[5]).
Docs, items 1-6: replace the README Stop restore block (:117-122) and the install §6 block (:201-208) with four blocks, in this order:
launchctl disable … && launchctl bootout …, then aprint-disabled/printcheck line that printsstopped.mvloop of mirror.db(-wal,-shm) and tombstones.db(-journal) into an aside- directory inside the store directory.export_file="<store.tombstone_export_path value>"is the first line, and the Rebuild runs only whentest -f "$export_file" && test ! -eholds for both stores. The README runsmessagesmind, and a new sentence says where it is on PATH and links to install §6.Item 1: the RESTART rule in 3 places (README :124 and :176, install :210) keys on the pre-restore refusal codes sync-running, rebuild-store-present, tombstones-present and feeder-missing, plus config=error/secret=error. All four codes are in sync.SETUP_CODES (sync.py:74-85), and these refusals happen before the restore (sync.py:808-825, tombstones.py:265-297, cli.py:133-152). No new printed code is added.
Item 4: the sidecars sentence becomes 'Mirror: -wal/-shm; Tombstone store: -journal', tied to tombstones.py:123 (journal_mode=DELETE) and store.py:244 (WAL).
Tests:
import sys.Notes 19 and 21 become doc sentences. Notes 20 and 22 get a decision recorded in the PR body. No edits to src/, .woodpecker/, docs/adr/, deploy/ or compose.yaml.
Files:
README.md·SECURITY.md·docs/install-single-host.md·tests/test_sync_documents.py·tests/test_sync.pyDecision: accept the 5 open risk(s) above and dispatch this spec (
svd:go), or park (svd:skip) / re-spec (svd:respec)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-16-restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-16-restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code.mdspec-verify-dispatch Half B for dev/messages-mind-mcp#92 restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code completed integration verify.
20d55383a820d5538; re-poll before merge.python3 -m pytestin the worktree fails on a missing tiktoken module; the worktree .venv interpreter (asmake checkuses via uv) works. Collection was run with .venv/bin/python3.codex-svd ship --run-id 20261116T050451Z-ee0393a6 --confirm-merge)spec-verify-dispatch Half B for dev/messages-mind-mcp#92 restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code completed integration verify.
2ff56b0017codex-svd ship --run-id 20261116T060424Z-8591db27 --confirm-merge)spec-verify-dispatch Half B for dev/messages-mind-mcp#92 restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code completed integration verify.
04af5ebf39codex-svd ship --run-id 20261116T104329Z-cb1ed6db --confirm-merge)spec-verify-dispatch Half B for dev/messages-mind-mcp#92 restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code completed integration verify.
5db9784db05db9784: ci/woodpecker/pr/validation pending. Local ruff, mypy and the full pytest run are green (1522 passed, 58 skipped). One blocker: the PR body lacks the required mutant table and notes.=> disabledvs=> true) remains unverified on a host (Open Risk 1).mirror = mirror.resolve()in _InstanceLock.hold). test_the_lock_is_keyed_on_the_mirror_path_as_the_config_writes_it failed, and src/ was reverted. The other mutants were not independently re-run.spec-verify-dispatch Half B for dev/messages-mind-mcp#92 restore-steps-follow-ups-from-the-pr-91-reviews-refusal-code completed integration verify.
5db9784db0codex-svd ship --run-id 20261116T104329Z-cb1ed6db --confirm-merge)Operator ruling, 2026-11-16T22:31:38+11:00: "Ratify, no precedent."
The operator had ruled rounds 2 and 3 only. Round 4 of this issue's rework (the
-journalmove-back fix, commit5db9784) was an exhausted-budget exception. The operator accepted it after the fact, so PR #96 (25865be) stays merged.The cap rule stands. The general auto-gate and T4 grant do not extend a used-up rework budget. Any round past a cap needs the operator's explicit word, relayed through minds-guide.
Record:
_architect/dd469-minds-2026-11-16/coordination.md. Non-blocking review findings are in #97.