Files
memory-os/.github/workflows/ci.yml
T
Claudio DrewsandClaudioDrews 251c16ffad feat: collapse v2 — attenuate Hebbian boost by query-local salience (#24)
- score_all() now multiplies amplify_gain by base salience before
  applying Hebbian cross-source corroboration boost, so globally-
  important structural facts no longer crowd out query-locally-
  relevant facts
- ICARUS_COLLAPSE_AMPLIFY_GAIN env var (default 0.15) tunes the
  tradeoff; raise to 0.20 if genuine corroboration feels undervalued
- All tests passing (_test_collapse.py, collapse_eval.py)
- Real pipeline test: 30-35% token reduction with correct ranking

Closes #23

Co-authored-by: ClaudioDrews <claudio@drews.com.br>
2026-06-07 09:48:00 -03:00

43 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: ['**']
pull_request:
# Cancel superseded runs on the same ref so a push + its open PR don't both
# burn a full matrix.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Byte-compile (syntax gate — all modules, not a whitelist)
run: python -m compileall -q icarus scripts setup _test_collapse.py _test_sanitize.py
- name: Collapse tests (pure + Hebbian amplify + attestation + adapter)
run: python _test_collapse.py
- name: Sanitize / prompt-injection tests
run: python _test_sanitize.py
- name: Collapse eval smoke (must run clean)
run: python scripts/collapse_eval.py