fix/1429-node-ref
1186 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2c2b4e8813 |
test(actor): add @tdd_issue_1429 regression tests for actor_ref field reading
CI / push-validation (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 30s
CI / lint (pull_request) Successful in 44s
CI / build (pull_request) Successful in 47s
CI / quality (pull_request) Successful in 50s
CI / typecheck (pull_request) Successful in 1m4s
CI / security (pull_request) Successful in 1m16s
CI / unit_tests (pull_request) Successful in 6m12s
CI / docker (pull_request) Successful in 1m23s
CI / coverage (pull_request) Successful in 16m5s
CI / integration_tests (pull_request) Successful in 22m39s
CI / status-check (pull_request) Successful in 2s
Add Behave feature file and Robot Framework integration tests covering the two compiler functions fixed in issue #1429: - _map_node(): SUBGRAPH node's NodeConfig.subgraph is now populated from node.actor_ref instead of config.get("actor_ref") which always returned None - compile_actor(): metadata.subgraph_refs is now populated from node_def.actor_ref instead of node_def.config.get("actor_ref", "") which always returned an empty string Three Behave scenarios tagged @tdd_issue @tdd_issue_1429 covering: 1. NodeConfig.subgraph field populated from actor_ref (_map_node fix) 2. metadata.subgraph_refs populated from actor_ref (compile_actor fix) 3. Both fields correct together with a realistic actor ref Two Robot Framework integration tests in tdd_actor_compiler_actor_ref_1429.robot with a self-contained Python helper that exercises both code paths in isolation. ISSUES CLOSED: #1429 |
||
|
|
02e51b9298 |
fix(actor): fix lint errors and add regression tests for lsp_binding field (#1432)
CI / build (pull_request) Successful in 34s
CI / helm (pull_request) Successful in 38s
CI / lint (pull_request) Successful in 45s
CI / typecheck (pull_request) Successful in 1m4s
CI / security (pull_request) Successful in 1m10s
CI / quality (pull_request) Successful in 1m16s
CI / push-validation (pull_request) Successful in 18s
CI / unit_tests (pull_request) Successful in 6m32s
CI / docker (pull_request) Successful in 1m37s
CI / coverage (pull_request) Successful in 13m26s
CI / integration_tests (pull_request) Successful in 23m55s
CI / status-check (pull_request) Successful in 4s
- Remove trailing whitespace from blank lines in _extract_lsp_bindings() (W293 at lines 160, 164, 167, 172, 183, 188, 203) - Simplify over-long line 180 (E501): auto_detect=node.lsp_binding.auto - Add Behave scenario verifying NodeLspBinding typed field populates CompilationMetadata.lsp_bindings (features/actor_lsp_binding_field.feature) - Add corresponding @given step using NodeLspBinding in actor_compiler_steps.py - Add Robot Framework regression test case and lsp-binding-field helper command confirming node.lsp_binding is read by compile_actor() - Update CHANGELOG.md and CONTRIBUTORS.md ISSUES CLOSED: #1432 |
||
|
|
92e2585358 |
fix: add missing validations/unit-tests.yaml example
CI / lint (pull_request) Successful in 39s
CI / helm (pull_request) Successful in 32s
CI / build (pull_request) Successful in 32s
CI / push-validation (pull_request) Successful in 31s
CI / quality (pull_request) Successful in 1m0s
CI / security (pull_request) Successful in 1m2s
CI / typecheck (pull_request) Successful in 1m40s
CI / unit_tests (pull_request) Successful in 6m25s
CI / docker (pull_request) Successful in 1m27s
CI / coverage (pull_request) Successful in 10m51s
CI / integration_tests (pull_request) Successful in 22m36s
CI / status-check (pull_request) Successful in 3s
Add the missing workflow validation example and keep the #1039 TDD regression active by removing the expected-fail tag and updating scenario narrative.\n\nTo satisfy the required full quality gates, stabilize flaky integration behavior encountered during this issue run: use a shared SQLAlchemy session in resource DAG scripts, isolate RxPY validation temp paths per test run, extend transient subprocess timeouts/retry behavior, and clear stale pabot worker artifacts before integration runs so repeated nox executions are reliable.\n\nISSUES CLOSED: #1039 |
||
|
|
8ed8750160 |
fix(audit): forward DomainEvent.timestamp to AuditService.record()
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 30s
CI / build (pull_request) Successful in 43s
CI / lint (pull_request) Successful in 55s
CI / quality (pull_request) Successful in 54s
CI / typecheck (pull_request) Successful in 57s
CI / security (pull_request) Successful in 1m28s
CI / integration_tests (pull_request) Successful in 3m4s
CI / unit_tests (pull_request) Successful in 7m30s
CI / docker (pull_request) Failing after 14m0s
CI / coverage (pull_request) Failing after 21m7s
CI / status-check (pull_request) Has been cancelled
AuditService.record() was generating its own timestamp internally, discarding the original DomainEvent.timestamp. This means audit entries recorded when an event was audited, not when the domain event actually occurred, breaking forensic accuracy per §Audit Logging (SEC7). Changes: - Add `timestamp: datetime | None = None` keyword parameter to AuditService.record(). When provided, uses it as created_at; falls back to datetime.now(tz=UTC) for backward compatibility. Applied to both the async queue path and the synchronous DB path. - AuditEventSubscriber._handle_event() now passes timestamp=event.timestamp so the original event creation time is preserved in audit entries. - Add 3 Behave BDD scenarios covering: full pipeline timestamp preservation, direct record() with explicit timestamp, and backward compatibility (record() without timestamp auto-generates created_at). - Add preserve_event_timestamp Robot integration test and helper subcommand. - Add static source check in security_audit.robot verifying the timestamp parameter signature exists. ISSUES CLOSED: #719 |
||
|
|
6a76ea894d |
test(cli): add TDD regression tests for automation_profile._get_service() DI bypass
CI / push-validation (pull_request) Successful in 27s
CI / helm (pull_request) Successful in 30s
CI / lint (pull_request) Successful in 39s
CI / build (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 58s
CI / typecheck (pull_request) Successful in 1m19s
CI / security (pull_request) Successful in 1m20s
CI / integration_tests (pull_request) Successful in 3m43s
CI / unit_tests (pull_request) Successful in 4m33s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 12m0s
CI / status-check (pull_request) Successful in 3s
Three BDD scenarios and two Robot Framework integration tests verifying that _get_service() in automation_profile.py resolves AutomationProfileService through the DI container rather than manually calling create_engine or sessionmaker (bug #990). Bug #990 was fixed by PR #1181 before this TDD test PR merged; the @tdd_expected_fail tag is therefore absent and these tests serve as permanent regression guards confirming the fix remains in place. ISSUES CLOSED: #1031 |
||
|
|
6c684d920f |
test(a2a): cover facade DI fallbacks and message/send validation
CI / lint (pull_request) Successful in 42s
CI / typecheck (pull_request) Successful in 54s
CI / security (pull_request) Successful in 1m7s
CI / push-validation (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 1m13s
CI / integration_tests (pull_request) Successful in 5m0s
CI / unit_tests (pull_request) Successful in 6m13s
CI / docker (pull_request) Successful in 1m25s
CI / coverage (pull_request) Successful in 11m16s
CI / status-check (pull_request) Successful in 3s
Add 5 BDD scenarios to features/a2a_facade_coverage_boost.feature that exercise previously uncovered paths in src/cleveragents/a2a/facade.py: - _handle_message_send raises ValueError on empty session_id (line 469) - _handle_message_send raises ValueError on empty message (line 471) - _build_actor_resolver_for_session_workflow exception fallback (411-425) - _build_actor_options_resolver_for_session_workflow exception fallback (434-452) - _provider_registry property read (line 160) Pushes overall coverage past the 96.5% slipcover --fail-under threshold that the CI / coverage gate enforces; the prior run was 96.4%. |
||
|
|
c77f90b4ff |
fix(sync): add missing coverage scenarios and remove dead _iso_now from sync_models
CI / push-validation (pull_request) Successful in 26s
CI / helm (pull_request) Successful in 28s
CI / lint (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 47s
CI / build (pull_request) Successful in 48s
CI / typecheck (pull_request) Successful in 1m8s
CI / security (pull_request) Successful in 1m17s
CI / integration_tests (pull_request) Failing after 2m54s
CI / unit_tests (pull_request) Failing after 4m48s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
- Remove unused _iso_now() from sync_models.py (dead code: called nowhere in the module; sync_service.py has its own _iso_now()) - Remove now-unused `from datetime import UTC, datetime` import - Add 5 new BDD scenarios covering previously uncovered code paths: - VectorClock.happens_before() TypeError guard (sync_models.py:134-135) - VectorClock.is_concurrent() TypeError guard (sync_models.py:159-160) - process_offline_queue() PULL direction branch (sync_service.py:468-475) - resolve_conflict() last_writer_wins when server entity is newer (sync_service.py:549 else) - SyncService.push() with CLIENT_WINS resolution (_resolve_conflict lines 663-665) - Add corresponding step implementations for the new scenarios ISSUES CLOSED: #1125 |
||
|
|
ee1ec2b56d | chore: worker ruff auto-fix (pre-push lint gate) | ||
|
|
5ede1c018a |
fix(server,sync): use A2aRequest.method not .operation in tests and helpers
The new entity-sync feature introduced A2aRequest with a `method` field (JSON-RPC 2.0 wire format), but several test/helper files used the wrong field name `operation` when constructing requests or logging, and checked non-existent `.status`/`.data` attributes on A2aResponse instead of `.result`/`.error`. Fixes: - asgi_app.py: log `a2a_request.method`, not `.operation` (typecheck error) - server_lifecycle_steps.py: send `method` key in JSON-RPC payload; look up status in `result` dict, not top-level response body - server_lifecycle.feature: expect "healthy" (what the handler returns), not "ok" - entity_sync_steps.py: construct A2aRequest(method=...) not (operation=...); assert on .result/.error instead of .status/.data - robot/helper_entity_sync.py: same method= and result/error fixes across sync_pull, sync_push, sync_status, sync_facade_no_service helpers - robot/helper_server_lifecycle.py: same method= and result path fixes ISSUES CLOSED: #1125 |
||
|
|
ff9c6540a2 |
feat(server): entity sync (_cleveragents/sync/*)
Implement entity synchronization between client and server using the _cleveragents/sync/* A2A extension methods per the specification. Sync models (src/cleveragents/a2a/sync_models.py): - Pydantic v2 models for pull/push/status requests and responses - VectorClock with increment, merge, happens-before, and concurrency detection for distributed conflict detection - SyncEntitySnapshot, SyncConflict, SyncState, SyncQueueEntry models - SyncEntityType enum: actor, skill, action, plan, session - ConflictResolution enum: last_writer_wins, manual, server_wins, client_wins SyncService (src/cleveragents/application/services/sync_service.py): - pull(): download server namespace entities to local cache with incremental sync (since timestamps) and force-overwrite option - push(): push local entity definitions to server namespace with configurable conflict resolution strategy - status(): compare local and server entity versions, detect drift, report local-ahead, server-ahead, and concurrent conflicts - resolve_conflict(): manually resolve detected conflicts with winner selection (local or server) - Offline queue: enqueue_offline() and process_offline_queue() for retry on reconnect, with max-retries enforcement - The local/ namespace is never synced per specification A2A facade (src/cleveragents/a2a/facade.py): - Replaced sync stub handlers with real _handle_sync_pull, _handle_sync_push, _handle_sync_status routing to SyncService - Added sync_service property and TYPE_CHECKING import - Facade returns stubs when no SyncService is registered Tests: - Behave BDD: features/entity_sync.feature (65 scenarios, 247 steps) covering models, vector clocks, pull/push/status, conflict resolution, offline queue, facade integration, constructor validation, edge cases - Robot Framework: robot/entity_sync.robot (8 integration tests) ISSUES CLOSED: #866 |
||
|
|
c690ae12ad |
fix(server): return JSON-RPC -32700 on non-JSON request body
CI / lint (pull_request) Successful in 45s
CI / helm (pull_request) Successful in 30s
CI / typecheck (pull_request) Successful in 1m2s
CI / quality (pull_request) Successful in 1m7s
CI / build (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m13s
CI / push-validation (pull_request) Successful in 27s
CI / integration_tests (pull_request) Successful in 3m1s
CI / unit_tests (pull_request) Failing after 6m17s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
Wrap `await request.json()` in its own try-except for `json.JSONDecodeError` so malformed/non-JSON request bodies yield HTTP 400 with JSON-RPC error code -32700 (Parse error) instead of propagating unhandled to FastAPI's ServerErrorMiddleware and returning HTTP 500. Update the BDD step `step_post_a2a_malformed` to send actual raw non-JSON bytes (`content=b"not-valid-json"`) so the scenario exercises the JSON parse failure path rather than the existing A2aRequest validation path (-32600). ISSUES CLOSED: #863 |
||
|
|
08868e1e55 |
test: boost coverage for server lifecycle and team collaboration
Add Behave BDD scenarios covering: - ServerLifecycle.start() with mocked uvicorn (full lifecycle) - run_server() convenience function with Settings defaults and overrides - Signal handler installation and non-main-thread edge case - TeamCollaborationService validation edge cases (empty args) - SessionRegistry validation edge cases and get_active_sessions - VersionConflictError negative version validation - Untracked resource version stamp creation path These tests cover previously uncovered validation branches and the server lifecycle start/shutdown paths to maintain >=97% coverage. |
||
|
|
32b9e43cc3 | fix: rename cls to klass in _validate_protocol staticmethod for pyright compliance | ||
|
|
b5f56a6fb8 |
feat(server): team collaboration features
Implemented multi-user connection handling with user identity tracking (TeamMember with owner/admin/member/viewer roles), role-based access control (TeamPermission with read/write/admin/manage_members), concurrent session support (SessionRegistry with thread-safe locking and per-user/ per-project queries), and optimistic-locking conflict resolution (VersionStamp with last-writer-wins, reject, and merge strategies). Added TeamCollaborationService as the central orchestrator for all collaboration operations: team membership management, permission enforcement, session lifecycle, and version-stamp conflict detection/ resolution. The service cleans up user sessions when members are removed. Domain models follow existing patterns: Pydantic BaseModel with ConfigDict, StrEnum enums, ULID identifiers, and an error hierarchy rooted in TeamCollaborationError. Includes 48 Behave BDD scenarios (178 steps) covering all models, service operations, and edge cases, plus 15 Robot Framework integration tests for end-to-end workflow validation. ISSUES CLOSED: #863 |
||
|
|
c6ccb85bb8 |
feat(server): ASGI endpoint via uvicorn
Implement FastAPI-based ASGI application served by uvicorn for the CleverAgents server mode. Add health check endpoint, A2A JSON-RPC routing, configurable host:port binding, and graceful shutdown handling. Server launches via `agents server start`. - Add FastAPI ASGI app factory at infrastructure/server/asgi_app.py with /.well-known/agent.json (Agent Card), /health (liveness), and /a2a (A2A JSON-RPC 2.0 dispatch via A2aLocalFacade) - Add ServerLifecycle class at infrastructure/server/server_lifecycle.py wrapping uvicorn.Server with SIGTERM/SIGINT graceful shutdown - Add `agents server start` CLI command with --host, --port, --log-level options, resolving defaults from Settings - Add fastapi>=0.115.0 dependency to pyproject.toml (uvicorn already present) - Add Behave BDD tests (features/server_lifecycle.feature, 20 scenarios) - Add Robot Framework integration tests (robot/server_lifecycle.robot) - Update CHANGELOG.md and vulture_whitelist.py ISSUES CLOSED: #862 |
||
|
|
4a8ede3fb4 |
fix(tests): resolve ambiguous Behave step by using context.last_error
CI / push-validation (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 43s
CI / lint (pull_request) Successful in 1m8s
CI / typecheck (pull_request) Successful in 1m19s
CI / security (pull_request) Successful in 1m19s
CI / quality (pull_request) Successful in 1m18s
CI / integration_tests (pull_request) Successful in 5m9s
CI / unit_tests (pull_request) Successful in 6m15s
CI / docker (pull_request) Successful in 1m24s
CI / coverage (pull_request) Successful in 11m59s
CI / status-check (pull_request) Successful in 3s
Remove duplicate @then step from uow_coverage_boost_steps.py that
conflicted with actor_config_steps.py:168. Both patterns matched
'a ValueError should be raised containing "{...}"' but used different
capture-variable names, triggering AmbiguousStep at import time.
Update the four When steps to store the caught exception in
context.last_error so the existing actor_config_steps assertion handles
the Then clause.
ISSUES CLOSED: #878
|
||
|
|
7536830f85 |
test(postgresql): add BDD coverage for UoW validation, dispose, context manager and is_postgresql ValueError
CI / push-validation (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 31s
CI / build (pull_request) Successful in 45s
CI / quality (pull_request) Successful in 47s
CI / lint (pull_request) Successful in 55s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 1m5s
CI / integration_tests (pull_request) Successful in 3m30s
CI / unit_tests (pull_request) Failing after 3m42s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
Cover previously-uncovered code paths added in the PostgreSQL backend PR: - UnitOfWork argument validation (empty URL, pool_size=0, max_overflow=-1, pool_recycle=-2) - dispose() with active engine (True branch) and without engine (False branch) - __enter__/__exit__ context manager protocol - psycopg2 ImportError path when psycopg2 is unavailable - settings.is_postgresql() except ValueError branch (server_mode + SQLite URL) ISSUES CLOSED: #1118 |
||
|
|
8dde6c81ef |
feat(server): implement PostgreSQL storage backend for server mode
Add PostgreSQL support as the server-mode storage backend alongside existing SQLite for local mode. Verify all ORM models are dialect- agnostic, configure connection pooling for multi-user access, add Docker Compose for local PG development, and wire database URL selection based on deployment mode. Changes: - Add psycopg2-binary dependency to pyproject.toml - Add server_mode, db_pool_size, db_max_overflow, db_pool_recycle settings to Settings with environment variable support - Add resolve_database_url() and is_postgresql() to Settings for mode-aware database URL resolution - Configure UnitOfWork engine creation with pool_size, max_overflow, pool_recycle, and pool_pre_ping for PostgreSQL connections - Update MigrationRunner to handle both SQLite and PostgreSQL backends - Add compare_type=True to Alembic env.py for dialect-aware migrations - Add docker-compose.yml with PostgreSQL 16-alpine for local development - Add Behave BDD feature (14 scenarios) covering settings, pool config, engine creation, ORM dialect compatibility, and migration runner - Add Robot Framework integration tests (12 test cases) for the abstraction layer with requires_postgresql tag for live PG tests Fixes: - Restore require_confirmation parameter to UnitOfWork.__init__ - Add argument validation to UnitOfWork.__init__ (fail-fast) - Add explicit PostgreSQL isolation_level (READ COMMITTED) - Add dispose() method and context manager support to UnitOfWork - Fix MigrationRunner.get_current_revision() to dispose engine - Fix Settings.is_postgresql() to handle ValueError gracefully ISSUES CLOSED: #878 |
||
|
|
6aaf69e0a4 |
feat(server): implement PostgreSQL storage backend for server mode
Add PostgreSQL support as the server-mode storage backend alongside existing SQLite for local mode. Verify all ORM models are dialect- agnostic, configure connection pooling for multi-user access, add Docker Compose for local PG development, and wire database URL selection based on deployment mode. Changes: - Add psycopg2-binary dependency to pyproject.toml - Add server_mode, db_pool_size, db_max_overflow, db_pool_recycle settings to Settings with environment variable support - Add resolve_database_url() and is_postgresql() to Settings for mode-aware database URL resolution - Configure UnitOfWork engine creation with pool_size, max_overflow, pool_recycle, and pool_pre_ping for PostgreSQL connections - Update MigrationRunner to handle both SQLite and PostgreSQL backends - Add compare_type=True to Alembic env.py for dialect-aware migrations - Add docker-compose.yml with PostgreSQL 16-alpine for local development - Add Behave BDD feature (14 scenarios) covering settings, pool config, engine creation, ORM dialect compatibility, and migration runner - Add Robot Framework integration tests (12 test cases) for the abstraction layer with requires_postgresql tag for live PG tests ISSUES CLOSED: #878 |
||
|
|
aecbaa00f6 |
fix(actor): resolve CI failures for config-actor format PR
CI / push-validation (pull_request) Successful in 39s
CI / helm (pull_request) Successful in 46s
CI / build (pull_request) Successful in 49s
CI / lint (pull_request) Successful in 1m14s
CI / quality (pull_request) Successful in 1m14s
CI / typecheck (pull_request) Successful in 1m29s
CI / security (pull_request) Successful in 1m30s
CI / integration_tests (pull_request) Successful in 4m49s
CI / unit_tests (pull_request) Successful in 6m25s
CI / docker (pull_request) Successful in 1m33s
CI / coverage (pull_request) Failing after 11m18s
CI / status-check (pull_request) Failing after 3s
Lint (ruff):
- schema.py: import `cast`, replace non-breaking hyphens, inline SIM103
return, wrap long is_nested_v3 line
- config.py: replace `if k in d: del d[k]` with `pop`, collapse nested
ifs (SIM102)
- format both reformatted-only files (ruff format)
Typecheck (pyright):
- config.py: guard `actor_type.lower()` calls with isinstance checks so
the None branch is type-safe
Unit tests (behave):
- Remove duplicate `@then('v3actor the command ...')` and
`@then('the actor should be registered with type ...')` registrations
that crashed step-registry with AmbiguousStep — shared versions live
in actor_add_v3_schema_validation_steps.py
- Add missing Actor import; drop unused ActorConfiguration / is_v3_yaml
imports and unused provider/model locals
- Populate `context.registered_actor_type` from the upsert call args so
the shared assertion step works for combined-format scenarios
- Add a `@when("I run the actor add command without a name argument")`
step that exercises the CLI's "Actor name is required" validation
path (the previously-active step always supplied a name, masking the
scenario's intent)
ISSUES CLOSED: #11189
|
||
|
|
7b91b66b28 |
Fix actor add --config crash with combined-format config.actor (#11189)
When users register actors via `agents actor add --config` using the
spec-compliant combined config.actor YAML format — either as a compact
string (config:\n actor: "<provider>/<model>") or as a nested dict
(config:\n actor:\n type: llm\n provider: aws) — the CLI crashed
with click.BadParameter: "Invalid value: 'provider' is required" because
the parser did not detect or flatten the nested structure.
Added:
- _detect_nested_config_actor() in schema.py to recognise both
compact-string and nested-dict forms of config-actor format.
- _flatten_config_actor() in schema.py to merge config["actor"]
fields into the dict top-level (removing the wrapper).
- Flattening logic in ActorConfiguration.from_blob() to handle both
string ("<provider>/<model>") and nested-dict forms of config.actor.
- CLI flattening step at the start of `agents actor add` command.
- New BDD scenarios for combined-format registration.
- Unit tests for detection, flattening, schema-v3 detection, and
full from_blob() flow.
ISSUES CLOSED: #11189
|
||
|
|
2dd920078a |
fix(tests): add resolve_actor_options to mock lifecycle helpers
The PR added resolve_actor_options() to StrategyActor, LLMStrategizeActor, and LLMExecuteActor, but the three mock lifecycle SimpleNamespace objects used by tests did not include this method, causing AttributeError at runtime: - features/mocks/mock_strategy_llm.py: make_mock_lifecycle() used by robot/helper_strategy_actor.py (strategy_actor.robot llm-json test) and features/steps/strategy_actor_llm_steps.py - features/steps/llm_actors_coverage_steps.py: _make_mock_lifecycle() used by llm_actors_coverage.feature scenarios - robot/helper_m5_e2e_context.py: inline lifecycle SimpleNamespace used by m5_e2e_verification.robot Execute Phase LLM Uses ACMS Context All three now include resolve_actor_options=MagicMock(return_value=None) matching the None-return contract the actors use when no custom backend is configured. ISSUES CLOSED: #11256 |
||
|
|
d5fd6b1765 |
fix(strategize): propagate actor options.openai_api_base and options.openai_api_key to LLM client creation in Strategize/Execute paths
Extract shared build_llm_kwargs_from_options() utility in actor/config.py that converts actor-level YAML options (openai_api_base, openai_api_key, temperature, max_tokens, etc.) into kwargs for ProviderRegistry.create_llm(). Add options field to ActorConfigSchema so it survives Pydantic validation instead of being silently dropped by extra='ignore' default. Add resolve_actor_options() to PlanLifecycleService and both LifecycleService and PlanLifecycleProtocol protocols so every call site can retrieve the actor's config_blob.options dict. Fix the four call sites that previously called create_llm() with zero extra kwargs, preventing local/custom LLM backends from working: - StrategyActor._execute_with_llm() in strategy_actor.py - LLMStrategizeActor.execute() in llm_actors.py - LLMExecuteActor.execute() in llm_actors.py - SessionWorkflow._resolve_llm() in session_workflow.py Refactor reactive path (stream_router.py, tool_caller.py) to use the shared build_llm_kwargs_from_options() utility instead of inline copies. Wire actor_options_resolver through CLI session builder and A2A facade. ISSUES CLOSED: #11256 |
||
|
|
cb27538a73 |
test(planconfig): add BDD coverage for ThreeWayMergeConflictDetector
CI / lint (pull_request) Successful in 45s
CI / typecheck (pull_request) Successful in 1m12s
CI / security (pull_request) Successful in 1m13s
CI / quality (pull_request) Successful in 40s
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 37s
CI / build (pull_request) Successful in 46s
CI / integration_tests (pull_request) Successful in 4m52s
CI / unit_tests (pull_request) Successful in 6m20s
CI / docker (pull_request) Successful in 1m34s
CI / coverage (pull_request) Successful in 11m20s
CI / status-check (pull_request) Successful in 3s
Add feature file and Behave steps covering all reachable code paths in merge_conflict.py: MODIFY_MODIFY/DELETE/ADD_ADD conflict types, auto- resolution for MODIFY_DELETE/DELETE_MODIFY/convergent ADD_ADD, DELETE_DELETE absence, detect_diff_text formatting, describe_all status types, and direct _analyse_field call for the unreachable ADD_ADD branch. Restores coverage above the 96.5% threshold after the merge_conflict module was added with zero test coverage. ISSUES CLOSED: #11000 |
||
|
|
22831e4f50 |
fix(lsp): make post-spawn logger.info mock selective and remove tdd_expected_fail
CI / lint (pull_request) Successful in 53s
CI / quality (pull_request) Successful in 54s
CI / typecheck (pull_request) Successful in 1m30s
CI / security (pull_request) Successful in 1m32s
CI / helm (pull_request) Successful in 29s
CI / build (pull_request) Successful in 33s
CI / push-validation (pull_request) Successful in 30s
CI / integration_tests (pull_request) Successful in 2m57s
CI / unit_tests (pull_request) Successful in 4m38s
CI / docker (pull_request) Successful in 1m25s
CI / coverage (pull_request) Successful in 13m7s
CI / status-check (pull_request) Successful in 6s
The _info_raises side_effect previously raised RuntimeError on every logger.info call, which caused the pre-Popen "lsp.transport.starting" call (transport.py:109) to raise before subprocess.Popen was ever reached. This meant the cleanup guard at lines 160-186 was never exercised, making the scenario a permanent no-op TDD stub rather than a genuine regression guard. Fix: make _info_raises conditional on the first positional argument being "lsp.transport.started" (the post-Popen message). The pre-Popen "lsp.transport.starting" call now passes through normally, Popen succeeds (mocked), and the RuntimeError is raised inside the guarded try/except block, triggering terminate() + wait() cleanup. Remove @tdd_expected_fail from the scenario since the cleanup code at transport.py:160-186 is in place and the scenario now passes. Closes #7044 |
||
|
|
c2459772eb |
fix(lsp): restore missing else branch for stderr in _make_mock_process
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 34s
CI / lint (pull_request) Successful in 47s
CI / typecheck (pull_request) Successful in 1m8s
CI / quality (pull_request) Successful in 1m14s
CI / security (pull_request) Successful in 1m27s
CI / push-validation (pull_request) Successful in 28s
CI / integration_tests (pull_request) Successful in 3m0s
CI / unit_tests (pull_request) Successful in 4m40s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 11m27s
CI / status-check (pull_request) Successful in 3s
The `else: proc.stderr = stderr` clause was dropped when the helper was extracted into `_ltcov_helpers.py`. `stdin` and `stdout` both have the corresponding else branches; this restores parity so that callers passing a non-"auto" stderr value have it honoured. |
||
|
|
a61d132ac0 |
fix(lsp): fix relative imports and remove unused imports in BDD step files
CI / lint (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 1m4s
CI / security (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m10s
CI / integration_tests (pull_request) Successful in 4m5s
CI / unit_tests (pull_request) Successful in 4m44s
CI / build (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 25s
CI / push-validation (pull_request) Successful in 20s
CI / coverage (pull_request) Has started running
CI / docker (pull_request) Successful in 2m20s
CI / status-check (pull_request) Has been cancelled
- features/steps/lsp_transport_coverage_steps.py: change relative import `from ._ltcov_helpers import build_lsp_frame, ...` to absolute `from _ltcov_helpers import make_mock_process ...`, removing unused `build_lsp_frame` - features/steps/lsp_transport_post_spawn_cleanup_steps.py: remove unused `subprocess` and `MagicMock` imports; fix relative import to absolute; collapse short assert messages to single lines; remove trailing blank line Behave's exec_file loader does not set __name__ in globals, causing relative imports to raise KeyError at step-module load time. Absolute imports work because Behave adds features/steps/ to sys.path. ISSUES CLOSED: #11237 |
||
|
|
daf90ba764 |
fix(lsp): wrap post-Popen init in cleanup guard to prevent orphaned processes
Closes #7044 The StdioTransport.start() method had an unprotected logger.info() call after successful Popen(). If that call raised, the subprocess would leak as an orphaned process. Wrap all post-spawn initialization in a try/except guard: on any exception after spawn, terminate and wait for the process (with kill fallback), reset state to None, then re-raise so callers still get proper error semantics. The existing stop() method cleanup pattern (terminate → wait → kill) is mirrored here for consistency across the transport lifecycle. Tests added: - TDD scenario with @tdd_issue_7044 verifying subprocess cleanup on post-Popen exception and state reset to None - Explicit is_alive() scenarios covering both alive and not-alive states Refactoring: - Extracted _make_mock_process and _build_lsp_frame helpers into a shared _ltcov_helpers module to keep step files under the 500-line CONTRIBUTING.md limit. ISSUES CLOSED: #7044 |
||
|
|
b98c99d93e |
test(integration): add BDD scenarios for full hierarchical plan 4-phase lifecycle execution
CI / push-validation (pull_request) Successful in 20s
CI / build (pull_request) Successful in 32s
CI / lint (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 41s
CI / quality (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 1m7s
CI / security (pull_request) Successful in 1m25s
CI / unit_tests (pull_request) Successful in 6m37s
CI / docker (pull_request) Successful in 1m34s
CI / integration_tests (pull_request) Failing after 18m31s
CI / coverage (pull_request) Successful in 11m2s
CI / status-check (pull_request) Failing after 3s
Adds BDD integration tests (Forgejo #10270) verifying that child plans independently complete all four lifecycle phases: Strategize, Decompose, Execute, and Validate. Scenarios covered: - Happy path: 2-level parent-child hierarchy with full phase execution - Checkpoint: on_subplan_spawn checkpoint creation verification - Max-child-depth: decomposition respects depth limits - Aggregation: parent plan aggregates child results - Failure handling: parent captures child plan failures - Nested: 3-level grandchild hierarchy cascading Uses real (non-mocked) service implementations in in-memory mode. ISSUES CLOSED: #10270 |
||
|
|
6bda792d2b |
fix(tui): subclass Input to override _watch_value and eliminate layout=True per keystroke
Input._watch_value sets self.virtual_size (Reactive layout=True) on every keystroke, keeping Textual's WriterThread write queue permanently non-empty. The queue never reaches qsize()==0 so flush() is never called and typed characters are invisible until Enter drains the queue. Two fixes applied: 1. _PromptTextInput subclasses textual.widgets.Input and overrides virtual_size with Reactive(layout=False). Setting virtual_size in _watch_value no longer triggers refresh(layout=True). Zero type:ignore suppressions — uses proper Textual reactive types. 2. CSS #prompt and #prompt > Input changed from height:auto to fixed heights (3 and 1). This prevents the auto_dimensions guard in _watch_value from adding a second refresh(layout=True) per keystroke. 3 BDD regression scenarios added covering: virtual_size layout=False, _PromptInputBase usage in _TextualPromptInput, and fixed CSS height. ISSUES CLOSED: #11249 |
||
|
|
91691750ed |
fix(reactive): forward actor options block in ToolCallingLLMCaller._resolve_llm
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 42s
CI / build (pull_request) Successful in 47s
CI / lint (pull_request) Successful in 1m10s
CI / typecheck (pull_request) Successful in 1m11s
CI / quality (pull_request) Successful in 1m10s
CI / security (pull_request) Successful in 1m37s
CI / integration_tests (pull_request) Failing after 4m9s
CI / unit_tests (pull_request) Successful in 4m59s
CI / docker (pull_request) Successful in 1m25s
CI / coverage (pull_request) Successful in 11m7s
CI / status-check (pull_request) Failing after 3s
Port the options-block merging logic from SimpleLLMAgent._resolve_llm()
(stream_router.py, added in PR #11225 / commit
|
||
|
|
0bde46f0ff |
fix(tui): update tests for renamed Anthropic model names and fix typer.Exit propagation
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 45s
CI / lint (pull_request) Successful in 1m9s
CI / typecheck (pull_request) Successful in 1m22s
CI / quality (pull_request) Successful in 1m21s
CI / security (pull_request) Successful in 1m30s
CI / integration_tests (pull_request) Successful in 3m20s
CI / unit_tests (pull_request) Successful in 4m57s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 11m3s
CI / status-check (pull_request) Successful in 3s
|
||
|
|
190606d7e6 |
fix(memory): handle langchain-community SQLChatMessageHistory API rename
CI / push-validation (pull_request) Successful in 34s
CI / helm (pull_request) Successful in 44s
CI / build (pull_request) Successful in 49s
CI / lint (pull_request) Successful in 1m4s
CI / typecheck (pull_request) Failing after 1m5s
CI / quality (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m12s
CI / integration_tests (pull_request) Successful in 4m9s
CI / unit_tests (pull_request) Successful in 6m17s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
langchain-community >= 0.3 renamed connection_string to connection in SQLChatMessageHistory.__init__(). Use the new 'connection' kwarg first and fall back to 'connection_string' for older versions. Also updates the test assertion in memory_service_coverage_steps.py to accept either parameter name. Fixes CI errors in: - plan_service_coverage.feature:128,141 - consolidated_misc.feature:1531 |
||
|
|
cdbe504b2c
|
fix(test): use shared in-memory SQLite URI in _ensure_memory_database_url
CI / push-validation (pull_request) Successful in 36s
CI / helm (pull_request) Successful in 44s
CI / build (pull_request) Successful in 48s
CI / lint (pull_request) Successful in 1m10s
CI / typecheck (pull_request) Successful in 1m21s
CI / security (pull_request) Successful in 1m20s
CI / quality (pull_request) Successful in 1m26s
CI / integration_tests (pull_request) Successful in 7m53s
CI / unit_tests (pull_request) Failing after 9m56s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 4s
Replace sqlite:///:memory: with sqlite:///file::memory:?cache=shared to ensure all SQLAlchemy connections within the same process share a single in-memory database. This prevents isolation issues where SQLChatMessageHistory and EntityStore would each create separate in-memory databases, avoiding unexpected errors in CI parallel execution. |
||
|
|
73d3bed2da |
test(persistence): remove stale @tdd_issue tags from EntityStore persistence tests
CI / lint (pull_request) Successful in 49s
CI / push-validation (pull_request) Successful in 33s
CI / helm (pull_request) Successful in 36s
CI / build (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m9s
CI / security (pull_request) Successful in 1m27s
CI / integration_tests (pull_request) Successful in 4m28s
CI / unit_tests (pull_request) Failing after 5m42s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 4s
The _load_from_persistence() and _persist_if_needed() stubs have been replaced with real SQLite persistence implementations, fixing bug #10455. All five scenarios now pass as regular regression tests. Refs: #10455 |
||
|
|
3e13411fcf
|
fix(actors): distinguish namespace/name from provider/model in actor name parsing
CI / lint (pull_request) Successful in 1m17s
CI / typecheck (pull_request) Successful in 2m2s
CI / security (pull_request) Successful in 2m5s
CI / quality (pull_request) Successful in 1m12s
CI / push-validation (pull_request) Successful in 47s
CI / helm (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 1m8s
CI / integration_tests (pull_request) Successful in 4m52s
CI / unit_tests (pull_request) Failing after 6m20s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
When action YAML references actors using namespace/name format (e.g. `strategy_actor: local/my-strategist`), `_parse_actor_name()` incorrectly treated the namespace prefix as a provider name, causing `ValueError: Unknown provider type: local`. Changes: - `_is_known_provider()`: New utility function (strategy_resolution.py) that checks whether a slash-separated first segment matches a known `ProviderType` value (openai, anthropic, etc.). Consolidated into a single implementation; llm_actors.py now imports from strategy_resolution.py. - `_parse_actor_name()`: When the first segment IS a known provider, preserves existing behaviour (provider/model). When it is NOT a known provider, treats the input as namespace/name and returns the full name as the model identifier with the default provider. Callers SHOULD pre-resolve namespace/name references via the actor registry before calling this function. Both implementations (strategy_resolution.py and llm_actors.py) updated; ProviderType import moved to top level. - `PlanLifecycleService.resolve_actor_provider_model()`: New method that resolves a namespaced actor name (e.g. local/my-strategist) to provider/model format by looking up the actor record and extracting its provider and model fields. - `LifecycleService` Protocol (strategy_resolution.py): Added `resolve_actor_provider_model` to the protocol, eliminating the need for `# type: ignore[union-attr]` at call sites. - `PlanLifecycleProtocol` (llm_actors.py): Added `resolve_actor_provider_model` to the protocol. - Caller pre-resolution: StrategyActor, LLMStrategizeActor, LLMExecuteActor, SessionWorkflow._resolve_llm(), and CLI session commands now pre-resolve actor names through the lifecycle service or via injected actor_resolver callables before calling `_parse_actor_name()`, ensuring namespace/name references are correctly mapped to their underlying LLM providers. - `_build_actor_resolver()` (cli/commands/session.py) and `_build_actor_resolver_for_session_workflow()` (a2a/facade.py): Moved `_is_known_provider` imports to top level; removed redundant `except (NotFoundError, Exception)`; added warning logging for outer exception handlers. - `make_mock_lifecycle()` (mock_strategy_llm.py) and `_make_mock_lifecycle()` (llm_actors_coverage_steps.py): Added `resolve_actor_provider_model` to mock lifecycle services for test compatibility. - Added `@tdd_issue @tdd_issue_11254` tags to all new BDD scenarios related to namespace/name disambiguation in llm_actors_coverage, strategy_actor_llm, and plan_lifecycle_service_coverage_boost_r4 feature files. - Updated docs/CHANGELOG.md with the fix entry. ISSUES CLOSED: #11254 |
||
|
|
652769c46c |
feat(tui): wire normal text input to LLM via A2A facade
CI / push-validation (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 42s
CI / build (pull_request) Successful in 42s
CI / lint (pull_request) Successful in 1m6s
CI / quality (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m12s
CI / security (pull_request) Successful in 1m25s
CI / integration_tests (pull_request) Successful in 3m17s
CI / unit_tests (pull_request) Successful in 4m37s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 11m50s
CI / status-check (pull_request) Successful in 5s
Wires the TUI normal text input path to the LLM via A2aLocalFacade, closing the gap where typing a message produced no LLM call. All infrastructure (facade, SessionWorkflow, ProviderRegistry) already existed in the CLI; this PR adds the TUI wiring on top. Key changes: - _run_llm_dispatch(): module-level, Textual-free dispatch function covering all domain exception paths with user-friendly messages - _format_worker_outcome(): testable worker result/error translator - _create_tui_session(): DB-backed session with persona actor binding - _build_tui_facade(): wired A2aLocalFacade + SessionWorkflow singleton - run_worker(thread=True, exclusive=True): non-blocking, serialised - _dispatch_gen counter: prevents cancelled worker callbacks from corrupting the multi-turn transcript - SessionView.transcript: accumulated conversation history, pre-escaped - Markup escaping: _escape() applied before transcript storage - on_mount focus: prompt.focus() so keyboard input is received Tests: 18 BDD scenarios + 6 Robot Framework integration tests with FakeListLLM (no real API keys required). ISSUES CLOSED: #11230 |
||
|
|
3a95701d9a
|
fix(decomposition): enforce plan.max-child-depth recursion limit to prevent unbounded hierarchy growth
CI / lint (pull_request) Successful in 1m19s
CI / quality (pull_request) Successful in 1m39s
CI / typecheck (pull_request) Successful in 1m43s
CI / security (pull_request) Successful in 1m56s
CI / build (pull_request) Successful in 33s
CI / helm (pull_request) Successful in 40s
CI / unit_tests (pull_request) Successful in 6m36s
CI / integration_tests (pull_request) Successful in 3m57s
CI / push-validation (pull_request) Successful in 19s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m46s
CI / status-check (pull_request) Successful in 4s
CI / lint (push) Failing after 12s
CI / typecheck (push) Failing after 11s
CI / integration_tests (push) Failing after 7s
CI / unit_tests (push) Failing after 12s
CI / quality (push) Failing after 12s
CI / security (push) Failing after 13s
CI / coverage (push) Has been skipped
CI / docker (push) Has been skipped
CI / push-validation (push) Failing after 13s
CI / helm (push) Failing after 14s
CI / build (push) Failing after 15s
CI / status-check (push) Failing after 2s
CI / benchmark-regression (push) Failing after 34s
CI / e2e_tests (push) Successful in 1m1s
CI / benchmark-publish (push) Failing after 35m10s
Add max_child_depth field to DecompositionConfig (default: 5, matching plan.max-child-depth config) with validation in __post_init__. Update _build_hierarchy() in DecompositionService to stop recursion and emit a warning when the depth limit is reached. BDD tests verify: max_child_depth guards trigger before max_depth when more restrictive, warnings are logged, default config value is correct, and invalid values are rejected. ISSUES CLOSED: #10269 |
||
|
|
8548644819
|
fix(cli): wire SubplanExecutionService in _get_plan_executor() to enable child plan execution
CI / push-validation (pull_request) Successful in 1m1s
CI / helm (pull_request) Successful in 1m12s
CI / lint (pull_request) Successful in 2m22s
CI / build (pull_request) Successful in 2m17s
CI / typecheck (pull_request) Successful in 3m2s
CI / security (pull_request) Successful in 3m1s
CI / quality (pull_request) Successful in 57s
CI / integration_tests (pull_request) Successful in 5m0s
CI / unit_tests (pull_request) Successful in 6m8s
CI / docker (pull_request) Successful in 1m30s
CI / coverage (pull_request) Successful in 11m51s
CI / status-check (pull_request) Successful in 6s
CI / push-validation (push) Successful in 31s
CI / helm (push) Successful in 37s
CI / build (push) Successful in 1m7s
CI / lint (push) Successful in 1m28s
CI / quality (push) Successful in 1m30s
CI / typecheck (push) Successful in 1m44s
CI / security (push) Successful in 1m49s
CI / benchmark-regression (push) Failing after 40s
CI / e2e_tests (push) Successful in 54s
CI / integration_tests (push) Successful in 3m33s
CI / unit_tests (push) Successful in 5m21s
CI / docker (push) Successful in 1m29s
CI / coverage (push) Successful in 11m6s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Successful in 1h39m32s
Wire subplan_service from the DI container into _get_plan_executor() so PlanExecutor can spawn child plans during the Execute phase. When SubplanService is available but SubplanExecutionService is not explicitly injected, _execute_subplans() now lazily creates a SubplanExecutionService on-the-fly using the parent plan's subplan_config and the new _execute_child_plan callback. - _get_plan_executor(): retrieve subplan_service from container, pass to PlanExecutor constructor - _execute_subplans(): lazily build SubplanExecutionService when only SubplanService is wired (Forgejo #10268) - _execute_child_plan(): new PlanExecutor method that runs a child plan's strategize + execute phases, registered as executor_fn callback ISSUES CLOSED: #10268 |
||
|
|
eb46f0ff54 |
fix(plan): add tier hydration and improve architecture review output (#10938)
CI / push-validation (push) Successful in 40s
CI / helm (push) Successful in 44s
CI / build (push) Successful in 1m14s
CI / lint (push) Successful in 1m18s
CI / quality (push) Successful in 1m36s
CI / e2e_tests (push) Successful in 1m19s
CI / typecheck (push) Successful in 2m22s
CI / security (push) Successful in 2m23s
CI / benchmark-regression (push) Failing after 41s
CI / integration_tests (push) Successful in 4m46s
CI / unit_tests (push) Failing after 20m13s
CI / benchmark-publish (push) Failing after 28m28s
CI / coverage (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / status-check (push) Has been cancelled
## Summary This PR fixes issue #10878 where architecture reviews were truncated because the regex pattern for parsing file output would stop at the first ``` encountered in the Markdown report. ## Changes - Change file delimiters from ``` to >>>>>>>/<<<<<<< to avoid Markdown conflicts - Add tier hydration before strategize phase in plan_executor.py - Increase max_tokens to 16384 in llm_actors.py for longer outputs - Increase context_max_tokens_hot from 16000 to 32000 in settings.py - Fix get_hot_view → get_hot_fragments in strategy_actor.py and plan_executor.py - Add opencode to skip directories in context_tier_hydrator.py - Change sandbox output location to plan-output/ directory in plan.py - Add get_context_summary stub method to acms_service.py ## Testing Run architecture review action and verify the output report is complete with all sections. Reviewed-on: #10938 |
||
|
|
0c5724c2f6 |
feat(actor-run): wire ToolCallingRuntime into actor run for skill-based tool calling
CI / push-validation (pull_request) Successful in 42s
CI / helm (pull_request) Successful in 51s
CI / lint (pull_request) Successful in 1m38s
CI / build (pull_request) Successful in 1m35s
CI / quality (pull_request) Successful in 2m21s
CI / security (pull_request) Successful in 2m26s
CI / typecheck (pull_request) Successful in 2m51s
CI / integration_tests (pull_request) Successful in 4m9s
CI / unit_tests (pull_request) Successful in 6m5s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 10m52s
CI / status-check (pull_request) Successful in 3s
CI / push-validation (push) Successful in 31s
CI / helm (push) Successful in 38s
CI / build (push) Successful in 1m10s
CI / quality (push) Successful in 1m28s
CI / lint (push) Successful in 1m31s
CI / typecheck (push) Successful in 1m53s
CI / security (push) Successful in 2m4s
CI / benchmark-regression (push) Failing after 39s
CI / integration_tests (push) Successful in 3m39s
CI / e2e_tests (push) Successful in 56s
CI / unit_tests (push) Successful in 5m21s
CI / docker (push) Successful in 1m28s
CI / coverage (push) Successful in 11m3s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Successful in 1h23m13s
Implements the full tool-calling path for `agents actor run --skill` so that LLM
actors can actually invoke tools through the ToolCallingRuntime loop when a skill
is attached.
Core changes:
- reactive/tool_caller.py (new): ToolCallingLLMCaller implements the LLMCaller protocol;
binds tool schemas via bind_tools(), threads SystemMessage+HumanMessage on first call
and AIMessage+ToolMessages on subsequent calls, extracts tool calls from LangChain
responses following the LangChainSessionCaller pattern.
- reactive/tool_caller.py: bidirectional tool name encoding via uppercase sentinels
(_encode_tool_name / _decode_tool_name) to make CleverAgents namespaced tool names
("builtin/file-read", "server:local/tool") compatible with Anthropic's tool name
pattern ^[a-zA-Z0-9_-]{1,128}$. Uses _C_ for ":" and _S_ for "/" — uppercase
sentinels are safe because valid CleverAgents tool names forbid uppercase letters.
Encoding applied in _resolve_llm() before bind_tools(); decoding applied in invoke()
when extracting tool calls from the LLM response.
- reactive/tool_agent.py (new): ToolCallingAgent builds a per-run local ToolRegistry from
resolved skill tool entries by looking up names in the shared builtin_registry; drives
ToolCallingRuntime.run_tool_loop(); exposes last_result for tool_calls surfacing.
- reactive/application.py: (ST-1) _make_agent_instance() now always merges skill tools
instead of silently dropping them when actor has no base tools list; routes
tools+llm→ToolCallingAgent, tools+non-llm→SimpleToolAgent, no-tools+llm→SimpleLLMAgent;
(ST-4) _builtin_registry created at startup with register_file_tools/git/subplan;
(ST-6) _tally_tool_calls() + last_run_tool_calls property.
- reactive/graph_executor.py: (ST-5) ToolCallingAgent added to isinstance check in
_invoke_agent() so context dict is forwarded for Jinja2 rendering.
- cli/commands/actor_run.py: prints "Tool Calls: {n}" when > 0.
Test fixes:
- features/steps/actor_cli_run_steps.py: _make_app() sets last_run_tool_calls=0 to avoid
MagicMock>int TypeError in Python 3.13.
- features/steps/actor_run_signature_resolve_steps.py: same fix.
- robot/helper_actor_run_signature.py: same fix.
- features/reactive_application_coverage_boost.feature: updated scenario to verify new
correct behavior (LLM+skills → ToolCallingAgent, not silently kept as SimpleLLMAgent).
BDD coverage: 34 scenarios in features/actor_run_tool_calling.feature covering
tool call success, multi-turn loop, no-skill regression, silent-drop fix, LLMCaller
internals, _build_tool_registry edge cases, last_run_tool_calls tallying,
tool name encoding/decoding, and LLM response decoding.
ISSUES CLOSED: #11211
|
||
|
|
e2167ab8e7 |
fix(acms): use project-level hot_max_tokens in execute phase context assembly
CI / lint (pull_request) Successful in 1m40s
CI / quality (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m46s
CI / helm (pull_request) Successful in 39s
CI / push-validation (pull_request) Successful in 48s
CI / security (pull_request) Successful in 2m11s
CI / build (pull_request) Successful in 1m31s
CI / integration_tests (pull_request) Successful in 4m57s
CI / unit_tests (pull_request) Successful in 6m44s
CI / docker (pull_request) Successful in 1m22s
CI / coverage (pull_request) Successful in 12m7s
CI / status-check (pull_request) Successful in 4s
CI / push-validation (push) Successful in 29s
CI / helm (push) Successful in 37s
CI / lint (push) Successful in 1m14s
CI / build (push) Successful in 1m16s
CI / benchmark-publish (push) Has started running
CI / quality (push) Successful in 1m30s
CI / typecheck (push) Successful in 1m36s
CI / security (push) Successful in 2m14s
CI / benchmark-regression (push) Failing after 44s
CI / e2e_tests (push) Successful in 49s
CI / integration_tests (push) Successful in 4m46s
CI / unit_tests (push) Successful in 5m57s
CI / docker (push) Successful in 1m32s
CI / coverage (push) Successful in 13m20s
CI / status-check (push) Successful in 2s
Fixed _resolve_hot_max_tokens() to read hot_max_tokens from the correct
sub-key in context_policy_json. The value is stored under
context_policy_json["acms_config"]["hot_max_tokens"] by
'agents project context set --hot-max-tokens', not at the top level.
The previous read (config_dict.get("hot_max_tokens")) always returned
None, causing the assembler to silently use the global 16K default even
when a project-level override was configured.
Also adds two Behave regression scenarios with @tdd_issue @tdd_issue_11035
tags that exercise the real DB query code path via a mocked
NamespacedProjectModel row, verifying:
1. hot_max_tokens=32000 in acms_config is applied to CoreContextBudget
and ContextRequest (override path).
2. Missing hot_max_tokens falls back to the constructor-injected global
default of 4096 (fallback path).
Module-level import json added to steps file; redundant inline MagicMock
import removed.
ISSUES CLOSED: #11035
ISSUES CLOSED: #11215
|
||
|
|
b3851693c8 |
fix(reactive): forward actor options block to LLM constructor for custom backend support
CI / push-validation (push) Successful in 38s
CI / helm (push) Successful in 49s
CI / lint (push) Successful in 1m20s
CI / build (push) Successful in 1m13s
CI / quality (push) Successful in 1m38s
CI / typecheck (push) Successful in 2m6s
CI / security (push) Successful in 2m5s
CI / benchmark-regression (push) Failing after 1m3s
CI / e2e_tests (push) Successful in 57s
CI / integration_tests (push) Successful in 4m37s
CI / unit_tests (push) Successful in 7m0s
CI / docker (push) Successful in 1m31s
CI / coverage (push) Successful in 13m59s
CI / status-check (push) Successful in 2s
CI / benchmark-publish (push) Successful in 1h37m21s
Two code paths in the reactive actor run pipeline silently discarded the options: block from v3 actor YAML, preventing custom OpenAI-compatible backends (llama.cpp, Ollama, etc.) from being used. Review fixes applied: - Fix 1: Relabeled issue #11223 from Type/Task to Type/Bug; added @tdd_issue/@tdd_issue_11223 tags to all 5 Behave scenarios. - Fix 2: openai_api_key in options now routes through the registry's __api_key_sentinel mechanism so user-provided keys correctly override environment defaults. (stream_router.py) - Fix 3: type: graph actors now propagate actor-level options to individual node configs via setdefault. (config_parser.py) - Fix 4: Options keys are validated against an explicit allowlist; reserved keys (provider_type, model_id) are excluded; unrecognized keys log a WARNING instead of being silently forwarded. (stream_router.py) - Fix 5: Updated _build_from_v3 docstring to list options as a propagated field. (config_parser.py) - Fix 6: Removed inconsistent and options_raw emptiness guard; empty options dicts are now preserved consistently. (config_parser.py) - Fix 7: Reserved keys provider_type and model_id are excluded from the options merge loop to prevent TypeError. (stream_router.py) - Fix 8: Added Behave scenario verifying top-level temperature takes precedence over options duplicate. (consolidated_routing.feature + steps) - Fix 9: Strengthened "no extra kwargs" assertion to assert kwargs == {} directly instead of using an allow-list filter. (stream_router steps) - Fix 10: Strengthened options assertion to exact dict equality. (actor_v3_schema_extended_steps.py) - N1: Comment style aligned to M5: prefix convention. - N2: Type annotations changed from Any to Context (behave.runner). - N3: Added Behave scenario for empty options: {} dict behavior. Tests: 5 new Behave scenarios (3 in actor_v3_schema.feature, 2 in consolidated_routing.feature) with @tdd_issue/@tdd_issue_11223 tags. ISSUES CLOSED: #11223 |
||
|
|
23d73e7fb2 |
chore: Fix ruff format violations in db_url_sanitisation_steps.py
CI / lint (push) Successful in 56s
CI / typecheck (push) Successful in 1m36s
CI / security (push) Successful in 1m37s
CI / helm (push) Successful in 51s
CI / push-validation (push) Successful in 48s
CI / build (push) Successful in 1m26s
CI / quality (push) Successful in 1m29s
CI / benchmark-regression (push) Failing after 1m47s
CI / e2e_tests (push) Successful in 1m48s
CI / integration_tests (push) Successful in 4m19s
CI / unit_tests (push) Successful in 6m8s
CI / docker (push) Successful in 1m23s
CI / coverage (push) Successful in 10m30s
CI / status-check (push) Successful in 2s
CI / benchmark-publish (push) Successful in 1h26m6s
CI / helm (pull_request) Successful in 47s
CI / push-validation (pull_request) Successful in 47s
CI / build (pull_request) Successful in 1m34s
CI / lint (pull_request) Successful in 2m18s
CI / quality (pull_request) Successful in 2m18s
CI / typecheck (pull_request) Successful in 2m30s
CI / security (pull_request) Successful in 2m36s
CI / integration_tests (pull_request) Successful in 5m23s
CI / unit_tests (pull_request) Successful in 7m48s
CI / docker (pull_request) Successful in 1m34s
CI / coverage (pull_request) Successful in 10m45s
CI / status-check (pull_request) Successful in 3s
Fix formatting issues detected by CI lint check: - Simplify multi-line decorator arguments to single line - Simplify multi-line assertion error messages to single line This resolves the format --check failure blocking CI. |
||
|
|
86f96f299e | fix(cli): Mask database URL credentials in agents info CLI output (#8395) | ||
|
|
5c5309f35d |
fix(ci): add missing effective set count step definition
CI / lint (push) Successful in 50s
CI / benchmark-regression (push) Failing after 46s
CI / typecheck (push) Successful in 1m21s
CI / security (push) Successful in 1m20s
CI / quality (push) Successful in 1m3s
CI / build (push) Successful in 35s
CI / helm (push) Successful in 32s
CI / integration_tests (push) Successful in 3m22s
CI / push-validation (push) Successful in 33s
CI / e2e_tests (push) Successful in 55s
CI / unit_tests (push) Successful in 5m49s
CI / docker (push) Successful in 2m1s
CI / coverage (push) Successful in 13m13s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Failing after 24m24s
The Behave scenario at line 671 of consolidated_domain_models.feature
asserts 'the effective set should have {count:d} invariants' but no
step handler existed, causing UndefinedStepError and CI failure.
Adds the missing step: @then('the effective set should have {count:d} invariants')
to step_invariant_models_steps.py, mirroring the existing invariant-set count pattern.
|
||
|
|
761622f746 |
fix(invariant): pass action_name in list_invariants when scope is ACTION
Fixes list_invariants(effective=True) to forward action_name to get_effective_invariants when scope is ACTION, ensuring action-scoped invariants are included in effective invariant lists. Also applies ruff formatting to the return statement in get_effective_invariants. Addresses reviewer observation about list_invariants gap. Refs: #9126 |
||
|
|
bf52a9c648 |
fix(invariant): restore ACTION scope in merge_invariants and InvariantSet.merge precedence chain
The 4-tier invariant precedence chain (plan > action > project > global) was broken at the domain layer — merge_invariants() and InvariantSet.merge() only accepted 3 parameters (plan, project, global), silently dropping all action- scoped invariants. Added action_invariants as a fourth parameter with proper backward compatibility (default to empty list). Updated module docstrings, InvariantScope docstring, and InvariantService.get_effective_invariants() to reflect the correct precedence chain. Added comprehensive BDD test scenarios covering four-tier merge precedence, action-before-project ordering, and effective invariant computation with all four scopes. ISSUES CLOSED: #9126 |
||
|
|
97c1007bb5
|
feat(events): wire domain services to emit missing EventBus events
CI / push-validation (pull_request) Successful in 48s
CI / build (pull_request) Successful in 1m17s
CI / helm (pull_request) Successful in 1m0s
CI / lint (pull_request) Successful in 1m54s
CI / quality (pull_request) Successful in 1m55s
CI / security (pull_request) Successful in 2m5s
CI / typecheck (pull_request) Successful in 2m4s
CI / integration_tests (pull_request) Successful in 5m1s
CI / unit_tests (pull_request) Successful in 5m10s
CI / docker (pull_request) Successful in 1m51s
CI / coverage (pull_request) Successful in 12m47s
CI / status-check (pull_request) Successful in 8s
CI / benchmark-publish (push) Has started running
CI / benchmark-regression (push) Failing after 1m15s
CI / typecheck (push) Has started running
CI / security (push) Has started running
CI / quality (push) Has started running
CI / integration_tests (push) Has started running
CI / unit_tests (push) Has started running
CI / e2e_tests (push) Has started running
CI / lint (push) Successful in 56s
CI / helm (push) Successful in 53s
CI / push-validation (push) Successful in 54s
CI / build (push) Successful in 1m24s
CI / coverage (push) Blocked by required conditions
CI / docker (push) Blocked by required conditions
CI / status-check (push) Blocked by required conditions
Add TokenAuthMiddleware to emit AUTH_SUCCESS/AUTH_FAILURE with spec-aligned audit details and wire it through the DI container using server.token resolution. Add Behave and Robot coverage for auth event emission and end-to-end audit persistence, and update audit subscriber producer notes and changelog. ISSUES CLOSED: #714 |
||
|
|
b4351ca78d |
Revert "Merge pull request 'fix(acms): use project-level hot_max_tokens in execute phase context assembly' (#11216) from bugfix/m5-acms-project-budget-override into master"
CI / push-validation (pull_request) Successful in 41s
CI / helm (pull_request) Successful in 50s
CI / build (pull_request) Successful in 1m13s
CI / lint (pull_request) Successful in 1m34s
CI / typecheck (pull_request) Successful in 1m40s
CI / quality (pull_request) Successful in 1m45s
CI / security (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 3m52s
CI / unit_tests (pull_request) Successful in 8m50s
CI / docker (pull_request) Successful in 1m39s
CI / coverage (pull_request) Successful in 12m1s
CI / status-check (pull_request) Successful in 6s
This reverts commit |