Skip to content

test(warnings): Turn all warnings into errors with reasoned exceptions #1878

Open
1 of 1 issue completed

Description

@dan-petty

Friction

AGENTS.md line 87 and test-first step 5 demand zero deprecation warnings. They say uv run devops ci enforces this. But filterwarnings in pyproject.toml holds three narrow entries. A DeprecationWarning ends with "1 passed, 1 warning".

Evidence

  • pyproject.toml:190-194 holds error:Logfire API is unreachable:UserWarning, error::pytest.PytestUnhandledThreadExceptionWarning and error::pytest.PytestAssertRewriteWarning.
  • A full run in a scratch clone (11,411 passed, 259 seconds on four workers) emitted 8 warnings in 8 tests.
    • Five tests leave an unclosed event loop: tests/test_ai_agent_guardrails.py::test_guardrail_capability_workflow, test_pydantic_ai_direct.py::test_direct_model_request_sync_with_test_model, test_qdrant_cluster_addressing.py::test_a_cluster_address_builds_a_proxied_client, test_reference_extractor.py::test_extract_network_references_toml_table_filtering and test_roadmap_board_read.py::test_a_reprioritize_run_on_a_board_of_931_items_charges_its_pages. Since feat(release): release-please makes every release from main #1952 deleted reprioritize, the last test has the name test_a_whole_board_read_of_931_items_charges_its_pages.
    • One test leaves an unclosed sqlite connection: test_ai_analyze_outlines.py::test_outline_validation_and_enhancement_retries.
    • One DeprecationWarning comes from google/genai/types.py:42 about _UnionGenericAlias. It is a third-party warning, with removal in Python 3.17.
    • One LogfireNotConfiguredWarning comes from test_telemetry_logfire.py::test_logfire_bridge_configuration_without_token_fallback.
  • [tool.ty.rules] sets 12 rules to ignore (unresolved-import, invalid-argument-type, deprecated and others). The scratch run of the review, with ty defaults, reported 76 hidden diagnostics on src/ (not repeated). uv check takes the newest ty on every run. For that reason fix(ai): ty v0.0.84 rejects calling a text output function with the text alone #510 was a change of verdict with no code change.

Decision (owner, 2026-10-22)

The project pins ty to one exact version. ty runs as an advisory check beside mypy --strict, and its result never fails devops ci. mypy --strict stays the blocking type gate. The owner approved this change to a gate.

Proposed remedy

  • Start filterwarnings with "error". Keep the three existing entries as exceptions with a reason each.
  • Fix the seven warnings from this repository at their source.
  • Add one reasoned ignore for the google-genai DeprecationWarning. The comment names the removal version (Python 3.17).
  • Pin ty to one exact version. Run ty as a non-blocking row of devops ci. Keep the 12 ignore rows.
  • Apply pair A22. Write the pasted text in ASD-STE100 Simplified Technical English.

What it deletes

  • Nothing. The change adds 3 lines to pyproject.toml.

Tests

  • The suite is the test. After the change it passes with -W error.
  • A negative control in tmp_path with pytester: a test that emits a DeprecationWarning fails the run.
  • A test that the ty row cannot fail devops ci.

Dependencies

  • docs(agents): agents and devops ai write in ASD-STE100 Simplified Technical English. Both items edit AGENTS.md.

Acceptance criteria

  • filterwarnings starts with "error". Each exception has a reason.
  • A full run reports 0 warnings.
  • The ty version is pinned, and the ty row is advisory.
  • uv run devops ci passes.

Size: M.

Alternatives check of 2026-11-01: not-applicable.
Tool: none found.

Proposed design

Problem statement

The test suite lets warnings pass. [tool.pytest.ini_options] filterwarnings in pyproject.toml holds only three narrow entries, so a DeprecationWarning ends a run as "1 passed, 1 warning". A full run under a leading "error" entry found about 36 new warning failures, not the 8 in the issue body. The sources are unclosed event loops, an unclosed file, qdrant UserWarnings, an anthropic model deprecation, a tree-sitter grammar deprecation and the google-genai _UnionGenericAlias warning. The owner decided on 2026-10-22 that the ty result is advisory beside the blocking mypy --strict. The uv-check row must honor that in the gate, in devops ci run and in the cache. This issue makes warnings errors, fixes or reasons each source, and makes the uv-check row advisory.

Acceptance criteria

Requirement: Warnings fail by default

The filterwarnings list in [tool.pytest.ini_options] of pyproject.toml SHALL start with the "error" entry.

Scenario: Read the warning filter

  • WHEN The test-settings check reads [tool.pytest.ini_options] filterwarnings from pyproject.toml.
  • THEN The first entry is "error".

Requirement: Every exception states its reason

Each entry after "error" in filterwarnings MUST have a comment on its line or the line above that names the warning and why the project does not fix it.

Scenario: Inspect the exception comments

  • WHEN The test-settings check reads the source lines of each non-error entry in filterwarnings.
  • THEN A # comment on the entry or the line above names the warning and the reason.

Requirement: The suite reports no warning

The full test suite MUST pass with no warning under the configured filterwarnings.

Scenario: Run the full suite

Requirement: The anthropic model warning is fixed

The tests that use claude-sonnet-4-5 MUST use a model that the pinned anthropic package does not deprecate.

Scenario: Run the anthropic model tests

  • WHEN A developer runs the named anthropic tests with -W error::DeprecationWarning.
  • THEN The tests pass and no warning names the model.

Requirement: The unclosed file warning is fixed

The test test_a_process_that_sent_a_request_exits_without_closing_its_session MUST close every file and session that it opens.

Scenario: Run the GitHub session test

  • WHEN A developer runs tests/github/test_github_session.py::test_a_process_that_sent_a_request_exits_without_closing_its_session with -W error::ResourceWarning.
  • THEN The test passes and reports no ResourceWarning.

Requirement: The event-loop warnings are fixed

Each test that creates an event loop MUST close it before the test ends.

Scenario: Run the event-loop tests

  • WHEN A developer runs the named AI, qdrant, security and telemetry tests with -W error::ResourceWarning.
  • THEN The tests pass and no unclosed event loop warning remains.

Requirement: The qdrant warnings are fixed or reasoned

The qdrant code and tests MUST close each client, and any third-party UserWarning that remains MUST have a reasoned ignore entry.

Scenario: Run the qdrant tests

  • WHEN A developer runs tests/ai/rag/test_rag_qdrant.py with -W error::UserWarning.
  • THEN The tests pass and each remaining UserWarning has a reasoned ignore in filterwarnings.

Requirement: The tree-sitter grammar warning is a reasoned exception

filterwarnings MUST hold an ignore entry for the tree_sitter_dockerfile int argument support DeprecationWarning, with a comment that names the upstream grammar.

Scenario: Read the tree-sitter exception

  • WHEN The test-settings check reads filterwarnings and its comments.
  • THEN An ignore entry names int argument support, and a comment names tree_sitter_dockerfile.

Requirement: The google-genai warning is a reasoned exception

filterwarnings MUST hold an ignore entry for the google-genai _UnionGenericAlias DeprecationWarning, and a comment MUST name Python 3.17 as its removal version.

Scenario: Read the google-genai exception

  • WHEN The test-settings check reads filterwarnings and its comments.
  • THEN An ignore entry names _UnionGenericAlias, and a comment names Python 3.17.

Requirement: A warning fails a test

A pytester test MUST prove that a test that emits a DeprecationWarning fails when the project's filterwarnings list is in force.

Scenario: Run the negative control

  • WHEN A pytester run in tmp_path uses the project's filterwarnings list and an inner test that emits a DeprecationWarning.
  • THEN The inner run fails and reports the warning as an error.

Requirement: The gate does not fail on ty

A failed uv-check row MUST NOT change the exit code of uv run devops ci or devops ci run.

Scenario: Simulate a ty diagnostic in the gate

  • WHEN The process fake makes uv check exit 1 and the gate runs with --only uv-check --no-cache.
  • THEN The gate exits 0 and its summary labels the row advisory.

Requirement: A failed advisory row keeps the gate cache

A failed advisory row MUST NOT clear the gate cache.

Scenario: Run the gate twice with a ty diagnostic

  • WHEN The process fake makes uv check exit 1 and a developer runs the gate twice with the cache enabled.
  • THEN The second run reads the cached verdict and does not repeat every row.

Requirement: A direct uv-check run still fails

devops ci uv-check MUST exit 1 when uv check exits 1.

Scenario: Run the uv-check subcommand alone

  • WHEN The process fake makes uv check exit 1 and a developer runs devops ci uv-check.
  • THEN The command exits 1.

Requirement: The ty pin and rule ignores stay

pyproject.toml MUST hold ty==0.0.101 and the same 12 ignore rows under [tool.ty.rules].

Scenario: Read the ty settings

  • WHEN A test reads the dev dependency group and [tool.ty.rules].
  • THEN The pin is 0.0.101 and the section holds the same 12 rules set to ignore.

Requirement: The gate passes

uv run devops ci MUST exit with code 0 after the change and after #4865 closes.

Scenario: Run the gate

Existing Tool Considered

The alternatives check returned not-applicable and found no tool. pytest's built-in filterwarnings covers warnings-as-errors, and pytester covers the negative control. pytest cannot fix a third-party warning, so google-genai and tree_sitter_dockerfile get reasoned ignore entries. No tool makes a CI row advisory, so the change adds an advisory field to CheckSpec and branches in _handle_ci_results, devops ci run and the cache path. Written cost: about 6,000 tokens to build, about 1,000 tokens a year to keep, about 3,000 tokens to fix; about 45 minutes elapsed.

Key questions

  • Should the uv-check row, which runs ty, be blocking or advisory in devops ci?: Advisory. The owner decided on 2026-10-22 that ty never fails devops ci and that mypy --strict stays the blocking type gate. (best practice) [sources: AGENTS.md, pyproject.toml]
    • Chosen: Advisory uv-check row beside blocking mypy --strict. The owner approved the gate change, and mypy --strict remains the blocking type gate.
    • Rejected: Keep the uv-check row blocking. It contradicts the owner decision and lets a new ty release fail devops ci.
    • Rejected: Drop mypy --strict and block on ty. The owner kept mypy --strict as the blocking gate, and ty has no blocking history.
  • How does the gate stop failing on a ty diagnostic without a new tool?: Add an advisory flag to CheckSpec. _handle_ci_results, the exit path of devops ci run, and the gate cache honor it. The summary labels the row advisory. The blocking lockfile, deps, build and audit rows cover the other validations of uv check. (best practice) [sources: src/devops_cli/commands/ci.py:149, src/devops_cli/commands/ci.py:1493, src/devops_cli/commands/ci.py:2440, src/devops_cli/commands/ci.py:1511]
    • Chosen: One advisory flag on the uv-check row. It is one field and a few branches, and the other validations of uv check are duplicated by blocking rows.
    • Rejected: A separate advisory ty row and a blocking uv-check row. The blocking row still runs ty inside uv check, so the same diagnostic still fails the gate.
    • Rejected: Leave both rows blocking. It contradicts the owner decision.
  • Does a direct devops ci uv-check run still exit 1 when uv check fails?: Yes. The advisory flag changes only the aggregate gate and devops ci run. A developer who runs the check by name gets exit 1 and the diagnostics. (best practice) [sources: src/devops_cli/commands/ci.py:1493, src/devops_cli/commands/ci.py:1616]
    • Chosen: Advisory in the gate only. The gate never fails on ty, and a direct run still tells a developer that the check failed.
    • Rejected: Advisory everywhere, including the subcommand. A developer who asks for the check by name would get exit 0 and no failure signal.
  • Is the ty development dependency pinned to one exact version?: Yes. pyproject.toml holds ty==0.0.101. fix(ai): ty v0.0.92 flags a redundant cast in src/devops_cli/ai/tools/__init__.py, so uv check fails on main #2281 delivered the pin, so this issue changes no version. [sources: pyproject.toml]
  • Which command proves that the suite emits no warning?: uv run devops ci test runs the suite under the pyproject.toml settings. uv run pytest -W error is not the proof: a command-line -W filter comes after the ini filters and wins, so it overrides the reasoned third-party ignore entries. (best practice) [sources: pyproject.toml]
    • Chosen: Run the configured suite. It applies filterwarnings as the project writes it, exceptions included.
    • Rejected: Run uv run pytest -W error. The command-line filter is applied after the ini filters and wins, so it overrides the reasoned third-party ignore.
  • Which warning sources must the change decide?: The run under error names these sources: the anthropic claude-sonnet-4-5 model deprecation in the named AI tests, the tree_sitter_dockerfile int argument support deprecation at src/devops_cli/ai/ast/engine.py:592, an unclosed file in tests/github/test_github_session.py, qdrant UserWarnings from src/devops_cli/ai/rag/qdrant.py:659 and tests/ai/rag/test_rag_qdrant.py, unclosed event loops in tests, and the google-genai _UnionGenericAlias warning. The body's count of 8 warnings is stale. [sources: tests/ai/client/test_claude_provider.py:76, tests/ai/client/test_ai_streaming.py:922, tests/ai/client/test_ai_client_providers_and_embeddings.py:317, tests/ai/test_thinking_providers.py:278, src/devops_cli/ai/ast/engine.py:592, tests/github/test_github_session.py, src/devops_cli/ai/rag/qdrant.py:659, tests/ai/rag/test_rag_qdrant.py, tests/conftest.py, pyproject.toml]
  • How should the anthropic claude-sonnet-4-5 deprecation be fixed?: Change the model name in the named tests to a model that the pinned anthropic==1.17.0 does not deprecate. Do not add an ignore: the model is test data and has a supported replacement. (best practice) [sources: tests/ai/client/test_claude_provider.py:76, tests/ai/client/test_ai_streaming.py:922, tests/ai/client/test_ai_client_providers_and_embeddings.py:317, tests/ai/test_thinking_providers.py:278, pyproject.toml]
    • Chosen: Change the test model name. The warning comes from test data that the project controls.
    • Rejected: Add an ignore for the model deprecation. The warning has a supported replacement, so an ignore would hide a fixable problem.
  • How should the tree_sitter_dockerfile deprecation be handled?: Add one reasoned ignore for the message int argument support with the category DeprecationWarning. The comment names the upstream grammar. Remove the ignore when the grammar stops the warning. (best practice) [sources: src/devops_cli/ai/ast/engine.py:592, pyproject.toml]
    • Chosen: Add a reasoned ignore. The warning comes from an upstream grammar, and the project cannot change that package.
    • Rejected: Patch the grammar in this repository. The project does not keep a fork of tree_sitter_dockerfile.
  • How should the unclosed file and qdrant UserWarnings be fixed?: Close each file and each qdrant client in the test or in src/devops_cli/ai/rag/qdrant.py. Add a reasoned ignore only for a UserWarning that the qdrant_client package still emits after the fix. (best practice) [sources: tests/github/test_github_session.py, src/devops_cli/ai/rag/qdrant.py:659, tests/ai/rag/test_rag_qdrant.py]
    • Chosen: Close the resources at their source. The warnings come from resources that the project opens and can close.
    • Rejected: Add a blanket ignore for ResourceWarning and UserWarning. A blanket ignore hides leaks in new tests and code.
  • How should the google-genai _UnionGenericAlias warning be handled?: Add one reasoned ignore for the DeprecationWarning from google.genai.types. The comment names Python 3.17 as the removal version. Remove the ignore when the pinned google-genai stops the warning. (best practice) [sources: pyproject.toml]
    • Chosen: Add a reasoned ignore. The warning comes from a third-party package, and the removal version is known.
    • Rejected: Pin an older Python version. The project requires Python 3.14, and an older Python is not a fix.
  • Does the full-suite verification wait on fix(roadmap): the review_window git transcript does not match the code #4865?: Yes. In the runner image, the full suite fails two review_window tests of tests/core/test_git_contract.py. CI on main is green. This issue depends on fix(roadmap): the review_window git transcript does not match the code #4865 so a full-suite verify does not fail on the base. (best practice) [sources: tests/core/test_git_contract.py]
    • Chosen: Depend on fix(roadmap): the review_window git transcript does not match the code #4865. The runner image fails those tests on the base, and implement does not subtract base failures.
    • Rejected: Exclude the two tests from the verify. A narrowed verify would not prove that the full suite passes with no warning.
    • Rejected: Ignore the runner failure. The group verify would fail on the base and prove nothing.
  • Does this issue change AGENTS.md prose, or wait on the docs item that edits AGENTS.md?: No. AGENTS.md rule 9 already requires ASD-STE100 prose. This issue changes pyproject.toml, src/devops_cli/commands/ci.py and tests, not AGENTS.md. The one-issue rule keeps the docs item separate. [sources: AGENTS.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4865

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    source/agent
    type/test
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/test. The candidate focuses on pytest warnings and test behavior, which aligns with test infrastructure changes.
    • Priority: P2-Medium. It impacts the reliability of CI checks and test environments, but does not block core functionality.
    • Value: Medium. Improves test consistency and developer experience by enforcing stricter warning behavior.
    • Effort: Low. Involves minor configuration changes and fixing a few warnings in existing tests.
  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Refine cannot set this item to Ready at 4da1e34 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • What is the google-genai DeprecationWarning and when is it removed? (missing verified source)
    • Which seven tests emit warnings that must be fixed at their source? (missing verified source)
  4. added
    priority/p2-medium
    status/new
    value/medium
    effort/low
    on Oct 28, 2026
  5. devops-cli-service commented on Nov 1, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Tool: none found

    Checked on 2026-11-01. A person decides what this means for the item. The check changes no label and closes no issue.

  6. changed the title [-]test(warnings): pytest turns every warning into an error with reasoned exceptions[/-] [+]test(warnings): Turn all warnings into errors with reasoned exceptions[/+] on Nov 6, 2026
  7. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 65 characters, and the limit is 60. The type and the scope stay.

    • Before: test(warnings): pytest turns every warning into an error with reasoned exceptions
    • After: test(warnings): Turn all warnings into errors with reasoned exceptions
    • Source of the summary: the background model
  8. 6 remaining items

  9. added
    status/in-progress
    on Nov 12, 2026
  10. added a commit that references this issue on Nov 12, 2026
  11. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Stopped at group 1.

    Failed check: uv run devops ci test.

    Failure class: plan_defect.
    Action taken: none.
    Action left: wait: wait for a person.

    Step Status Attempts Tokens in/out Last failing command
    group 1 stopped 1 4488151/39144 uv run devops ci test

    Reason:

    The agent asked for a scope change: Group 1 cannot pass its verification with the files it names. First, the runner image holds no kubectl, so `uv run devops ci test` fails about 20 tests with FileNotFoundError('kubectl') on the base commit too, and the recorded git scenario review_window fails on this host's git. Second, the bare "error" entry makes ResourceWarning an error. Python ignores ResourceWarning by default, so the base run never showed these warnings. The census now fails about 36 more tests on unclosed sockets, files and event loops, on the deprecated claude-sonnet-4-5 model, and on a tree-sitter DeprecationWarning at src/devops_cli/ai/ast/engine.py:592. Their sources sit in tests/conftest.py, tests/github/test_github_session.py, tests/ai/rag/test_rag_qdrant.py, src/devops_cli/ai/rag/qdrant.py, src/devops_cli/ai/ast/engine.py and the four claude test files, which group 1 does not name. A test that fails on such a warning passes when it runs alone, so the failing ID does not name the source.. Evidence: shutil.which('kubectl') is None and `uv run devops install-tools --check --tool kubectl` prints 'kubectl 1.37.2: not installed'. `uv run pytest -n 0 -q -o filterwarnings= tests/k8s/test_image_pins.py::test_an_image_on_the_latest_tag_is_not_a_pin tests/core/test_git_contract.py` fails at the base filter with FileNotFoundError: 'kubectl' and with the review_window transcript mismatch. `uv run devops ci test` after the change printed '61 failed, 3 errors, 23810 passed in 863.44s'. `uv run pytest -n 0 -q -o filterwarnings= tests/commands/test_valkey.py tests/github/test_github_session.py tests/ai/rag/test_rag_qdrant.py` printed '219 passed, 2 warnings'. `uv run pytest -n 0 -q -o filterwarnings= tests/ai/test_repomap.py::test_generate_repo_map_multilingual_dockerfile_yaml_helm tests/ai/ast/test_treesitter_native_symbols.py` printed '14 passed, 2 warnings' with the DeprecationWarning at src/devops_cli/ai/ast/engine.py:592, and the same tests fail under the new filter. `uv run pytest -n 0 -q tests/roadmap/stage/test_roadmap_stage_window.py::test_a_first_request_with_the_context_and_the_body_at_their_caps_offers_the_tools_and_a_reserve` passes alone and failed in the full run.
    

    Last message of the agent (a claim that no check verified): I changed three files, then found that the group's verification cannot pass in this runner image. Here is what I did and what I saw. Changed - pyproject.toml: filterwarnings now starts with "error". Each of the three narrow entries keeps a # reason on the line above it. One new ignore entry names _UnionGenericAlias, and its comment names Python 3.17 as the removal version. - tests/ai/rag/test_qdrant_cluster_addressing.py: both native clients now live in a local and close in a finally. - tests/ai/analyze/test_ai_analyze_outlines.py: test_outline_validation_and_enhancement_retries patches devops_cli.ai.rag.investigator.investigate_rag_context, as the other test in the module does. Verified - uv run devops ci test tests/ai/rag/test_qdrant_cluster_addressing.py tests/ai/analyze/test_ai_analyze_outlines.py → 19 passed, no warning. - uv run ruff check on both test files → all checks passed. - uv run devops ci test (the census) → 61 failed, 3 errors, 23810 passed in 863.44s. About 20 of the failures are FileNotFoundError: 'kubectl' (this image has no kubectl), 2 are the review_window git transcript, 1 is test_review_facts (fails at the base filter too), and about 36 are new failures from the bare "error" entry. - uv run pytest -n 0 -q -o filterwarnings= tests/commands/test_valkey.py tests/github/test_github_session.py tests/ai/rag/test_rag_qdrant.py → 219 passed, 2 warnings. Python ignores ResourceWarning by default, so the base

    The job discarded this work. Read it before you retry:

    diff --git a/pyproject.toml b/pyproject.toml
    index 623d65b8..99857c53 100644
    --- a/pyproject.toml
    +++ b/pyproject.toml
    @@ -235,14 +235,23 @@ markers = [
         "live: live tests requiring the named local tool binaries; skipped where a binary is not installed",
         "unreachable: tests that exercise a refused endpoint before its fake lands",
     ]
    -# Logfire's token check warns from a background thread, so the warning fails a test only
    -# through pytest's unhandled-thread warning; both are errors so no test starts it (#965).
    -# A `tests.support` module imported before the root conftest marks it for assertion rewriting
    -# cannot be rewritten, and pytest only warns; as an error it fails the run (#1312).
    +# Every warning fails a test unless a reason below makes it an exception (#1878). pytest applies
    +# the last matching entry, so a narrow entry after `"error"` still wins for its own warning.
     filterwarnings = [
    +    "error",
    +    # Logfire's token check warns from a background thread, so the warning fails a test only
    +    # through pytest's unhandled-thread warning; both are errors so no test starts it (#965).
         "error:Logfire API is unreachable:UserWarning",
    +    # A warning that a background thread raises reaches pytest only as this warning, and it must
    +    # fail the test that started the thread (#965).
         "error::pytest.PytestUnhandledThreadExceptionWarning",
    +    # A `tests.support` module imported before the root conftest marks it for assertion rewriting
    +    # cannot be rewritten, and pytest only warns; as an error it fails the run (#1312).
         "error::pytest.PytestAssertRewriteWarning",
    +    # google-genai reads the private `typing._UnionGenericAlias` alias, and Python 3.14 deprecates
    +    # it. This repository cannot fix a dependency, so the exception stays until Python 3.17 removes
    +    # the alias and google-genai drops the read (#1878).
    +    "ignore:'_UnionGenericAlias' is deprecated:DeprecationWarning",
     ]
     
     
    diff --git a/tests/ai/analyze/test_ai_analyze_outlines.py b/tests/ai/analyze/test_ai_analyze_outlines.py
    index 01515a81..9496349e 100644
    --- a/tests/ai/analyze/test_ai_analyze_outlines.py
    +++ b/tests/ai/analyze/test_ai_analyze_outlines.py
    @@ -156,7 +156,7 @@ def test_pseudocode_generation_and_ai_enhancement(tmp_path: Path) -> None:
     
     def test_outline_validation_and_enhancement_retries(tmp_path: Path) -> None:
         """Verify metadata validation error cases, complexity levels, and AI retry flow."""
    -    from unittest.mock import MagicMock
    +    from unittest.mock import MagicMock, patch
     
         from devops_cli.ai.analyze.outlines import (
             _calculate_complexity_score,
    @@ -217,9 +217,12 @@ def test_outline_validation_and_enhancement_retries(tmp_path: Path) -> None:
             "not json",
             '{"primary_purpose": "Recovered Purpose after retry", "key_symbols": ["Valid"]}',
         ]
    -    enhanced_res = enhance_file_metadata_with_ai(
    -        "service.py", "def foo(): pass", "python", ["foo"], mock_retry_ai, max_retries=2
    -    )
    +    mock_rag_ctx = MagicMock()
    +    mock_rag_ctx.retrieved_chunks = [MagicMock(text="Chunk 1", similarity=0.9)]
    +    with patch("devops_cli.ai.rag.investigator.investigate_rag_context", return_value=mock_rag_ctx):
    +        enhanced_res = enhance_file_metadata_with_ai(
    +            "service.py", "def foo(): pass", "python", ["foo"], mock_retry_ai, max_retries=2
    +        )
         assert enhanced_res is not None
         assert enhanced_res.primary_purpose == "Recovered Purpose after retry"
     
    diff --git a/tests/ai/rag/test_qdrant_cluster_addressing.py b/tests/ai/rag/test_qdrant_cluster_addressing.py
    index d5a04736..4ae57627 100644
    --- a/tests/ai/rag/test_qdrant_cluster_addressing.py
    +++ b/tests/ai/rag/test_qdrant_cluster_addressing.py
    @@ -63,7 +63,11 @@ def test_a_cluster_address_builds_a_client_for_the_proxy_endpoint(cluster: FakeC
         with serving_qdrant(prefix=f"/{PROXY_PREFIX}", collections=["devops_code"]) as served:
             cluster.configuration.host = served.url
     
    -        create_native_qdrant_client(CLUSTER_URL).get_collections()
    +        client = create_native_qdrant_client(CLUSTER_URL)
    +        try:
    +            client.get_collections()
    +        finally:
    +            client.close()
     
         assert [(method, path) for method, path, _ in served.requests] == [
             ("GET", f"/{PROXY_PREFIX}/collections")
    @@ -73,7 +77,11 @@ def test_a_cluster_address_builds_a_client_for_the_proxy_endpoint(cluster: FakeC
     def test_a_direct_address_is_unchanged() -> None:
         """Direct addressing keeps working for a Qdrant that is not in a cluster."""
         with serving_qdrant(collections=["devops_code"]) as served:
    -        create_native_qdrant_client(served.url).get_collections()
    +        client = create_native_qdrant_client(served.url)
    +        try:
    +            client.get_collections()
    +        finally:
    +            client.close()
     
         assert [(method, path) for method, path, _ in served.requests] == [("GET", "/collections")]
     

    The item is Blocked, and the job will not run it. Fix the cause. Then comment implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits of roadmap.implement.digest_clears_per_class and roadmap.implement.digest_clears_per_item allow it.

  12. added
    status/blocked
    and removed
    status/in-progress
    on Nov 12, 2026
  13. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-runner-20261112-142259-191c ended: succeeded.
    Image digest: sha256:c8d2f7c80de33578454240252dfc94730ff674dc124598574e12bc57f551d79c

    The last lines of its log:

    Tool call: run_command, program grep, ok.
    Tool call: run_command, started: grep -n filterwarnings\\|simplefilter -B 3 -A ...
    Tool call: run_command, program grep, ok.
    Tool call: read_file, ok.
    Tool call: grep, ok.
    Tool call: run_command, started: uv run pytest -n 0 -q ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: grep -rn kubectl tests/conftest.py tests/support/*.py | ...
    Tool call: run_command, started: ls .data
    Tool call: run_command, program ls, ok.
    Tool call: run_command, program grep, ok.
    Tool call: run_command, started: uv run pytest -n 0 -q ...
    Tool call: run_command, program uv, ok.
    Tool call: grep, ok.
    Tool call: run_command, started: uv run devops install-tools --check --tool ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: uv run pytest -n 0 -q ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: grep -rln <masked> .venv/lib/python3.14/site-packages | head
    Tool call: run_command, program grep, ok.
    Tool call: run_command, started: other
    Tool call: run_command, program other:54458a724944, refused.
    Tool call: write_file, ok.
    Tool call: run_command, started: uv run python .data/agent/scratch/run_pytest_tracemalloc.py tests/github/test_github_session.py::test_a_process_that_sent_a_request_exits_without_closing_its_se ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: uv run python .data/agent/scratch/run_pytest_tracemalloc.py tests/github/test_github_session.py::test_a_process_that_sent_a_request_exits_without_closing_its_se ...
    Tool call: run_command, program uv, ok.
    Tool call: grep, retry (context must be between 0 and 20. Path: tests/github/test_github_session.py).
    Tool call: grep, ok.
    Tool call: run_command, started: uv run python .data/agent/scratch/run_pytest_tracemalloc.py tests/roadmap/stage/test_roadmap_stage_window.py::test_a_first_request_with_the_context_and_the_body ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: uv run python .data/agent/scratch/run_pytest_tracemalloc.py tests/roadmap/stage/test_roadmap_stage_window.py::test_a_first_request_with_the_context_and_the_body ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: uv run ruff check tests/ai/rag/test_qdrant_cluster_addressing.py tests/ai/analyze/test_ai_analyze_outlines.py
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: uv run pytest -n 0 -q ...
    Tool call: run_command, program uv, ok.
    Failure class plan_defect. Action left: wait.
    ✓ Took 0 item(s) to a ready pull request, stopped 1.
    Elapsed: 1h 7m 20s
    
  14. removed
    owner/service
    on Nov 12, 2026
  15. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    The 21 FileNotFoundError: kubectl failures of this run are filed as #5132: the tests need a real kubectl, which the runner image leaves out on purpose.

  16. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Warning census for #1878 (plan PR #5105 closed with no merge)

    The plan of #5105 cannot pass group 1, because its scope comes from a wrong count in the item body. The bare "error" entry in filterwarnings of pyproject.toml makes each ResourceWarning, UserWarning and third-party DeprecationWarning a test failure, in files that group 1 does not name.

    Census. The implement job ran the full suite with the "error" entry (implement comment 6827938727 on #1878): 61 failed, 3 errors, 23810 passed. About 36 of the failures are new warning failures in files that group 1 does not name. About 21 failures were "FileNotFoundError: kubectl" in the runner image; #5137 fixed them on main. The body says that a full run gives "8 warnings in 8 tests" and that the change adds 3 lines. That count is wrong.

    Warning sources and their files. A new plan must decide each source and name each file in the Changes: list of a group.

    1. The anthropic package warns a DeprecationWarning for the model claude-sonnet-4-5 (end of life 30 Nov 2026). These tests use the model: tests/ai/client/test_claude_provider.py:76, tests/ai/client/test_ai_streaming.py:922, tests/ai/client/test_ai_client_providers_and_embeddings.py:317 and :662, tests/ai/test_thinking_providers.py:278, :334 and :424. Possible decision: change the model name in the tests.
    2. tree_sitter_dockerfile warns "DeprecationWarning: int argument support is deprecated" when src/devops_cli/ai/ast/engine.py:592 loads it. Possible decision: one ignore entry with a reason.
    3. A ResourceWarning "unclosed file" in tests/github/test_github_session.py (test_a_process_that_sent_a_request_exits_without_closing_its_session).
    4. UserWarnings from src/devops_cli/ai/rag/qdrant.py:659 and from the qdrant_client package in tests/ai/rag/test_rag_qdrant.py.
    5. The event-loop sources that the implement agent named (tests/conftest.py and other files).

    Advice for the next plan.

    • Measure the census before the plan, and name each source file in the Changes: list of a group. The planner cannot run the suite, so the census must be in the item text.
    • Dependency: fix(roadmap): the review_window git transcript does not match the code #4865. In the runner image, the full-suite verify fails 2 review_window tests of tests/core/test_git_contract.py. CI on main is green. Implement does not subtract the failures that exist on the base, so a group that verifies with the full suite fails on these tests.
    • Possible split for refine: the ty advisory row (groups 2 and 4 of docs(openspec): plan #1878 Fail tests on warnings and mark ty advisory #5105) does not need the "error" entry, so it can be built now. The "error" entry (groups 1 and 3) waits for the decisions above and for fix(roadmap): the review_window git transcript does not match the code #4865.
    • Review points that stay open: (a) no group verify runs uv run devops ci, but the criteria map "uv run devops ci passes" to group 4; (b) devops ci run decides its own exit code (src/devops_cli/commands/ci.py:2440-2441), so a ty diagnostic still fails that path, and the plan changes only _handle_ci_results; (c) a failed advisory row clears the gate cache (src/devops_cli/commands/ci.py:1511-1519), so each later run repeats every row while ty has a diagnostic.
    • A stale fact: the plan says that the dev group holds ty 0.0.92. The dev group holds ty 0.0.101.

    Why no retry. The stop class is plan_defect, and its action is amend. A retry of this plan costs about 4.5M tokens and about 68 minutes, and it stops again on the same scope.

  17. added
    status/new
    and removed
    status/blocked
    on Nov 12, 2026
  18. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Plan pull request #5105 closed with no merge. The job waits for an edit of the text of this item, or for a commit that changes a file that the reason names.

    The reason, from the last comment of dan-petty on the pull request:

    Warning census for #1878 (plan PR #5105 closed with no merge)

    The plan of #5105 cannot pass group 1, because its scope comes from a wrong count in the item body. The bare "error" entry in filterwarnings of pyproject.toml makes each ResourceWarning, UserWarning and third-party DeprecationWarning a test failure, in files that group 1 does not name.

    Census. The implement job ran the full suite with the "error" entry (implement comment 6827938727 on #1878): 61 failed, 3 errors, 23810 passed. About 36 of the failures are new warning failures in files that group 1 does not name. About 21 failures were "FileNotFoundError: kubectl" in the runner image; #5137 fixed them on main. The body says that a full run gives "8 warnings in 8 tests" and that the change adds 3 lines. That count is wrong.

    Warning sources and their files. A new plan must decide each source and name each file in the Changes: list of a group.

    1. The anthropic package warns a DeprecationWarning for the model claude-sonnet-4-5 (end of life 30 Nov 2026). These tests use the model: tests/ai/client/test_claude_provider.py:76, tests/ai/client/test_ai_streaming.py:922, tests/ai/client/test_ai_client_providers_and_embeddings.py:317 and :662, tests/ai/test_thinking_providers.py:278, :334 and :424. Possible decision: change the model name in the tests.
    2. tree_sitter_dockerfile warns "DeprecationWarning: int argument support is deprecated" when src/devops_cli/ai/ast/engine.py:592 loads it. Possible decision: one ignore entry with a reason.
    3. A ResourceWarning "unclosed file" in tests/github/test_github_session.py (test_a_process_that_sent_a_request_exits_without_closing_its_session).
    4. UserWarnings from src/devops_cli/ai/rag/qdrant.py:659 and from the qdrant_client package in tests/ai/rag/test_rag_qdrant.py.
    5. The event-loop sources that the implement agent named (tests/conftest.py and other files).

    Advice for the next plan.

    • Measure the census before the plan, and name each source file in the Changes: list of a group. The planner cannot run the suite, so the census must be in the item text.
    • Dependency: fix(roadmap): the review_window git transcript does not match the code #4865. In the runner image, the full-suite verify fails 2 review_window tests of tests/core/test_git_contract.py. CI on main is green. Implement does not subtract the failures that exist on the base, so a group that verifies with the full suite fails on these tests.
    • Possible split for refine: the ty advisory row (groups 2 and 4 of docs(openspec): plan #1878 Fail tests on warnings and mark ty advisory #5105) does not need the "error" entry, so it can be built now. The "error" entry (groups 1 and 3) waits for the decisions above and for fix(roadmap): the review_window git transcript does not match the code #4865.
    • Review points that stay open: (a) no group verify runs uv run devops ci, but the criteria map "uv run devops ci passes" to group 4; (b) devops ci run decides its own exit code (src/devops_cli/commands/ci.py:2440-2441), so a ty diagnostic still fails that path, and the plan changes only _handle_ci_results; (c) a failed advisory row clears the gate cache (src/devops_cli/commands/ci.py:1511-1519), so each later run repeats every row while ty has a diagnostic.
    • A stale fact: the plan says that the dev group holds ty 0.0.92. The dev group holds ty 0.0.101.

    Why no retry. The stop class is plan_defect, and its action is amend. A retry of this plan costs about 4.5M tokens and about 68 minutes, and it stops again on the same scope.

  19. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 7a158c4 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: tests/core/test_git_contract.py.

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/p2-mediumsource/agentstatus/newtype/testvalue/medium

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions