Repository navigation
CI: run every tracked test file - #70
Conversation
site/ops/test_brain_release_authority.py (the release-neutral path policy the promoter and bundle freezer depend on) was tracked but never run by CI. Add it to scripts/ci-python.sh next to the other site/ops release tests, and add a meta-check that fails when a tracked test_*.py is neither named by a run_check line nor on an explicit corpus-only allowlist (the five Brain acceptance gates that need build output or a private cache). Stale allowlist entries fail too.
|
Verdict: ready to merge. CI is green. The meta-check printed The pre-push review found wrong reasons on two allowlist entries; I corrected them before pushing.
Optional follow-up: pinning |
CI: run every tracked test file
|
Re-review on main ( By design, not a regression: the parser is lexical. A test path counts as run if it appears on any column-0 |
Problem
site/ops/test_brain_release_authority.pytestssite/ops/brain_release_authority.py, the release-neutral path policy that the exact-release promoter and the activation bundle freezer use to decide whethermainmay move past a built release. CI has never run it. It was added in 0a09877 (PR #45), andscripts/ci-python.shon main has no line for it.Nothing catches that kind of gap. A tracked
test_*.pythat no gate runs looks like coverage but isn't.On main today, 101
test_*.pyfiles are tracked and 95 are run byci-python.sh. The other six:site/ops/test_brain_release_authority.py, which CI should runsite/ops/brain-nightly.sh:713,742,765,773):brain/test_acceptance.pyneeds the gitignoredbrain/data/edges_links.jsonlbrain/test_cells.py: its data checks pass on trackedbrain/data, but its layout check importsnumpy(brain/layout.py:32), whichrequirements-ci.txtdoesn't pinbrain/test_cell_shards.pyneeds the gitignoredsite/assets/brain/cells/brain/test_frontier.pyneeds the gitignoredbrain/data/synapses.jsonlbrain/test_fold_xref.pyneeds the private declaration cache plus a Mathlib checkout (CONTRIBUTING.md, "Corpus-dependent checks")Change
scripts/ci-python.shrunssite/ops/test_brain_release_authority.py, placed next to the othersite/opsrelease tests.scripts/check_ci_python_tests.py, which runs first inci-python.sh. It lists tracked files withgit ls-filesand parses therun_checklines ofci-python.sh, recognizing script paths and-m unittest pkg.test_modmodules; commented-out lines don't count. It fails when:test_*.pyis neither run nor on itsCORPUS_ONLYallowlist (the five files above, each with the corpus it needs)ci-python.shnow runs it, so the allowlist can't go stalerun_checknames a test file that isn't trackedrun_checkline. It then exits with that line instead of a traceback.How tested
python3 scripts/check_ci_python_tests.pyprints101 tracked test files: 96 run by CI, 5 corpus-only.and exits 0.python3 site/ops/test_brain_release_authority.py: 7 tests pass.problems(), each producing exactly the expected error:run_checkline-m unittest brain.test_provenance_coverageand-I brain/test_replay_sandbox.pyforms are recognized.Risks
test_*.pywithout arun_checkline now fails CI. That is the point; the error message says what to do.bot/test_settle_gate.pycomes with its ownrun_check) are unaffected.run_checkinvocations, which is allci-python.shuses. A test run some other way would be reported as not run, so it fails loudly rather than passing silently.What Jack must do
Nothing. There's an optional follow-up: pinning
numpyinrequirements-ci.txtwould likely letbrain/test_cells.pymove from the allowlist into CI, since everything else it reads is tracked. I haven't verified its layout checks with numpy installed.Release-neutral (per
site/ops/brain_release_authority.py): the PR changes onlyscripts/.