# 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: ```bash 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: ```text 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: ```powershell .\internal\tools\build-swblock.ps1 ``` Linux / Git Bash: ```bash bash internal/tools/build-swblock.sh ``` Useful options: ```powershell .\internal\tools\build-swblock.ps1 -RunnerRoot C:\work\sw-test-runner .\internal\tools\build-swblock.ps1 -NoClone ``` ```bash bash internal/tools/build-swblock.sh --runner-root /path/to/sw-test-runner bash internal/tools/build-swblock.sh --no-clone ``` Default output: ```text /.tools/swblock.exe # Windows /.tools/swblock # Linux /.tools/swblock.path # file containing the built binary path ``` ## Expected Commands Validate a product-owned scenario: ```bash 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): ```bash swblock run testops/scenarios/nvme-p5-protocol-component-gate.yaml \ --env product_root=/path/to/seaweed-block \ --env node_host= \ --env node_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): ```bash SW_BLOCK_SSH_KEY=/path/to/key SW_BLOCK_NODE_HOST= \ SW_BLOCK_NODE_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: ```bash swblock validate-bundle --profile protocol-release-gate \ /g15d-k8s/testops-runs/protocol-release-gate-native/ ``` ## 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.