Skip to content

82% of the test suite (933 of 1136 files) runs in no CI job #5813

Description

@vivekchand

Measured while shipping this: 82% of the test suite runs in no CI job

Wiring tests/test_ingest_doc_drift.py into ci.yml was the fourth time in one session that a guard turned out to be named in no workflow file list, so I measured the class instead of just fixing the instance:

test files in tests/            1136
named in NO workflow file list   933   (82%)

This is not a measurement artifact. There is no catch-all pytest tests/ anywhere in .github/workflows/ — every invocation is an explicit file list, and the workflow comments say so themselves ("a guard added without a line here runs in no job at all"). Spot-checked both directions:

test_api.py                   listed=True
test_workflow_yaml_valid.py   listed=True
test_ac_coverage_guard.py     listed=False   (9 test funcs, 135 lines)
test_adapters.py              listed=False   (15 test funcs, 256 lines)
test_agent_principals.py      listed=False   (17 test funcs, 194 lines)

Those are real suites with real assertions, not helpers or fixtures.

Why it matters more than it sounds. The explicit-file-list convention is deliberate and documented, and there are good reasons for it (job scoping, dependency isolation, runtime). The problem is that the convention has no enforcement, so the failure mode is silent in exactly the direction that hurts: a test you just wrote passes locally, the PR goes green, and the guard never runs again. Every instance I hit this session was a newly added guard — the case where the author is most confident it is protecting something.

I have not added a gate for this, deliberately. A check asserting every tests/test_*.py appears in some workflow list would fail 933 times on day one, which makes it unshippable as a hard gate and useless as a ratchet without a baseline. The shape that would work is the one this repo already uses for known holes elsewhere: record the current 933 as an accepted baseline, fail only when the count grows, and let it ratchet down. That is a real piece of work and a policy decision about CI cost, not something to slip into a docs PR — so I am reporting it rather than doing it.

The four instances I hit and fixed along the way: tests/test_ci_workflow_invocations_are_real.py (#5744), tests/test_field_failure_autoclose.py (#5790), tests/test_obs_gap_openclaw_update_pipeline_5749.py (#5763), and this one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions