refactor: remove deprecated devx.ci.discover_runners wrapper

All workflows now use devx.molecule.discover_runners directly. The
deprecated wrapper (added in Phase 1c for backward compatibility) is
no longer referenced by any workflow in devx, grm, or infra.

- Delete src/devx/ci/discover_runners.py
- Remove `devx ci discover-runners` CLI subcommand
- Update tests to import from devx.molecule.discover_runners
- Remove TestDeprecationWrapper class
- Update docs, README, AGENTS.md, ADR-0002

DEVX-160

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
emil
2026-08-13 01:35:51 +02:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 10de782d93
commit 2652352205
11 changed files with 21 additions and 109 deletions
-7
View File
@@ -73,13 +73,6 @@ class TestCiCommands:
assert result.exit_code == 0
mock_run.assert_called_once_with("devx.ci.detect_release_commit", [])
@patch("devx.cli._run_module")
def test_ci_discover_runners(self, mock_run: MagicMock) -> None:
runner = CliRunner()
result = runner.invoke(cli, ["ci", "discover-runners", "positional"])
assert result.exit_code == 0
mock_run.assert_called_once_with("devx.ci.discover_runners", ["positional"])
@patch("devx.cli._run_module")
def test_ci_doc_coverage(self, mock_run: MagicMock) -> None:
runner = CliRunner()
+3 -31
View File
@@ -1,8 +1,6 @@
"""Unit tests for devx.ci.discover_runners (deprecated wrapper).
"""Unit tests for devx.molecule.discover_runners.
The wrapper re-exports from devx.molecule.discover_runners; these tests
verify backward compatibility by importing through the wrapper and
patching the canonical implementation's requests module.
Tests verify the canonical implementation by patching the requests module.
"""
import json
@@ -13,7 +11,7 @@ import click
import pytest
from click.testing import CliRunner
from devx.ci.discover_runners import (
from devx.molecule.discover_runners import (
DEFAULT_MAX_RUNNERS,
generate_indices,
get_runner_count,
@@ -266,29 +264,3 @@ class TestMain:
assert result.output.strip() == "3"
args, _ = mock_count.call_args
assert args[1] is None # token passed as None when missing
class TestDeprecationWrapper:
def test_re_exports_canonical_symbols(self) -> None:
"""The wrapper re-exports the canonical implementation's symbols."""
from devx.ci import discover_runners as ci_mod
from devx.molecule import discover_runners as mol_mod
assert ci_mod.query_runners is mol_mod.query_runners
assert ci_mod.get_runner_count is mol_mod.get_runner_count
assert ci_mod.generate_indices is mol_mod.generate_indices
assert ci_mod.main is mol_mod.main
assert ci_mod.DEFAULT_MAX_RUNNERS is mol_mod.DEFAULT_MAX_RUNNERS
def test_emit_deprecation_warning(self) -> None:
"""_emit_deprecation_warning issues a DeprecationWarning."""
import warnings
from devx.ci.discover_runners import _emit_deprecation_warning
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always")
_emit_deprecation_warning()
assert len(caught) == 1
assert issubclass(caught[0].category, DeprecationWarning)
assert "deprecated" in str(caught[0].message)