Repository navigation
fix(tests): run-full.sh reaches the api/standalone/postgres tiers again; an unreached tier fails the run (#2888) - #2893
Merged
Merged
Conversation
…in, and a tier it does not reach fails the run (#2888) Fixes #2888 The unclassified-directory guard globbed `tests/*/` after the script had already `cd`'d into `tests/`, so it looked for `tests/tests/*/`, matched nothing, stayed a literal `*` under default globbing, failed classification and `exit 1`'d the run at the api boundary. Every full-suite run since a646de8 (2026-08-27) stopped before the `api`, `standalone` and `postgres` tiers — ~1,900 tests — and nothing said so. - The guard is now `tests/harness/check_test_dirs.py`, handed TESTS_DIR explicitly instead of globbing relative to the cwd, and testable: only a directory that HOLDS test files is a finding (`__pycache__`, `reports/`, a stale local checkout with only `node_modules` are on every machine and collected by nothing), and an owner entry with no directory on disk is flagged too (pytest ignores a missing `--ignore=` path silently). - Tier ledger: DECLARED_TIERS is checked against the recorded rows at the end. A declared tier with no row that the caller did not deselect is reported `NEVER RAN` and fails the run; deselected tiers (`--tier`, `--no-pg`) are listed as SKIP and the verdict says `partial`. - Abort trap: any exit before the summary — including SIGINT/SIGTERM — prints an ABORTED banner naming the tiers left unrun and exits non-zero. The disposable postgres container is torn down on that path too (the old per-tier `trap ... EXIT` is folded into it). - The alembic step of the postgres tier now carries the same dummy Redis/encryption env pg-migrations.yml sets: revision 0041 (#2330) imports `services` → `config`, which raises without Redis credentials. Broken since 2026-08-20, a week before the tier stopped being reached. Guards in tests/unit/test_2080_harness_contract.py: the glob is matched as code (not the comment that names it), the guard passes on the real tree with the real owner lists, fires on an unwired directory holding tests, ignores test-less directories, every `run_tier` name is in DECLARED_TIERS, and the NEVER-RAN / abort paths are present. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
Author
|
Complete The
Worth separate issues; I have not filed them here so this PR stays the one-line-fix-plus-guard it is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2888
What was wrong
tests/run-full.shcds intotests/at line 31, then the unclassified-directory guard globbedtests/*/— i.e.tests/tests/*/, which matches nothing, stays a literal*under default globbing, fails classification andexit 1s the run beforerun_tier api. Every full-suite run since a646de8 (2026-08-27) skipped theapi,standaloneandpostgrestiers (~1,900 tests) with nothing saying so.What this does
tests/harness/check_test_dirs.py, handed$TESTS_DIRexplicitly (no cwd-relative glob), and unit-tested. Only a directory that holdstest_*.pyis a finding —__pycache__,reports/, the venv, a stale local checkout with onlynode_modulesexist on every machine and are collected by nothing, so naming them would fail every run (same truncation, sign flipped). An owner entry with no directory on disk is flagged too (a renamed tier dir keeps its--ignore=silently).DECLARED_TIERSis checked against the recorded rows at the end. A declared tier with no row that the caller did not deselect →NEVER RAN, run fails.--tier/--no-pgdeselections are listed asSKIPand the verdict readsPASS (partial — … not a full-suite result).exit N, SIGINT, SIGTERM — prints anABORTED before the summarybanner naming the unrun tiers and exits non-zero. The postgres container teardown is folded into it (replaces the per-tiertrap … EXIT).pg-migrations.ymlalready sets — revision0041importsservices→config, which raises without Redis creds. Broken since 2026-08-20; found the first time the tier ran again.Evidence
Unwired dir added temporarily (AC #2) — guard fires, abort ledger names every tier:
--tier api --tier standalone --tier postgres -k "test_health or test_admin_login or alembic_heads"— the three previously-unreachable tiers now run:SIGTERM mid-unit-tier:
tests/unit/test_2080_harness_contract.py: 24 passed (10 new for #2888). Completetests/run-full.shrun in progress locally (Python 3.12 venv, underTRINITY_TEST_ALLOW_PY_MISMATCH=1); will post the summary in a comment.🤖 Generated with Claude Code