ci: re-enable pipeline; add test-ci scope (skips wikipedia ingest)

Pipeline was disabled 2026-05-02 because CI runners overlapped
with bench infrastructure. Today the substrate is in a good
state (1,684 passing locally) and the gate has been off long
enough that drift would land silently if reintroduced.

Re-enables the workflow + adds a `test-ci` Makefile target that
skips the wikipedia ingest test files (test_wikipedia_old.py,
test_wikipedia_xml.py). Their runtime path is already exercised
end-to-end by `make ingest-*` against real shards, so the
synthetic fixtures duplicate coverage without adding signal CI
should gate on.

`make test` stays comprehensive for the local dev loop —
1,684 passed there, 1,560 passed under `make test-ci` (the
124-test delta is the wikipedia ingest fixtures).

PYTEST_XDIST_AUTO_NUM_WORKERS=4 still caps the runner's
parallelism so a re-enabled CI doesn't oversubscribe the
shared host or skew live bench latencies on the same pool.
This commit is contained in:
russell@unturf.com 2026-05-09 16:47:31 -04:00
parent a2ff9d4574
commit 0c4fbb53f8
No known key found for this signature in database
2 changed files with 34 additions and 15 deletions

View file

@ -15,14 +15,13 @@
# Run on demand via `make bench-qa-{quick,smoke}` (10s / 30s) or
# full `make bench-qa` (full sweep).
# Pipeline DISABLED 2026-05-02. CI runners overlap with the bench
# infrastructure fox is using for QA-quality measurements; auto-
# triggered pipelines on every push contend for the same runner pool
# & risk skewing bench latencies. Re-enable by deleting this
# workflow.rules block (everything below stays valid).
workflow:
rules:
- when: never
# Pipeline RE-ENABLED 2026-05-09 with `test-ci` (skips wikipedia
# ingest tests; full suite still available locally via `make test`).
# Originally disabled 2026-05-02 because bench infrastructure
# overlapped with the runner pool; mitigation today is the
# `test-ci` scope cap + per-job parallelism cap
# (PYTEST_XDIST_AUTO_NUM_WORKERS=4) so CI doesn't crowd live bench
# work.
stages:
- test
@ -37,10 +36,15 @@ variables:
PYTEST_XDIST_AUTO_NUM_WORKERS: "4"
# ----------------------------------------------------------------------
# Default test job — runs the full unit suite via `make test`, which
# already passes `-n auto` to pytest-xdist for parallelism. On the
# in-house runner this finishes in ~11s wall-clock (3.4× the serial
# cost) for the 641-test suite.
# Default test job — runs the CI-scoped suite via `make test-ci`,
# which is `make test` minus tests/crawler (network) and the
# wikipedia ingest tests (`test_wikipedia_old.py`,
# `test_wikipedia_xml.py`; their runtime path is exercised end-to-end
# by real ingest under `make ingest-*` so the synthetic fixtures
# duplicate coverage). pytest-xdist `-n auto` parallelism is capped
# by PYTEST_XDIST_AUTO_NUM_WORKERS so cgroup-limited containers
# don't oversubscribe the host. Local `make test` stays
# comprehensive for the dev loop.
# ----------------------------------------------------------------------
test:
stage: test
@ -62,10 +66,11 @@ test:
- .venv/bin/pip install --upgrade pip wheel
- .venv/bin/pip install -e '.[dev]'
script:
# `make test` invokes `pytest -q --ignore=tests/crawler -n auto`.
# `make test-ci` invokes pytest with --ignore=tests/crawler
# plus --ignore on the two wikipedia ingest test files.
# PYTEST_XDIST_AUTO_NUM_WORKERS env var caps the worker count on
# the runner; locally `-n auto` uses the full machine.
- make test
- make test-ci
artifacts:
when: on_failure
paths:

View file

@ -29,7 +29,7 @@ SEARCH_Q ?= computer
ingest ingest-cur ingest-old ingest-xml ingest-xml-history \
ingest-xml-attached ingest-abstract \
ingest-self ingest-self-providence ingest-git ingest-hg \
verify search stats test test-live docs docs-api docs-api-clean \
verify search stats test test-ci test-live docs docs-api docs-api-clean \
chain-check chain-check-shards \
falsify burn burn-kindergarten inspect bootstrap-crawler test-crawler crawl-ingest \
recrawl-check bench-qa bootstrap-math clean clean-db clean-data help \
@ -613,6 +613,20 @@ stats: bootstrap ## counts: documents, chunks, edges, audit chain
test: bootstrap ## run pytest suite (excludes opt-in crawler tests)
$(VENV)/bin/pytest -q --ignore=tests/crawler -n auto
# CI-scoped suite: same as `make test` but also drops the wikipedia
# ingest tests (`test_wikipedia_old.py`, `test_wikipedia_xml.py`).
# Wikipedia ingest is exercised end-to-end on real shards via
# `make ingest-cur` / `make ingest-xml`; running synthetic-fixture
# coverage on every CI push duplicates that surface for no signal
# the runtime path doesn't already provide. Local `make test` stays
# comprehensive — this target is for the gate, not the dev loop.
test-ci: bootstrap ## CI gate: full suite minus crawler + wikipedia ingest
$(VENV)/bin/pytest -q \
--ignore=tests/crawler \
--ignore=tests/test_wikipedia_old.py \
--ignore=tests/test_wikipedia_xml.py \
-n auto
# Crawler tests are off-by-default — they hit the network in many cases
# and require the heavy [crawler] extras (aiohttp, bs4, lxml, etc.).
# Bootstrap installs the extras into the existing venv idempotently.