test: add TDD bug-capture test for #1078 — container-instance missing --mount flag #1129

Merged
brent.edwards merged 1 commits from tdd/m5-container-mount-flag into master 2026-03-27 20:33:16 +00:00
+250 -247
View File
@@ -2,42 +2,44 @@
## Unreleased
<<<<<<< HEAD
- Implemented `--mount` flag on `resource add container-instance`. Supports
resource-reference mounts (`--mount local/api-repo:/workspace`) and
host-path mounts (`--mount /var/config:/config:ro`). Multiple `--mount`
flags can be specified. Mount info is persisted as JSON in resource
properties and displayed by `resource show`. (#1078)
- Added TDD bug-capture tests for #1078 — resource add container-instance
missing --mount flag. Three Behave scenarios prove the --mount flag is not
recognised. Uses @tdd_expected_fail until fix is merged. (#1099)
- Added TDD bug-capture tests for bug #1076`use_action()` does not
propagate `automation_profile` to Plan. Three Behave BDD scenarios
propagate `automation_profile` to Plan. Three Behave BDD scenarios
(`@tdd_bug @tdd_bug_1076 @tdd_expected_fail`) verify the full precedence
chain (action, project-scoped config, global default) for automation
profile resolution at `plan use` time. Tests prove the bug exists: the
profile resolution at `plan use` time. Tests prove the bug exists: the
Plan's `automation_profile` is always `None` regardless of the Action's
profile, project config, or global default. The `@tdd_expected_fail` tag
inverts this to a CI pass until the fix is merged. (#1098)
profile, project config, or global default. The `@tdd_expected_fail` tag
inverts this to a CI pass until the fix is merged. (#1098)
- Added TDD bug-capture tests for bug #1022 — InvariantService in-memory
storage only. Four Behave BDD scenarios and three Robot Framework
storage only. Four Behave BDD scenarios and three Robot Framework
integration tests verify invariant persistence across simulated CLI
process restarts. Tests use `@tdd_expected_fail` until bug #1022 is
fixed. (#1032)
process restarts. Tests use `@tdd_expected_fail` until bug #1022 is
fixed. (#1032)
- Added TDD bug-capture test for bug #988 — ReactiveEventBus.emit() swallows
exception details. Behave BDD scenario (`@tdd_bug @tdd_bug_988
@tdd_expected_fail`) captures the missing exception message and traceback in
the emit() exception handler. The test subscribes a handler that raises
exception details. Behave BDD scenario (`@tdd_bug @tdd_bug_988
@tdd_expected_fail`) captures the missing exception message and traceback in
the emit() exception handler. The test subscribes a handler that raises
ValueError with a distinctive message and asserts the message appears in the
structlog warning log — which currently fails, confirming the bug. The
structlog warning log — which currently fails, confirming the bug. The
`@tdd_expected_fail` tag inverts this to a CI pass until the fix is merged.
(#1093)
- Added ResourceHandler sandbox and checkpoint lifecycle methods:
`create_sandbox` (idempotent, delegates to SandboxManager),
`create_checkpoint`, `rollback_to`, and `project_access`. Frozen
`create_checkpoint`, `rollback_to`, and `project_access`. Frozen
dataclass result types (SandboxResult, CheckpointResult, RollbackResult,
AccessResult) added to the handler protocol. GitCheckoutHandler uses
AccessResult) added to the handler protocol. GitCheckoutHandler uses
`git tag` for checkpoint and `git checkout` for rollback.
FsDirectoryHandler uses `shutil.copytree` snapshot and clear-and-restore.
Default `project_access` delegates to PermissionService (local mode =
always permit). (#836)
always permit). (#836)
- Added 5 missing LSP capabilities to `LspCapability` enum: `HOVER`,
`DEFINITIONS`, `SIGNATURE_HELP`, `DOCUMENT_SYMBOLS`, `WORKSPACE_SYMBOLS`.
Renamed `TYPE_INFO` -> `HOVER`, `SYMBOLS` -> `DOCUMENT_SYMBOLS`,
@@ -47,21 +49,21 @@
Extended `initialize()` to advertise all 11 capabilities. Fixed
`workspace_symbols` runtime handler to accept query-only input. (#834)
- Added TDD bug-capture E2E tests for bug #1028 — ACMS indexing pipeline not
wired into CLI. Four Robot Framework E2E tests prove ContextTierService starts
empty on every CLI invocation. Tests use ``@tdd_expected_fail`` until the bug
fix is merged. (#1029)
wired into CLI. Four Robot Framework E2E tests prove ContextTierService starts
empty on every CLI invocation. Tests use `@tdd_expected_fail` until the bug
fix is merged. (#1029)
- Added Fix-then-Revalidate orchestration loop for required validations:
bounded retry with configurable limits (0--100 per Safety Profile),
strategy revision escalation via ``auto_strategy_revision`` float
threshold, user escalation via ``needs_user_escalation`` result flag,
and domain events (``VALIDATION_FIX_ATTEMPTED``, ``VALIDATION_FIX_SUCCEEDED``,
``VALIDATION_FIX_EXHAUSTED``). Validation errors are treated as required
failures regardless of mode. Includes ``auto_validation_fix`` threshold,
per-resource retry tracking, early-exit signalling via ``None`` return from
``FixCallback``, event bus circuit breaker with lock-protected failure
counter, spec-required ``validation_summary`` and
``final_validation_results`` fields on the result model, DI container
registration per ADR-003, and structured logging via ``structlog``.
strategy revision escalation via `auto_strategy_revision` float
threshold, user escalation via `needs_user_escalation` result flag,
and domain events (`VALIDATION_FIX_ATTEMPTED`, `VALIDATION_FIX_SUCCEEDED`,
`VALIDATION_FIX_EXHAUSTED`). Validation errors are treated as required
failures regardless of mode. Includes `auto_validation_fix` threshold,
per-resource retry tracking, early-exit signalling via `None` return from
`FixCallback`, event bus circuit breaker with lock-protected failure
counter, spec-required `validation_summary` and
`final_validation_results` fields on the result model, DI container
registration per ADR-003, and structured logging via `structlog`.
(#583)
- Added LSP resource types: `executable`, `lsp-server`, `lsp-workspace`,
`lsp-document` with parent/child hierarchy, auto-discovery rules, and
@@ -75,53 +77,53 @@
4-layer detection (extension, shebang, UKO, project config). Includes
27 Behave BDD scenarios and 6 Robot integration tests. (#826)
- Added ResourceHandler CRUD and discovery methods: read, write, delete,
list_children, diff, and discover_children. Frozen dataclass result types
list_children, diff, and discover_children. Frozen dataclass result types
(Content, WriteResult, DeleteResult, DiffResult) added to the handler
protocol. GitCheckoutHandler implements all six methods via git plumbing
and filesystem operations. FsDirectoryHandler implements all six via
pathlib/os/difflib. DevcontainerHandler implements read, write, and
discover_children via `devcontainer exec`. DatabaseResourceHandler
inherits NotImplementedError stubs pending connection management. (#827)
protocol. GitCheckoutHandler implements all six methods via git plumbing
and filesystem operations. FsDirectoryHandler implements all six via
pathlib/os/difflib. DevcontainerHandler implements read, write, and
discover_children via `devcontainer exec`. DatabaseResourceHandler
inherits NotImplementedError stubs pending connection management. (#827)
- Implemented ACMS context tier runtime promotion/demotion/eviction:
auto-promotion on access with configurable threshold (default: 5),
time-based staleness enforcement (hot/warm TTL, default: 24h each),
budget-based LRU eviction on hot-tier overflow, and tier transition
event emission (TIER_PROMOTED, TIER_DEMOTED, TIER_EVICTED) via
EventBus. Added `context_tier_promotion_threshold`,
EventBus. Added `context_tier_promotion_threshold`,
`context_tier_hot_ttl_hours`, and `context_tier_warm_ttl_hours`
settings with DI wiring of event_bus into ContextTierService.
Oversized fragments that exceed the entire hot-tier budget are now
redirected to the warm tier with a TIER_DEMOTED event. Promotion
redirected to the warm tier with a TIER_DEMOTED event. Promotion
to hot falls back to warm when the promoted fragment is evicted by
budget enforcement. Event emission is best-effort; a failing event
bus no longer breaks tier operations. Added `CLEVERAGENTS_CTX_HOT_HOURS`
budget enforcement. Event emission is best-effort; a failing event
bus no longer breaks tier operations. Added `CLEVERAGENTS_CTX_HOT_HOURS`
env var alias for `context_tier_hot_ttl_hours` for consistency with
the warm-tier alias. Demotion now resets `access_count` to zero so
the warm-tier alias. Demotion now resets `access_count` to zero so
that demoted fragments must accumulate fresh accesses before
re-promotion, preventing staleness enforcement from being immediately
undone by a single access. (#821)
undone by a single access. (#821)
- Added byte-size budget enforcement for the ACMS context assembly
pipeline. `enforce_size_budget()` filters context fragments against
pipeline. `enforce_size_budget()` filters context fragments against
`max_file_size` (per-fragment) and `max_total_size` (cumulative)
limits defined in a `ContextView`. New domain models
limits defined in a `ContextView`. New domain models
`BudgetViolation` and `BudgetEnforcementResult` provide structured
violation reporting. Pipeline integration in `ACMSPipeline.assemble()`
violation reporting. Pipeline integration in `ACMSPipeline.assemble()`
applies enforcement as a pre-filter when a `context_view` is
provided. (#847)
provided. (#847)
- Aligned plan lifecycle model with specification: ERRORED is now
terminal in `is_terminal`, per-phase state validation enforces
APPLIED/CONSTRAINED to APPLY-only and COMPLETE to
STRATEGIZE/EXECUTE-only via model validator, COMPLETE docstring
clarified as phase-level terminal. Added defensive coercion in
clarified as phase-level terminal. Added defensive coercion in
database deserialization for legacy invalid phase/state
combinations with warning-level logging. Fixed assignment ordering
combinations with warning-level logging. Fixed assignment ordering
in `execute_plan()` for consistency with phase-state validator.
Updated `PlanResumeService` docstring to reflect ERRORED
terminality. (#918)
terminality. (#918)
- Fixed `shell=True` subprocess usage in `cli_coverage_steps.py` by replacing
with `shlex.split()` and `shell=False` for defense-in-depth command injection
prevention, consistent with the existing pattern in
`cli_plan_context_commands_steps.py`. (#734)
`cli_plan_context_commands_steps.py`. (#734)
- Added ACMS Backend Abstraction Layer (BAL) protocol definitions and
in-memory stub implementations. Defines `TextBackend`, `VectorBackend`,
and `GraphBackend` protocols with frozen result dataclasses (`TextResult`,
@@ -132,13 +134,13 @@
`override_providers()`. Includes Behave BDD tests (35 scenarios), Robot
Framework smoke tests, ASV benchmarks, and reference documentation. (#498)
- Added TDD bug-capture tests for #1024 — SQLite DB URL resolves to CWD
instead of CLEVERAGENTS_HOME. Behave BDD scenarios
instead of CLEVERAGENTS_HOME. Behave BDD scenarios
(`@tdd_bug @tdd_bug_1024 @tdd_expected_fail`) verify that the default
`database_url` resolves inside `CLEVERAGENTS_HOME`, not the current
working directory. Includes Robot Framework integration tests with a
helper script exercising the same resolution path via subprocess. (#1034)
working directory. Includes Robot Framework integration tests with a
helper script exercising the same resolution path via subprocess. (#1034)
- Added integration Robot Framework test for Specification Workflow Example 7:
CI/CD Integration — Automated PR Review and Fix. Exercises the `ci`
CI/CD Integration — Automated PR Review and Fix. Exercises the `ci`
automation profile (headless, non-interactive) covering: ci-profile
configuration (automation-profile, format, log level), idempotent
resource and project registration with duplicate-detection assertions,
@@ -150,19 +152,19 @@
path checks, and JSON output structure verification
including `plan_id`, `phase`, `state`, `action`, `projects`, and
`arguments` fields.
(`robot/wf07_cicd_integration.robot`, `robot/helper_wf07_cicd.py`) (#771)
(`robot/wf07_cicd_integration.robot`, `robot/helper_wf07_cicd.py`) (#771)
- Added integration Robot Framework test for Specification Workflow Example 14:
Server Mode — Team Collaboration. Exercises server mode configuration,
Server Mode — Team Collaboration. Exercises server mode configuration,
config-registry diagnostics, namespace management, action publishing with
namespaced actor references and supervised profile metadata, shared action
consumption via `use_action()` with required arguments and project links,
and namespace + phase plan monitoring using mocked LLM providers and
in-memory domain services (`CLEVERAGENTS_TESTING_USE_MOCK_AI=true`).
(`robot/wf14_server_mode_integration.robot`,
`robot/helper_wf14_server_mode.py`) (#778)
`robot/helper_wf14_server_mode.py`) (#778)
- Added volatile in-memory `audit_log` to `ReactiveEventBus` — every emitted
`DomainEvent` is appended to a volatile in-memory log accessible via the
`audit_log` property (defensive copy). Emit ordering now follows the
`audit_log` property (defensive copy). Emit ordering now follows the
specification: RxPY stream push, then audit append, then handler dispatch.
Reactive and logging event buses now isolate stream/handler failures so one
subscriber cannot block audit recording or downstream subscribers. The
@@ -170,23 +172,23 @@
`on_next()` bypass), and `ReactiveEventBus` supports explicit in-memory
retention controls via `max_audit_log_size` and `clear_audit_log()`. Includes
expanded Behave and Robot integration coverage, 5 ASV benchmark suites, and
`vulture_whitelist.py` entry. (#587)
`vulture_whitelist.py` entry. (#587)
- **Breaking (CLI):** `agents actor run` now takes positional `<NAME>` and
`<PROMPT>` arguments, aligning the command signature with the specification.
The previous `--prompt/-p` option is removed. `--config/-c` is preserved as
The previous `--prompt/-p` option is removed. `--config/-c` is preserved as
an optional fallback that overrides registry-based name resolution (spec
deviation documented in `_resolve_actor.py`). Shared resolution logic
deviation documented in `_resolve_actor.py`). Shared resolution logic
extracted to `_resolve_actor.py` with `yaml.safe_dump`, early name
validation, input sanitisation, resilient `atexit`-based temp file cleanup,
and graceful error handling for missing actors, empty config data, and
non-serialisable config blobs (without exposing serializer internals in
user-facing errors). Comprehensive BDD and Robot Framework
tests cover all resolution paths and edge cases. (#901)
user-facing errors). Comprehensive BDD and Robot Framework
tests cover all resolution paths and edge cases. (#901)
- Fixed `list_actions()` to query the database when persistence is enabled
so that actions created by previous CLI invocations are visible. Falls
so that actions created by previous CLI invocations are visible. Falls
back to the in-memory cache on database errors or when no Unit of Work
is wired. Added `ActionRepository.list_all()` for unfiltered action
listing. (#760)
is wired. Added `ActionRepository.list_all()` for unfiltered action
listing. (#760)
- Added BuiltinAdapter class and MCP automatic resource slot creation.
BuiltinAdapter wraps register_file_tools/register_git_tools/register_subplan_tool
into a unified adapter interface. McpAdapter.infer_resource_slots() analyzes
@@ -202,32 +204,32 @@
constants), centralized errors.py (cli_error, cli_not_found, cli_warning),
and completion command for shell tab-completion generation. (#861)
- Added tool-level execution environment preferences with NONE, REQUIRED,
PREFERRED, and SPECIFIC modes. ToolRunner routes tool execution based on
preference mode with caller-override precedence. (#879)
PREFERRED, and SPECIFIC modes. ToolRunner routes tool execution based on
preference mode with caller-override precedence. (#879)
- Added Robot Framework integration test suite for Specification Workflow
Example 4: Multi-Project Dependency Update. 8 test cases exercising
supervised automation profile with 4 projects, child plan spawning,
dependency-ordered execution, and coordinated apply. Uses mocked LLM
providers via `CLEVERAGENTS_TESTING_USE_MOCK_AI`. (#768)
- Added TDD bug-capture tests for #969`plan correct` expects `decision_id`
but M3 acceptance test passes `plan_id`. Behave BDD scenarios (revert and
but M3 acceptance test passes `plan_id`. Behave BDD scenarios (revert and
append modes) and Robot Framework integration tests verify that
`request_correction` is called with the root decision ID when a plan_id is
given as the first positional argument. Tests use `@tdd_expected_fail` until
the bug fix is merged. Shared mock fixtures extracted to
`features/mocks/tdd_plan_correct_plan_id_fixtures.py`. (#979)
- Added TDD bug-capture tests for bug #968: ``plan explain`` expects a
decision_id but the M3 acceptance test passes a plan_id. Two Behave BDD
scenarios (``@tdd_bug @tdd_bug_968 @tdd_expected_fail``) verify the fixed
behaviour — ``plan explain <plan_id>`` succeeds (rc=0) and displays
decision details. Includes Robot Framework integration tests with a
given as the first positional argument. Tests use `@tdd_expected_fail` until
the bug fix is merged. Shared mock fixtures extracted to
`features/mocks/tdd_plan_correct_plan_id_fixtures.py`. (#979)
- Added TDD bug-capture tests for bug #968: `plan explain` expects a
decision_id but the M3 acceptance test passes a plan_id. Two Behave BDD
scenarios (`@tdd_bug @tdd_bug_968 @tdd_expected_fail`) verify the fixed
behaviour — `plan explain <plan_id>` succeeds (rc=0) and displays
decision details. Includes Robot Framework integration tests with a
helper script exercising the same CLI path via subprocess, and step
definitions following established patterns. (#978)
definitions following established patterns. (#978)
- Added TDD bug-capture tests for bug #967`plan execute` phase processing.
Tests exercise the CLI orchestration layer via CliRunner (Behave) and
replicated CLI logic (Robot) to verify that `plan execute` correctly
handles plans in Strategize/QUEUED state by running `run_strategize()`
before transitioning. Includes four Behave scenarios and four Robot
before transitioning. Includes four Behave scenarios and four Robot
integration test cases covering CLI execute from QUEUED, full lifecycle
orchestration, positive control, and auto-discovery of QUEUED plans.
(`features/tdd_plan_execute_phase_processing.feature`,
@@ -235,18 +237,18 @@
- **Breaking (behavioral):** `resource_selection` decision type reclassified from
Execute-only to phase-agnostic (valid in both Strategize and Execute).
`DecisionType.RESOURCE_SELECTION` now appears in both `STRATEGIZE_TYPES` and
`EXECUTE_TYPES`. Code relying on `is_strategize_type` or `is_execute_type`
`EXECUTE_TYPES`. Code relying on `is_strategize_type` or `is_execute_type`
returning `False` for `resource_selection` will see different results.
Reclassification aligns with ADR-007 L72 and ADR-033 L74 which permit
resource selection during planning. (#931)
resource selection during planning. (#931)
- Added ResourceHandler CRUD and discovery methods: read, write, delete,
list_children, diff, and discover_children. Frozen dataclass result types
list_children, diff, and discover_children. Frozen dataclass result types
(Content, WriteResult, DeleteResult, DiffResult) added to the handler
protocol. GitCheckoutHandler implements all six methods via git plumbing
and filesystem operations. FsDirectoryHandler implements all six via
pathlib/os/difflib. DevcontainerHandler implements read, write, and
discover_children via `devcontainer exec`. DatabaseResourceHandler
inherits NotImplementedError stubs pending connection management. (#827)
protocol. GitCheckoutHandler implements all six methods via git plumbing
and filesystem operations. FsDirectoryHandler implements all six via
pathlib/os/difflib. DevcontainerHandler implements read, write, and
discover_children via `devcontainer exec`. DatabaseResourceHandler
inherits NotImplementedError stubs pending connection management. (#827)
- Added E2E test for Workflow Example 5: Database Schema Migration with Safety
Nets (review automation profile). Exercises custom resource type registration
(`resource type add`), custom skill creation with spec-aligned database tools
@@ -263,29 +265,29 @@
- Enhanced `CorrectionService` subtree isolation: `analyze_impact()` now
populates `excluded_decisions` and `rollback_tier_depth`; added
`compute_rollback_tier()`, `validate_subtree_isolation()`, and dry-run
report enhancements with tier-0 root-targeted warnings. Fixed status
report enhancements with tier-0 root-targeted warnings. Fixed status
state-machine regression in `execute_revert()` where `analyze_impact()`
overwrote status back to ANALYZING; `execute_revert()` now transitions
through ANALYZING before EXECUTING for correct lifecycle ordering.
Fixed `validate_subtree_isolation()` to check structural-only BFS for
sibling invariant so influence-DAG-caused sibling reachability is not
misreported as a violation. Fixed false-positive cycle-detection warnings
misreported as a violation. Fixed false-positive cycle-detection warnings
from convergent (diamond) topologies by using a global enqueued set in
BFS instead of per-node seen_this_round. Added `dry_run` enforcement
BFS instead of per-node seen_this_round. Added `dry_run` enforcement
guard in `_assert_executable()` to prevent execution of dry-run-only
corrections per spec (§ plan correct --dry-run). Added terminal-state
corrections per spec (§ plan correct --dry-run). Added terminal-state
guard in `analyze_impact()` to reject re-analysis after execution.
Added mode validation in `execute_revert()`/`execute_append()` to
prevent mode-mismatched execution. Fixed `generate_dry_run_report()`
to preserve request status (dry-run is non-mutating). Fixed tier-0
prevent mode-mismatched execution. Fixed `generate_dry_run_report()`
to preserve request status (dry-run is non-mutating). Fixed tier-0
warning to only trigger when target is genuinely in the structural
tree. Fixed `_collect_all_decisions()` to always include the target
decision in the universe. Improved cycle-detection log message
accuracy. Extracted cost/time estimation constants. Fixed
tree. Fixed `_collect_all_decisions()` to always include the target
decision in the universe. Improved cycle-detection log message
accuracy. Extracted cost/time estimation constants. Fixed
`generate_dry_run_report()` to use try/finally for status restoration
so that an exception during `analyze_impact()` does not leave the
request stuck in ANALYZING status. Promoted terminal-status set to
a module-level `_TERMINAL_STATUSES` frozenset constant. Review-cycle
request stuck in ANALYZING status. Promoted terminal-status set to
a module-level `_TERMINAL_STATUSES` frozenset constant. Review-cycle
fixes: fixed `generate_dry_run_report()` to also restore `_impacts`
dict (not only status) so dry-run is fully non-mutating; fixed tier-0
warning to compare against the actual root via `_find_root()` rather
@@ -302,14 +304,14 @@
emission (`_emit_correction_applied`) now includes `attempt_id` and
logs failures at error level; added `max_length=10000` to
`CorrectionRequest.guidance` field; moved status transition after
attempt creation in both execution paths. Includes Behave BDD
attempt creation in both execution paths. Includes Behave BDD
scenarios (influence DAG, append mode, negative isolation validation,
dry-run enforcement, execute-revert end-to-end, status guard, mode
mismatch, single-node tree, terminal state guard, exact-match
affected count, convergent diamond DAG topology, dry-run exception
recovery, execute-revert with influence edges, DAG-only nodes in
excluded set), Robot Framework integration tests, and updated
dry-run report model fields. (#845)
dry-run report model fields. (#845)
- Added deferred physical resource types for git object taxonomy
(`git`, `git-remote`, `git-branch`, `git-tag`, `git-commit`, `git-tree`,
`git-tree-entry`, `git-stash`, `git-submodule`) and filesystem link types
@@ -320,21 +322,21 @@
- Added TDD bug-capture tests for #932 (plan apply missing --yes flag). (#950)
- Modified `auto_progress()` to complete the Apply phase immediately after
transitioning from Execute to Apply, since Apply is a metadata transition
with no LLM processing. This ensures `plan execute` drives the plan to
with no LLM processing. This ensures `plan execute` drives the plan to
the terminal `applied` state when the automation profile permits (ci,
full-auto profiles with `auto_apply < 1.0`).
Extracted `_complete_apply_if_queued()` helper that consolidates the
Apply-completion pattern (start_apply + complete_apply) into a single
method with error recovery (calls `fail_apply` on failure) and async-job
guard (skips inline completion when async execution is enabled to avoid
orphaning enqueued jobs). Used by `auto_progress()`,
orphaning enqueued jobs). Used by `auto_progress()`,
`lifecycle_apply_plan()`, and `try_auto_run()`.
Added `PlanLifecycleService.try_auto_run()` that drives plans through all
lifecycle phases (Strategize → Execute → Apply) when automation-profile
thresholds allow automatic progression; a threshold of 1.0 stops the plan
at that phase boundary for human approval.
Fixed `lifecycle-apply` CLI leaving plans stuck in `apply/queued` without
completing. The command now calls `_complete_apply_if_queued()` when the
completing. The command now calls `_complete_apply_if_queued()` when the
plan is in Apply/queued, driving it to the terminal `applied` state.
Fixed stale RICH output in `lifecycle_apply_plan` that printed
"Plan is now in Apply phase (queued)" after the plan had already reached
@@ -349,14 +351,14 @@
(`src/cleveragents/application/services/plan_lifecycle_service.py`,
`src/cleveragents/cli/commands/plan.py`,
`src/cleveragents/infrastructure/database/repositories.py`,
`docs/reference/plan_cli.md`) (#753)
`docs/reference/plan_cli.md`) (#753)
- Fixed `plan execute` CLI failing with "Plan is not in an executable state
(current: strategize/queued)" after strategize completed successfully.
Root cause: `_get_plan_executor()` created a second `PlanLifecycleService`
Factory instance with its own in-memory `_plans` cache. After the executor's
Factory instance with its own in-memory `_plans` cache. After the executor's
`run_strategize()` advanced the plan to `execute/queued` (via `auto_progress`),
the CLI handler's separate service instance returned stale `strategize/queued`
state from its cache. Fix: `_get_plan_executor()` now accepts an optional
state from its cache. Fix: `_get_plan_executor()` now accepts an optional
`lifecycle_service` parameter; the `plan execute` handler passes its own
service instance so both share the same cache.
(`src/cleveragents/cli/commands/plan.py`)
@@ -371,45 +373,45 @@
- Added M5 (v3.4.0) E2E acceptance test suite `robot/e2e/m5_acceptance.robot`
with 21 zero-mock test cases covering context assembly, context policy
configuration, budget enforcement, context analysis, 10,000+ file scaling,
and plan execution with real LLM calls (`openai/gpt-4o-mini`). (#745)
and plan execution with real LLM calls (`openai/gpt-4o-mini`). (#745)
- Fixed `project context set` writing policy changes via `session.flush()`
instead of `session.commit()`, causing silently lost data on
`session.close()`. (#745)
`session.close()`. (#745)
- Added `session_factory` DI provider to `Container` for CLI project-context
commands. The four `project context` subcommands (`set`, `show`, `inspect`,
commands. The four `project context` subcommands (`set`, `show`, `inspect`,
`simulate`) previously called `container.session_factory()` which did not
exist, causing `AttributeError` at runtime. (#745)
exist, causing `AttributeError` at runtime. (#745)
- Added Google/Gemini API key pattern (`AIzaSy...`) to secret redaction in
`redaction.py`. (#745)
`redaction.py`. (#745)
- Added `--skill <SKILL>` repeatable flag to `agents actor run` and
`actor-run` CLI commands. The flag resolves named skills from the
`actor-run` CLI commands. The flag resolves named skills from the
Skill Registry at runtime and merges their tools into agents that
already have configured tools, enabling ad-hoc skill injection
without modifying YAML configuration. Skill resolution uses the
without modifying YAML configuration. Skill resolution uses the
DI-provided `SkillService` singleton; unknown or invalid skill names
produce a clear error and exit code 2. (#887)
produce a clear error and exit code 2. (#887)
- Added `--execution-env-priority` flag to `agents plan use` command, accepting
`fallback` (default) or `override` to control execution environment routing
precedence per ADR-043. Includes `ExecutionEnvPriority` StrEnum on the domain
precedence per ADR-043. Includes `ExecutionEnvPriority` StrEnum on the domain
model, domain-level model validation (priority requires environment),
`as_cli_dict()` support for both `execution_environment` and
`execution_env_priority`, database persistence via new columns on
`LifecyclePlanModel` with Alembic migration, and a `save_plan()` service
method to re-persist CLI overrides after plan creation. (#886)
method to re-persist CLI overrides after plan creation. (#886)
- Added estimation actor support and role-aware actor validation for issue #650.
- **Schema/validation:** introduced `role_hint` and `response_format` fields,
plus role-aware compatibility warnings through shared validation helpers.
- **Preflight/CLI wiring:** aligned actor registration and preflight warning
paths to use the same warning logic and resolved estimation actor configs
before preflight compatibility checks.
- **Examples/docs/tests:** added `examples/actors/estimator.yaml`, updated
actor example docs, and expanded Behave/Robot coverage for estimator schema
and warning scenarios.
- **E2E helper behavior:** aligned M1/M2/M3/M6 integration helper handling so
missing OpenAI provider keys in local environments are controlled non-crash
outcomes while tracebacks/unexpected internal failures still fail.
- Runtime enforcement of `response_format` in provider invocation remains
planned and tracked via TODO comments in runtime code. (#650)
- **Schema/validation:** introduced `role_hint` and `response_format` fields,
plus role-aware compatibility warnings through shared validation helpers.
- **Preflight/CLI wiring:** aligned actor registration and preflight warning
paths to use the same warning logic and resolved estimation actor configs
before preflight compatibility checks.
- **Examples/docs/tests:** added `examples/actors/estimator.yaml`, updated
actor example docs, and expanded Behave/Robot coverage for estimator schema
and warning scenarios.
- **E2E helper behavior:** aligned M1/M2/M3/M6 integration helper handling so
missing OpenAI provider keys in local environments are controlled non-crash
outcomes while tracebacks/unexpected internal failures still fail.
- Runtime enforcement of `response_format` in provider invocation remains
planned and tracked via TODO comments in runtime code. (#650)
- Added interactive TUI persona and input-mode support with a dedicated
`agents tui` entry point and Textual app scaffolding. Personas are now
managed as local YAML configs with per-session binding/state, and input
@@ -423,53 +425,53 @@
Behave and Robot. Added regression-guard assertions, cache/singleton
cleanup hardening, and targeted issue-648 review follow-ups. (#648)
- Added four CLI-based integration test cases to M5 E2E verification suite
for v3.4.0 milestone acceptance criteria validation. Tests exercise
for v3.4.0 milestone acceptance criteria validation. Tests exercise
`project create`, `resource add git-checkout`, `project link-resource`, and
`project show` via real subprocess calls to `python -m cleveragents` with
per-test workspace isolation. (#496)
per-test workspace isolation. (#496)
- Fixed `ProjectResourceLinkRepository.create_link()` and `remove_link()`
only calling `session.flush()` without `session.commit()`, causing linked
resource data to be lost between sessions. Added `finally: session.close()`
resource data to be lost between sessions. Added `finally: session.close()`
to both methods to match the session-factory lifecycle pattern used by all
other mutating repository methods. (#496)
other mutating repository methods. (#496)
- Fixed `agents plan execute` always using local-only stub actors that returned
empty changesets instead of invoking real LLM providers. The CLI command only
empty changesets instead of invoking real LLM providers. The CLI command only
performed phase transitions (Strategize → Execute) without ever running the
``PlanExecutor`` to drive the strategize or execute actors. Added
``_get_plan_executor()`` helper that resolves ``ProviderRegistry`` from the DI
container and constructs ``LLMStrategizeActor`` / ``LLMExecuteActor`` for real
LLM calls. Updated ``execute_plan`` CLI to detect plan phase/state and
`PlanExecutor` to drive the strategize or execute actors. Added
`_get_plan_executor()` helper that resolves `ProviderRegistry` from the DI
container and constructs `LLMStrategizeActor` / `LLMExecuteActor` for real
LLM calls. Updated `execute_plan` CLI to detect plan phase/state and
automatically invoke the appropriate actor: strategize actor when the plan is
in ``Strategize/queued``, phase transition for ``Strategize/complete``, and
execute actor for ``Execute/queued``. Existing mock-based tests remain
backward-compatible via duck-typing fallback. New ``llm_actors.py`` module
provides ``LLMStrategizeActor`` (task decomposition) and ``LLMExecuteActor``
(code generation) that resolve ``provider/model`` actor names to LangChain LLM
instances. ``PlanExecutor.__init__`` now accepts optional ``strategize_actor``
and ``execute_actor`` parameters with stub defaults. (#960)
- Fixed `agents action create` missing the `--format`/`-f` flag. All other
in `Strategize/queued`, phase transition for `Strategize/complete`, and
execute actor for `Execute/queued`. Existing mock-based tests remain
backward-compatible via duck-typing fallback. New `llm_actors.py` module
provides `LLMStrategizeActor` (task decomposition) and `LLMExecuteActor`
(code generation) that resolve `provider/model` actor names to LangChain LLM
instances. `PlanExecutor.__init__` now accepts optional `strategize_actor`
and `execute_actor` parameters with stub defaults. (#960)
- Fixed `agents action create` missing the `--format`/`-f` flag. All other
action subcommands (`list`, `show`, `archive`) already accepted `--format`
and routed through `_print_action()`, but `create` was the only one omitted.
Running `action create --config action.yaml --format plain` previously failed
with a Typer unrecognized-option error. Added the `fmt` parameter to the
`create()` function signature and wired it to `_print_action()`. (#959)
with a Typer unrecognized-option error. Added the `fmt` parameter to the
`create()` function signature and wired it to `_print_action()`. (#959)
- Added E2E acceptance test for M2 (v3.1.0): Actor Compiler + Full LLM
Integration. Robot Framework test suite ``robot/e2e/m2_acceptance.robot``
Integration. Robot Framework test suite `robot/e2e/m2_acceptance.robot`
exercises actor YAML compilation into functional graphs, skill registry,
tool lifecycle, and plan execution with a custom actor using real LLM API
keys. Test flow: create temp git repo → register custom actor → register
keys. Test flow: create temp git repo → register custom actor → register
resource and project → create action → run full plan lifecycle (use →
execute strategize → execute → diff → apply) → verify actor compilation
and plan integrity. Uses ``[Tags] E2E``, ``Skip If No LLM Keys``, and
flexible structural assertions with ``expected_rc=None`` for LLM-dependent
commands. (#742)
and plan integrity. Uses `[Tags] E2E`, `Skip If No LLM Keys`, and
flexible structural assertions with `expected_rc=None` for LLM-dependent
commands. (#742)
- Fixed `plan execute` failing with `Error [500] INTERNAL` when run in a
separate CLI process from `plan use`. Root cause: `start_strategize()`
separate CLI process from `plan use`. Root cause: `start_strategize()`
built its action registry from the in-memory `_actions` dict only,
missing DB-persisted actions created by prior CLI invocations. The
missing DB-persisted actions created by prior CLI invocations. The
preflight guardrail then rejected the plan with a `PreflightRejection`
that escaped the CLI error handler (extends bare `Exception`, not
`CleverAgentsError`). Fixes: (1) `start_strategize()` now loads the
`CleverAgentsError`). Fixes: (1) `start_strategize()` now loads the
plan's action from the persistence layer before preflight checks,
(2) `execute_plan` CLI catches `PreflightRejection` for user-friendly
errors, (3) `plan execute` runs the execute phase inline so the plan
@@ -477,19 +479,19 @@
invocation, (4) `lifecycle-apply` handles plans already auto-progressed
to apply/queued by `complete_execute()`.
(`src/cleveragents/application/services/plan_lifecycle_service.py`,
`src/cleveragents/cli/commands/plan.py`) (#746)
`src/cleveragents/cli/commands/plan.py`) (#746)
- Added E2E Robot Framework acceptance test for M6 (v3.5.0) autonomy hardening
milestone. Exercises session CRUD lifecycle, automation-profile list/show/set,
milestone. Exercises session CRUD lifecycle, automation-profile list/show/set,
project init with git-checkout resource, A2A plan lifecycle (use,
lifecycle-list, status, execute, lifecycle-apply), guard enforcement via
automation profiles, and a full autonomy acceptance flow — all via real CLI
invocations. LLM-dependent tests skip gracefully when API keys are absent.
invocations. LLM-dependent tests skip gracefully when API keys are absent.
Hardened shared E2E keywords: safe JSON parsing with multi-object fallback,
git return-code checks, special-character-safe API-key detection, `IF`/`ELSE`
migration from deprecated `Run Keyword If`, per-test teardowns, and
`Force Tags`. Profile list now verifies all 8 built-in profiles. Session
delete confirms removal via re-list. Apply step verifies phase transition.
Execute step asserts plan_id in output. JSON-quoted assertions for short
`Force Tags`. Profile list now verifies all 8 built-in profiles. Session
delete confirms removal via re-list. Apply step verifies phase transition.
Execute step asserts plan_id in output. JSON-quoted assertions for short
profile names (`"ci"`, `"auto"`) prevent false-positive substring matches.
Added four new E2E tests covering remaining acceptance criteria: guard
enforcement with custom profile (denylist, budget caps, tool-call limits),
@@ -497,19 +499,19 @@
pub/sub via plan lifecycle state transitions, and hierarchical decomposition
verification via `plan tree`.
Post-review hardening (PR #803): LLM-dependent tests now Fail instead of
Skip when API keys are present but `plan use` returns non-zero. Event Queue
Skip when API keys are present but `plan use` returns non-zero. Event Queue
test (AC-3) uses hard assertions for state transition verification.
Hierarchical Decomposition test (AC-6) asserts at least one decision node
exists after execution. Guard Enforcement Assertions verify the resolved
profile name matches the expected value. Extracted `Setup Plan Test
Resources` keyword to eliminate repeated boilerplate and bring the file
under the 500-line limit. `Verify Plan In List` and `Full Flow Apply Step`
keywords use hard assertions instead of WARN fallbacks. Profile Precedence
exists after execution. Guard Enforcement Assertions verify the resolved
profile name matches the expected value. Extracted `Setup Plan Test
Resources` keyword to eliminate repeated boilerplate and bring the file
under the 500-line limit. `Verify Plan In List` and `Full Flow Apply Step`
keywords use hard assertions instead of WARN fallbacks. Profile Precedence
test documents that action > global precedence requires production wiring
not yet present in `PlanLifecycleService.use_action`.
(`robot/e2e/m6_acceptance.robot`, `robot/e2e/common_e2e.resource`) (#746)
(`robot/e2e/m6_acceptance.robot`, `robot/e2e/common_e2e.resource`) (#746)
- Added E2E Robot Framework test for Specification Workflow Example 7: CI/CD
Integration — Automated PR Review and Fix. Exercises the `ci` automation
Integration — Automated PR Review and Fix. Exercises the `ci` automation
profile (headless, non-interactive) with JSON output and log-level
configuration, idempotent resource and project registration with `--branch`
and `--description` flags, three-validation registration (source/mode/code)
@@ -519,55 +521,55 @@
`plan execute` for lifecycle progression, `plan status` terminal-state
assertion, plan diff JSON validation, and JSON output verification.
Resource/project naming follows spec convention (`local/ci-workspace` project,
`local/ci-main` resource). Entity creation commands tolerate "already
exists" for CI re-runnability. `Extract JSON Field` keyword handles CLI
`local/ci-main` resource). Entity creation commands tolerate "already
exists" for CI re-runnability. `Extract JSON Field` keyword handles CLI
debug log lines preceding JSON via `JSONDecoder.raw_decode(strict=False)`.
Fail-fast `expected_rc` only where the spec mandates error suppression
(`2>/dev/null || true`); first `resource add` and `project create` now
assert `expected_rc=${0}`. Config assertions use stdout-only matching and
exact equality for the `ci` profile value. Project idempotency verified
with occurrence count. Empty plan-diff stdout logged as warning.
assert `expected_rc=${0}`. Config assertions use stdout-only matching and
exact equality for the `ci` profile value. Project idempotency verified
with occurrence count. Empty plan-diff stdout logged as warning.
Validation naming aligned with spec (`local/ci-lint` per §Example 7).
All `Run Process` calls include `on_timeout=kill` per codebase CI
stability standard. Added `on_timeout=kill` to `Run CleverAgents
Command` and `Create Temp Git Repo` keywords in `common_e2e.resource`
stability standard. Added `on_timeout=kill` to `Run CleverAgents
Command` and `Create Temp Git Repo` keywords in `common_e2e.resource`
for consistent timeout handling across all E2E suites.
Dynamic actor selection based on available API keys (same pattern as
`m6_acceptance.robot`) avoids runtime failure when only one provider
key is set. `Poll Plan Until Terminal` keyword now integrated into
the CI Plan Launch test case per spec Step 3 polling loop. Replaced
key is set. `Poll Plan Until Terminal` keyword now integrated into
the CI Plan Launch test case per spec Step 3 polling loop. Replaced
local `Extract JSON Field` with shared `Safe Parse Json Field` from
`common_e2e.resource`. Added `Force Tags E2E` and per-test
`[Teardown]` blocks. Added `WF07 Suite Setup` keyword for database
`common_e2e.resource`. Added `Force Tags E2E` and per-test
`[Teardown]` blocks. Added `WF07 Suite Setup` keyword for database
initialisation.
Added `robot/common_vars.py` module placeholder for shared Robot
Framework variables.
(`robot/e2e/wf07_cicd.robot`, `robot/e2e/common_e2e.resource`,
`robot/common_vars.py`) (#753)
`robot/common_vars.py`) (#753)
- Added E2E Robot Framework test for Specification Workflow Example 14: Server
Mode — Team Collaboration. Exercises server mode configuration (server URL,
Mode — Team Collaboration. Exercises server mode configuration (server URL,
token, namespace), diagnostics, action publishing to team namespace with
namespace-scoped listing, actor registration, plan list smoke test, and
`supervised` automation profile verification with threshold field assertions
via real CLI with zero mocking. (`robot/e2e/wf14_server_mode.robot`) (#760)
via real CLI with zero mocking. (`robot/e2e/wf14_server_mode.robot`) (#760)
- Fixed `agents session list`, `agents session create`, and other session
subcommands raising `AttributeError: 'DynamicContainer' object has no
attribute 'db'` after `agents init`. Root cause: `_get_session_service()`
called `container.db()` but no `db` provider existed. Added a
attribute 'db'` after `agents init`. Root cause: `_get_session_service()`
called `container.db()` but no `db` provider existed. Added a
`session_service` DI provider in `container.py` that builds the engine,
sessionmaker, and auto-committing repositories. Rewrote
sessionmaker, and auto-committing repositories. Rewrote
`_get_session_service()` to resolve via the container with module-level
caching. Added `auto_commit` parameter to `SessionRepository` and
caching. Added `auto_commit` parameter to `SessionRepository` and
`SessionMessageRepository` to prevent resource leaks in CLI context while
preserving Unit-of-Work semantics. Unified error handling across all 7
session subcommands. Includes Behave BDD regression scenarios, Robot
preserving Unit-of-Work semantics. Unified error handling across all 7
session subcommands. Includes Behave BDD regression scenarios, Robot
Framework integration smoke tests, and structlog isolation for parallel
test execution. (#554, #570, #680)
test execution. (#554, #570, #680)
- Added Robot Framework E2E acceptance test for M1 (v3.0.0) milestone.
Tests the complete plan lifecycle (action create → resource add → project
create → plan use → plan execute strategize → plan execute → plan diff →
plan apply) with real LLM API keys and no mocking. Gracefully skips when
API keys are absent. (#741)
plan apply) with real LLM API keys and no mocking. Gracefully skips when
API keys are absent. (#741)
- Added dedicated E2E test infrastructure: new `nox -s e2e_tests` session
running Robot Framework with `--include E2E` tag filter against `robot/e2e/`
directory, dedicated CI job with real LLM API key secrets, graceful skip
@@ -575,28 +577,28 @@
test session. Includes a minimal smoke test exercising `agents --version`
and `agents --help`. (#740)
- Implemented `tdd_expected_fail` tag handling in Robot Framework via a Listener v3
module (`robot/tdd_expected_fail_listener.py`). Tests tagged `tdd_expected_fail`
module (`robot/tdd_expected_fail_listener.py`). Tests tagged `tdd_expected_fail`
that fail have their result inverted to pass (expected failure); tests that
unexpectedly pass are reported as failed with guidance to remove the tag. Tag
validation enforces `tdd_bug` + `tdd_bug_<N>` prerequisites. Includes
unexpectedly pass are reported as failed with guidance to remove the tag. Tag
validation enforces `tdd_bug` + `tdd_bug_<N>` prerequisites. Includes
idempotency guard against double-invocation, explicit SKIP status handling,
and a `close()` hook for clean teardown. Listener is registered in the nox
`integration_tests` and `slow_integration_tests` sessions. Fixture files are
excluded from the main pabot runner via `tdd_fixture` tag. Includes 9 Robot
Framework integration test cases. (#628)
and a `close()` hook for clean teardown. Listener is registered in the nox
`integration_tests` and `slow_integration_tests` sessions. Fixture files are
excluded from the main pabot runner via `tdd_fixture` tag. Includes 9 Robot
Framework integration test cases. (#628)
- Added TDD-style failing Behave BDD tests for the session list DI container
missing `db` provider bug. Three scenarios exercise `session list`,
missing `db` provider bug. Three scenarios exercise `session list`,
`_get_session_service()`, and `session list --format json` through the real
DI path. Includes Robot Framework smoke tests and ASV benchmarks. Tests
are intentionally failing (``@tdd_expected_fail``) until the bug fix for
#554 is applied. (#631)
DI path. Includes Robot Framework smoke tests and ASV benchmarks. Tests
are intentionally failing (`@tdd_expected_fail`) until the bug fix for
#554 is applied. (#631)
- Added TDD-style failing Behave BDD tests for the session create DI container
missing `db` provider bug. Three scenarios exercise `session create`,
missing `db` provider bug. Three scenarios exercise `session create`,
`session create --actor`, and `session create --format json` through the
real DI path. Includes Robot Framework smoke tests and ASV benchmarks.
Tests are intentionally failing (``@tdd_expected_fail``) until the bug fix
for #570 is applied. (#630)
real DI path. Includes Robot Framework smoke tests and ASV benchmarks.
Tests are intentionally failing (`@tdd_expected_fail`) until the bug fix
for #570 is applied. (#630)
- Implemented UKO Layer 2 paradigm vocabulary specializations: Object-Oriented
(`uko-oo:`), Functional (`uko-func:`), and Procedural (`uko-proc:`). Added
OWL/Turtle class and property definitions for all three paradigms in
@@ -619,15 +621,15 @@
insertions. Includes OWL/Turtle ontology files, ProvenanceInfo model with 2
required fields (source_resource, source_path) and 3 defaulted fields
(source_range, valid_from, is_current), build_detail_level_map/resolve_detail_level
utilities, and full Behave BDD tests (78 scenarios, 200 steps). (#576)
utilities, and full Behave BDD tests (78 scenarios, 200 steps). (#576)
- Added `RepoIndexingService` for repository file indexing with incremental
refresh, extension-based language detection, SHA-256 content hashing, and
token estimation. Supports policy enforcement via include/exclude globs,
token estimation. Supports policy enforcement via include/exclude globs,
max file size, and max total size limits from project `ContextConfig`.
Persists index metadata and per-file records to SQLite via `RepoIndexModel`
and `IndexedFileModel`. Domain models (`IndexStatus`, `FileRecord`,
and `IndexedFileModel`. Domain models (`IndexStatus`, `FileRecord`,
`IndexMetadata`, `RepoIndex`) are frozen Pydantic v2 with ULID IDs and UTC
datetimes. Wired into the DI container. Includes 28 Behave BDD scenarios,
datetimes. Wired into the DI container. Includes 28 Behave BDD scenarios,
3 Robot Framework integration tests, ASV benchmarks (5 time + 2 track), and
reference documentation. (#195)
- Wired retry policies and circuit breakers into the service layer.
@@ -659,7 +661,7 @@
as failed with guidance to remove the tag. Tag validation enforces `@tdd_bug` +
`@tdd_bug_<N>` prerequisites. Implemented via `Scenario.run()` monkey-patch in `before_all`.
Includes 34 Behave BDD scenarios (19 tag-validation, 14 infrastructure, and
1 demo) and 12 Robot Framework integration test cases. (#627)
1 demo) and 12 Robot Framework integration test cases. (#627)
- Wired `AuditService.record()` into domain services via EventBus auto-dispatch.
Created `AuditEventSubscriber` that subscribes to 9 security-relevant event types
(`plan_applied`, `plan_cancelled`, `resource_modified`, `correction_applied`,
@@ -681,8 +683,8 @@
23 Behave BDD scenarios, 5 Robot Framework integration tests, and ASV benchmarks.
(#581)
### Added
- Resource type single-inheritance via `inherits` field (ADR-042) (#513)
- Inheritance chain resolution, field merging, and polymorphic type matching
- `ToolRegistry.find_tools_for_resource()` for polymorphic tool binding
@@ -692,57 +694,57 @@
- Fixed `agents actor list` raising a validation error on fresh projects.
`ActorRegistry._actor_name()` built names via `f"{provider}/{model}"`,
which produced names with 2+ slashes when providers had models containing
`/` (e.g. OpenRouter's `anthropic/claude-sonnet-4-20250514`). Now sanitises
`/` (e.g. OpenRouter's `anthropic/claude-sonnet-4-20250514`). Now sanitises
both provider and model names by replacing `/` with `-` and lowercasing to
satisfy the spec pattern. **Note:** provider/model names are now lowercased;
satisfy the spec pattern. **Note:** provider/model names are now lowercased;
existing mixed-case built-in actors will be superseded by lowercased versions
on the next `ensure_built_in_actors()` call.
Includes Behave BDD regression scenarios, Robot Framework integration
smoke tests, and ASV benchmarks. (#592)
smoke tests, and ASV benchmarks. (#592)
- Added TDD regression tests for `agents session list` DI container wiring
error (bug #554). `_get_session_service()` calls `container.db()` but the
`Container` class has no `db` provider, raising `AttributeError`. Includes
error (bug #554). `_get_session_service()` calls `container.db()` but the
`Container` class has no `db` provider, raising `AttributeError`. Includes
10 Behave BDD scenarios (`@tdd_bug @tdd_bug_554 @tdd_expected_fail`)
covering empty list, empty-list format validation (JSON/YAML/plain),
init-then-list lifecycle, post-create list, rich/JSON/plain/YAML output
formats, and stderr error-path assertions. Robot Framework integration
smoke tests and ASV service-layer benchmarks. Implements
formats, and stderr error-path assertions. Robot Framework integration
smoke tests and ASV service-layer benchmarks. Implements
`@tdd_expected_fail` infrastructure (Behave `after_scenario` hook and Robot
listener) and migrates 18 existing TDD scenarios from `@tdd @bugNNN` to
`@tdd_bug @tdd_bug_NNN` convention. (#554)
`@tdd_bug @tdd_bug_NNN` convention. (#554)
- Added TDD regression tests for `agents session create` DI container wiring
error (bug #570). `_get_session_service()` calls `container.db()` but the
`Container` class has no `db` provider, raising `AttributeError`. Same root
cause as #554. Includes 4 Behave BDD scenarios
error (bug #570). `_get_session_service()` calls `container.db()` but the
`Container` class has no `db` provider, raising `AttributeError`. Same root
cause as #554. Includes 4 Behave BDD scenarios
(`@tdd_bug @tdd_bug_570 @tdd_expected_fail`), Robot Framework integration
smoke tests, and ASV service-layer benchmarks. Tests exercise the real DI
smoke tests, and ASV service-layer benchmarks. Tests exercise the real DI
path with `_service = None` and a file-based SQLite database.
Also implements the `@tdd_expected_fail` inversion infrastructure:
a Behave `after_scenario` hook in `features/environment.py` that flips
pass/fail for `@tdd_expected_fail` scenarios, and a Robot Framework
Listener API v3 plugin (`robot/tdd_expected_fail_listener.py`) with
identical semantics. Migrates 18 existing TDD scenarios from the old
identical semantics. Migrates 18 existing TDD scenarios from the old
`@tdd @bugNNN` convention to standardised `@tdd_bug @tdd_bug_NNN` tags.
(#570)
- Fixed intermittent race condition in M4 validation integration tests when
running under pabot. Root cause was three-pronged: shared SQLite DB URL,
running under pabot. Root cause was three-pronged: shared SQLite DB URL,
shared CLEVERAGENTS_HOME directory, and singleton leaks in chained CLI
helper invocations. Introduced composable `Setup Database Isolation`
helper invocations. Introduced composable `Setup Database Isolation`
keyword in `common.resource`, per-suite temp directories, and centralised
`reset_global_state()` in `robot/helpers_common.py`. Added `timeout=30s`
to all `Run Process` calls in `m4_e2e_verification.robot`. (#563)
`reset_global_state()` in `robot/helpers_common.py`. Added `timeout=30s`
to all `Run Process` calls in `m4_e2e_verification.robot`. (#563)
- Fixed `agents project show` not finding a project immediately after creation.
Extended the `session.commit()` fix from #589 to also cover `update()` and
`delete()` in `NamespacedProjectRepository`, and updated the class docstring
to reflect that all mutating methods now commit within their own session.
Includes 3 Behave BDD regression scenarios, Robot Framework integration
smoke tests, and ASV benchmarks. (#590)
smoke tests, and ASV benchmarks. (#590)
- Fixed `agents project create` not persisting projects to the database.
`NamespacedProjectRepository.create()` called `session.flush()` but never
`session.commit()`, so projects were invisible to subsequent
`agents project list` calls. Added `session.commit()` and a `finally:
session.close()` guard. Includes 4 Behave BDD regression scenarios,
Robot Framework integration smoke tests, and ASV benchmarks. (#589)
`agents project list` calls. Added `session.commit()` and a `finally:
session.close()` guard. Includes 4 Behave BDD regression scenarios,
Robot Framework integration smoke tests, and ASV benchmarks. (#589)
- Added TDD-style Behave BDD tests for the built-in `git-checkout` resource type
bootstrap. Three scenarios: one failing TDD test reproducing bug #524 (no bootstrap
called during init), and two regression tests verifying `bootstrap_builtin_types()`
@@ -847,12 +849,12 @@
Added CLI-exercising integration tests for `plan use`, `plan execute`, and `plan tree`
commands to verify the milestone success criteria through actual Typer CLI invocations.
Split 1074-line helper into six focused modules (`_common`, `_domain`, `_merge`, `_cli`,
`_cli_errors`, dispatcher) under the 500-line limit. Added CLI error-path tests for
`_cli_errors`, dispatcher) under the 500-line limit. Added CLI error-path tests for
read-only plan execute, unavailable action, missing changeset, and empty decision tree.
Extracted `_make_subplan_status` factory, `_assert_exit_code` and
`_assert_mock_called_once*` wrappers, frozen timestamp constant, and `shutil.which`
git pre-check. Removed tautological domain assertions in `plan_tree` and
`parallel_max`. Fixed CONTRIBUTORS.md alphabetical ordering. (#495)
git pre-check. Removed tautological domain assertions in `plan_tree` and
`parallel_max`. Fixed CONTRIBUTORS.md alphabetical ordering. (#495)
- Added minimal LSP server stub with `agents lsp serve` CLI command supporting the
`initialize`, `shutdown`, and `exit` lifecycle handshake over JSON-RPC stdin/stdout
transport with Content-Length header framing. Unsupported methods return `MethodNotFound`
@@ -865,9 +867,9 @@
`docs/reference/lsp_stub.md`. (#203)
- Validated M3 acceptance criteria for v3.2.0 milestone closure. All 10 E2E
verification tests pass against the final implementation, exercising real
CLI command paths (``plan use``, ``plan execute``, ``plan tree``,
``plan explain``, project-scoped ``invariant add/list``, dry-run and live
``plan correct``), database-backed persistence, context snapshots, and
CLI command paths (`plan use`, `plan execute`, `plan tree`,
`plan explain`, project-scoped `invariant add/list`, dry-run and live
`plan correct`), database-backed persistence, context snapshots, and
invariant enforcement during strategize. Added acceptance criteria tags and
milestone documentation to the robot suite. (#494)
- Added scoped backend view filtering for project-resource isolation in ACMS.
@@ -918,7 +920,7 @@
`StrategyRegistry` supports config-driven registration, per-strategy
timeout/max-fragment limits, per-project enable/disable overrides,
plugin discovery from `"module:ClassName"` strings, and validation
that strategies declare supported resource types. (#191)
that strategies declare supported resource types. (#191)
- Fixed `context inspect` to display project-scoped tier fragment counts instead of global
counts. Added `ContextTierService.get_scoped_metrics()` which returns fragment population
counts filtered to the target project while keeping hit/miss counters as global service
@@ -929,7 +931,7 @@
- Wired project context CLI stubs (`inspect`, `simulate`, `set`, `show`) to live ACMS pipeline
services. `context inspect` queries `ContextTierService` for tier metrics and per-project
fragments with optional filtering by strategy, focus area, breadth, and depth. `context
simulate` performs dry-run context assembly using CRP models with configurable token budget
simulate` performs dry-run context assembly using CRP models with configurable token budget
and assembly strategies. `context set` gains 12 ACMS pipeline options (`hot_max_tokens`,
`warm_max_decisions`, `cold_max_decisions`, `summary_max_tokens`, `temporal_scope`,
`auto_refresh`, `focus_area`, `breadth`, `depth`, `assembly_strategy`, `retrieval_strategy`,
@@ -1049,7 +1051,7 @@
tool. (#482)
- Added checkpointing and rollback with `CheckpointService` for creating, listing, pruning,
and deleting sandbox snapshots, and restoring sandbox state via `plan rollback <plan_id>
<checkpoint_id>` CLI command. Checkpoint domain models (`Checkpoint`, `CheckpointMetadata`,
<checkpoint_id>` CLI command. Checkpoint domain models (`Checkpoint`, `CheckpointMetadata`,
`CheckpointRetentionPolicy`, `RollbackResult`) store sandbox refs, decision alignment,
checkpoint type (`pre_write`, `post_step`, `manual`), filesystem path, size, and structured
audit metadata (reason, source tool, phase). Retention policy auto-prunes oldest interior
@@ -1087,19 +1089,19 @@
schemas for refresh output. Updated CLI reference documentation with refresh examples and
caching behavior. (#167)
- Added UKO Layer 0-3 ontology scaffolding (RDF/TTL) aligned with specification
Section 14. Layer 0 (`uko:`) defines InformationUnit, Container, Atom,
Section 14. Layer 0 (`uko:`) defines InformationUnit, Container, Atom,
Annotation, Boundary plus contains/references/dependsOn relationships,
content properties (hasRendering, renderingDepth, hasFullContent),
provenance properties (sourceResource, sourcePath, sourceRange), and
temporal properties (validFrom, validUntil, isCurrent, isRevisionOf).
Layer 1 (`uko-code:`) defines Module, Callable, TypeDefinition, TestCase,
Import plus hasReturnType/hasParameters/testsCallable. Layer 2 (`uko-oo:`)
Import plus hasReturnType/hasParameters/testsCallable. Layer 2 (`uko-oo:`)
defines Class, Interface, Method, Attribute plus inheritsFrom/implements
with `rdfs:subPropertyOf`. Layer 3 is reserved for DetailLevelMap
insertions. Loader supports semantic domain prefixes, hyphenated prefix
with `rdfs:subPropertyOf`. Layer 3 is reserved for DetailLevelMap
insertions. Loader supports semantic domain prefixes, hyphenated prefix
names, full-URI layer detection, multi-parent `rdfs:subClassOf` (DAG
traversal via BFS), `rdfs:domain`/`rdfs:range`/`rdfs:subPropertyOf`
resolution, and non-existent parent validation. (#189)
resolution, and non-existent parent validation. (#189)
- Added ACMS v1 context assembly pipeline with UKO and CRP integration, three
fusion strategies (relevance, recency, tiered), budget-constrained assembly,
and extensible strategy registration. (#188)
@@ -1132,6 +1134,7 @@
`get_role_bindings()`.
### feat(actor): extend hierarchical actor YAML schema and loader
- Extended actor YAML schema with hierarchical graph support: per-node LSP bindings (`lsp_binding`), tool-source references (`tool_sources`), and subgraph `actor_ref`.
- Added graph reachability validation — all nodes must be reachable from `entry_node` via edges or conditional routing targets.
- Improved loader error reporting with YAML line/column positions and Pydantic field-path hints.