Verification-Led Development
Purpose
Make every meaningful change earn trust with the cheapest relevant signal. Prefer small, layer-owned checks over broad, slow rituals that do not exercise the changed behavior. Small verification scope does not imply small implementation scope: a broad rewrite is valid when it is the smallest coherent way to test or reach the target architecture, as long as it has staged checks and clear rollback/baseline evidence.
Verification Workflow
Define the claim.
- State what should now be true.
- Identify the owner layer.
- Identify the smallest artifact that can prove it.
- State whether the change is a local patch, a target-shaped slice, or a subsystem replacement, and why that scope is justified by the evidence.
Choose checks by risk.
- Build check for compile/link/interface changes.
- Import/syntax check for Python/package changes.
- Unit or smoke test for local behavior.
- End-to-end run for cross-layer integration.
- Screenshot/pixel/log check for visual behavior.
- AOV/reference-image check for renderer material, shadow, lighting, GI, tone mapping, or stochastic sampling changes.
- Benchmark only when performance is part of the claim.
Run checks in dependency order.
- Core library first.
- Bindings second.
- Viewer/client last.
- Do not test an adapter against a stale library unless that is the intended compatibility case.
Inspect outputs, not just exit codes.
- Read warnings that may signal ABI drift or stale build paths.
- Verify the expected target was produced.
- Confirm logs show the intended code path.
- Confirm screenshots are nonblank and from the expected scene/mode.
- For renderer captures, confirm the output records camera, resolution, color management, tone map, sample count, seed, and backend.
Report residual risk.
- Say what passed.
- Say what was not run and why.
- Mention environment assumptions such as display, GPU, network, cache, or unavailable hardware.
Check Selection
Use this mapping:
- Build script changed: run that script from the repo root.
- CMake target changed: clean or configure build; ensure old targets disappeared when deletion was intended.
- Native API changed: rebuild library and run a binding import/smoke.
- Python binding changed:
python -m py_compile or compileall, then import/use the installed package.
- Viewer CLI changed: run
--help and one noninteractive path.
- Renderer output changed: run a screenshot or benchmark smoke on a known small scene.
- Physically based renderer output changed: run term-level AOV or reference-golden checks before relying on beauty images.
- GUI state changed: run offscreen capture when available, then note if live GUI was not exercised.
Useful Commands
Prefer commands that match repository conventions:
./build.sh --no-clean
./build.sh
./run.sh --help
python3 -m compileall -q path/to/package
ctest --test-dir build --output-on-failure
For visual smoke paths, prefer explicit output files:
python3 test/bench_render.py scene.usda
QT_QPA_PLATFORM=offscreen ./build/nanousdview --screenshot /tmp/smoke.ppm scene.usda
Verification Integrity
- Do not mark work done because compilation reached a target before a later packaging step failed.
- Do not trust old build directories after deleting targets; clean at least once.
- Do not ignore warnings about missing modules, stale symbols, or fallback targets.
- Do not use tests that exercise removed legacy paths as proof of the new path.
- Do not use performance wins as proof of renderer correctness; physical terms and reference parity need separate evidence.
- Do not shrink implementation scope just because broad changes are harder to review when repeated small changes have already falsified the local hypothesis.
- Do not leave long-running servers/processes open unless the user asked for them.
Final Handoff
Keep the handoff short and concrete:
- Changed files or areas.
- Behavior now provided.
- Commands run and outcomes.
- Known gaps or checks not run.
- Next action when it directly follows from the work.
1---2name: verification-led-development3description: Plan and execute code changes with focused verification at each layer. Use when implementing fixes or refactors that need builds, tests, smoke runs, screenshots, logs, benchmarks, or clear residual-risk reporting before handoff.4---56# Verification-Led Development78## Purpose910Make every meaningful change earn trust with the cheapest relevant signal. Prefer small, layer-owned checks over broad, slow rituals that do not exercise the changed behavior. Small verification scope does not imply small implementation scope: a broad rewrite is valid when it is the smallest coherent way to test or reach the target architecture, as long as it has staged checks and clear rollback/baseline evidence.1112## Verification Workflow13141. Define the claim.15 - State what should now be true.16 - Identify the owner layer.17 - Identify the smallest artifact that can prove it.18 - State whether the change is a local patch, a target-shaped slice, or a subsystem replacement, and why that scope is justified by the evidence.19202. Choose checks by risk.21 - Build check for compile/link/interface changes.22 - Import/syntax check for Python/package changes.23 - Unit or smoke test for local behavior.24 - End-to-end run for cross-layer integration.25 - Screenshot/pixel/log check for visual behavior.26 - AOV/reference-image check for renderer material, shadow, lighting, GI, tone mapping, or stochastic sampling changes.27 - Benchmark only when performance is part of the claim.28293. Run checks in dependency order.30 - Core library first.31 - Bindings second.32 - Viewer/client last.33 - Do not test an adapter against a stale library unless that is the intended compatibility case.34354. Inspect outputs, not just exit codes.36 - Read warnings that may signal ABI drift or stale build paths.37 - Verify the expected target was produced.38 - Confirm logs show the intended code path.39 - Confirm screenshots are nonblank and from the expected scene/mode.40 - For renderer captures, confirm the output records camera, resolution, color management, tone map, sample count, seed, and backend.41425. Report residual risk.43 - Say what passed.44 - Say what was not run and why.45 - Mention environment assumptions such as display, GPU, network, cache, or unavailable hardware.4647## Check Selection4849Use this mapping:5051- Build script changed: run that script from the repo root.52- CMake target changed: clean or configure build; ensure old targets disappeared when deletion was intended.53- Native API changed: rebuild library and run a binding import/smoke.54- Python binding changed: `python -m py_compile` or `compileall`, then import/use the installed package.55- Viewer CLI changed: run `--help` and one noninteractive path.56- Renderer output changed: run a screenshot or benchmark smoke on a known small scene.57- Physically based renderer output changed: run term-level AOV or reference-golden checks before relying on beauty images.58- GUI state changed: run offscreen capture when available, then note if live GUI was not exercised.5960## Useful Commands6162Prefer commands that match repository conventions:6364```bash65./build.sh --no-clean66./build.sh67./run.sh --help68python3 -m compileall -q path/to/package69ctest --test-dir build --output-on-failure70```7172For visual smoke paths, prefer explicit output files:7374```bash75python3 test/bench_render.py scene.usda76QT_QPA_PLATFORM=offscreen ./build/nanousdview --screenshot /tmp/smoke.ppm scene.usda77```7879## Verification Integrity8081- Do not mark work done because compilation reached a target before a later packaging step failed.82- Do not trust old build directories after deleting targets; clean at least once.83- Do not ignore warnings about missing modules, stale symbols, or fallback targets.84- Do not use tests that exercise removed legacy paths as proof of the new path.85- Do not use performance wins as proof of renderer correctness; physical terms and reference parity need separate evidence.86- Do not shrink implementation scope just because broad changes are harder to review when repeated small changes have already falsified the local hypothesis.87- Do not leave long-running servers/processes open unless the user asked for them.8889## Final Handoff9091Keep the handoff short and concrete:9293- Changed files or areas.94- Behavior now provided.95- Commands run and outcomes.96- Known gaps or checks not run.97- Next action when it directly follows from the work.