Skip to content

Test fail-closed recovery with a non-cooperating writer - #6

Open
JusterZhu wants to merge 5 commits into
justerzhu-bowl-failure-diagnostics-rollbackfrom
justerzhu-plan-bowl-recovery-consumer
Open

JusterZhu wants to merge 5 commits into
justerzhu-bowl-failure-diagnostics-rollbackfrom
justerzhu-plan-bowl-recovery-consumer

Conversation

@JusterZhu

@JusterZhu JusterZhu commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a real-process regression demonstrating that an independent writer can change the installation while Bowl Host is running and after it crashes.
  • Verify that restarting the Host refuses unsafe recovery, preserves the external change and snapshot, and blocks a later attempt.
  • Document that the existing installation lock only coordinates Hosts sharing a state root; it is not a filesystem write fence.

Safety and dependency

This is a test and documentation change only. It does not enable recovery, establish writer exclusion, or provide a crash-safe recovery handoff. Production recovery remains fail-closed and defaults are unchanged.

This PR requires both of these independent dependencies:

  • Bowl #3, specifically 97e9540c03c0167c0c81ac7cc086ea9cc0afca8c (current base).
  • Bowl #4, specifically 47b5a065100c4f017b636eb4c9068978fbf33151 (ProcessRunner stdout/stderr EOF-drain fix).

#3 and #4 both target main; #4 is not an ancestor of #3, and this PR's current branch contains #3 but not #4. Do not merge #6 until both dependencies are integrated. No #4 production changes were copied into this PR.

Validation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the added recovery regression coverage and lock-scope documentation.

No open issues 🎉

What changed in this PR

Adds regression coverage for fail-closed recovery when an independent process writes to the installation during and after a Host crash. This is a test-and-documentation change stacked on PR #3; production recovery behavior and defaults remain unchanged.

Changes:

  • Adds a test peer that accepts write commands independently of the Host.
  • Verifies that recovery is refused, external changes and the snapshot are preserved, and a later attempt is blocked.
  • Clarifies that the installation lock coordinates Hosts sharing a state root but does not prevent external writes.
File Description
tests/​Bowl.TestPeer/​Program.cs Adds the command-driven, non-cooperating writer mode.
tests/​Bowl.Host.Tests/​ProcessTests.cs Adds the real-process crash and recovery-refusal regression.
docs/​protocol-v1.md Documents lock limitations and the regression’s safety scope.

Review effort: Balanced

JusterZhu and others added 4 commits November 23, 2026 08:27
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants