Review of dfc8f19 (codex01, V:/share/rdma/codex01-block152-r2-review-
20261116T0342Z/REVIEW.md). Controls failing against stubs restoring the
reviewed behaviour:
- P1: an unknown id's admission and a known record's ordinary
DeleteVolume leave CreateVolume free, also after a restart
(TestMarkVolumeDeleting_ReservesUnknownIdsAndSurvivesDeleteAndRestart).
- P2 persistence: the mark is intent-only (no write/sync); write,
rename and directory-sync faults and a restart lose it
(TestDeletionReservations_*).
- P2 rollback: a give-back (claim, held HEAD) leaves the master
exclusion in place; a lost admission response reads as a refusal
(TestCatalog_DeleteVolumeGivesBackOnALiveClaim, ...HeldAfterAdmission
GivesBack, ...LostAdmissionResponse, TestOpsChunk_VolumeDelete with a
real master: claim refusal must leave the id usable).
- P2 failed abort: B's failed tombstone write still frees the name, so
A's late publication survives a completed delete
(TestCatalog_FailedAbortCannotHideALatePublication).
- P2 concurrent deletes: D1's revert after D2 committed counts as a
give-back (TestCatalog_ConcurrentDeleteCannotRollBackACommittedOne).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 626c7de (codex01). One control per schedule, each failing
against a stub that restores the reviewed behaviour:
- P1 1: a holder that attaches before the HEAD mark's first read is
deleted (TestCatalog_DeleteVolumeRefusesAnAttachBeforeTheMark).
- P1 2: an attach that passed EnsureVolume revives a deleting/deleted
HEAD through CASHead (TestCatalog_DeletedHeadCannotBeRevivedByAClaim).
- P1 3: after the master's delete mark, an existing placement still
leads to an assignment, the reconciler places, the id can be created
and bound again (TestMarkVolumeDeleting_StopsLaterAssignment...).
- P2: a fork claim after the check is refused only after irreversible
writes (TestCatalog_DeleteVolumeGivesBackOnALiveClaim); a fork after
the mark installs (TestCatalog_ForkAfterTheDeleteMarkRefuses); a held
snapshot publication and a snapshot started after the mark escape the
delete (TestCatalog_DeleteVolumeCatchesInFlightSnapshots); a failed
claim removal is reported released, and the CLI drops partial effects
(TestCatalog_DeleteVolumeTombstonesAndReleases, TestOpsChunk_VolumeDelete).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#128 rule 6 (claude05's rulings 21:07Z): declarations with the decision
stubbed, plus the controls.
- proto: HeartbeatSlot.unhealthy_reason (13); StatusResponse
.unhealthy_replicas (9) with ReplicaUnhealthy (regenerated with the
checked-in generator versions; the gRPC file is unchanged).
- authority: SlotFact/HeartbeatSlot.UnhealthyReason (raw fact).
- volume: the recovery watchdog type and Host wiring (primary
assignment, supporting admission, heartbeat Eligible/UnhealthyReason,
/status UnhealthyReason and CatchUp), --recover-timeout on blockvolume
(default 30s, logged at start); its decision is stubbed here.
- controls: a primary-assigned not-ready replica past the timeout
reports Eligible=false + recovery_timeout; ready clears it and
disarms the watchdog, a new primary epoch re-arms it; the G1 latch
reports role_admission_failed; /status shows the reason and a
supporting replica's catch-up state; the master promotes nobody
without a qualified peer and shows the reason in volume status and as
replica_unhealthy / replica_unhealthy_cleared events. Controls that
pass on both sides: a supporting replica is never flagged; an
unhealthy primary fails over at once to a qualified peer.
Refs #128
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blockvolume reports a random incarnation, new on every process start, in
each heartbeat slot (proto field 12, regenerated with the checked-in
generator versions). It flows through the wire, observation and snapshot
layers to ReplicaCandidate.Incarnation as a raw fact. The controller
config gains PrimaryBootGrace and the flap bounds, unused here.
The new controller tests pin the #128 boot-grace contract and fail
against today's rule (a not-ready current primary with a ready peer
fails over at once): restart -> endpoint refresh; no ask inside the
grace; ready ends the grace; a flapper gets none. The explicit-unhealthy
and no-incarnation cases pass on both sides as controls.
Refs #128
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Package the Kubernetes alpha into a script-based Day-1 activation loop: activate the stack, create the first PVC-backed volume, verify writer/reader data, collect product-owned observation evidence, render a local read-only report, and clean up.
Includes multi-node-safe activation defaults, first-volume example automation, read-only ops report output, README/quickstart/release note updates, and review-driven hardening for fail-fast configuration, promotion evidence, inventory fail-closed behavior, and test guards.
Validated by Day-1 activation run 20260517-205252-04e9 and read-only report run 20260517-212358-bfba. Local targeted tests passed.
Close the current protocol-readiness plan and move active work to V2 parity and hardening.
The release gate now covers iSCSI ALUA/failover, NVMe ANA/multipath/failover, CSI protocol selection, and the iSCSI compatibility soak. Test layering is documented so default Go tests stay unit/component scoped, local subprocess tests are opt-in, and Linux lab coverage remains in runner-native TestOps suites.
Completes the T4a-5.0 §8C.3 Discovery Bridge resolution (Option
P-refined, landed per architect + QA round-19). Extends the
AssignmentFact wire with master-minted peer set + monotonic
generation, adds a separate host-only decode path that does NOT
touch AssignmentInfo (preserves the TestNoOtherAssignment
InfoConstruction AST fence), and wires Host.streamOnce to drive
ReplicationVolume.UpdateReplicaSet after every self-replica
AssignmentFact.
Guardrails (all four from round-19) honored:
1. decodeAssignmentFact unchanged; AST fence stays green.
2. decodeReplicaTargets is SEPARATE and produces replication.
ReplicaTarget + generation, never AssignmentInfo. Adapter +
engine packages: zero changes.
3. Peer set is master-minted only. Host does NOT accumulate or
derive from other-replica facts (option R rejected).
4. peer_set_generation mandatory on the wire; monotonic guard in
ReplicationVolume.UpdateReplicaSet.
Changes:
core/rpc/proto/control.proto
NEW message ReplicaDescriptor{replica_id, epoch, endpoint_
version, data_addr, ctrl_addr}. AssignmentFact gains
`repeated ReplicaDescriptor peers = 7` (excludes self) and
`uint64 peer_set_generation = 8` (monotonic, master-minted).
core/rpc/control/control.pb.go + control_grpc.pb.go
Regenerated via scripts/genproto.sh.
core/host/master/services.go
SubscribeAssignments fills fact.Peers via new collectPeers
helper (reads Publisher.LastPublished for each non-self slot
in the volume's accepted topology). Generation derived as
`(info.Epoch << 32) | info.EndpointVersion` — monotonic
because publisher's lex-dedupe upstream guarantees strictly-
increasing (Epoch, EV) pairs and Epoch/EV are durable authority
facts (survives master restart).
core/host/volume/subscribe.go
NEW decodeReplicaTargets(fact) ([]replication.ReplicaTarget,
uint64) — strict field-copy, same discipline as decode
AssignmentFact. Produces a different output type so the
AST fence TestNoOtherAssignmentInfoConstruction continues to
pass.
core/host/volume/host.go
Config gains `ReplicationVolume *replication.ReplicationVolume`
(nil = T0/observer-only; non-nil = T4a-5 production wire).
streamOnce self-replica branch calls UpdateReplicaSet(gen,
targets) AFTER adapter.OnAssignment. Non-blocking log on
error (best-effort; failure does not stop the assignment
stream).
core/replication/volume.go
UpdateReplicaSet signature break (QA option (a), no shim):
Before: UpdateReplicaSet(targets []ReplicaTarget) error
After: UpdateReplicaSet(generation uint64, targets []ReplicaTarget) error
Three-way generation rule (T4a-5.0 §9.4, QA corrected sw's
original MaxUint64 sentinel which would have one-way-poisoned
the monotonic guard):
- gen == 0: unversioned apply; peer map mutated;
lastAppliedGeneration NOT advanced. Test/fake-master only.
- gen > 0 && gen > lastApplied: apply + advance.
- gen > 0 && gen <= lastApplied: stale; peer map NOT mutated;
replayedGens counter increments; debug log emits peer-ID-
set delta (Q2 binding — IDs only, not full target structs).
Returns nil (idempotent replay is success).
Empty peer set (N → 0) flows through the same teardown path as
any N → M-1 removal. No special branch (Q3 binding).
New state: lastAppliedGeneration uint64 (mu-guarded);
replayedGens atomic.Uint64 (stats counter, private; public
Stats() deferred to T4-end observability pass).
New helpers (internal): peerIDSet, targetIDSet,
stringSetEqual, formatIDSet (deterministic brace-form
rendering of peer-ID sets for log diffs).
core/replication/volume_test.go
All 8 existing tests migrated to new signature with gen=0
(unversioned apply preserves previous functional semantics).
3 new tests (Q1/Q2/Q3 pins):
9. UpdateReplicaSet_Generation_MonotonicGuard — advance
through gens 1, 2, 3; stale replays at gen=2 and gen=3
(equal is stale); verify replayedGens counter; forward
progress at gen=4 works. Exercises Q2 differing-peers
path via the gen=2 replay with original r1+r2 set.
10. UpdateReplicaSet_GenerationZero_DoesNotAdvanceGuard —
gen=5 applied, gen=0 applied (peers mutated, last
Applied stays at 5), gen=3 rejected as stale. Pins the
correctness of the gen=0 rule vs. the original
MaxUint64 sentinel which would have failed this test.
11. UpdateReplicaSet_EmptyPeerSet_AppliesWithTeardown — Q3
binding three assertions: PeerCount=0 after empty
apply, all former peers' executor sessions invalidated,
next OnLocalWrite succeeds as zero-fanout no-op.
Verification: full 20-package repo suite green (core/host: 124s
including supersede_integration_test; core/host/volume: 31ms
confirming AST fence TestNoOtherAssignmentInfoConstruction still
passes; core/replication: all 17 tests green). G-2 tri-line godoc
on every new public surface.
Closes T4a-5.0 §8C.3 Discovery Bridge. Next: T4a-6 L2 subprocess
integration test.
Product binaries (cmd/blockmaster, cmd/blockvolume) and
core/host wiring for volume-scoped assignment delivery,
durable authority with Windows rename retry, and the T0
closure test set (D1 L2 subprocess, D2 G1 adversarial,
D3 concurrent write-reload regression, D4 hosting-smoke
scenario + Go-native replay, D5 --topology flag).
Diagnostic surfaces: ObservationStore.SupersededCount
(PCDD-DELAYED-HB-001 evidence, not authority input) and
SetNowForTest clock seam on Store/Host, guarded by grep
test ensuring the identifier stays out of production files.