Repository navigation
Description
Problem
#6806 (devops repos onboard) adds four DevOpsCLIError subclasses in src/devops_cli/github/onboard/: AnswerFlagError, BaselineUnreadableError, RouteRefusedError and RouteWriteError. docs/ERRORS.md has no row for them. DocGenerator._import_all_exception_modules in src/devops_cli/docs/generator.py imports the modules of devops_cli.exceptions and the modules of CONST_DOMAIN_EXCEPTION_MODULES, a list that a person keeps by hand. The onboard modules are not in that list, so the generated catalog leaves out their errors.
tests/docs/test_exceptions.py::test_each_error_class_declares_the_codes_of_its_catalog_row compares every loaded DevOpsCLIError subclass with the rows of the catalog. It sees the onboard errors only when another test in the same worker imports devops_cli.github.onboard. So the test passes or fails with the shard layout of the run.
Evidence on origin/main 676e107 (2026-11-23):
pytest tests/docs/test_exceptions.py::test_each_error_class_declares_the_codes_of_its_catalog_row
1 passed
pytest tests/github/onboard/test_onboard_routes.py tests/docs/test_exceptions.py::test_each_error_class_declares_the_codes_of_its_catalog_row
1 failed, 35 passed
The CI of PR #6812 fails in shard 1 of "Tests & Coverage" with this test (run 45086267466): "Left contains 4 more items: AnswerFlagError, BaselineUnreadableError, RouteRefusedError, RouteWriteError". PR #6812 does not change these files. Its new tests changed the shard layout.
Expected
The error catalog lists every DevOpsCLIError subclass of devops-cli, and the catalog test gives the same result in each shard layout. A new module with an error class cannot leave the catalog without a failed check.
Acceptance criteria
- Test first: a check fails when a module of
src/devops_clidefines aDevOpsCLIErrorsubclass and the generator does not import that module. It fails on the base for the onboard modules. uv run devops docs generategives the rows of the four onboard errors indocs/ERRORS.md.- The catalog test passes alone and after
tests/github/onboard/test_onboard_routes.pyin one process.
Activity
dan-petty commentedon Nov 23, 2026
The flaky catalog test caused a CI failure on PR #6812 in run 45086267466.The failed run 45086267466 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.Both target the docs generator in docs/generator.py, but #854 fixes error-swallowing and missing group options while this candidate fixes the error catalog missing rows for unlisted modules.dan-petty commentedon Nov 23, 2026
One more pull request can meet this failure: #6816 adds tests to
tests/commands/test_repos_onboard.py, which importdevops_cli.github.onboard, so its shard layout changes. Reproduced on its branch, which does not change these files:pytest -n 0 tests/github/onboard/test_onboard_routes.py tests/docs/test_exceptions.pygives1 failed, 46 passed, with the same four error classes.dan-petty commentedon Nov 23, 2026
#6810 (ec5b16b) adds
devops_cli.github.onboard.baselineanddevops_cli.github.onboard.routestoCONST_DOMAIN_EXCEPTION_MODULESand the four onboard rows todocs/ERRORS.md. So the catalog test now passes on main in each shard layout. On 676e107 it failed aftertests/github/onboard/test_onboard_routes.py; on the newest main it passes (36 passed in one process).The cause stays open: the module list is kept by hand, and no check fails when a new module with a
DevOpsCLIErrorsubclass is not in it. This issue now holds only the first acceptance criterion, the guard. The proof that the guard fails runs on 676e107, the base before #6810.devops-cli-service commentedon Nov 23, 2026
Released in v0.198.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.198.0
devops-cli-service commentedon Nov 23, 2026
Live since 2026-11-23 04:05 UTC