Skip to content

fix(docs): the error catalog lists the onboard errors #6815

Closed

Description

@dan-petty

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_cli defines a DevOpsCLIError subclass and the generator does not import that module. It fails on the base for the onboard modules.
  • uv run devops docs generate gives the rows of the four onboard errors in docs/ERRORS.md.
  • The catalog test passes alone and after tests/github/onboard/test_onboard_routes.py in one process.

Dependencies

None. Related: #6806, #2490.

Activity

  1. added
    type/bug
    scope/docs
    source/agent
    on Nov 23, 2026
  2. dan-petty commented on Nov 23, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. 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.
    • Related: fix(docs): generated reference docs fail closed and describe the real surface #854, which asks for a different change. 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.
  3. added
    status/new
    effort/low
    value/high
    priority/p1-high
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 23, 2026
  4. dan-petty commented on Nov 23, 2026

    @dan-petty
    OwnerAuthor

    One more pull request can meet this failure: #6816 adds tests to tests/commands/test_repos_onboard.py, which import devops_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.py gives 1 failed, 46 passed, with the same four error classes.

  5. dan-petty commented on Nov 23, 2026

    @dan-petty
    OwnerAuthor

    #6810 (ec5b16b) adds devops_cli.github.onboard.baseline and devops_cli.github.onboard.routes to CONST_DOMAIN_EXCEPTION_MODULES and the four onboard rows to docs/ERRORS.md. So the catalog test now passes on main in each shard layout. On 676e107 it failed after tests/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 DevOpsCLIError subclass 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.

  6. added
    status/in-review
    and removed
    status/in-progress
    on Nov 23, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 23, 2026
  8. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor
  9. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-23 04:05 UTC

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

    effort/lowpriority/p1-highscope/docssource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions