carlos / platform Public

spec, ledger: V13, a DR-4 roll refuses a member a lock names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 29d23bd5f16fa8d6d2556744d6bd51fe02daa66c parent e5588c1
2 files changed, +7 −5
  • docs/superpowers/specs/2026-11-09-group-roll-verb-design.md +4 −2
  • internal/grouproll/testdata/parity-ledger.tsv +3 −3
diff --git a/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md b/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md
index 4375bc964..396d5261a 100644
--- a/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md
+++ b/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md
@@ -308,8 +308,9 @@ The Go verb does what the script does, decision for decision. In particular:
`carlos-edge.service`, prove `MainPID=0`, sweep the locks again, and terminate
(`stop_and_terminate`, `:2169-2182`).
- **The floor and DR-4.** `roll` drains only when the floor holds and says which
- rule applied; `replace` and `remove` refuse below the floor; a floor that cannot
- be read refuses and never falls back to DR-4 (§9).
+ rule applied; under DR-4 it rolls only a member no lock names (V13); `replace`
+ and `remove` refuse below the floor; a floor that cannot be read refuses and
+ never falls back to DR-4 (§9).
- **The same bounds:** `WAIT` 900 s, `DRAIN_TRIES` 3, `DRAIN_BOUND` 3600 s, edge stop
120 s, cancel 300 s, `TERMINATE_RETRIES` 2, settle 120 s, pending 600 s, the 5 s
freshness window on `ExitStandby`, the 60 s readiness age, the 2 s publication
@@ -367,6 +368,7 @@ build to it.
| V10 | The depart watch keeps the first replacement it admitted; a different replacement later passes without its own readiness check (`depart_watch`, `:2264-2278`) | The admitted replacement's iid is journaled; any later change to the set of new members is a failed probe (`members`) | Found in the build's Task 9 review (Astra, 2026-11-10); completion must describe the replacement actually admitted |
| V11 | After the terminate check, any `desired` or `minimum` below N is raised again (`:2248-2255`), so an outside reduction after the restore launches capacity | Once a fresh read shows a restore reached N, a later value below N is a failed probe (`desired_changed`); only an unanswered restore is retried | Same review; H4 forbids the tool from raising capacity it already restored |
| V12 | `refuse_while_moving` is skipped once any `exit-intent` exists (`:1828`), though that row is written before dispatch and dispatch can be refused or cut | Before every ExitStandby of a failed drain's member the drain check runs on the status the request acts on, whatever earlier intents exist | Branch review round 1 (Astra P1, 2026-11-10): the r2 cut must hold on resume |
+| V13 | Under DR-4, `roll` prints the rule ("Replace only lock-free members") and goes on: Standby, then apply, which restarts the edge with no drain | Under DR-4, `roll` refuses up front when a lock names the member: it runs the lock sweep (`locks_naming_member`) immediately before the first group write and closes `floor-refused` with no group write (`floor_refused`, then `lock_held`; `floor_config` without `data_bucket` or `data_prefix`; a sweep that cannot read refuses too). It re-checks immediately before the mutation, after Standby and the permit: a lock or a failed sweep returns the member unchanged, revokes the permit and closes `lock-refused` | Dev W2 2026-11-10 restarted a lease-holding member without a drain (8a3d302 P1) |
Not deviations, recorded so nobody "fixes" them in the port: the drain-rerun
backoff and the TakeHost `wake_timeout` follow-ups from the held build stay
diff --git a/internal/grouproll/testdata/parity-ledger.tsv b/internal/grouproll/testdata/parity-ledger.tsv
index 8d15c757a..d81b1f149 100644
--- a/internal/grouproll/testdata/parity-ledger.tsv
+++ b/internal/grouproll/testdata/parity-ledger.tsv
@@ -24,7 +24,7 @@ roll StandbyTests.test_standby_roll_order ported TestRollStandbyOrder
roll StandbyTests.test_standby_response_loss ported TestRollStandbyResponseLoss
roll StandbyTests.test_standby_resume ported TestRollStandbyResume
roll StandbyTests.test_standby_resume_before_every_write ported TestRollStandbyResume the before=true cases
-roll StandbyTests.test_standby_shared_outage ported TestRollStandbySharedOutage
+roll StandbyTests.test_standby_shared_outage ported TestRollStandbySharedOutage V13: the outage starts at the apply, not the permit: the second DR-4 lock sweep reads the member's edges file before apply and fails closed
roll StandbyTests.test_standby_exit_pending_wait ported TestRollHookIsDivergenceWithoutCompletion
roll StandbyTests.test_standby_exit_pending_wait_resume_and_loss ported TestRollExitPendingWaitResumeAndLoss
roll StandbyTests.test_standby_exit_pending_wait_admission_loss ported TestRollDefaultAbandonAndResumeStayFailed
@@ -102,7 +102,7 @@ roll AdapterTests.test_session_pty_captures_noninteractive_output ported groupro
roll AdapterTests.test_session_pty_stdin_is_terminal_without_eof ported grouprollaws.TestSessionReadsFrame
roll AdapterTests.test_session_pty_plugin_returns_frames_without_stdin_eof ported grouprollaws.TestSessionReadsFrame
roll AdapterTests.test_session_pty_timeout ported grouprollaws.TestSessionBoundKillsGroup grouprollaws.TestSessionLeaderExitsBeforeOutputEnds
-roll AdapterTests.test_fsync_precedes_provider_write ported TestRollFsyncPrecedesProviderWrite
+roll AdapterTests.test_fsync_precedes_provider_write ported TestRollFsyncPrecedesProviderWrite V13: a DR-4 lock read is one journaled call of two requests (the exact-key listing, then its GET)
roll RoundThreeTests.test_box_action_time_does_not_consume_readiness_wait ported TestRollBoxActionTimeDoesNotConsumeReadinessWait
roll RoundThreeTests.test_rollback_waits_for_cut_apply_lock_before_inspecting_digest ported TestRollRollbackWaitsForStatus
roll ClassifyTests.test_table_hook_record_cut ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
@@ -215,7 +215,7 @@ held RemoveMinimumTests.test_remove_needs_two_survivors ported TestDepartRemoveN
held DrainedRollTests.test_roll_drains_before_apply_and_lifts_fence_after_exit ported TestDrainedRollDrainsBeforeApplyAndLiftsFenceAfterExit
held DrainedRollTests.test_roll_failed_drain_returns_unchanged ported TestDrainedRollFailedDrainReturnsUnchanged
held DrainedRollTests.test_roll_lock_after_permit_returns_and_revokes ported TestDrainedRollLockAfterPermitReturnsAndRevokes
-held DrainedRollTests.test_roll_below_floor_uses_dr4_and_says_so ported TestDrainedRollBelowFloorUsesDR4AndSaysSo
+held DrainedRollTests.test_roll_below_floor_uses_dr4_and_says_so ported TestDrainedRollBelowFloorUsesDR4AndSaysSo TestRollDR4LockFreeProceeds TestRollDR4RefusesLeaseHolder V13: the member is lock free; a lock naming it refuses the roll
held DrainedRollTests.test_roll_to_release_below_floor_uses_dr4 ported TestDrainedRollToReleaseBelowFloorUsesDR4 TestFloorRollToReleaseBelowFloorUsesDR4
held DrainedRollTests.test_drained_roll_resumes_after_every_write ported TestDrainedRollResumesAfterEveryWrite
held TerminateDecisionTests.test_every_combination ported TestTerminateEveryCombination the 92,169-row grid against the ported oracle (not recorded into golden)