# GPU CI regression smoke manifest.
#
# Add new workload smoke entries here; scripts/ci/run_gpu_regression_smokes.sh
# runs every entry whose ``min_gpus`` requirement is met. No workflow edits needed
# when extending coverage.
#
# Fields:
#   name        - short label for logs
#   command     - argv executed inside the CI container (working dir: /workspace/aorta)
#   min_gpus    - optional; skip when torch.cuda.device_count() is lower (default 1)
#   pr          - optional bool; when true the smoke also runs on the PR gate
#                 (AORTA_CI_TIER=pr). Keep the PR set fast and single-GPU so
#                 GPU-touching PRs stay protected without starving the runner.
#                 Nightly / workflow_dispatch (AORTA_CI_TIER=full) run everything.
#
# Exit codes: every ``aorta sweep run`` smoke passes ``--strict``. Without it the
# matrix flow tolerates per-cell failures and exits 0, so a workload that errors
# or never runs would leave this gate green -- the one thing it exists to catch.
# ``aorta run`` needs no flag: it already exits non-zero on a failed trial.
# ``--strict`` deliberately does NOT trip on a cell that ran and reported
# passed=False, which is an expected A/B "bug reproduced" outcome; these smokes
# are all expected to pass cleanly, so an errored workload is the target here.

smokes:
  - name: gpu_smoke_recipe
    pr: true
    command:
      - aorta
      - sweep
      - run
      - --recipe
      - recipes/ci/gpu-smoke.yaml
      - --strict

  - name: gpu_smoke_cli
    pr: true
    command:
      # No ``--strict``: ``aorta run`` derives its exit code from trial results.
      - aorta
      - run
      - --workload
      - gpu_smoke
      - --trials
      - "1"
      - --steps
      - "1"

  - name: inference_smoke
    pr: true
    command:
      - aorta
      - sweep
      - run
      - --recipe
      - recipes/inference/example-inference-smoke.yaml
      - --strict

  # Distributed (2-GPU) reproducer: nightly / dispatch only -- too heavy for the
  # per-PR path and needs a second GPU.
  - name: race_smoke
    min_gpus: 2
    command:
      - torchrun
      - --standalone
      - --nproc_per_node=2
      - aorta
      - sweep
      - run
      - --recipe
      - recipes/race/race_smoke.yaml
      - --strict
