Repository navigation
Description
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-194holdserror:Logfire API is unreachable:UserWarning,error::pytest.PytestUnhandledThreadExceptionWarninganderror::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_filteringandtest_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 nametest_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
DeprecationWarningcomes fromgoogle/genai/types.py:42about_UnionGenericAlias. It is a third-party warning, with removal in Python 3.17. - One
LogfireNotConfiguredWarningcomes fromtest_telemetry_logfire.py::test_logfire_bridge_configuration_without_token_fallback.
- Five tests leave an unclosed event loop:
[tool.ty.rules]sets 12 rules toignore(unresolved-import,invalid-argument-type,deprecatedand others). The scratch run of the review, with ty defaults, reported 76 hidden diagnostics onsrc/(not repeated).uv checktakes 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
filterwarningswith"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
ignorefor the google-genaiDeprecationWarning. 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 12ignorerows. - 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_pathwithpytester: a test that emits aDeprecationWarningfails 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
filterwarningsstarts 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 cipasses.
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-settingscheck reads[tool.pytest.ini_options] filterwarningsfrompyproject.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-settingscheck reads the source lines of each non-error entry infilterwarnings. - 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
- WHEN A developer runs
uv run devops ci testafter fix(roadmap): the review_window git transcript does not match the code #4865 closes. - THEN The run passes and its summary reports zero warnings.
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_sessionwith-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.pywith-W error::UserWarning. - THEN The tests pass and each remaining
UserWarninghas a reasonedignoreinfilterwarnings.
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-settingscheck readsfilterwarningsand its comments. - THEN An
ignoreentry namesint 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-settingscheck readsfilterwarningsand its comments. - THEN An
ignoreentry 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_pathuses the project'sfilterwarningslist and an inner test that emits aDeprecationWarning. - 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 checkexit 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 checkexit 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 checkexit 1 and a developer runsdevops 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.101and the section holds the same 12 rules set toignore.
Requirement: The gate passes
uv run devops ci MUST exit with code 0 after the change and after #4865 closes.
Scenario: Run the gate
- WHEN A developer runs
uv run devops ciafter fix(roadmap): the review_window git transcript does not match the code #4865 closes. - THEN The command exits with code 0.
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-checkrow, which runs ty, be blocking or advisory indevops ci?: Advisory. The owner decided on 2026-10-22 that ty never failsdevops ciand thatmypy --strictstays the blocking type gate. (best practice) [sources: AGENTS.md, pyproject.toml]- Chosen: Advisory
uv-checkrow beside blockingmypy --strict. The owner approved the gate change, andmypy --strictremains the blocking type gate. - Rejected: Keep the
uv-checkrow blocking. It contradicts the owner decision and lets a new ty release faildevops ci. - Rejected: Drop
mypy --strictand block on ty. The owner keptmypy --strictas the blocking gate, and ty has no blocking history.
- Chosen: Advisory
- How does the gate stop failing on a ty diagnostic without a new tool?: Add an
advisoryflag toCheckSpec._handle_ci_results, the exit path ofdevops ci run, and the gate cache honor it. The summary labels the row advisory. The blockinglockfile,deps,buildandauditrows cover the other validations ofuv 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
advisoryflag on theuv-checkrow. It is one field and a few branches, and the other validations ofuv checkare duplicated by blocking rows. - Rejected: A separate advisory
tyrow and a blockinguv-checkrow. The blocking row still runs ty insideuv check, so the same diagnostic still fails the gate. - Rejected: Leave both rows blocking. It contradicts the owner decision.
- Chosen: One
- Does a direct
devops ci uv-checkrun still exit 1 whenuv checkfails?: Yes. The advisory flag changes only the aggregate gate anddevops 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.tomlholdsty==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 testruns the suite under thepyproject.tomlsettings.uv run pytest -W erroris not the proof: a command-line-Wfilter comes after the ini filters and wins, so it overrides the reasoned third-partyignoreentries. (best practice) [sources: pyproject.toml]- Chosen: Run the configured suite. It applies
filterwarningsas 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-partyignore.
- Chosen: Run the configured suite. It applies
- Which warning sources must the change decide?: The run under
errornames these sources: the anthropicclaude-sonnet-4-5model deprecation in the named AI tests, the tree_sitter_dockerfileint argument supportdeprecation atsrc/devops_cli/ai/ast/engine.py:592, an unclosed file intests/github/test_github_session.py, qdrantUserWarnings fromsrc/devops_cli/ai/rag/qdrant.py:659andtests/ai/rag/test_rag_qdrant.py, unclosed event loops in tests, and the google-genai_UnionGenericAliaswarning. 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-5deprecation be fixed?: Change the model name in the named tests to a model that the pinnedanthropic==1.17.0does 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
ignorefor the messageint argument supportwith the categoryDeprecationWarning. 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 insrc/devops_cli/ai/rag/qdrant.py. Add a reasonedignoreonly for aUserWarningthat 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
_UnionGenericAliaswarning be handled?: Add one reasonedignorefor theDeprecationWarningfromgoogle.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_windowtests oftests/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.pyand 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
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 22, 2026
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.
The candidate focuses on pytest warnings and test behavior, which aligns with test infrastructure changes.It impacts the reliability of CI checks and test environments, but does not block core functionality.Improves test consistency and developer experience by enforcing stricter warning behavior.Involves minor configuration changes and fixing a few warnings in existing tests.dan-petty commentedon Oct 28, 2026
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.
devops-cli-service commentedon Nov 1, 2026
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.
[-]test(warnings): pytest turns every warning into an error with reasoned exceptions[/-][+]test(warnings): Turn all warnings into errors with reasoned exceptions[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 65 characters, and the limit is 60. The type and the scope stay.
test(warnings): pytest turns every warning into an error with reasoned exceptionstest(warnings): Turn all warnings into errors with reasoned exceptions6 remaining items
docs(openspec): plan #1878 Fail tests on warnings and mark ty advisory
devops-cli-service commentedon Nov 12, 2026
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.uv run devops ci testReason:
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:filterwarningsnow starts with"error". Each of the three narrow entries keeps a#reason on the line above it. One newignoreentry 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 afinally. -tests/ai/analyze/test_ai_analyze_outlines.py:test_outline_validation_and_enhancement_retriespatchesdevops_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 checkon 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 areFileNotFoundError: 'kubectl'(this image has nokubectl), 2 are thereview_windowgit transcript, 1 istest_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 ignoresResourceWarningby default, so the baseThe job discarded this work. Read it before you retry:
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 ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.devops-cli-service commentedon Nov 12, 2026
The runner Job devops-cli-runner-20261112-142259-191c ended: succeeded.
Image digest: sha256:c8d2f7c80de33578454240252dfc94730ff674dc124598574e12bc57f551d79c
The last lines of its log:
dan-petty commentedon Nov 12, 2026
The 21
FileNotFoundError: kubectlfailures of this run are filed as #5132: the tests need a realkubectl, which the runner image leaves out on purpose.test(tests): run the k8s tests without kubectl on PATH (#5137)
dan-petty commentedon Nov 12, 2026
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 infilterwarningsofpyproject.tomlmakes 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.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.src/devops_cli/ai/ast/engine.py:592 loads it. Possible decision: one ignore entry with a reason.tests/github/test_github_session.py(test_a_process_that_sent_a_request_exits_without_closing_its_session).src/devops_cli/ai/rag/qdrant.py:659 and from the qdrant_client package intests/ai/rag/test_rag_qdrant.py.tests/conftest.pyand other files).Advice for the next plan.
Changes:list of a group. The planner cannot run the suite, so the census must be in the item text.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."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.uv run devops ci, but the criteria map "uv run devops ci passes" to group 4; (b)devops ci rundecides 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.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.
devops-cli-service commentedon Nov 12, 2026
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:
devops-cli-service commentedon Nov 13, 2026
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.