name: CI
on:
push:
branches: [main]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Test SpecRail gate wiring
run: python3 scripts/ci/test_specrail_gate_wiring.py
- name: Verify synced SpecRail checks
run: scripts/sync-specrail-checks.sh --verify
- name: Check plugin version sync
run: python3 scripts/ci/check_plugin_version_sync.py
- name: Check public surface
run: python3 scripts/ci/check_public_surface.py
- name: Check public benchmark claims
run: python3 scripts/ci/check_public_claims.py
- name: Check source file size guard
run: python3 scripts/ci/check_file_size.py
- name: Check release workflows
run: python3 scripts/ci/check_release_workflows.py
- name: Test plugin runtime scripts
run: node --test plugins/remem/scripts/remem-runtime.test.js plugins/remem/apps/remem/request-security.test.js plugins/remem/apps/remem/server.test.js npm/remem/scripts/install.test.js
- name: Check spec lifecycle
if: github.event_name == 'pull_request'
env:
GITHUB_PR_TITLE: ${{ github.event.pull_request.title }}
GITHUB_PR_BODY: ${{ github.event.pull_request.body }}
run: python3 scripts/ci/check_spec_lifecycle.py "${{ github.event.pull_request.base.sha }}" HEAD
- name: Check PR tier self-test
run: python3 scripts/ci/check_pr_tier.py --self-test
- name: Check PR tier
if: github.event_name == 'pull_request'
env:
GITHUB_PR_BODY: ${{ github.event.pull_request.body }}
run: python3 scripts/ci/check_pr_tier.py "${{ github.event.pull_request.base.sha }}" HEAD
- name: Check version bump
if: github.event_name == 'pull_request'
run: python3 scripts/ci/check_version_bump.py "${{ github.event.pull_request.base.sha }}" HEAD
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo clippy --all-targets -- -D warnings
- name: Run native web API smoke
run: scripts/smoke_native_web_api.sh
- name: Run extraction baseline gate
run: cargo run -- eval-extraction --json --check-baseline > /tmp/remem-extraction-eval.json
- name: Run eval regression gates
run: cargo run -- eval-gates --json-out /tmp/remem-eval-gates.json
- name: Prove eval gate blocks constructed regression
run: |
set +e
cargo run -- eval-gates --simulate-golden-regression --json-out /tmp/remem-eval-gates-regression.json > /tmp/remem-eval-gates-regression.log 2>&1
code=$?
set -e
cat /tmp/remem-eval-gates-regression.log
if [ "$code" -eq 0 ]; then
echo "expected simulated eval regression to fail"
exit 1
fi
grep -q "golden.slice.temporal.hit_at_k regressed" /tmp/remem-eval-gates-regression.log
- name: Prove capacity gate blocks constructed regression
run: |
set +e
cargo run -- eval-gates --simulate-capacity-regression --json-out /tmp/remem-eval-gates-capacity-regression.json > /tmp/remem-eval-gates-capacity-regression.log 2>&1
code=$?
set -e
cat /tmp/remem-eval-gates-capacity-regression.log
if [ "$code" -eq 0 ]; then
echo "expected simulated capacity regression to fail"
exit 1
fi
grep -q "capacity.degradation.fused.recall_at_k_loss increased" /tmp/remem-eval-gates-capacity-regression.log
- name: Upload eval gate artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: remem-eval-gates
path: |
/tmp/remem-extraction-eval.json
/tmp/remem-eval-gates.json
/tmp/remem-eval-gates-regression.json
/tmp/remem-eval-gates-regression.log
/tmp/remem-eval-gates-capacity-regression.json
/tmp/remem-eval-gates-capacity-regression.log
- run: cargo test