name: ci

# H4 — gate every push on the credential-free, offline test suite.
# No secrets, no live vault: everything runs against the mock OLRAPI.

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ["3.10", "3.12"]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}

      - name: Routing docs in sync with routing.json (offline)
        run: python echo-memory.plugin.src/skills/echo-memory/scripts/check_routing.py

      - name: Interface guard for v1.0 scaffolds
        run: python echo-memory.plugin.src/skills/echo-memory/scripts/test_v1_scaffold.py

      - name: Client regression tests
        run: python echo-memory.plugin.src/skills/echo-memory/scripts/test_echo_client.py

      - name: Feature integration tests (mock OLRAPI)
        run: python eval/test_features.py

      - name: PATCH-semantics tests (hi-fi mock)
        run: python eval/test_patch_semantics.py

      - name: Offline write-ahead queue + cache tests (H2)
        run: python eval/test_offline_queue.py

      - name: Session-reflection capture tests (H5)
        run: python eval/test_reflect.py

      # TODO (H4): fold the hi-fi mock into the main eval and publish the refreshed
      #   eval/results/latest.json (currently still a 0.6-vs-0.7 baseline) as an artifact:
      #   python eval/run_eval.py
