Wrap ChunkedFileTraverser calls in contextlib.suppress / try-except so
that existing tests with mocked Path.exists (but unmocked is_file/is_dir)
no longer raise ValueError. Also fix ruff format violation in tag_info
ternary expression.
ISSUES CLOSED: #9982
The a2a_module_imports_audit scenario at line 126 scans all step files
for bare `\bacp\b` references on lines that lack `a2a`. The audit skips
files whose name contains "acp", "rename", or "audit", but
`a2a_naming_regression_steps.py` matched none of those markers despite
containing many ACP-related strings (import checks, error messages, etc.).
Renaming to `a2a_acp_naming_regression_steps.py` puts "acp" in the
filename so the audit correctly skips it. Behave discovers step
definitions by directory scan, so no feature file updates are needed.
ISSUES CLOSED: #10668
Regression tests were added to exercise the a2a module rename scenario and verify that there are zero acp references after the rename. These tests ensure the rename path handles all references correctly, including imports and related metadata.
They validate both static references in source and configuration, and dynamic references in generated artifacts, ensuring no residual acp references remain post-rename.
Why they're important: they guard against regressions during refactors, protect the integrity of acp references across the codebase, and help catch issues early before release.
ISSUES CLOSED: #7578
Git user: HAL9000 (HAL9000@cleverthis.com)
- Add CHANGELOG.md [Unreleased] entry for the three new module guides
- Add CONTRIBUTORS.md entry for HAL9000 authoring the module guides
- Fix InvariantReconciliationActor DI container snippet in
invariant-reconciliation.md: replace incorrect event_bus/audit_service
params with the actual constructor params (invariant_service,
decision_service) as defined in src/cleveragents/actor/reconciliation.py
ISSUES CLOSED: #4848
- actor.py and actor_run.py: broaden `except click.exceptions.Exit` to
`except (click.exceptions.Exit, typer.Exit)` so that typer.Exit(code=N)
raised by _resolve_config_files propagates with the original exit code
instead of being caught by the generic Exception handler and re-raised
as code 3. Fixes Unknown Actor Name Error / Actor App Unknown Name Error
integration tests.
- actor_run_signature_resolve_steps.py + actor_run_signature_security_steps.py:
add typer.Exit to the exception catches around resolve_config_files calls
so Behave scenarios correctly capture the exit code.
- cloud_types_steps.py: add missing @then("it should reject tags with empty key")
step for the AWSResource tags validation scenario.
ISSUES CLOSED: #8607
Fixes two spec-implementation discrepancies identified in issue #5009:
1. Checkpoint trigger names: rename on_tool_write → before_tool_execute and
on_tool_write_complete → after_tool_execute to match the implementation in
src/cleveragents/tool/runner.py and src/cleveragents/application/services/
config_service.py. The implementation names are more precise — they describe
the execution phase rather than implying only write tools trigger them
(though the implementation correctly gates them on write tools).
2. Config key path: correct the Configuration Reference table entry from
sandbox.checkpoint.auto-create-on to core.checkpoints.auto-create-on,
matching both the implementation (config_service.py line 482) and the
inline spec at line 19449. Also update the default values in the table
to use the corrected trigger names.
Closes#5009
- Replace `alternatives_considered` with structured `alternatives` array containing index(1-based), description, and chosen(boolean) fields in `_build_explain_dict()`
- Fix test fixture: add `chosen_option="GraphQL API"` to match an alternative so exactly_one_chosen assertion is correct
- Fix step pattern: replace fragile CSV-capture step with explicit field-checking step that validates all three keys (index, description, chosen)
- Update BDD scenarios and Robot Framework helpers for new field name
- Add CHANGELOG entry under [Unreleased]/Changed
ISSUES CLOSED: #9166
Registers PriorityContextStrategy in ACMSPipeline via the same lazy-import
pattern used for SemanticChunkingStrategy (issue #9996), resolving acceptance
criterion #5 from issue #9997: "Strategy is registered in the plugin registry
under key 'priority_context'".
Adds a lazy getter _get_priority_context_strategy_class() that avoids circular
imports, and registers the strategy inside ACMSPipeline.__init__ after the
semantic_chunking registration. The strategy is now available by default
without requiring a manual register_strategy() call.
Also adds the required CHANGELOG.md entry under [Unreleased].
ISSUES CLOSED: #9997
The architecture conformance test "all dataclasses should use Pydantic
models" failed because PriorityRule was declared with @dataclass instead
of inheriting BaseModel. Replaces the dataclass with a Pydantic
BaseModel using the same str_strip_whitespace + validate_assignment
config as the sibling StrategyAction model. All keyword-argument call
sites (DEFAULT_PRIORITY_RULES, the step file's PriorityRule constructor)
are unaffected since BaseModel accepts kwargs.
Also marks the defensive naive-datetime branch in _recency_score as
``# pragma: no cover`` — ContextFragment.created_at always defaults to
``datetime.now(UTC)`` so the branch is unreachable through the public
fragment factory, which was the diff_coverage gate's prior complaint.
Refs: #9997
The tdd_json_decode_crash_persistence_steps.py was using incorrect field
names (auto_strategize, auto_execute, etc.) that do not exist on the
current AutomationProfileModel. This caused a TypeError during step
execution which was not an AssertionError and therefore bypassed the
@tdd_expected_fail inversion guard, causing the unit_tests CI job to fail.
Fix: use the correct field names (decompose_task, create_tool, etc.)
that match the current AutomationProfileModel schema.
Apply ruff format to priority_context_strategy_steps.py to fix CI lint failure. Collapses unnecessary line breaks in decorator arguments, function calls, and assertion expressions.
ISSUES CLOSED: #9997
- Fix ruff format violations: collapse list comprehension in
materializer.py, collapse function signature, collapse decorators
and assertion in tui_materializer_steps.py, remove trailing
whitespace in vulture_whitelist.py
- Remove duplicate Behave step definitions from tui_materializer_steps.py
that conflicted with output_rendering_steps.py and
project_commands_coverage_steps.py: create status handle,
create code handle, close panel handle, close status handle,
no error should be raised
- Rename render_element_for_tui step texts to avoid conflict with
tui_first_run_steps.py: rendered text should contain/be empty ->
render output should contain/be empty
- Update tui_materializer.feature to use renamed step texts and
replace no error should be raised with materializer still running
ISSUES CLOSED: #11164
The Tree and TreeNode imports were not in alphabetical order, causing ruff I001 lint
violation. Reordered to comply with CONTRIBUTING.md import rules.
ISSUES CLOSED: #5326
Implemented the TuiMaterializer class that bridges the Output Rendering
Framework to Textual UI widgets, enabling all CLI command producers to
render in the TUI without modification. Split the module into three files
to stay under the 500-line file limit: main materializer.py (TuiMaterializer
class), _tui_events.py (event type constants and event model), and
_tui_renderers.py (all rendering helper functions).
The TuiMaterializer implements the MaterializationStrategy protocol and
maps ElementHandle events (Panel, Table, Status, Progress, Tree, Code,
Diff, Separator, ActionHint, Text) to plain-text renderings for TUI display.
Supports real-time streaming updates and A2A event routing for
PermissionRequest and ThoughtBlock events. Thread-safe with lock guards on
all shared state mutations.
Added comprehensive Behave BDD test suite covering all element types,
callback invocation, rendered output accumulation, A2A routing logic, and
concurrent thread safety verification.
ISSUES CLOSED: #5326
`PluginManager.get_plugin()` raises `PluginNotFoundError` for unknown
plugins and never returns `None`, so the post-call `None` guards plus
their `except NotFoundError` handlers were unreachable. Drop them along
with the now-unused `NotFoundError`/`CleverAgentsError` imports. Also
drop the broad `except Exception` in `install_plugin` (the only ops it
guards — `Path()`/`.exists()`/`.is_dir()` — do not raise) and the
defensive `except CleverAgentsError` in `list_plugins` (covers only
`PluginManager()`/`list_plugins()`, both currently infallible) so the
remaining error paths are the ones the BDD suite actually exercises.
ISSUES CLOSED: #5756
Add mock-based @given steps and 14 new scenarios covering the rich
table list, show, enable, disable, remove happy paths, the abort
confirmation flow, and the description truncation branch
(plugin.py:134). The @when step now patches _get_plugin_manager via
context so PluginManager isolation works without a singleton.
ISSUES CLOSED: #5756
The mro-based UsageError check inside the Exception block already
catches BadParameter (it inherits from UsageError) — the separate
typer.BadParameter handler was redundant.
Added an in-process Behave step that calls main() directly and
captures err_console output, plus a scenario that runs
`plan use --no-such-flag` to cover the UsageError branch (subprocess
steps do not count toward unit-test coverage).
The custom _print_basic_help() omitted the global flags from --help output,
so the "Help Shows All Three Options" integration test failed even though
the flags worked. Added a "Global options:" section listing --data-dir,
--config-path, -v, --format, --version, --show-secrets.
The generic Exception handler in main() also swallowed click UsageError
(including NoSuchOption) and reported them as "Error [500] INTERNAL",
masking unknown-option messages. Typer vendors its own click, so an
isinstance check against `click.exceptions.UsageError` would miss
`typer._click.exceptions.UsageError`. Walk type(e).__mro__ for any
class named "UsageError" and reprint with e.format_message() at exit
code 2 — surfaces the "No such option: --automation-level" message
the "Plan Use Rejects Automation Level Flag" test asserts.