Skip to content

A2 gate: pytest tests/ fails under pytest 8.4.2 (a2_release option registered too late) #116

Closed

Description

@Data-Wise

Problem

The A2 full_gates observation fails before running any test: python -m pytest tests/ -q -p no:cacheprovider exits 3 with ValueError: no option named 'a2_release' raised from tests/a2/conftest.py:43 (config.getoption('--a2-release') in pytest_collection_modifyitems). The option is registered by pytest_addoption in the same file, but a conftest in a subdirectory is not an initial conftest when tests/ is the argument, so the option registers too late under pytest 8.4.2.

scripts/verify_a2_release.py:172 hard-codes python -m pytest tests/ -q -p no:cacheprovider as the canonical gate command, so the command cannot simply be reordered (tests/a2 tests/ collects only the 680 A2 tests).

Why it surfaced now

No pytest version satisfies the gate as written:

pytest pytest tests/ manifest node IDs
8.4.2 (pinned in 1acda3e) fails (this issue) match
9.2.0 (unpinned before 1acda3e) collects drift; broke a2-release run 41221084359

The observations gate last ran on 2026-10-25, when an older pytest satisfied both. Reproduced locally on dev and on the v2.22.1 commit (6ce4e50) with pytest 8.4.2; collection under pytest 9.2.0 succeeds.

Evidence: a2-observations run 41237353606 on 53d633f: 5 of 6 observations passed, full_gates failed with pytest exit code 3, pytest_passed 0.

Proposed fix

Register --a2-release in tests/conftest.py, which pytest loads at startup when tests/ is an argument, and remove the registration from tests/a2/conftest.py. Verify pytest tests/ under 8.4.2 and that scripts/run_a2_release.py (tests/a2 --a2-release -p tests.a2.release_capture) still works.

Impact

Independent of #115: the next release's observations run fails the same way until this is fixed.

Activity

  1. Data-Wise commented on Oct 31, 2026

    @Data-Wise
    OwnerAuthor

    Fixed in PR #117 (commit 3bf81cf, squashed to 8dbd32e): --a2-release is registered in tests/conftest.py. Verified: pytest tests/ exit 0 with 1610 passed and 5 skipped under pytest 8.4.2, and the full_gates observation passed in run 41241520378. Reaches main with the next dev to main release.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions