Remove all 14 remaining TODO/FIXME keywords from the 13 source files listed
in issue #9022. Each location now carries a plain explanatory comment that
describes the deferred work and references the corresponding tracked issue
(#9023–#9034). The plan.py EstimationResult migration TODO was already
resolved on master prior to this PR's rebase and required no further action.
Locations addressed:
- cli/commands/plan.py (×2): sandbox strategy hardcoded to git_worktree
- application/services/plan_lifecycle_service.py: EstimationStubActor placeholder (→ #9023)
- application/services/cleanup_service.py (×2): CONC3 DB session wiring (→ #9024)
- tool/runner.py: target_resource not yet forwarded to executor API (→ #9034)
- application/services/llm_actors.py (×2): response_format wiring #650 (→ #9025)
- a2a/facade.py: ACMS ContextAssemblyPipeline stub (→ #9026)
- application/services/correction_service.py: synthetic affected_files (→ #9027)
- mcp/adapter.py: resource_slots downstream wiring #882 (→ #9028)
- application/services/uko_indexer_internals.py: placeholder embedding #578 (→ #9029)
- cli/commands/skill.py: MCP adapter refresh_tools deferred (→ #9030)
- application/services/service_retry_wiring.py: class responsibility separation (→ #9031)
- application/services/phase_gating.py: pg-migration TOCTOU note (→ #9032)
- application/services/uko_loader.py: layer index precomputation (→ #9033)
TODO_FIXME_RESOLUTION.md updated to accurately reflect all resolutions,
including correction of the prior false claim that runner.py was implemented.
ISSUES CLOSED: #9022
The CHANGELOG entry for issue #5566 was dropped during conflict
resolution. Adds the entry back to the [Unreleased] > Fixed section
as required by contributing guidelines.
ISSUES CLOSED: #5566
Add BDD tests to verify that cleveragents.acp is not importable and
the acp directory does not exist in the source tree. This ensures v3.6.0
deliverable #1 compliance: 'No acp references in public API'.
The acp module was renamed to a2a in issue #688, but stale __pycache__
files were left behind, allowing the module to still be imported from
bytecode. This test ensures this compliance persists.
ISSUES CLOSED: #5566
features/lsp_actor_service_wiring.feature scenarios "handles multiple
LSP servers" and "tool specs have correct schema": add an explicit
`| CAPABILITIES |` header to the capability tables. Behave treats the
first table row as the heading, so `| DIAGNOSTICS |` (the only row)
was being silently dropped, leaving the registered server with zero
capabilities and the adapter generating no tool specs.
features/steps/lsp_actor_service_steps.py: strip surrounding double
quotes from each entry in the comma-separated `fields` placeholder of
the `requires "..."` Then step so a feature line like `requires
"file_path", "line", "column"` resolves to the three unquoted field
names rather than `file_path"`, `"line"`, `"column"`.
features/steps/tui_persona_cycle_steps.py: include the surrounding
double quotes in the step pattern for "the registry last persona
should be set to ..." so the feature literal `"p2"` matches as `p2`
(without the quotes the placeholder captured `"p2"` and the equality
check against the registry value failed).
src/cleveragents/tui/persona/registry.py: reject absolute paths from
`resolve_export_path` and `resolve_import_path` with the messages the
"Persona export/import rejects absolute path targets" scenarios in
features/repl_input_modes.feature expect. The previous behaviour
silently accepted absolute paths, defeating the working-directory
sandboxing intent.
ISSUES CLOSED: #5663
LspRuntime.__init__ and LspActorService.__init__ used ``x or Y()`` to
default the registry/runtime kwargs. LspRegistry defines __len__, so an
empty instance is falsy, and the OR silently discarded a caller-supplied
empty registry — making the constructor parameter unusable. Replace with
explicit ``is None`` checks so callers can inject collaborators at
construction time. The previous workaround in lsp_actor_service_steps.py
reached into ``service._runtime._registry`` to compensate; the steps now
inject via the public LspRuntime + LspActorService constructors, no
private-attribute access.
Also deconflict three behave AmbiguousStep collisions in the bundled TUI
persona work that prevented behave-parallel from registering any step
definitions (the unit_tests gate was aborting at load time):
* tui_persona_cycle_steps.py duplicated the registry-setup and active-
persona steps already defined in tui_persona_system_steps.py — drop
the duplicates and let the system file own them.
* tui_persona_state_coverage_steps.py / .feature shared
``the registry last persona should be set to "X"`` with
tui_persona_cycle_steps.py while asserting on a different mock —
rename the coverage step to ``the mock registry set_last_persona
should have been called with "X"``.
* lsp_actor_service_steps.py registered the "actor bindings are
activated" step under @when only; the deactivate scenario uses it
after a ``Given/And`` chain, so behave inherited Given and the step
was undefined. Register the same handler under both @given and
@when.
Reformat three files that ``ruff format --check`` flagged
(tui_persona_cycle_steps.py, tui_persona_state_coverage_steps.py via
the rename, tui/persona/state.py) so the lint gate goes green.
ISSUES CLOSED: #5663
- Replace standard logging with structlog in LspActorService to fix typecheck errors (structlog uses keyword arguments for structured logging, not positional like stdlib logging)
- Fix LspServerConfig command field: use str not list[str] in test step definitions
- Add _MockLifecycleManager stub to prevent real LSP server process spawning during unit tests
- Rename duplicate step "a clean LSP registry" to "a clean LSP actor service registry" to avoid conflict with lsp_registry_steps.py
- Fix B904 lint error: raise ValueError from None in except clause
- Add LspActorService to manage LSP server lifecycle for actors
- Implement activate_actor_bindings() to start servers and generate tool specs
- Implement deactivate_actor_bindings() to release server references
- Add BDD tests for LSP actor service wiring
- Add step definitions for LSP actor service tests
Fixes#5663
- Replace deprecated typing imports (Dict, Callable, Generic) with
collections.abc.Callable and built-in dict
- Convert Command from ABC to plain base class (B024: no abstract methods)
- Convert CommandHandler to PEP 695 type parameter syntax (UP046)
- Remove unused PlanService/ProjectService imports from command_registry
- Fix ruff format: blank line before nested defs in command_registry and steps
- Rename @then('a ValueError should be raised') to domain-specific suffix
to avoid AmbiguousStep collision with lsp_registry_steps.py
ISSUES CLOSED: #8880
Implemented a command bus architecture to decouple CLI command handling from application services. Added command_bus.py with Command, CommandHandler, and CommandBus classes, and command_registry.py to register handlers. Introduced BDD tests at features/cli_command_bus_decoupling.feature and corresponding step definitions in features/steps/cli_command_bus_steps.py to verify the decoupling behavior.
ISSUES CLOSED: #8880
- Add __allow_unmapped__ = True and type: ignore[misc] to CostEntry model
- Import typing.cast and use cast() for all SQLAlchemy column attribute accesses
- Wrap long __init__ signature to stay within 88-char line limit
- Wrap long docstring lines to stay within 88-char line limit
- Wrap long query chains to stay within 88-char line limit
- Replace non-existent 'session create --name' with 'session create --format json'
- Replace non-existent 'plan create --session --description' with 'plan list --format json'
- Replace 'session delete <name>' with 'session delete <ULID> --yes' using extracted session ID
- Remove invalid '--format json' from context list/show commands that don't support it
- Use Safe Parse Json Field keyword to extract session_id from JSON output
- Align all test commands with actual CLI interface
- Add test_a2a_local_facade.robot with session and plan lifecycle tests
- Add test_context_workflow.robot with context configuration and execution tests
- Tests validate output format matches specification
- Tests run against real CLI without mocking
- Covers A2A session initialization, plan creation, listing, and deletion
- Covers context loading, validation, and plan execution workflows
Restores green unit_tests by removing the duplicate Pydantic virtual-resource
implementation that had no production consumers and was causing behave step
collisions, fixing parse-library step patterns that never matched, and giving
the failing-test scenarios concrete step definitions.
Changes:
- Remove unused parallel implementation `src/cleveragents/domain/models/core/
virtual_resource.py`, its feature file `features/virtual_resource_types.feature`,
and its step file `features/steps/virtual_resource_types_steps.py`. The
canonical `src/cleveragents/resource/virtual.py` (re-exported by
`src/cleveragents/resource/__init__.py`) is the only public API; the
Pydantic copy had zero non-test consumers and its step file duplicated
step text patterns (e.g., `the computed value should be ...`), triggering
`behave.step_registry.AmbiguousStep` errors at module load.
- Fix `VirtualResource.__init__` name validation in
`src/cleveragents/resource/virtual.py`: replace the
`name.replace("-", "").replace("_", "").isalnum()` check with a single
regex `^[a-zA-Z][a-zA-Z0-9_-]*$`. The old check accepted leading digits
(e.g., `"123-invalid"` would strip the hyphen and pass `isalnum()`), so
the "Reject invalid resource names" scenario was silently failing.
- Fix step patterns in `features/steps/resource_virtual_types_steps.py`:
replace unsupported `{name!r}` parse-library syntax with literal-quoted
`"{name}"` (confirmed via `parse.parse(...)` REPL that `!r` returns
`None`); rename the over-broad `it should contain "{text}"` /
`it should raise {error_type} with message containing "{message}"`
patterns to specific forms that don't collide with steps in
`execution_environment_steps.py` and `structural_validation_steps.py`;
add try/except in the `When I compute the virtual resource` step so the
exception-handling scenario can reach its `Then` step.
- Fix table headers in `features/resource_virtual_types.feature` so behave's
table parser sees a proper `| name | value |` header row instead of
treating the first data row as headers.
- Drop the now-unused E501 override for the deleted file from `pyproject.toml`.
- Add CHANGELOG.md entry under `[Unreleased]`.
Verified locally: unit_tests gate against `features/resource_virtual_types.feature`
passes 18/18 scenarios; lint and typecheck both green.
Refs: #8610
- Remove # type: ignore from resource_virtual_types_steps.py (zero tolerance)
- Replace all eval() calls with ast.literal_eval() and _parse_lambda_body() helper
- Fix step mismatch: 'the complex computed value should be correct'
- Fix trailing whitespace and import ordering (W293, I001, RUF100)
- Fix B011 assert False -> raise AssertionError()
- Fix UP035/UP045/UP046 modernisation in domain model and resource virtual module
- Fix RUF022 __all__ sorting in resource/__init__.py
- Fix E501 long lines in virtual_resource.py via per-file-ignores
- Assign PR milestone to v3.6.0
- Implement VirtualResource base class for abstract/computed resources
- Add MetricResource example for computed metrics
- Add APIEndpointResource example for API endpoints
- Implement comprehensive BDD tests for virtual resource types
- Full type annotations with Generic support
- Support for on-demand computation via compute_fn
- Support for kwargs passing to compute functions
Closes#8610
- Implement VirtualResource base class with name, description, compute_fn, and metadata
- Implement MetricResource example for computed metrics with unit support
- Implement APIEndpointResource example for API endpoints with HTTP method support
- Add comprehensive BDD tests with 20+ scenarios covering all functionality
- Support on-demand computation via compute_fn callable
- Support metadata management with with_metadata() method
- Full type annotations and Pydantic validation
The BudgetExhaustionEvent validator dropped "daily" from its allowed set, but
the legacy CostTracker in providers/cost_tracker.py still emits "daily" events
for the per-day budget path. That broke two cost_controls.feature scenarios
(BudgetExhaustionEvent accepts daily budget type; CostTracker blocks at 100% of
daily budget). Restore "daily" alongside "plan", "session", "org".
CostTrackingService lived in src/cleveragents/core/cost_tracking.py but imported
from cleveragents.domain.models.core.*, violating the architecture.feature
invariant "core package should be self-contained" (core may only import from
{core, config, shared}). Move the service to application/services/, where
domain imports are permitted, and update the lone caller in the BDD step file.
ISSUES CLOSED: #8609
- Remove triple blank line in steps file (ruff format E303)
- Collapse multiline if conditions in cost_tracking.py (ruff format)
- Add BudgetExceededError to __all__ in exceptions.py
- Fix step_check_budget to pass context.org_accumulator instead of None
- Fix Three-tier scenario amounts so org budget fails first (session $200, org $100)
- Disambiguate @when step using {cost:f} type specifier to avoid AmbiguousStep
- Rename duplicate @then step to avoid conflict with lsp_registry_steps.py
- Add missing column header rows to Gherkin tables in feature file
ISSUES CLOSED: #8609
- Use BudgetLevel.SESSION/ORG string values instead of hardcoded plan/daily in enforce_budget()
- Accept 'session' and 'org' as valid budget_type values in BudgetExhaustionEvent validator
- Add WARNING_THRESHOLD constant instead of magic 0.9 number
- Simplify nested ternary in check_budget() warning logic
- Remove unused OrgCostAccumulator import from cost_tracking.py
- Add missing BDD step definitions for org budget scenarios
- Fix budget_type check in step definitions to use BudgetLevel.SESSION.value
Closes#8609
- Replace hardcoded gpt-4/openai/gpt-4 references with Resolve LLM Actor
keyword so the test falls back to Anthropic when OpenAI is unavailable
- Add explicit return-code check (rc==0) for actor registration in Step 2
- Update CHANGELOG.md with entry for PR #11191
The M2 acceptance test was incomplete (truncated at line 48).
Restore the full test case that exercises the complete M2 milestone:
- Actor YAML compilation and registration
- Resource registration and project creation
- Action creation with custom actor configuration
- Full plan lifecycle: use, strategize, execute, diff, apply
- Verification of plan status and integrity
Exercises real LLM API integration using OpenAI GPT-4 model.
ISSUES CLOSED: #10812