Click 8.2 removed the mix_stderr=False keyword argument from
CliRunner.__init__. Every CliRunner(...) call in
features/steps/validation_list_command_steps.py was passing it,
causing all 7 scenarios in features/validation_list_command.feature
to error with TypeError during the @when steps. Drop the keyword
to restore the default (which now always merges stderr into stdout,
matching what the tests previously did with mix_stderr=False = True
semantics via result.output).
ISSUES CLOSED: #8621
All 7 scenarios in validation_list_command.feature were tagged with
@tdd_issue_8621 but missing the required @tdd_issue companion tag.
validate_tdd_tags() in before_scenario raises ValueError when the
numbered tag is present without @tdd_issue, causing every scenario
to error at hook-level in behave-parallel.
Also fix the JSON and YAML Then steps: format_output() returns an
envelope dict {"data": [...], "command": "", ...} not a plain list.
ISSUES CLOSED: #8621
The PR moved `_get_tool_registry_service` from a private helper in
`validation.py` to a public `get_tool_registry_service` in
`validation_helpers.py`, re-exported into the `validation` module
namespace. All test files that patched the old private name via
`mock.patch()` raised `AttributeError` at runtime.
Updated all 14 affected files to patch the public name:
- features/steps/: 8 step files updated patch targets and direct imports
- robot/: 4 helper scripts updated patch targets
- benchmarks/: 2 benchmark files updated patch targets
Also fixed `validation_list_command_steps.py`:
- Added `patch` import
- Added proper `get_tool_registry_service` patcher in all @given steps
so the CLI is mocked correctly during scenario execution
- Removed invalid import from non-existent `validation_app` module
ISSUES CLOSED: #8667
Add the `list` subcommand to the validation CLI command group. This fixes issue #8621 where users were unable to list registered validations through the CLI interface due to the command not being implemented and registered.
Changes:
- Added `list` command with --namespace/-n, --source/-s, and --pattern/-p (regex) filters for listing validation agents
- Extracted shared helper functions into new validation_helpers.py module
- Updated imports in validation.py to use extracted helpers instead of inline private functions
- Fixed lint and formatting issues
Testing:
- Added BDD regression test feature file (features/validation_list_command.feature) with 7 scenarios covering: empty state, rich table display, namespace/source/pattern filtering, JSON output, and YAML output modes
- Added corresponding step definitions in features/steps/validation_list_command_steps.py
ISSUES CLOSED: #8621
Replace all # type: ignore[arg-type] and # type: ignore[misc] comments
with pyright-compatible alternatives: typing.cast() for intentional
type mismatches in error-handling tests, and explicit stub method bodies
for Protocol subclasses.
The coverage job in ci.yml was updated to depend on unit_tests only
(removing lint/typecheck which are independent static-analysis jobs).
Two BDD scenarios still asserted the old lint+typecheck dependency,
causing unit_tests gate failures. Updated both scenarios and the
step definition to assert the correct unit_tests dependency.
ISSUES CLOSED: #1641
Key optimisations applied to .forgejo/workflows/ci.yml:
1. Remove unnecessary needs: [lint, typecheck, security, quality] from the
coverage job. Coverage runs the full unit-test suite independently under
slipcover and does not depend on static-analysis results. Removing this
dependency allows coverage to start immediately in parallel with all other
jobs, eliminating a sequential bottleneck that forced coverage to wait for
four upstream jobs before it could begin.
2. Reduce docker job gate from needs: [lint, typecheck, security, quality,
unit_tests] to needs: [unit_tests] only. The Docker image build does not
require static-analysis results to succeed; gating on unit_tests alone is
sufficient to ensure the image is built from tested code.
3. Add uv.lock to all cache keys (was pyproject.toml only). Including the
lock file produces a more precise cache key: a dependency version bump now
correctly invalidates the cache, and unchanged lock files yield higher hit
rates across PRs that only touch source code.
4. Add per-job .nox virtualenv caching for all jobs (lint, typecheck,
security, quality, unit_tests, integration_tests, e2e_tests, coverage,
build). On cache hit, nox skips the full uv pip install step, saving
30-90 s of package installation time per job per run.
Expected aggregate wall-clock reduction: >50% vs the 3556 s baseline
(target: <=1778 s over 20 PRs), primarily from parallelising coverage and
reducing per-job install overhead via nox venv caching.
ISSUES CLOSED: #1641
The previous ACMSPipeline.__init__ invoked _load_strategies_from_settings
at line 831 before self._strategies (line 834) and self._logger (line 864)
were initialized. When a Settings whose context dict contained a
'strategies' key was passed in, the method body raised AttributeError on
'self._strategies', and the except handler then raised a second
AttributeError on 'self._logger' that propagated out of __init__ and
crashed pipeline construction entirely.
Move the auto-load call to after both attributes are bound. Convert the
pytest-shaped tests/strategies/test_strategy_registry.py (which the
behave-based unit_tests gate never ran) into a behave feature file +
step definitions under features/, matching the project's BDD convention
and bringing the strategy auto-loading paths under actual CI coverage.
ISSUES CLOSED: #7527
Implement strategy registry integration as spec §47561 by adding:
- load_strategies_from_config() in context_strategies.py for TOML-driven
strategy bootstrapping (register builtins, discover custom plugins via
module:ClassName, set enabled list)
- Re-exports of StrategyRegistry, StrategyConfig, StrategyRegistryEntry,
StrategyNotFoundError, StrategyRegistrationError and ContextStrategy from
strategy_registry and acms_service modules
- __all__ export list and DEFAULT_ENABLED_STRATEGIES constant
Fix StrategyRegistry.validate_registry() to skip resource_types check for
v1 pipeline strategies (context_strategies.py, acms_service.py) whose
StrategyCapabilities dataclass lacks the domain-model resource_types field,
preventing false-positive warnings. Adds _is_v1_pipeline_caps() helper.
Auto-load strategy configuration from Settings in ACMSPipeline.__init__()
when a Settings object is provided, reading context.strategies config and
registering/ enabling strategies via the plugin loader.
The previous refactor routed list_invariants through _resolve_scope,
which silently changed the no-flags behavior: _resolve_scope returns
(GLOBAL, "system") when no flag is given (the `add` default), so
`agents invariant list` filtered to only global+system invariants
instead of returning every active invariant.
InvariantService.list_invariants documents scope=None / source_name=None
as "all scopes" / "all sources"; the listing CLI must preserve that
contract. Inline the mutual-exclusion check in list_invariants and
restore the if/elif chain that leaves scope/source_name=None when no
flag is set, while keeping `agents invariant add` defaulting to global.
Tests added:
- "List invariants with no flags passes no scope filter" verifies the
service is called with scope=None, source_name=None.
- "List invariants with conflicting scope flags rejected" covers the
new BadParameter raise path.
ISSUES CLOSED: #11049