US04-03: Apply and Verify Guarded Renames #68

Merged
domverse merged 1 commits from us/US04-03-apply-and-verify-guarded-renames into main 2026-08-16 11:27:09 +02:00
Owner

Implements #22

Tests:

  • work_item/scripts/python -m unittest discover -s work_item/tests -v
  • work_item/scripts/python -m pytest tests -q
  • work_item/scripts/python -m pytest tests/integration/test_rename_apply.py tests/integration/test_rename_recovery.py -q

Commit: 47350132784b332c816c857bf2e7e30da793ff65

Implements #22 Tests: - `work_item/scripts/python -m unittest discover -s work_item/tests -v` - `work_item/scripts/python -m pytest tests -q` - `work_item/scripts/python -m pytest tests/integration/test_rename_apply.py tests/integration/test_rename_recovery.py -q` Commit: `47350132784b332c816c857bf2e7e30da793ff65`
domverse added 1 commit 2026-08-16 11:26:11 +02:00
Author
Owner

This PR delivers both US04-03 (#22) and US04-04 (#23) as one change, per the agreed Phase D grouping: apply and recovery are two halves of one crash-safe transaction — recovery reads exactly the journal evidence apply writes, so splitting them would ship a filesystem-mutating apply with no recovery.

Covered here:

  • US04-03: version/checksum-confirmed apply, exclusive mutation lease, preconditions rechecked immediately before each mutation, staged case-only and copy-verify-delete cross-filesystem procedures, postcondition byte/path verification, stable-ID reconciliation and path history.
  • US04-04: evidence-based recovery classification, resume, rollback with hash revalidation, manual-recovery blocking, and idempotency across repeated restarts. Fault injection kills a real child process at every persisted journal transition.

Tests: tests/integration/test_rename_apply.py (13) and tests/integration/test_rename_recovery.py (15). Full suite 383 passing.

This PR delivers **both** US04-03 (#22) and US04-04 (#23) as one change, per the agreed Phase D grouping: apply and recovery are two halves of one crash-safe transaction — recovery reads exactly the journal evidence apply writes, so splitting them would ship a filesystem-mutating apply with no recovery. Covered here: - US04-03: version/checksum-confirmed apply, exclusive mutation lease, preconditions rechecked immediately before each mutation, staged case-only and copy-verify-delete cross-filesystem procedures, postcondition byte/path verification, stable-ID reconciliation and path history. - US04-04: evidence-based recovery classification, resume, rollback with hash revalidation, manual-recovery blocking, and idempotency across repeated restarts. Fault injection kills a real child process at every persisted journal transition. Tests: tests/integration/test_rename_apply.py (13) and tests/integration/test_rename_recovery.py (15). Full suite 383 passing.
domverse merged commit 7103cb84bf into main 2026-08-16 11:27:09 +02:00
Sign in to join this conversation.