First m01 hardware run (b77rzzhc2) failed at #4 verify_restart_catchup
because the replica restart hit 'bind: address already in use' on
status port 9291 — TERM alone left the prior process holding the
port at restart time. Probe loop on primary correctly tried 5x and
got connection-refused, replica process never came up.
This is a script orchestration issue, NOT a G5-5C software issue.
Primary log (artifacts-20260427T <run2>) shows the probe loop
fired on schedule with the right cooldown progression — there was
just nothing to probe.
Fix: kill replica with TERM (1s) → KILL fallback → poll ss for
port 9291 release (up to 10s) before returning. Replica restart
then has a clean port to bind to.
Run this fix on m01 and re-verify #4 GREEN before §close.
Per mini-plan v0.5 §1.A architect binding: production primary runs
probe loop at 5s interval. The script's primary launch now passes
--degraded-probe-interval=5s so verify_restart_catchup can converge
within the 30s deadline (5s loop + ~10s catch-up + safety).
Replica side stays unchanged (probe loop is primary-only).
Investigation found root cause of round-13 silent failures:
M02 had a leftover INPUT DROP rule from an earlier run's
verify_network_catchup that used the OLD pattern
(`iptables -I INPUT` on M02). When that earlier run aborted via
set -e before reaching its cleanup `iptables -D`, the rule
persisted across runs. Round 13's rewrite changed to OUTPUT-on-m01
but didn't clean up the legacy INPUT-on-M02 leftover. The stale
rule blocked m01→M02:9221 ship/barrier traffic for ALL subsequent
runs; primary's peer entered degraded state on first ship attempt;
all rounds after the original poisoning incident saw the symptom
"replica daemon dies silently" because the SCRIPT's pkill found
nothing (replica had been killed by the script's own pkill but
no ship traffic ever flowed during the run).
Diagnosis sequence:
1. ssh m01→M02:9221 TCP test: timeout (FAIL=124)
2. m01 iptables: empty (rules out m01-side block)
3. M02 iptables INPUT: `DROP tcp dpt:9221` (~50 dropped pkts)
4. `iptables -D INPUT -p tcp --dport 9221 -j DROP` on M02
5. Re-test: ssh→TCP echo OK
6. Re-run: chain flows through to all 3 verify steps
Fix: start_cluster() now drops both possible patterns pre-flight:
- sudo iptables -D OUTPUT -d -p tcp --dport -j DROP (round-13 pattern)
- sudo iptables -D INPUT -p tcp --dport -j DROP (round-12 leftover)
Both with || true so missing rules don't fail set -e.
Round-14 result on m01:
✓ verify_cluster_ready
✓ verify_byte_equal (LBA[0]=0xab)
✓ verify_network_catchup (LBA[1]=0xcd byte-equal in 8s after iptables disconnect+heal)
✗ verify_restart_catchup (LBA[2]=0xef MISMATCH — real recovery-path finding)
The verify_restart_catchup failure is exactly the case architect
ruling 2 named: 'run #4 naively first; if it doesn't converge,
that is a real recovery-path finding to surface, not a test flaw.'
Primary's log evidence:
After replica killed → ship attempt → barrier timeout → peer
invalidated (degraded). Primary writes LBA[2]=0xef while replica
down → 'ship gate-degraded peer=r2 lba=2 lsn=3 (peer degraded)'
— ship is gated out before any TCP attempt. Replica restarts;
no mechanism triggers primary to re-establish the peer
connection or re-ship the missed entries.
Architecturally the engine-driven catch-up path needs a trigger
(probe success, assignment re-emit, etc.) to bring a degraded
peer back online + replay missed LSNs. G5-5 surfaces that this
trigger isn't wired into the binary's runtime — surface for
architect / QA decision: (a) defer #4 to a follow-up batch with
a dedicated peer-recovery fix; (b) implement now within G5-5
scope.
Refs: round 14 m01 self-iteration; investigation traced 4
indirection layers to find the leftover iptables rule.
Per architect ratification round 13 + QA planning input:
- Add wait_until_byte_equal(lba, pattern, deadline_s) helper —
cycles kill→m01verify→restart per poll until match or timeout.
Caller-side honest about OpenReadOnly's no-concurrent-writer
assumption.
- Add iscsi_write_pattern(lba, count, pattern) helper using
python3 binary write (byte-exact pattern; tr does not grok
\xHH escapes per round-12 finding).
- Rewrite verify_network_catchup with iptables OUTPUT drop on
m01 toward M02_IP:M02_REPLICA_DATA_PORT. trap RETURN ensures
iptables -D runs on any exit path. Pass condition is direct
byte-equal at LBA[1]=0xcd, not engine-state H/R polling.
- Rewrite verify_restart_catchup with replica killall+restart
pattern. Run NAIVELY first per architect ruling — if catch-up
doesn't converge with BestEffort durability, that is a real
recovery-path finding to surface, not a test flaw.
- Diagnostic snapshots from /status/recovery kept as supporting
evidence only, not pass/fail oracle.
KNOWN ISSUE — round 13 self-test on m01: even verify_byte_equal
(which worked on round 12 part C) now fails before reaching
m01verify. Replica daemon on M02 dies silently after recording
supersede; subsequent SSH_M02 pkill matches nothing → set -e
exit. Replica's primary log ends at 'recording supersede, not
applying to adapter'; no exit/panic/SIGSEGV trace in journalctl
or dmesg. Needs further investigation:
- Is replica daemon exiting cleanly via some path I'm not aware of?
- Is there an unbuffered panic going to /dev/null because of
setsid+nohup+</dev/null?
- Was round-12-part-C's success actually flaky?
Pausing self-iteration here. Round 13 rewrite is complete in
script; #2 byte-equal already proven on hardware in round 12
part C (committed at 82e9018). #3/#4 need additional debug
either (a) on the daemon's lifecycle, or (b) on the script's
sequencing of the replica daemon during multi-step scenarios.
Refs: architect ruling round 13; QA planning input.
QA round 12 self-test on m01: m01verify reported MISMATCH on
LBA 0 — but inspecting the bytes via xxd showed the primary's
on-disk file matched the replica's, both 0x78 (ASCII 'x') × 4096.
Replication chain is correct; the script wrote the wrong bytes.
Root cause: the script used 'tr "\0" "\xab"' which DOES
NOT produce 0xab. tr's escape grammar recognizes only octal
(\NNN) and a small set of letter escapes (\n, \t, ...);
\xHH is not understood — tr substitutes with the literal first
char of the replacement string, which is '\' parsed loosely
giving 'x' (0x78). Verified empirically on m01:
$ dd if=/dev/zero bs=4096 count=1 2>/dev/null | tr "\0" "\xab" | xxd | head -1
00000000: 7878 7878 7878 7878 7878 7878 7878 7878 xxxxxxxxxxxxxxxx
Fix: use python3 binary write — guaranteed byte-exact 0xab fill:
python3 -c "...sys.stdout.buffer.write(b'\xab' * 4096)..."
Round 12 part C result on m01:
✓ verify_cluster_ready
✓ verify_byte_equal — m01verify reports 'OK 1 LBA(s) byte-equal'
This is the FIRST end-to-end PASS of acceptance criterion #2 on
real hardware. The replication chain (lineage latch + ship +
barrier + apply) is verified working. verify_network_catchup
still hits H-advance false-positive (engine state semantic is
probe-driven, not local-write-driven; same as fix in #2 but
applied per-step); will address next.
Refs: round 12 m01 self-test full progression
(rounds 1-11 surfaced 14 distinct bugs each isolated and fixed).
m01verify in verify_byte_equal expected v1.walstore but
durable provider's volumePath uses VolumeID+".bin" (provider.go:133).
Same fix in verify_network_catchup and verify_restart_catchup
helpers if they reference the file path.
Engine's Recovery.H is updated by probe events
(RecoveryFactsObserved), not by local writes. At adoption time
engine sets H = walHead = nextLSN (already 1 for empty walstore);
local write at LSN=1 advances nextLSN to 2 internally, but
Recovery.H stays at 1 until a probe re-reads boundaries. Using
H-advance as a 'silent write failure' preflight produces a false
positive — H stays at 1, check fails, but the actual write +
ship + barrier all completed (per primary log evidence).
Round 11+12 m01 evidence shows the full chain flows:
durable: dp.Open latching identity volume=v1 replica=r1 epoch=1 ev=1
durable: StorageBackend.SetIdentity latched ...
iscsi: SCSI WRITE handler lba=0 transferLen=8 dataOut=4096
durable: StorageBackend.Write entry offset=0 len=4096
durable: write observer dispatch lba=0 lsn=1
replication: OnLocalWrite volume=v1 lba=0 lsn=1 peers=1
transport: ship lazy-dial replica=r2 ok
replication: ship ok peer=r2 lba=0 lsn=1
iscsi: SCSI WRITE backend.Write ok lba=0
iscsi: SCSI SYNCHRONIZE_CACHE handler entry
replication: barrier wait peer=r2 targetLSN=1 epoch=1
replication: barrier ack peer=r2 targetLSN=1 achievedLSN=1
iscsi: SCSI SYNCHRONIZE_CACHE backend.Sync ok
Replication is working end-to-end on m01+M02 hardware.
Fix: replace H-advance check with informational log; let
m01verify byte-equal compare be the actual proof. Same change
unchanged for verify_network_catchup and verify_restart_catchup
(they still use H comparisons but for different semantics —
catch-up convergence, where H is the engine-level boundary and
the comparison is against replica's R, which the engine DOES
update on session completion).
Refs: round 12 self-test on m01 cross-node — chain flows
end-to-end; H-advance was the only false-positive blocking
m01verify from running.
QA round 54: cluster came up, iSCSI session established, but
fsync (SYNCHRONIZE CACHE) returned I/O error. Root cause: replica
bound --data-addr 0.0.0.0:9221 AND advertised that string to master
heartbeat. Master minted AssignmentFact.peers[*].DataAddr=0.0.0.0:9221.
Primary's BlockExecutor tried to dial 0.0.0.0:9221 — unroutable
destination — connection failed. Replication fan-out + Sync barriers
silently failed (best-effort log line; the fsync gets I/O error).
The daemon advertises the literal --data-addr string verbatim:
cmd/blockvolume/main.go:230 → cfg.DataAddr = f.dataAddr
→ host heartbeats DataAddr to master
→ master.collectPeers copies it into AssignmentFact.peers
→ primary dials peers[*].DataAddr
So for cross-host the bind addr MUST be a routable IP, not 0.0.0.0.
On Linux, binding to a specific local-interface IP works fine and
ensures the literal advertised string is routable.
Fix: extract M01_IP / M02_IP from M01_HOST / M02_HOST and use as
both bind and advertise:
Tier 2: M01_PRIMARY_BIND_IP=${M01_IP}, M02_REPLICA_BIND_IP=${M02_IP}
Tier 1: M01_PRIMARY_BIND_IP=127.0.0.1, M02_REPLICA_BIND_IP=127.0.0.1
start_primary / start_replica now use the IP variables for both
--ctrl-addr and --data-addr. Master's --listen stays 0.0.0.0 (it's
the destination of heartbeats, not advertised).
This is a script-side fix only; daemon code unchanged. Refs QA
round 54.
QA round 53 isolation: SSH_OPTS included -n which redirects ssh
stdin from /dev/null. With bash -s, remote bash reads script from
stdin — stdin is EOF (because -n) so bash exits immediately, daemon
never starts, master.log stays empty.
QA evidence: dbg.sh on m01 reproduced heredoc form WITHOUT -n;
bash -s correctly read heredoc, blockmaster launched, port 9180
bound, proof.txt confirmed heredoc execution.
Fix per architect option (A): split SSH options into two sets:
SSH_OPTS_BASE — shared: -T (no PTY) + BatchMode=yes
SSH_OPTS — base + -n; for ssh host CMD patterns
SSH_OPTS_LAUNCH — base only (no -n); for ssh host bash -s
launch_m01 / launch_m02 use SSH_OPTS_LAUNCH. PTY-hang protection
comes from -T alone, present in both sets.
Verified: launch_m01 heredoc body executes; variable expansion
works; remote-shell PID resolves correctly.
QA round 53 finding (Tier 2 m01 → M02): start_replica's SSH session
hung even on Linux (m01 native ssh, no Windows-Git-Bash quirks).
Root cause is a `\<newline>` line-collapse hazard in the
double-quoted SSH command argument:
$SSH_LAUNCH_M02 "
setsid nohup /tmp/g5-blockvolume \
--master ... \
...
> .../replica.log 2>&1 </dev/null &
disown \$! 2>/dev/null || true
sleep 1
exit 0"
The local shell processes `\<newline>` as line continuation INSIDE
the double-quoted string. The `\` at end of every option line
collapses lines, which can in some bash interactions produce a
joined argv where `&` runs into `disown` directly with no
separator. Remote bash then parses the joined statement
incorrectly, never executes `disown $!` / `sleep 1` / `exit 0`,
remains attached to the bg daemon, and SSH hangs.
The `\<newline>` substitution happens in the LOCAL shell (the one
running iterate.sh), so it's not Windows-Git-Bash-specific —
reproduces on m01 (Linux) too.
Fix per architect option (A) round 53: pipe the command body to
remote bash via `bash -s` heredoc instead of double-quoted ssh
argument.
launch_m01 <<EOF
setsid nohup CMD ARG1 ARG2 ... > LOG 2>&1 </dev/null &
disown \$! 2>/dev/null || true
sleep 1
exit 0
EOF
With heredoc + `bash -s`:
- body is piped to remote bash's stdin verbatim
- newlines are preserved literally regardless of any local
shell processing
- statement boundaries are unambiguous
- daemon command on a single line (no `\<newline>` continuations)
eliminates the entire ambiguity class
Implementation:
- new launch_m01() / launch_m02() functions handle Tier 1
(LOCAL_MODE=1, run via local `bash -s`) and Tier 2 (run via
`ssh ... bash -s`) with shared timeout-prefix logic
- start_master / start_primary / start_replica use the new
helpers + heredoc body
- removed SSH_LAUNCH_M01 / SSH_LAUNCH_M02 vars (subsumed by
launch_m01 / launch_m02)
Verified: local Tier-1-style smoke test launches a `sleep 30` bg
process, disowns it, and exits within 1.08s (the explicit `sleep
1` + overhead). Pre-fix this took ~5s (timeout fallback). The bg
process detached and ran independently. This proves all three
post-`&` statements (disown / sleep / exit) execute as separate
commands — the line-collapse hazard is structurally eliminated.
Refs: QA Tier 2 round 53 finding (Linux SSH hang); architect
option (A) ratified; option (B) `;<newline>` rejected per QA's
clarification (newlines also stripped by `\<newline>` so
semicolons alone don't help).
Architect option (a) ratified round 53. Two changes to sync_and_build:
1. PREBUILT_BIN_DIR fast-path for Tier 2 (cross-node m01+M02):
When PREBUILT_BIN_DIR is set, skip source-tar + remote-build
entirely. scp the 3 pre-built binaries (g5-blockmaster,
g5-blockvolume, g5-m01verify) directly to m01:/tmp/ and onward
to M02. Mirrors the existing LOCAL_MODE branch pattern.
Use case: Windows workstation cross-compiles via
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ...
then sets PREBUILT_BIN_DIR=/path/to/bins. No m01-side source
tree or `go` install needed. Also works for CI artifact paths.
2. SRC_DIR safety guard (the bug QA hit round 53):
When iterate.sh is copied away from the repo and run with
SRC_DIR resolving to "" or "/" (e.g., bash /tmp/iterate.sh
without overriding SRC_DIR), the prior code called
`cd "$SRC_DIR" && tar -czf /tmp/g5-src.tgz .`
which tarred the root filesystem. QA killed it before damage,
but the unsafety must not exist.
Guard sequence (refuses with named error before any tar):
- SRC_DIR empty or "/" → die
- SRC_DIR/go.mod missing → die
- SRC_DIR/cmd/blockvolume/ → die
- else → safe to tar
Verified all 4 die paths fire with clear messages: empty, "/",
non-repo path, PREBUILT_BIN_DIR with missing binary.
Acceptance criteria #1-#7 unaffected; only the build/sync mechanism
changes. The 4 verify_* scenario bodies are untouched.
Refs: QA Tier 2 round 53 finding (SMB-driven iterate.sh attempted
to tar root filesystem); architect option (a) binding.
QA Tier 2 m01 cross-node verification surfaced: cluster comes up
correctly (master + primary + replica all start, replica logs
"authority is now r1@1; recording supersede" — exactly the
architect-binding role split), but the Windows Git Bash side of
start_replica's SSH session never returns even though the remote
process is detached via setsid+nohup+disown.
Root cause: OpenSSH on Windows Git Bash allocates a PTY for the
remote shell (default behavior when stdin is a terminal); the
local ssh client waits for the PTY to detach, which never happens
even after setsid. Standard Git Bash quirk; well-documented but
not previously hit by V3 because prior cross-node scripts used
short-lived SSH calls only.
Two-layer fix:
1. Add -T (no PTY) and -n (close local stdin) to all SSH commands
via shared SSH_OPTS variable. -T is the primary fix; -n was
already added by prior edit but is insufficient alone.
2. Wrap launch-and-detach SSH calls (start_master/_primary/_replica)
with `timeout 15 --preserve-status` as defense-in-depth. If SSH
still hangs (rare with -T -n applied), the script moves on after
15s. Remote process is already disown'd so the only stale state
is a local ssh client process — harmless. Falls back to no-op
wrapper if `timeout` isn't installed (Git Bash without coreutils).
Also tightens remote launch heredoc:
- explicit `disown $!` after backgrounding to detach from job table
- explicit `exit 0` to force the wrapping shell to exit cleanly
even if any prior command had a non-zero status
Tested: bash -n syntax clean; timeout available on local box; no
local-mode regression (LOCAL_MODE=1 path uses bash -c, not ssh).
Refs: QA Tier 2 round 53 finding; environmental, not a product bug
(daemon comes up correctly on cross-node hardware per the same
session's logs).
Architect round-52 findings absorbed:
- iscsi-listen 0.0.0.0 → 127.0.0.1 (T2 iSCSI loopback-only rule)
- remote SSH bash blocks: set -euo pipefail + DEV non-empty assert
+ primary.H advancement check (catches silent dd failure masking)
- RecoveryDecision empty no longer acceptable: must observe
explicit catch_up transition or fail
- (walstore.OpenReadOnly already correct per sw earlier commit)
Two-tier mode added:
- LOCAL_MODE=1: single Linux host (e.g. WSL); both processes on
localhost; iSCSI/race/full-suite skip if iscsiadm/Go-too-old
- LOCAL_MODE=0 (default): m01 cross-node Tier 2
Tier 1 verified PASS on WSL (cluster bring-up + role split; iSCSI
tests cleanly skip).
SSH detach fixes:
- pkill -f '[g]5-block' (regex character class avoids self-match)
- setsid nohup ... & (replaces & disown; full process group break)
- ssh -n (no stdin; helps SSH session cleanup on Windows Git Bash)
Tier 2 (m01) status: cluster comes up correctly end-to-end (master +
primary + replica all running; replica logs role-split supersede),
but SSH session for start_replica step doesn't return cleanly from
Windows Git Bash — known SSH-from-Windows quirk. Tier 2 should run
from a Linux SSH host OR with ProxyJump to avoid Windows-side hang.
Tier 1 evidence is sufficient for criteria #1 (cluster ready, role
split). Criteria #2/#3/#4 require iSCSI which neither WSL (no
open-iscsi) nor Tier 2 (Windows-SSH hang) currently runs end-to-end.
Carry: Tier 2 on Linux-host SSH OR install open-iscsi on WSL.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add two-tier test mode to iterate-m01-replicated-write.sh:
Tier 1 (LOCAL_MODE=1): both processes on localhost, no SSH/scp
- drives faster dev iteration (no cross-node sync overhead)
- iSCSI tests skip with explicit message if iscsiadm not present
- intended for WSL/Linux dev workstation iteration before
escalating to cross-node m01/M02 verification
Tier 2 (default, LOCAL_MODE=0): m01 (192.168.1.181) + M02
(192.168.1.184) cross-node — deployment-realism close evidence
Implementation:
- SSH_M01/SSH_M02 redefined as `bash -c` in LOCAL_MODE
- sync_and_build skips tar/scp in LOCAL_MODE; builds locally
- master subscribe target switched to 127.0.0.1 vs 192.168.1.181
- HAS_ISCSI sentinel set per-mode for skip messaging
Addresses architect/QA review round 52 findings:
MEDIUM — OpenReadOnly inherited writer machinery:
Original implementation reused openInitialized which started
flusher + committer + admission goroutines and persisted the
superblock back through Close. Those writes target the fd
opened O_RDONLY — silent OS-layer failure but a "read-only
verifier" leak.
Rewrite: WALStoreReader is now a minimal handle (fd + sb + dm)
with its own Read/Close paths. No openInitialized call, no
background goroutines, Close only releases the fd. Same
WAL-then-extent merge semantic for Read(lba); recoverWAL is
invoked directly to populate the dirty map (it's a pure read
pass over WAL frames — no fd writes).
Pinned by new TestOpenReadOnly_NoBackgroundGoroutines that
snapshots runtime.NumGoroutine() before/after Open+Read+Close
and asserts no growth (tolerance 1 for runtime jitter; flusher
+ committer alone would add 2).
HIGH — verify_byte_equal could false-pass on silent write failure:
Same hardening pattern already applied to verify_network_catchup
+ verify_restart_catchup (user-applied edits) now extended to
verify_byte_equal:
- remote SSH heredoc uses `set -euo pipefail`
- DEV non-empty assertion before dd
- primary.H captured before + after, asserted strictly greater
(catches silent-write-failure masking before the byte-equal
check ever runs)
- explicit echo "WROTE-LBA-0-PATTERN-AB" stamped on success
so the surrounding script can grep for the marker if needed
BLOCKER from round 51 (--iscsi-listen 0.0.0.0:) was already
resolved in the prior commit (file edit set 127.0.0.1).
Tests: core/storage 3/3 PASS (incl. new goroutine fence);
core/host/volume + cmd/blockvolume + smartwal all green.
Script syntax-checked clean (bash -n).
Refs: sw-block/design/v3-phase-15-g5-5-mini-plan.md v0.3 §6
risks (architect REVIEW round 52 findings)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per architect-ratified mini-plan v0.3 §1 file map. Three additions
(no engine/adapter behavior changes per architect §6 binding):
1. /status/recovery endpoint (opt-in, loopback-only, default off)
- core/host/volume/status_server.go: handler + EnableRecoveryEndpoint()
- core/host/volume/projection_bridge.go: AdapterProjectionView.EngineProjection()
accessor returns the underlying engine.ReplicaProjection (Mode/R/S/H/
RecoveryDecision/Reason). Surfaces existing engine state via HTTP;
no engine code change.
- cmd/blockvolume/main.go: --status-recovery CLI flag (default off);
calls status.EnableRecoveryEndpoint() when set
- core/host/volume/status_server_test.go: 3 new tests
(Disabled→404, Enabled→200+fields, WrongVolume→404)
2. core/storage.OpenReadOnly + WALStoreReader
- Read-only walstore opener for hardware byte-equal verification.
Opens O_RDONLY, runs Recover() to populate dirty map, exposes
Read(lba) only (no Write/Sync surface). Caller must ensure no
concurrent writer.
- core/storage/walstore_readonly.go + walstore_readonly_test.go
(round-trip write→close→OpenReadOnly→Read passes; missing-file
fence)
3. cmd/m01verify standalone helper (build-tag m01verify)
- Separate cmd subpackage so it doesn't collide with blockvolume's
main(). Builds only with `go build -tags m01verify`.
- Opens replica's walstore via storage.OpenReadOnly, calls Read(lba)
per LBA in target range, SHA-256 vs --expected-pattern (single hex
byte) or --expected-file (binary payload). Prints OK / MISMATCH +
exit 0/1.
- Architect REVISE round 51: NO raw .extent peek; storage abstraction
is the only authoritative read path.
4. scripts/iterate-m01-replicated-write.sh — full G5-5 orchestration
- Replaces v0.1 skeleton's TODO scenario bodies with real verify
steps matching mini-plan v0.3 §2 acceptance criteria #1-#6.
- 6 verify functions: cluster_ready, byte_equal (kernel iSCSI write
+ m01verify storage-aware compare), network_catchup (iptables
drop + /status/recovery R/H polling), restart_catchup (SIGTERM
replica + restart same --durable-root + R/H polling), race_stress
(TestG54_BinaryWiring x10 -race on m01), full_suite (go test ./...).
- Build phase compiles all 3 binaries on m01 (master + volume + verify)
and scp blockvolume + m01verify to M02. SMB share path used in
prior smoke is replaced by direct scp for simpler dependency.
Acceptance gates per mini-plan v0.3 §2:
#1-#6 covered by script verify steps; m01 hardware run is QA's
responsibility per `v3-batch-process.md §14` (sw drafts, QA verifies).
#7 (v3-dev-roadmap.md update at gate-close) deferred to §close.
Full V3 regression: 23/23 packages green from local Windows run
(includes G5-4 binary integration test still passing at 16.4s; new
status_server tests pass; new walstore_readonly tests pass; m01verify
builds clean under -tags m01verify).
Hard binding preserved: zero engine/adapter behavior changes. The
/status/recovery endpoint surfaces an already-computed projection;
walstore.OpenReadOnly is a new read-only wrapper around existing Recover
+ Read; no semantic changes to either.
Refs: sw-block/design/v3-phase-15-g5-5-mini-plan.md v0.3
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
T3-DEF-6 (NVMe session cleanup contract):
Add core/frontend/nvme/t3_qa_session_cleanup_addendum_test.go with
TestT3_NVMe_Session_CleanupOnClose_NoLeaksAcrossCycles (20 cycles,
goroutine leak guard) and TestT3_NVMe_Session_CleanupOnClose_CNTLIDAllocator
(monotonic CNTLID across 8 cycles + one post-cycles reconnect).
Pins new catalogue row C5-NVME-SESSION-STATE-CLEANUP-ON-CLOSE as
smoke + leak-guard (not full state-release introspection;
target-registry introspection deferred).
Matrix F ENOSPC cleanup robustness (iterate-m01-nvme.sh):
SSH cleanup phase was non-zero-exiting when blockvolume crashed on
ENOSPC (dead NVMe target hangs sudo nvme disconnect). Switch cleanup
block to tolerate all benign non-zero exits, remove set -e, and
use pattern-based success detection (grep 'ENOSPC triggered gracefully'
in server-side output) as the authoritative Matrix F pass signal.
Ownership: QA (L1 addendum + QA-owned script)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
QA-owned adaptation to make Path B reconnect matrix runs deterministic
on m01. Enables BUG-005 post-fix m01 re-verification against a clean
slate.
Changes:
- pkill stale blockmaster/blockvolume before start_services
- dmesg --clear before each run so check_dmesg_clean doesn't trip
on entries from a prior cycle
Precondition for BUG-005 (commit 1d21b0f) m01 re-verify: without
these, a successful fix run could look like a fail (stale dmesg)
or a partial fix could look like clean (stale processes still
serving). Committing so HEAD is reproducible end-to-end for the
cross-session reconnect test.
No production-code change; test infra only.
Co-Authored-By: Claude Sonnet 4.6 (QA agent) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
QA-owned tests and infra landed during Batch 11c sign-prep. These
files carry `Ownership: QA` headers — sw may not modify without
architect approval via §8B.4 Discovery Bridge.
## Files
### Kernel-realistic rewrites of prior QA tests
core/frontend/nvme/t2_v2port_nvme_pipelined_writes_test.go
core/frontend/nvme/t2_v2port_nvme_pipeline_extended_test.go
Post-BUG-001 revert rewrites to paired R2T+H2CData sequencing
(the pattern Linux kernel actually emits). Replaces the earlier
"send N cmds → read N R2Ts → then send all H2CData" shape which
QA withdrew after BUG-001 §13 post-mortem established that async
R2T emission is spec-legal but not kernel-realistic, and chasing
it broke m01 compatibility.
### B-tier early-landed regression tests
core/frontend/nvme/t2_v2port_nvme_disconnect_mid_r2t_test.go (L1B-4)
Pins server cleanup when host disconnects mid-H2CData-stream.
Ledger row: PCDD-NVME-SESSION-DISCONNECT-MID-R2T-001
core/frontend/nvme/t2_v2port_nvme_reconnect_loop_test.go (L1B-1)
50 attach/detach cycles + goroutine-leak sentinel. Surfaces
resource leaks that single-shot tests would miss.
Ledger row: PCDD-NVME-SESSION-RECONNECT-LOOP-001
### L3-A sign-prep infrastructure
scripts/iterate-m01-nvme.sh
m01 iteration harness for the remaining QA §4 checklist
item #4. Runs against real Linux NVMe/TCP initiator for
product-ready evidence.
## Regression
go test ./core/frontend/nvme/ -count=1 → ok 60.9s
Full suite green including these files (already verified locally
before commit).
## Sign-prep checklist progress (QA §4)
#1 L1-A ConcurrentQueueStress [x] commit b0ccd27#2 L1-A LargeWriteStress [x] commit b0ccd27#3 L2-A t2-nvme-smoke.yaml + replay [x] commit b0ccd27#4 L3-A m01 iterate-m01-nvme.sh [x] this commit (script landed;
QA runs against m01 next)
#5 Full regression green [x]
#6 Boundary guard green [x]
#7-#11 QA, post-soak
Co-Authored-By: Claude Sonnet 4.6 (QA agent) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.