Repository navigation
Description
Three CI Quality Gate checks fail on origin/main (99d1f6ea7) after parallel pull request merges:
tests/ai/test_ai_plans_configured_urls.py::test_gateway_and_qdrant_plans_emit_placeholders_when_unsetfails withValidationError: The context is empty. Pass the evidence text with --context (-c).(src/devops_cli/ai/jev_ask.py:164) because#7732(32fabe258) requires non-emptycontextwhile#7730(376e396a0) callsplan_ai_ask_jev("binary", "status?")with no context.test-tree: source_tree.check_tests_hold_at_most_the_recorded_private_importsfails (430 > _PRIVATE_IMPORT_CEILINGof428) because#7730(376e396a0) imports_get_llm_chat_targetand_get_llm_embedding_targetintests/ai/test_ai_plans_configured_urls.py:12-15.tests/roadmap/test_roadmap_adr.py::test_adrs_in_force_keep_headroom_and_matching_constant_commentfails withassert (33, 9675, 1000) == (32, 9230, 1000)because#7722(2cad07ead) superseded ADR 0001 and ADR 0016 and added ADR 0042 (leaving 32 in-force ADRs at 9,230 tokens), colliding with#7734(3f9178d00) recording 33 ADRs and 9,675 tokens insrc/devops_cli/config/constants.py.
Reproduction
Run on origin/main:
DEVOPS_CLI_CONFIG=config.example.yaml .venv/bin/pytest -q tests/ai/test_ai_plans_configured_urls.py tests/roadmap/test_roadmap_adr.pyDEVOPS_CLI_CONFIG=config.example.yaml uv run devops ci --only test-tree
Expected Behavior
All three CI checks pass on main and unblocked pull request branches.
Proposed design
Problem statement
Three CI Quality Gate checks fail on origin/main after parallel pull request merges. The ask-jev plan test passes no context to a function that now requires one. The test file imports two private helpers and exceeds the private import ceiling. The ADR budget comment states the old count and token total. The fix makes the three checks pass and unblocks pull request branches.
Acceptance criteria
Requirement: Ask-jev plan test passes a context
The ask-jev plan test SHALL pass a non-empty context to plan_ai_ask_jev.
Scenario: Gateway and Qdrant placeholders with no configured URL
- WHEN the test
test_gateway_and_qdrant_plans_emit_placeholders_when_unsetruns - THEN it passes and asserts the ask-jev target
<ai.gateway_url>/v1/systemone
Requirement: Test file stays under the private import ceiling
tests/ai/test_ai_plans_configured_urls.py MUST import no private name from devops_cli.ai.ai_plans.
Scenario: Private import ceiling of the test tree
- WHEN
uv run devops ci --only test-treeruns - THEN
source_tree.check_tests_hold_at_most_the_recorded_private_importspasses with a count at or below_PRIVATE_IMPORT_CEILING
Requirement: ADR budget comment matches the in-force ADRs
The CONST_ROADMAP_ALTERNATIVES_MAX_ADR_TOKENS comment MUST state the in-force ADR count and token total.
Scenario: Comment parity with docs/adr/
- WHEN
pytest -q tests/roadmap/test_roadmap_adr.py::test_adrs_in_force_keep_headroom_and_matching_constant_commentruns - THEN the test passes and the parsed comment equals the in-force ADR count, the token total and a 1000-token margin
Requirement: Reproduction suite passes
The three failing checks SHALL pass together on main.
Scenario: Full reproduction command
- WHEN
DEVOPS_CLI_CONFIG=config.example.yaml .venv/bin/pytest -q tests/ai/test_ai_plans_configured_urls.py tests/roadmap/test_roadmap_adr.pyruns - THEN pytest reports no failure
Existing Tool Considered
No alternatives check has run. The item adds no dependency and builds no new code. pytest, already in use, runs the two test files. The test-tree check runs the private import ceiling. The change is three edits: pass a context, remove two private imports and their duplicate assertions, and update one comment.
Key questions
- Which two private imports push the test tree over the ceiling?:
tests/ai/test_ai_plans_configured_urls.py:12-13imports_get_llm_chat_targetand_get_llm_embedding_targetfromdevops_cli.ai.ai_plans. [sources: tests/ai/test_ai_plans_configured_urls.py:12, tests/ai/test_ai_plans_configured_urls.py:13] - What are the in-force ADR count and token total?: The in-force set holds 32 ADRs and 9230 tokens. [sources: tests/roadmap/test_roadmap_adr.py]
- How does the test file drop the two private imports without losing the target checks?: Remove the two private imports. In the Ollama test, remove the two direct assertions because the plan assertions repeat them. In the provider test, remove the two direct assertions and assert
plan_ai_analyze_path()[0].target == expected_embed. (best practice) [sources: tests/ai/test_ai_plans_configured_urls.py, AGENTS.md]- Chosen: Remove the imports and use the plan assertions. It keeps the recorded ceiling and the target coverage.
- Rejected: Import the module and call the helpers as attributes. It still touches private members and may trip a lint rule.
- Rejected: Raise
_PRIVATE_IMPORT_CEILING. It lowers a threshold, which AGENTS.md rule 5 forbids.
- Which context does the ask-jev plan test pass?: Pass a short evidence string, for example
"gateway health status", as thecontextargument. The test checks only the placeholder target. (best practice) [sources: src/devops_cli/ai/jev_ask.py:164, src/devops_cli/ai/ai_plans.py, tests/ai/test_ai_plans_configured_urls.py]- Chosen: Pass a fixed evidence string. It satisfies the new validation and keeps the test deterministic.
- Rejected: Pass the question as the context. It couples the evidence to the question text and adds no value.
- Does the fix change
CONST_ROADMAP_ALTERNATIVES_MAX_ADR_TOKENS?: No. The fix updates the comment to 32 in-force ADRs and 9230 tokens. The headroom check passes with the current cap. (best practice) [sources: tests/roadmap/test_roadmap_adr.py, src/devops_cli/config/constants.py]- Chosen: Update the comment only. The headroom assertion passes before the comment assertion.
- Rejected: Raise the cap. It changes a limit with no failing headroom check.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 29, 2026
CI is failing on main, which blocks all pull request merges.Both deal with CI failures on main, but #5590 fixes the Fail-to-Pass mechanism that blocks fixes, while this candidate fixes the three test failures themselves.devops-cli-service commentedon Nov 29, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.247.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.247.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 16:17 UTC