Clarify safe sync recovery across supervisors #90

Closed
svc-svd-writer wants to merge 1 commit from feat/svd-dev-messages-mind-mcp-87-rebuild-safety-docs-from-th-f149650c into main
Collaborator

Document persistent supervisor stops, the Tombstone export guard, and the checks required before restarting after a Rebuild. Add regression tests for the recovery guidance and existing lock and store behavior.

Docs change (operator-visible): to stop sync before a Rebuild, disable and boot out the launchd agent so it stays stopped across a logout; Compose and Kubernetes are named too

This PR replaces the closed PR #89. It carries the merge-gate rework rows R1 to R10 (spec section G): start sync again only after the Rebuild exits 0 and the Tombstone store file exists; set store.tombstone_export_path as a guard before moving the stores; name every Compose command that starts sync; warn about a Kubernetes reconcile; and tighten the test pins.

Item 14 record

The except widened at store.py:266 (RuntimeError, ValueError) also covers create=True. On that branch only a NUL path can raise these, and the config already refuses a NUL store path (#81). The #84 spec said the branch was unchanged; this records that it now catches more.

Mutation log

Run by the merge gate on the host at c87de9e, one mutant at a time, each reverted after its run. The dispatch did not run M4 to M7, because the write set excludes source files; the gate ran them. Each line gives the mutant, the test filter and the observed result.

  • M1 install: 'before you move the Mirror or run a Rebuild' -> 'before a Rebuild': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login (killed).
  • M2 SECURITY: delete the 0700 sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_state_what_the_lock_does_not_cover (killed).
  • M3 README: delete the 'If the agent is not stopped ...' sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition (killed).
  • M4 store.py: absolute() -> resolve(): filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_store.py::test_a_writer_without_create_opens_the_path_as_written_without_resolving (killed).
  • M5 sync.py: drop os.close(fd) in the OSError branch: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync.py::test_a_hold_that_flock_refuses_with_an_os_error_closes_its_descriptor (killed).
  • M6 sync.py: delete the in-loop salt check: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync.py::test_a_missing_salt_refuses_before_the_lock_and_the_stores (killed).
  • M7 sync.py: key the lock on mirror.resolve(): filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync.py::test_a_symlink_loop_at_the_mirror_path_is_retried_with_tombstones_unreadable (killed).
  • M8a README: delete the bootout-lasts-one-login sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login (killed).
  • M8b README: delete the launchctl disable line: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login (killed).
  • M8c install: delete the launchctl disable line: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login (killed).
  • M8d README: delete the Compose stop sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor (killed).
  • M8e README: delete 'This stops the api too ...': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor (killed).
  • M8f README: delete 'If only the Mirror is moved ...': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition (killed).
  • M8g SECURITY: delete 'A restarted sync agent can sync Forgotten messages back.': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_security_states_the_resync_risk_and_the_stop_rule (killed).
  • M8h SECURITY: delete the moved-lock sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_name_the_moved_store_directory (killed).
  • M8i README: drop the stop step from the source-replaced row: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_every_rebuild_pointer_says_to_stop_the_agent_first (killed).
  • M8j README: 'On some NFS or SMB mounts, where' -> 'On NFS or SMB, where': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_nfs_and_smb_cases_stay_apart (killed).
  • M8k SECURITY: delete the lock directory fails-closed sentence: all 200 tests passed (survived).
  • R1a README Stop section: delete the start-only-after sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1b README Rebuild paragraph: delete the start-only-after sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1c install: delete the start-only-after sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1d README: delete the 'continue only if' comment line: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1e install: delete the 'continue only if' comment line: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1f README: put enable before the Rebuild line: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1g install: put enable before the Rebuild line: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1h README: drop the Compose start condition: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor (killed).
  • R1i README: drop the Kubernetes scale-up condition: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R1j README Stop section: delete 'If the Rebuild fails, keep sync stopped ...': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild (killed).
  • R2a README Stop section: delete the set-export-path sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard (killed).
  • R2b README Rebuild paragraph: delete the set-export-path sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard (killed).
  • R2c install: delete the set-export-path sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard (killed).
  • R2d README: delete the 'refuses with tombstones-not-restored and creates nothing' clause: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard (killed).
  • R2e README: delete the path-rules sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard (killed).
  • R3a README: drop docker compose run api: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_every_compose_command_that_starts_sync (killed).
  • R3b README: drop docker compose restart: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_every_compose_command_that_starts_sync (killed).
  • R4a README: delete the reconcile warning: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_warn_that_a_kubernetes_reconcile_restores_the_replicas (killed).
  • R4b SECURITY: delete the reconcile warning: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_warn_that_a_kubernetes_reconcile_restores_the_replicas (killed).
  • R5a README: delete the moved-directory-moves-both sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_say_a_moved_store_directory_moves_both_stores (killed).
  • R5b SECURITY: delete the moved-directory-moves-both sentence: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_say_a_moved_store_directory_moves_both_stores (killed).
  • R6 README: drop the stop clause from the last Rebuild pointer: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_every_rebuild_pointer_says_to_stop_the_agent_first (killed).
  • R7a README: delete the LaunchAgents cause: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login (killed).
  • R7b SECURITY: delete the LaunchAgents cause: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_name_the_launch_agents_directory_as_the_login_cause (killed).
  • R7c install: delete the LaunchAgents cause: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_name_the_launch_agents_directory_as_the_login_cause (killed).
  • R8a README: drop 'with both stores moved aside': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition (killed).
  • R8b install: drop 'with both stores moved aside': filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition (killed).
  • R9 install: delete the block lead-in: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_install_risk_sentence_names_both_stores_and_leads_into_the_block (killed).
  • R10a README: rename the Stop heading: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_every_stop_the_sync_agent_link_resolves (killed).
  • R10b README: --replicas=0 -> --replicas=01: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor (killed).
  • R10c k8s: Deployment name -> messagesmind-x: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor (killed).
  • R10d compose: drop restart from the sync service: filter tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x; failed tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor (killed).
  • T2a compose: drop the api dependency on sync (informational): all 200 tests passed (survived).
  • T2b k8s: replicas 1 -> 2 (informational): all 200 tests passed (survived).

M1 to M8j and every R row were killed. M8k (the SECURITY sentence about a directory at the lock path) survived: no test pins that sentence, although the behaviour is tested. T2a and T2b are extra gate checks outside the spec; no test pins the api dependency on sync in compose.yaml or the Deployment's default of 1 replica. The three survivors go to a follow-up issue.

Test results

  • Base db2f89f: 1470 passed, 58 skipped, 2 deselected (make check on the host).
  • Head c87de9e: 1491 passed, 58 skipped, 2 deselected (dispatch report).

Closes #87
Co-Authored-By: gpt-6.1-terra noreply@openai.com

Document persistent supervisor stops, the Tombstone export guard, and the checks required before restarting after a Rebuild. Add regression tests for the recovery guidance and existing lock and store behavior. Docs change (operator-visible): to stop sync before a Rebuild, disable and boot out the launchd agent so it stays stopped across a logout; Compose and Kubernetes are named too This PR replaces the closed PR #89. It carries the merge-gate rework rows R1 to R10 (spec section G): start sync again only after the Rebuild exits 0 and the Tombstone store file exists; set `store.tombstone_export_path` as a guard before moving the stores; name every Compose command that starts sync; warn about a Kubernetes reconcile; and tighten the test pins. ## Item 14 record The except widened at `store.py:266` (`RuntimeError`, `ValueError`) also covers `create=True`. On that branch only a NUL path can raise these, and the config already refuses a NUL store path (#81). The #84 spec said the branch was unchanged; this records that it now catches more. ## Mutation log Run by the merge gate on the host at `c87de9e`, one mutant at a time, each reverted after its run. The dispatch did not run M4 to M7, because the write set excludes source files; the gate ran them. Each line gives the mutant, the test filter and the observed result. - M1 install: 'before you move the Mirror or run a Rebuild' -> 'before a Rebuild': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login` (killed). - M2 SECURITY: delete the 0700 sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_state_what_the_lock_does_not_cover` (killed). - M3 README: delete the 'If the agent is not stopped ...' sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition` (killed). - M4 store.py: absolute() -> resolve(): filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_store.py::test_a_writer_without_create_opens_the_path_as_written_without_resolving` (killed). - M5 sync.py: drop os.close(fd) in the OSError branch: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync.py::test_a_hold_that_flock_refuses_with_an_os_error_closes_its_descriptor` (killed). - M6 sync.py: delete the in-loop salt check: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync.py::test_a_missing_salt_refuses_before_the_lock_and_the_stores` (killed). - M7 sync.py: key the lock on mirror.resolve(): filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync.py::test_a_symlink_loop_at_the_mirror_path_is_retried_with_tombstones_unreadable` (killed). - M8a README: delete the bootout-lasts-one-login sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login` (killed). - M8b README: delete the launchctl disable line: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login` (killed). - M8c install: delete the launchctl disable line: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login` (killed). - M8d README: delete the Compose stop sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor` (killed). - M8e README: delete 'This stops the api too ...': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor` (killed). - M8f README: delete 'If only the Mirror is moved ...': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition` (killed). - M8g SECURITY: delete 'A restarted sync agent can sync Forgotten messages back.': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_security_states_the_resync_risk_and_the_stop_rule` (killed). - M8h SECURITY: delete the moved-lock sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_name_the_moved_store_directory` (killed). - M8i README: drop the stop step from the source-replaced row: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_every_rebuild_pointer_says_to_stop_the_agent_first` (killed). - M8j README: 'On some NFS or SMB mounts, where' -> 'On NFS or SMB, where': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_nfs_and_smb_cases_stay_apart` (killed). - M8k SECURITY: delete the lock directory fails-closed sentence: all 200 tests passed (**survived**). - R1a README Stop section: delete the start-only-after sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1b README Rebuild paragraph: delete the start-only-after sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1c install: delete the start-only-after sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1d README: delete the 'continue only if' comment line: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1e install: delete the 'continue only if' comment line: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1f README: put enable before the Rebuild line: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1g install: put enable before the Rebuild line: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1h README: drop the Compose start condition: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor` (killed). - R1i README: drop the Kubernetes scale-up condition: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R1j README Stop section: delete 'If the Rebuild fails, keep sync stopped ...': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_restart_sync_only_after_a_successful_rebuild` (killed). - R2a README Stop section: delete the set-export-path sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard` (killed). - R2b README Rebuild paragraph: delete the set-export-path sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard` (killed). - R2c install: delete the set-export-path sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard` (killed). - R2d README: delete the 'refuses with tombstones-not-restored and creates nothing' clause: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard` (killed). - R2e README: delete the path-rules sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_rebuild_steps_set_the_export_path_as_a_guard` (killed). - R3a README: drop `docker compose run api`: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_every_compose_command_that_starts_sync` (killed). - R3b README: drop `docker compose restart`: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_every_compose_command_that_starts_sync` (killed). - R4a README: delete the reconcile warning: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_warn_that_a_kubernetes_reconcile_restores_the_replicas` (killed). - R4b SECURITY: delete the reconcile warning: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_warn_that_a_kubernetes_reconcile_restores_the_replicas` (killed). - R5a README: delete the moved-directory-moves-both sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_say_a_moved_store_directory_moves_both_stores` (killed). - R5b SECURITY: delete the moved-directory-moves-both sentence: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_say_a_moved_store_directory_moves_both_stores` (killed). - R6 README: drop the stop clause from the last Rebuild pointer: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_every_rebuild_pointer_says_to_stop_the_agent_first` (killed). - R7a README: delete the LaunchAgents cause: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_stop_the_launchd_agent_across_a_login` (killed). - R7b SECURITY: delete the LaunchAgents cause: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_name_the_launch_agents_directory_as_the_login_cause` (killed). - R7c install: delete the LaunchAgents cause: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_name_the_launch_agents_directory_as_the_login_cause` (killed). - R8a README: drop 'with both stores moved aside': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition` (killed). - R8b install: drop 'with both stores moved aside': filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_documents_state_the_exact_fresh_store_condition` (killed). - R9 install: delete the block lead-in: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_install_risk_sentence_names_both_stores_and_leads_into_the_block` (killed). - R10a README: rename the Stop heading: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_every_stop_the_sync_agent_link_resolves` (killed). - R10b README: --replicas=0 -> --replicas=01: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor` (killed). - R10c k8s: Deployment name -> messagesmind-x: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor` (killed). - R10d compose: drop restart from the sync service: filter `tests/test_sync_documents.py tests/test_sync.py tests/test_store.py -x`; failed `tests/test_sync_documents.py::test_the_readme_names_how_to_stop_every_supervisor` (killed). - T2a compose: drop the api dependency on sync (informational): all 200 tests passed (**survived**). - T2b k8s: replicas 1 -> 2 (informational): all 200 tests passed (**survived**). M1 to M8j and every R row were killed. M8k (the SECURITY sentence about a directory at the lock path) survived: no test pins that sentence, although the behaviour is tested. T2a and T2b are extra gate checks outside the spec; no test pins the api dependency on sync in `compose.yaml` or the Deployment's default of 1 replica. The three survivors go to a follow-up issue. ## Test results - Base `db2f89f`: 1470 passed, 58 skipped, 2 deselected (`make check` on the host). - Head `c87de9e`: 1491 passed, 58 skipped, 2 deselected (dispatch report). Closes #87 Co-Authored-By: gpt-6.1-terra <noreply@openai.com>
Clarify safe sync recovery across supervisors
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful
c87de9eae2
Document persistent supervisor stops, the Tombstone export guard, and the checks required before restarting after a Rebuild. Add regression tests for the recovery guidance and existing lock and store behavior.

Closes #87
Co-Authored-By: gpt-6.1-terra <noreply@openai.com>

This was generated by AI during the merge gate.

Closed without merge. The correctness review of c87de9e found two blockers:

  • The launchd block puts the Rebuild and launchctl enable / bootstrap in one block, with only a comment between them. A pasted block starts sync again after a failed Rebuild. The install block also runs messagesmind, which is not on PATH in that install.
  • "Start sync again only after the Rebuild exits 0" contradicts the code. A Rebuild whose restore succeeds and whose pass fails exits non-zero with the Tombstone store in place; a plain sync finishes the work, and a second Rebuild refuses with rebuild-store-present.

The security review found no blocker but reported the same gaps, plus: "creates nothing" is false (the lock file), a whole-directory move with an export path set makes every verb refuse with config-validation, and the tests did not catch a restart placed before the Rebuild.

The host gate passed (1491 passed) and the mutation pass killed 49 of 52 mutants; see the PR body. The spec for #87 now carries rework rows H1 to H9 (architect gate, round 3). Because codex-svd integrate cannot rework after a spec amendment (dev/stables#2219), #87 is dispatched again from main. The Compose and Kubernetes Rebuild runbook stays in #88.

> *This was generated by AI during the merge gate.* Closed without merge. The correctness review of `c87de9e` found two blockers: - The launchd block puts the Rebuild and `launchctl enable` / `bootstrap` in one block, with only a comment between them. A pasted block starts sync again after a failed Rebuild. The install block also runs `messagesmind`, which is not on PATH in that install. - "Start sync again only after the Rebuild exits 0" contradicts the code. A Rebuild whose restore succeeds and whose pass fails exits non-zero with the Tombstone store in place; a plain `sync` finishes the work, and a second Rebuild refuses with `rebuild-store-present`. The security review found no blocker but reported the same gaps, plus: "creates nothing" is false (the lock file), a whole-directory move with an export path set makes every verb refuse with `config-validation`, and the tests did not catch a restart placed before the Rebuild. The host gate passed (1491 passed) and the mutation pass killed 49 of 52 mutants; see the PR body. The spec for #87 now carries rework rows H1 to H9 (architect gate, round 3). Because `codex-svd integrate` cannot rework after a spec amendment (dev/stables#2219), #87 is dispatched again from `main`. The Compose and Kubernetes Rebuild runbook stays in #88.
svc-agent-writer closed this pull request 2026-11-16 03:52:30 +00:00
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful

Pull request closed

Sign in to join this conversation.
No description provided.