Rebuild safety docs from the PR #86 reviews: bootout lasts one login, stop every supervisor, name the exact condition #87
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#87
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 of PR #86 (#84) at
3fa2084. Neither review found a blocker. Line numbers are at3fa2084. Items 1 to 5 complete the purpose of #84: the documents must tell the operator plainly how a restart can sync Forgotten messages back.Should fix first (privacy, explicit documents)
launchctl bootoutstops the agent only until the next login (README.md:103,:147,docs/install-single-host.md:195). The plist hasRunAtLoadtrue (deploy/launchagents/…sync.plist:23) and sits in~/Library/LaunchAgents. If the operator moves the stores aside and then logs out or restarts the Mac before the Rebuild, the agent starts again. With no export configured, it makes fresh stores and syncs Forgotten messages back. Say: finish the Rebuild in the same login session, orlaunchctl disablethe agent (or move its plist out of~/Library/LaunchAgents) first, and enable it again afterwards.README.md:103, install:195). A restarted agent makes a new empty Mirror and Tombstone store only when both are absent and no export is configured (sync.py:708). If only the Mirror is moved, the agent makes a new Mirror and keeps the Tombstone store, so Forgotten messages stay forgotten.README.md:103). Compose (restart: unless-stopped) and Kubernetes also restart sync (README.md:98). Name every supervisor, and say how to stop each one before a Rebuild.README.md:80(source-replaced),:81(row-id-reused),:82(tombstones-not-restored) and:151("Restore withsync --rebuild EXPORT"). Thesource-replacedandrow-id-reusedrows are the dangerous ones: exit 3 restarts every 60 s, and their Rebuild needs both stores moved aside.<mirror>.lockwith it, so a Rebuild at the original path meets no lock while the old agent still runs. Deleting the lock file has the same effect.README.md:103). "may not stop a sync on another host" and "flockfails, for example NFS or SMB". Say "some NFS or SMB mounts" and keep the two cases apart.Test gaps (mutations that survived)
:195"before you move the Mirror or run a Rebuild" can revert to "before a Rebuild".SECURITY.md:105can lose the 0700 sentence.README.md:103can lose "If the agent is not stopped and no export is configured,". All the documents tests still pass. Pin each sentence.store.py:240:absolute()back toresolve()survives, becauseRuntimeErroris now mapped. Pinabsolute(), or record that the mapping is the guard.sync.py:146-148: droppingos.close(fd)in theexcept OSErrorbranch survives. This predates #84.sync.py:743-746: deleting the in-loop salt check survives. Its comment is true, but no test reaches the check.sync.py:134: keying the lock onmirror.resolve()is killed only by accident. No test pins "keyed on the Mirror path as the config writes it".tests/test_sync.py:1308:os.get_inheritable(...)is always False under PEP 446, so that assert proves nothing. The flags check is the real test. Drop the assert, or say why it stays.Notes
exceptatstore.py:266also coverscreate=True. There, aRuntimeErrororValueErrorcan come only from a NUL path, which the config already refuses. The #84 spec said that branch stays unchanged. Record it.O_NOFOLLOWrefuses a symlink, and a FIFO or a directory fails closed withstore-unavailable. "Only the directory mode limits" leaves out ACLs.Acceptance criteria
Triage decisions (2026-11-16)
The operator accepted these decisions ("Yes, my way, before #75"). Run SVD on this issue before #75.
launchctl disable gui/$(id -u)/asia.groupthink.messagesmind.sync, thenlaunchctl bootout …. After the Rebuild, runlaunchctl enable …andlaunchctl bootstrap …. Say why: the plist hasRunAtLoad.restart: unless-stopped) and Kubernetes. For each one, say how to stop sync before a Rebuild: launchd as in item 1,docker compose stop sync(use the service name incompose.yaml), and scale the Deployment to 0 replicas.README.md:80,:81,:82,:151).absolute(). For items 10 to 12, add a test for each. For item 13, drop theos.get_inheritableassert.exceptalso coverscreate=True, where only a NUL path (refused by the config) can raise these errors.O_NOFOLLOWrefuses a symlink, and a FIFO or a directory fails closed withstore-unavailable; the lock does not check the owner or the mode of a planted regular file; only the directory mode and ACLs limit who can plant one.Do not edit
deploy/,compose.yaml, the plist,docs/adr/or.woodpecker/.Blocked by
Filed under: #84 merge gate, fresh reviews of PR #86 at
3fa2084.The operator accepted the triage decisions on 2026-11-16. They are in the issue body under "Triage decisions (2026-11-16)". #84 is closed (PR #86,
db2f89f). State: ready-for-agent.⏸ SVD architect gate: dev/messages-mind-mcp#87 rebuild-safety-docs-from-the-pr-86-reviews-bootout-lasts-one
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:
20261116T025430Z-0656fa3dHeld because: CLEAN but 5 open risk(s) (2 verification · 3 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
sync --rebuildagainst the PVC or volume while sync is stopped, and deploy/ is off-limits. Should a follow-up issue cover a K8s/Compose Rebuild runbook? Lean: yes, out of scope here. [decision]launchctl print-disabled gui/$(id -u) | grep asia.groupthink.messagesmind.syncshows it disabled andlaunchctl print gui/$(id -u)/asia.groupthink.messagesmind.syncshows it is not loaded. After enable plus bootstrap,state = running. [verification]make checkon pristinedb2f89fon the host, and assert the post-change failure set is unchanged and the passed count grows by the new tests. [verification]Change: Add a README '### Stop the sync agent' subsection after README.md:105, holding the launchd disable→bootout→enable→bootstrap sh block (reason: RunAtLoad, plist:23-24),
docker compose stop sync/start sync, andkubectl scale deploy/messagesmind --replicas=0(which also stops the api). Link it from the Cause column of rows :80/:81/:82; the Loop column is pinned by loop_column_agrees, tests/test_sync_documents.py:144-153. Also link it from :147 and :151, and put the same launchd block in install §6 (:195). State the code-exact fresh-store condition from sync.py:699-708: both stores absent and no export file at the configured path. Add the re-sync risk, the stop rule and the moved-directory case to the SECURITY_TEXT slice. Reword SECURITY:105: O_NOFOLLOW; a directory fails closed everywhere, a FIFO on macOS (measured); 'directory mode and ACLs'. Split the NFS/SMB sentences into two that each say 'some NFS or SMB mounts'. Mirror the substring-pin style in tests/test_sync_documents.py:470-587 for the documents tests. Mirror the lock tests in tests/test_sync.py:1271-1369 for item 10 (fcntl.flock raises OSError and /dev/fd count stays unchanged), item 11 (salt=None gives the exact secret-missing line, exit 2, no store dir), item 12 (a Mirror alias symlink gets its own alias.db.lock) and item 13 (drop the :1307 get_inheritable assert). Mirror tests/test_store.py:447-465 for item 9 (spy on store._connect; the URI keeps the unresolved symlink spelling). Item 14 goes in the PR body. Prove M1–M8 hand mutations fail.Files:
README.md·SECURITY.md·docs/install-single-host.md·tests/test_sync_documents.py·tests/test_sync.py·tests/test_store.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-rebuild-safety-docs-from-the-pr-86-reviews-bootout-lasts-one.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-16-rebuild-safety-docs-from-the-pr-86-reviews-bootout-lasts-one.mdspec-verify-dispatch Half B for dev/messages-mind-mcp#87 rebuild-safety-docs-from-the-pr-86-reviews-bootout-lasts-one completed integration verify.
e72c2c6e36e72c2c6: Woodpecker ci/woodpecker/pr/validation pending. Local: 1483 passed, 58 skipped, 2 deselected. All 14 scenario tests collect. One PR-metadata blocker: mutation log incomplete. Not ready for merge.spec-verify-dispatch Half B for dev/messages-mind-mcp#87 rebuild-safety-docs-from-the-pr-86-reviews-bootout-lasts-one completed integration verify.
45872a337645872a3. Local make check green (1505 passed, 58 skipped, 2 deselected). All 36 scenario filters collect their named tests. No src/deploy/compose/adr/woodpecker diff.codex-svd ship --run-id 20261116T035257Z-097bf627 --confirm-merge)