This page explains how to verify the Iteration A CLI features end-to-end, how the smoke tests are structured, and how CI enforces quality gates.
1. What This Guide Covers
Iteration A introduced:
pic.flow validate
pic.flow run --dry-run and --format json
- standardized error envelope:
ERROR <CODE> | key=<...> | file=<...> | message=<...> | hint=<...>
- CI workflow for CLI smoke tests and markdown link checks
This guide documents:
- manual smoke commands for users and maintainers,
- automated smoke tests in
tests/test_cli_smoke.py,
- workflow behavior in
.github/workflows/quality.yml,
- extension patterns when adding future CLI features.
2. Quick Smoke Matrix (Manual)
Run from repository root.
2.1 Command Discovery Smoke
./scripts/pic.flow --help
./scripts/pic.flow run --help
./scripts/pic.flow validate --help
Expected:
- top-level help lists
validate,
- run help lists
--dry-run and --format {text,json},
- validate help lists file-role flags and
--strict.
2.2 Config-Only Validation Smoke
Valid fixture set:
./scripts/pic.flow validate \
--case tests/fixtures/valid/case.yml \
--solver tests/fixtures/valid/solver.yml \
--monitor tests/fixtures/valid/monitor.yml \
--post tests/fixtures/valid/post.yml \
--cluster tests/fixtures/valid/cluster.yml \
--study tests/fixtures/valid/study.yml
Expected:
- exit code
0,
[SUCCESS] Validation completed for ... file(s).
Invalid fixture example:
./scripts/pic.flow validate \
--case tests/fixtures/invalid/case_missing_properties.yml \
--solver tests/fixtures/valid/solver.yml \
--monitor tests/fixtures/valid/monitor.yml
Expected:
- exit code
1,
- at least one structured error line with
ERROR CFG_MISSING_SECTION.
2.3 Dry-Run Smoke (No File Writes)
Human-readable plan:
./scripts/pic.flow run --solve --post-process \
--case tests/fixtures/valid/case.yml \
--solver tests/fixtures/valid/solver.yml \
--monitor tests/fixtures/valid/monitor.yml \
--post tests/fixtures/valid/post.yml \
--dry-run
Machine-readable plan:
./scripts/pic.flow run --solve --post-process \
--case tests/fixtures/valid/case.yml \
--solver tests/fixtures/valid/solver.yml \
--monitor tests/fixtures/valid/monitor.yml \
--post tests/fixtures/valid/post.yml \
--dry-run --format json
Expected:
- no new run directories/files are created,
- JSON output parses cleanly and includes
mode, launch_mode, stages, and artifacts.
3. Code Map (Where Behavior Lives)
Primary implementation in scripts/pic.flow:
- standardized error emitter:
emit_structured_error(...)
- CLI usage failure exit code (
2): fail_cli_usage(...)
- dry-run plan builder:
build_run_dry_plan(args)
- dry-run renderer (text/json):
render_run_dry_plan(plan, output_format=...)
- validate command implementation:
validate_workflow(args)
- parser composition:
build_main_parser()
- dispatch and argument combination checks:
dispatch_command(args)
Related docs:
4. Automated Smoke Tests
Automated smoke tests live in:
Fixture packs:
- valid configs:
tests/fixtures/valid/
- invalid configs:
tests/fixtures/invalid/
Current test categories:
- help output smoke,
- validate pass/fail behavior,
- structured error presence for invalid inputs,
- dry-run no-write guarantee,
- dry-run JSON schema sanity,
- markdown link checker pass.
Run locally (when pytest is available):
5. CI Quality Gate Behavior
Workflow file:
.github/workflows/quality.yml
Pipeline steps:
- checkout,
- setup Python,
- install
pytest, pyyaml, numpy,
- run
pytest -q,
- run
python scripts/check_markdown_links.py.
If either step fails, the workflow fails and blocks merge (for repositories using required checks).
Separate docs build/mirror workflow:
.github/workflows/docs.yml
- handles Doxygen generation and docs artifact mirroring.
6. Markdown Link Checking
Link checker script:
Coverage:
README.md
docs/**/*.md (excluding generated docs_build/)
It checks local relative links only and intentionally skips:
7. How to Extend Smoke Coverage
When adding a new CLI option or subcommand:
- add a help-output assertion in
tests/test_cli_smoke.py,
- add one success-path and one failure-path test,
- add/update fixtures under
tests/fixtures/,
- document user-facing behavior in The Conductor Script: pic.flow,
- update this page’s smoke matrix if the command is user-critical.
When adding new docs pages:
- add nav entries in
docs/DoxygenLayout.xml,
- run
python scripts/check_markdown_links.py,
- ensure links from at least one entry page (
mainpage/conductor/how-to).
9. Common First-Run Issues
Common local issues:
pytest: command not found:
- install pytest in your local Python environment,
- or run tests in CI where dependencies are provisioned.
No module named pytest:
- use the Python interpreter/environment intended for development.
- network-restricted environments:
- local package install may fail; rely on CI run for authoritative smoke status.
1. Reference Scales