wzcheng99 ee12558f58 T2 checkpoint 8: cmd/blockvolume --nvme-* wiring + NVMe L2-harness green
cmd/blockvolume/main.go
  New flags symmetric with iSCSI:
    --nvme-listen <addr>      (loopback-only bind enforced;
                               empty disables)
    --nvme-subsysnqn <nqn>    (required when --nvme-listen set)
    --nvme-ns <id>            (default 1)
  When --nvme-listen is set:
    - implicitly auto-enables --t1-readiness with same stderr
      notice ("blockvolume: nvme enabled: t1-readiness auto-enabled")
      → kept symmetric with iSCSI per QA checkpoint-7 note;
      closure report doesn't have to explain asymmetry.
    - constructs memback.NewProvider wrapping the volume's
      AdapterProjectionView (same readiness bridge as iSCSI;
      sketch §10 "Readiness bridge shared, not duplicated").
    - emits nvme-listening JSON ready line with nvme_addr + subsys_nqn.

  Refactored enforceIscsiLoopbackBind → enforceFrontendLoopbackBind
  (parameterized on kind="iscsi"|"nvme") so both protocols use
  one guard. Identical loopback-only safety policy.

core/frontend/nvme/t2_l2_nvme_harness_test.go (QA-owned, test-spec §6)
  // T2 L2 EVIDENCE CLASS: L2-harness

  T2.L2.n1 TestT2Process_NVMe_AttachWriteRead (13.6s):
    real blockmaster + blockvolume subprocesses with
    --nvme-listen on a reserved loopback port; Go NVMe/TCP
    initiator does ICReq → fabric Connect → Write 512B at LBA
    0 → Read at same location, bytes match over real wire
    (capsule + R2T + H2CData + C2HData round trip).

  T2.L2.n4 TestT2Process_NVMe_ReopenAfterMove_ServesNewLineage (17.2s):
    same harness; pre-move Connect+Write+disconnect, then primary
    volume restarts with new data/ctrl addrs (same status+nvme
    addrs). Master mints IntentRefreshEndpoint → EV advances.
    Fresh Connect to the same NVMe addr gets a backend at the
    new lineage and Write+Read round-trip succeed. Explicit
    NON-CLAIM: pre-move bytes not expected to persist.

  NOT included per checkpoint-5 scope (C5.3 applied to NVMe):
  T2.L2.n2 / n3 (stale Write / Read after move). L2-OS REQUIRED
  critical cells; harness can't substitute for kernel ANA
  Transition handling. Tracked for L2-OS on m01.

Tests green (no regressions):
  core/frontend/nvme:    22 tests (errors 7 + boundary 1 + io 9 +
                         L1 route 3 + L2-harness 2)
  core/frontend/iscsi:   31 unchanged
  All other packages:    unchanged.

Sign-off tier: T2B-NVMe-provisional
  Acceptance:
    - L0 6/6 green (n1-n6)
    - L1 3/3 green (n1-n3 component route)
    - L2-harness 2/2 green (n1 + n4)
    - cmd/blockvolume --nvme-* product-host wiring landed
    - loopback default + NQN required match T2 safe defaults
    - i2 stale Write / i3 stale Read deferred to L2-OS
  Sign-off: QA Owner + sw lead (§8B.9 provisional tier)
  Downstream unlock: none; T2A-iSCSI-product-ready and
                     T2B-NVMe-product-ready remain L2-OS work
                     (m01 enablement).
2026-04-21 21:12:35 -07:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%