
  # compat-matrix (Phase G4) — second-consumer regression check. Installs the
  # in-repo library editable, then the in-repo example_app on top (its path
  # source already points at ..), and runs example_app's tests. A public-API
  # regression surfaces here BEFORE a release lands, not after. 3.12 only — the
  # version fan-out is covered by test-3.11/3.12/3.13.
  - name: compat-matrix-example-app
    image: python:3.12-slim
    commands:
      - pip install --quiet --upgrade pip
      - {{EXTRAS_INSTALL_CMD}}
      # Steered like every package-consuming install (PKG-06 single index; the
      # retry re-runs the SAME steered command, never a bare index-less one). The
      # index is $DEVPI_URL — the Woodpecker server-level variable (PAPER-113;
      # MGF_INFRA.md §2), never a hardcoded IP; the guard fails fast when unset.
      - '[ -n "$DEVPI_URL" ] || { echo "DEVPI_URL is unset -- set the Woodpecker server-level variable (MGF_INFRA.md §2; PAPER-113)"; exit 1; }'
      - pip install --quiet -e "./example_app[dev]" --index-url "$DEVPI_URL" || (sleep 15 && pip install --quiet -e "./example_app[dev]" --index-url "$DEVPI_URL")
      - cd example_app && pytest --tb=short -q

  # perf-nightly (LG-12 + RA-11 + PC-01 budgets) — runs only on the `cron`
  # event. The per-PR default suite excludes perf via `-m "not perf and not
  # slow"` in addopts; this is the nightly counterpart that exercises the
  # perf-marked tests so a budget regression fires instead of sliding through.
  # Schedule lives in the platform UI (Settings → Crons), not in this file.
  - name: perf-nightly
    image: python:3.12-slim
    when:
      event: cron
    commands:
      - pip install --quiet --upgrade pip
      - {{EXTRAS_INSTALL_CMD}}
      - pytest -m perf -v --override-ini "addopts="
