Commit Graph

5 Commits

Author SHA1 Message Date
HAL9000 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
2026-05-28 17:35:08 -04:00
CoreRasurae 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
2026-05-22 20:42:25 +01:00
HAL9000 80bc9c552d test: restore and enhance e2e test coverage
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 33s
CI / helm (pull_request) Successful in 45s
CI / build (pull_request) Successful in 1m4s
CI / lint (pull_request) Successful in 1m13s
CI / typecheck (pull_request) Successful in 1m31s
CI / quality (pull_request) Successful in 1m37s
CI / security (pull_request) Successful in 1m49s
CI / integration_tests (pull_request) Successful in 3m34s
CI / e2e_tests (pull_request) Successful in 5m6s
CI / unit_tests (pull_request) Successful in 6m14s
CI / docker (pull_request) Successful in 1m36s
CI / coverage (pull_request) Successful in 12m27s
CI / status-check (push) Blocked by required conditions
CI / coverage (push) Blocked by required conditions
CI / docker (push) Blocked by required conditions
CI / unit_tests (push) Has started running
CI / status-check (pull_request) Successful in 4s
CI / helm (push) Successful in 31s
CI / build (push) Successful in 53s
CI / lint (push) Successful in 1m3s
CI / quality (push) Successful in 1m13s
CI / typecheck (push) Successful in 1m46s
CI / security (push) Successful in 1m46s
CI / push-validation (push) Successful in 20s
CI / benchmark-publish (push) Failing after 43s
CI / e2e_tests (push) Successful in 4m9s
CI / integration_tests (push) Successful in 6m57s
Fix malformed imports in helper_m1_e2e_verification.py and
helper_m4_e2e_cli.py where 'from helpers_common import reset_global_state'
was incorrectly inserted inside a parenthesized import block, causing
Python syntax errors and breaking the lint and unit_tests CI gates.

Also fix import ordering in helper_m2_e2e_verification.py,
helper_m5_e2e_context.py, helper_m5_e2e_support.py, and
helper_m5_e2e_verification.py to satisfy ruff I001 import-sort rules
by placing helpers_common imports in the correct group alongside other
local robot/ helper imports.

ISSUES CLOSED: #8459
2026-05-01 00:59:02 +00:00
HAL9000 7aa50ac489 fix(e2e): restore M5/WF14 tests broken by JSON envelope and stale config
- Add NO_COLOR=1 to E2E Suite Setup and Test Environment to prevent
  Rich from injecting ANSI escape codes into JSON output, which breaks
  Extract JSON From Stdout and JSON assertions in M5/WF14 acceptance tests.

- Add reset_global_state() calls to all M1/M2/M4/M5 E2E verification
  helpers to clear Settings singleton, DI container, provider registry,
  and SQLAlchemy engine cache between parallel pabot worker runs.

- Propagate NO_COLOR=1 at suite-setup level in E2E and integration
  test resource files so all Run Process subprocesses inherit clean
  terminal output mode.

Root causes:
1. Missing NO_COLOR=1 caused Rich ANSI codes in CLI JSON output,
   making json.loads() failures in robot Extract JSON From Stdout
2. Stale Settings singleton carried provider keys and DB paths between
   pabot workers, causing UNIQUE constraint violations and stale config
   lookups in context policy and server mode E2E tests.

Related: PR #9912
2026-05-01 00:59:02 +00:00
aditya 4e64544aae feat(acms): projects with 10,000+ files index without timeout
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 48s
CI / build (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 3m15s
CI / typecheck (pull_request) Successful in 4m4s
CI / security (pull_request) Successful in 4m13s
CI / unit_tests (pull_request) Successful in 4m28s
CI / docker (pull_request) Successful in 1m52s
CI / integration_tests (pull_request) Successful in 7m14s
CI / coverage (pull_request) Successful in 12m49s
CI / e2e_tests (pull_request) Successful in 22m8s
CI / status-check (pull_request) Successful in 2s
CI / benchmark-regression (pull_request) Successful in 57m27s
Add explicit indexing timeout bounds and propagate timeout_seconds through the repo indexing service, utility walker, and CLI entrypoint so large repositories fail predictably instead of hanging.

Add 10K-scale Behave/Robot verification and a dedicated benchmark path to validate that large-project indexing completes, persists status correctly, and remains measurable for regressions.

Address review feedback by splitting oversized Behave and Robot support files into focused modules, trimming repo_indexing_service.py back under the 500-line limit, and rebasing the branch onto current master.

ISSUES CLOSED: #851

# Conflicts:
#	CHANGELOG.md
#	robot/helper_m5_e2e_verification.py
2026-03-30 10:18:19 +00:00