Files
seaweedfs/seaweed-block/internal/docs/ref/testops-runner-binary-contract.md
T
Ping QiuandClaude Opus 5.5 e17e30b4aa seaweed-block: keep only the runner scenarios this tree uses (#13418)
Removes lab-only runner scenarios and suites from seaweed-block/, keeps the scenarios this tree's CI uses with environment placeholders, and guards every artifact-root use before any cleanup. Includes the maintainer's follow-ups from #13419 and #13423.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 03:20:55 -08:00

4.3 KiB

TestOps Runner Binary Contract

Status: active reference for beta-hardening work.

Purpose: keep the product repo, runner repo, developer workstation, and QA lab aligned on what binary executes runner-native scenarios.

Binary Identity

swblock is the standalone sw-test-runner binary for Seaweed Block / V3.

  • Runner repo: pingqiu/sw-test-runner
  • Main package: cmd/swblock/main.go
  • Build command:
go build -o swblock ./cmd/swblock

swblock links the shared runner engine plus the V3 product action set:

  • core actions,
  • iSCSI actions,
  • NVMe actions,
  • Kubernetes actions,
  • V3-specific product pack actions.

Sibling binaries use the same engine with different linked action sets:

  • weedblock: V2 product pack.
  • cmd/sw-test-runner: broad development / kitchen-sink binary.

Path Convention

QA currently keeps a Windows build at:

C:\work\swblock.exe

Developer machines should either put the binary on PATH as swblock or call it by full path. Linux controllers should do the same with a Linux build of the binary.

The product repo should not vendor the runner binary. The product repo owns scenario content; the runner repo owns execution.

Product-Side Build Helper

This product repo includes a helper for developer/QA convenience. It does not vendor the binary; it builds from a local sw-test-runner checkout or clones the runner repo when allowed.

Windows:

.\internal\tools\build-swblock.ps1

Linux / Git Bash:

bash internal/tools/build-swblock.sh

Useful options:

.\internal\tools\build-swblock.ps1 -RunnerRoot C:\work\sw-test-runner
.\internal\tools\build-swblock.ps1 -NoClone
bash internal/tools/build-swblock.sh --runner-root /path/to/sw-test-runner
bash internal/tools/build-swblock.sh --no-clone

Default output:

<product-root>/.tools/swblock.exe   # Windows
<product-root>/.tools/swblock       # Linux
<product-root>/.tools/swblock.path  # file containing the built binary path

Expected Commands

Validate a product-owned scenario:

swblock validate testops/scenarios/nvme-p5-protocol-component-gate.yaml

Run a product-owned scenario against a test node (every setting is required; testops/README.md lists them):

swblock run testops/scenarios/nvme-p5-protocol-component-gate.yaml \
  --env product_root=/path/to/seaweed-block \
  --env node_host=<node address> \
  --env node_user=<ssh user> \
  --env ssh_key=/path/to/key \
  --env artifact_root=/path/to/shared/artifacts

Run the full protocol release gate (the four protocol chains in order):

SW_BLOCK_SSH_KEY=/path/to/key SW_BLOCK_NODE_HOST=<node address> \
SW_BLOCK_NODE_USER=<ssh user> SW_BLOCK_NODE_ARTIFACT_ROOT=/path/to/shared/artifacts \
  bash scripts/testops-run-protocol-release-gate.sh

Validate a finished protocol release gate bundle:

swblock validate-bundle --profile protocol-release-gate \
  <evidence-store>/g15d-k8s/testops-runs/protocol-release-gate-native/<run-id>

Responsibility Boundary

Product repo:

  • scenario YAML,
  • product smoke scripts,
  • field-level assertions,
  • QA assignment docs,
  • expected evidence and non-claims.

Runner repo:

  • action registry,
  • SSH/control execution,
  • run-control status schema,
  • result bundle layout,
  • artifact collection,
  • bundle validation.

QA:

  • builds or receives the correct runner binary,
  • runs product-owned scenarios/suites,
  • reports result bundle path and validation output.

Developer:

  • writes product-owned scenario content,
  • keeps gates narrow and evidence-based,
  • uses swblock validate/run locally when the binary is available.

QA Assignment Policy

Use developer self-run for short feedback loops:

  • swblock validate on a new or edited scenario,
  • one child scenario run when the target lab is reachable,
  • a focused re-run after a small scenario/product fix.

Assign QA when independence or lab discipline matters:

  • milestone validation,
  • release-gate validation,
  • long soak / repeatability runs,
  • runner feature validation such as status, cancellation, collection, or bundle validation,
  • complex scenario design where the product behavior and lab evidence still need shaping.

This keeps TestOps productive: developers use the runner for immediate feedback, while QA owns authoritative evidence and complex validation.