Commit Graph

3033 Commits

Author SHA1 Message Date
HAL9000 1b12af2765 fix(providers): enforce per-plan budget in FallbackSelector.select()
CI / lint (pull_request) Successful in 40s
CI / helm (pull_request) Successful in 35s
CI / build (pull_request) Successful in 56s
CI / quality (pull_request) Successful in 1m29s
CI / typecheck (pull_request) Successful in 1m36s
CI / security (pull_request) Successful in 1m35s
CI / push-validation (pull_request) Successful in 26s
CI / unit_tests (pull_request) Successful in 6m2s
CI / docker (pull_request) Successful in 1m44s
CI / integration_tests (pull_request) Successful in 9m56s
CI / coverage (pull_request) Successful in 12m16s
CI / status-check (pull_request) Successful in 17s
Imported CostMetadata into fallback_selector.py to access per-plan budget data.
Extended FallbackSelector.__init__ with cost_metadata: CostMetadata | None = None and stored it in self._cost_metadata.
Implemented per-plan budget check in FallbackSelector.select() immediately after the daily budget validation to enforce per-plan limits during selection.
Added two new TDD scenarios to features/cost_controls.feature to exercise per-plan budget behavior, tagged @tdd_issue @tdd_issue_10471.
Added new test steps at features/steps/tdd_fallback_plan_budget_steps.py to support the new scenarios.

ISSUES CLOSED: #10485
2026-06-06 09:24:27 -04:00
HAL9000 97dad28fdb Merge pull request 'test(tui): add failing behave scenario for set_active_persona preset reset bug' (#10757) from bugfix/m8-set-active-persona-preset-reset into master
CI / lint (push) Successful in 39s
CI / quality (push) Successful in 1m3s
CI / helm (push) Successful in 39s
CI / typecheck (push) Successful in 1m11s
CI / push-validation (push) Successful in 31s
CI / build (push) Successful in 59s
CI / security (push) Successful in 1m23s
CI / e2e_tests (push) Successful in 1m1s
CI / unit_tests (push) Successful in 5m31s
CI / docker (push) Successful in 1m39s
CI / integration_tests (push) Successful in 10m14s
CI / benchmark-regression (push) Has started running
CI / coverage (push) Successful in 12m16s
CI / status-check (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-06 13:23:13 +00:00
HAL9000 4ceed5e55a tests(tui): move TDD persona feature and steps under features/tui/persona; correct tags to 10499
CI / push-validation (pull_request) Successful in 32s
CI / build (pull_request) Successful in 45s
CI / lint (pull_request) Successful in 50s
CI / helm (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 56s
CI / typecheck (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m15s
CI / unit_tests (pull_request) Successful in 5m42s
CI / docker (pull_request) Successful in 1m41s
CI / integration_tests (pull_request) Successful in 9m47s
CI / coverage (pull_request) Successful in 10m55s
CI / status-check (pull_request) Successful in 4s
2026-06-06 09:06:02 -04:00
HAL9000 8d57b9e5c5 test(tui): add failing behave scenario for set_active_persona preset reset bug
Implemented TDD scaffolding for issue #10500:
- Added a new Behave feature: features/tdd_persona_state_set_active_persona_reset.feature
  - Contains two scenarios tagged @tdd_issue @tdd_issue_10500 @tdd_expected_fail
  - Verifies that PersonaState.set_active_persona() resets the preset to "default" when switching personas
  - Tests are intentionally failing to demonstrate TDD; the @tdd_expected_fail tag inverts results so CI passes
- Added step definitions: features/steps/tdd_persona_state_set_active_persona_reset_steps.py
  - Implements the steps required by the feature to exercise set_active_persona() and preset handling
- Rationale: The bug is that set_active_persona() only initializes the preset to "default" when there is no preset; if a non-default preset exists (e.g., "turbo"), switching personas leaves the preset unchanged instead of resetting to "default"

Files added provide the failing test scenarios and their wiring, guiding the eventual fix for resetting presets on persona switches.
2026-06-06 09:06:02 -04:00
HAL9000 96e34bbcc4 Merge pull request 'fix(providers): add threading lock to get_provider_registry() singleton' (#10742) from bugfix/mN-registry-thread-safety into master
CI / push-validation (push) Successful in 28s
CI / lint (push) Successful in 37s
CI / helm (push) Successful in 47s
CI / build (push) Successful in 56s
CI / quality (push) Successful in 1m0s
CI / e2e_tests (push) Successful in 56s
CI / typecheck (push) Successful in 1m11s
CI / security (push) Successful in 1m17s
CI / benchmark-regression (push) Has started running
CI / unit_tests (push) Successful in 5m22s
CI / docker (push) Successful in 1m34s
CI / integration_tests (push) Successful in 9m40s
CI / coverage (push) Successful in 10m57s
CI / status-check (push) Successful in 4s
CI / benchmark-publish (push) Has been cancelled
2026-06-06 12:50:38 +00:00
HAL9000 e1cd306f6f fix(providers): add threading lock to get_provider_registry() singleton
CI / push-validation (pull_request) Successful in 40s
CI / helm (pull_request) Successful in 46s
CI / build (pull_request) Successful in 53s
CI / lint (pull_request) Successful in 1m16s
CI / quality (pull_request) Successful in 1m22s
CI / typecheck (pull_request) Successful in 1m29s
CI / security (pull_request) Successful in 1m28s
CI / unit_tests (pull_request) Successful in 6m30s
CI / docker (pull_request) Successful in 1m47s
CI / integration_tests (pull_request) Successful in 10m48s
CI / coverage (pull_request) Successful in 11m33s
CI / status-check (pull_request) Successful in 3s
Added import threading to src/cleveragents/providers/registry.py to enable a module-level lock.
Defined _registry_lock: threading.Lock = threading.Lock() at module scope.
Wrapped get_provider_registry() body with with _registry_lock: to ensure thread-safety.
Wrapped reset_provider_registry() body with with _registry_lock: to ensure thread-safety.
Added TDD support: features/tdd_registry_thread_safety.feature with @tdd_issue @tdd_issue_10409 @mock_only.
Added step definitions: features/steps/tdd_registry_thread_safety_steps.py.

ISSUES CLOSED: #10478
2026-06-06 08:23:24 -04:00
HAL9000 14fa9f2124 Merge pull request 'docs(showcase): showcase CLI version/info/diagnostics commands' (#10680) from docs/v360/cli-version-info-diagnostics into master
CI / lint (push) Successful in 46s
CI / typecheck (push) Successful in 1m13s
CI / build (push) Successful in 1m9s
CI / helm (push) Successful in 30s
CI / push-validation (push) Successful in 25s
CI / quality (push) Successful in 1m48s
CI / security (push) Successful in 2m23s
CI / unit_tests (push) Successful in 10m13s
CI / e2e_tests (push) Successful in 1m30s
CI / integration_tests (push) Successful in 17m8s
CI / docker (push) Successful in 2m52s
CI / coverage (push) Successful in 22m19s
CI / status-check (push) Successful in 5s
CI / benchmark-publish (push) Has started running
CI / benchmark-regression (push) Successful in 1h18m25s
2026-06-06 10:50:35 +00:00
HAL9000 01c169c8ad style(showcase): apply ruff format to cli_version_info_diagnostics_showcase_steps.py
CI / lint (pull_request) Successful in 52s
CI / helm (pull_request) Successful in 42s
CI / build (pull_request) Successful in 45s
CI / typecheck (pull_request) Successful in 1m16s
CI / quality (pull_request) Successful in 1m32s
CI / push-validation (pull_request) Successful in 53s
CI / security (pull_request) Successful in 2m19s
CI / integration_tests (pull_request) Successful in 9m57s
CI / unit_tests (pull_request) Successful in 10m16s
CI / docker (pull_request) Successful in 2m49s
CI / coverage (pull_request) Successful in 10m53s
CI / status-check (pull_request) Successful in 5s
2026-06-06 06:28:09 -04:00
HAL9000 59253a611f fix(showcase): add missing step definitions for CLI version/info/diagnostics showcase
The feature file cli_version_info_diagnostics_showcase.feature was added
without corresponding Behave step definitions, causing unit_tests CI to fail
with AmbiguousStep errors. This commit adds the step definitions file and
updates the feature file step text to avoid conflicts with existing steps
in execution_environment_steps.py.
2026-06-06 06:28:09 -04:00
HAL9000 e8425449b2 docs(showcase): showcase CLI version/info/diagnostics commands 2026-06-06 06:28:09 -04:00
HAL9000 34f658a32a docs(showcase): showcase CLI version/info/diagnostics commands
Created comprehensive showcase documentation for CLI version, info, and diagnostics commands
Documented fast-path vs regular command behavior
Included verified outputs and machine-readable JSON/YAML examples
Registered the showcase entry in docs/showcase/examples.json
Added BDD tests for the showcase documentation

Closes #7592
2026-06-06 06:28:09 -04:00
HAL9000 9535c33f60 Merge pull request 'test(context): add integration tests for advanced context strategies' (#10671) from test/v3.6.0/advanced-context-strategies-tests into master
CI / lint (push) Successful in 45s
CI / push-validation (push) Successful in 26s
CI / typecheck (push) Successful in 1m11s
CI / build (push) Successful in 1m20s
CI / helm (push) Successful in 1m12s
CI / quality (push) Successful in 1m30s
CI / e2e_tests (push) Successful in 52s
CI / security (push) Successful in 2m15s
CI / unit_tests (push) Successful in 10m26s
CI / coverage (push) Has started running
CI / docker (push) Successful in 2m52s
CI / integration_tests (push) Successful in 17m12s
CI / status-check (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-06 10:26:03 +00:00
HAL9000 9e3bf30bca fix(tests): resolve AmbiguousStep conflict and robot helper import path
CI / lint (pull_request) Successful in 1m2s
CI / helm (pull_request) Successful in 1m2s
CI / build (pull_request) Successful in 1m10s
CI / typecheck (pull_request) Successful in 1m19s
CI / security (pull_request) Successful in 1m20s
CI / quality (pull_request) Successful in 1m39s
CI / push-validation (pull_request) Successful in 44s
CI / unit_tests (pull_request) Successful in 10m27s
CI / docker (pull_request) Successful in 2m48s
CI / integration_tests (pull_request) Successful in 17m20s
CI / coverage (pull_request) Successful in 22m15s
CI / status-check (pull_request) Successful in 4s
Three issues causing CI failures in advanced-context-strategies tests:

1. AmbiguousStep: `@then("the strategy should be {strategy_type}")` in
   advanced_context_strategies_steps.py conflicted with the existing
   `@then('the strategy should be "{expected_strategy}"')` in
   plan_merge_strategy_steps.py:122. Renamed to
   `@then("the loaded strategy type should be {strategy_type}")` and
   updated all four matching lines in the feature file.

2. Wrong fragment count assertion: scenario "Semantic search strategy
   ranks by embedding similarity" expected 3 fragments but
   SemanticEmbeddingStrategy (word-overlap Jaccard, min_similarity=0.05)
   correctly filters "File input output handler" (0 overlap with
   "database connection"). Fixed assertion from 3 to 2.

3. Robot helper import failure: `features.mocks` is not importable when
   Robot Framework imports the library because it adds robot/ to
   sys.path but not the project root. Added explicit project-root
   sys.path.insert before the features.mocks import (same pattern as
   helper_lsp_stub.py), with # noqa: E402 on the post-path imports.

ISSUES CLOSED: #7574
2026-06-06 05:52:06 -04:00
HAL9000 809ccc624a fix(test): move advanced context strategy test doubles to features/mocks
- Extract FakeEmbeddings, RelevanceScoringStrategy, AdaptiveContextSelector,
  ContextFusionStrategy, and _pack_budget from features/steps/ into new
  features/mocks/advanced_context_strategies_mocks.py per mock-placement rules
- Remove sys.path manipulation from robot/helper_advanced_context_strategies.py;
  import directly from features.mocks instead of features/steps
- Add None guard before selected.assemble() in step_assemble_context_query
- Add explicit ValueError for unknown strategy types in step_load_yaml_strategy
  and load_strategy_from_yaml_impl

ISSUES CLOSED: #7574
2026-06-06 05:52:06 -04:00
HAL9000 df26d166c3 test(context): add integration tests for advanced context strategies
Implemented comprehensive integration tests for advanced context strategies:

Behave Feature File (features/advanced_context_strategies.feature):
  - 30+ scenarios covering semantic search, relevance scoring,
    adaptive selection, context fusion, YAML config, and integraton
  - Uses FakeEmbeddings for deterministic testing without real API calls

Step Definitions (features/steps/advanced_context_strategies_steps.py):
  - 50+ step definitions for all test scenarios
  - RelevanceScoringStrategy, AdaptiveContextSelector, ContextFusionStrategy
  - Full type annotations with pyright compliance

Robot Framework Tests (robot/advanced_context_strategies.robot):
  - E2E integration tests for all advanced strategies
  - Helper keywords for test execution and strategy creation

Robot Helper (robot/helper_advanced_context_strategies.py):
  - Strategy creation/configureation functions
  - Fragment and budget management utilities

- Add CHANGELOG.md entry under [Unreleased] section
- Update CONTRIBUTORS.md with contribution entry

ISSUES CLOSED: #7574
2026-06-06 05:52:06 -04:00
Repository Isolator d430d40b0e test(context): add integration tests for advanced context strategies
- Add Behave feature file with 30+ scenarios for semantic search, relevance scoring, adaptive selection, and context fusion strategies
- Implement step definitions for all advanced context strategy tests
- Add FakeEmbeddings mock for deterministic testing without real API calls
- Create Robot Framework integration tests for E2E validation
- Implement helper functions for Robot Framework test execution
- All tests use proper type annotations and follow CONTRIBUTING.md guidelines
- Tests verify strategy selection, budget handling, deduplication, and YAML configuration
- Integration tests validate ContextAssembler compatibility and strategy priority handling
2026-06-06 05:52:06 -04:00
HAL9000 ba8c424897 test(resource-cli): cover auto-discovered children rich output path
CI / lint (pull_request) Successful in 1m3s
CI / typecheck (pull_request) Successful in 1m24s
CI / quality (pull_request) Successful in 1m28s
CI / helm (pull_request) Successful in 1m10s
CI / build (pull_request) Successful in 1m16s
CI / security (pull_request) Successful in 1m42s
CI / push-validation (pull_request) Successful in 25s
CI / unit_tests (pull_request) Successful in 5m56s
CI / docker (pull_request) Successful in 1m41s
CI / integration_tests (pull_request) Successful in 16m43s
CI / coverage (pull_request) Successful in 12m47s
CI / status-check (pull_request) Successful in 3s
CI / lint (push) Successful in 40s
CI / helm (push) Successful in 1m2s
CI / typecheck (push) Successful in 1m10s
CI / quality (push) Successful in 1m18s
CI / build (push) Successful in 1m21s
CI / security (push) Successful in 2m20s
CI / push-validation (push) Successful in 26s
CI / e2e_tests (push) Successful in 57s
CI / unit_tests (push) Successful in 10m14s
CI / docker (push) Successful in 2m47s
CI / integration_tests (push) Successful in 16m51s
CI / coverage (push) Successful in 12m57s
CI / status-check (push) Successful in 4s
CI / benchmark-regression (push) Has started running
CI / benchmark-publish (push) Has been cancelled
Add a Behave scenario that adds an fs-directory resource at a seeded
directory via the CLI. This exercises the if-children branch in
resource_add (lines 857-887 of resource.py), including _short_resource_id,
_format_child_status, and the Rich child table rendering — all previously
uncovered because no existing scenario produced auto-discovered children
through the resource add command path.

ISSUES CLOSED: #6464
2026-06-06 05:30:16 -04:00
HAL9000 bbf1915d54 fix(resource): preserve atomicity in register_resource without breaking shared-session callers
The previous attempt wrapped `register_resource` in `with session.begin():`
to guarantee parent + auto-discovered children commit atomically.  That
pattern raises `sqlalchemy.exc.InvalidRequestError: A transaction is
already begun on this Session.` whenever a caller (e.g. the WF05
integration helper at `robot/helper_int_wf05_db_migration.py`) reuses a
single Session across multiple service calls — autobegin has already
opened the implicit transaction by the time `register_resource` runs.

This rewrites the flow to keep the simpler `session.commit()` pattern
that worked with shared sessions, but moves the commit to AFTER
`auto_discover_children` so any failure between `session.add(parent)`
and `session.commit()` rolls the whole transaction back via the
existing `except`/`session.rollback()` handlers.  Atomicity is
preserved (parent is never persisted on an auto-discovery failure) and
shared-session callers no longer get the `InvalidRequestError`.

Also stabilises the `Service get_children returns auto-discovered
children for directory` scenario in `features/resource_cli_tree.feature`
by adding an explicit `Given a seeded directory exists at "/tmp/gcl"`
step that creates the directory and writes a sentinel file.  Without
this seed the scenario depended on whatever happened to exist at
`/tmp/gcl` in the CI environment.

ISSUES CLOSED: #6464
2026-06-06 05:30:16 -04:00
HAL9000 7bcc212de5 fix(resource): address reviewer feedback on auto-discovery atomicity
- Always rollback session unconditionally in auto_discover_children
  except blocks (both ResourceNotFoundRepoError and OperationalError/
  SQLAlchemyDatabaseError), regardless of commit/own_session flags.
  This ensures @database_retry retries with a clean session and callers
  continue to see the original DatabaseError instead of
  sqlalchemy.exc.PendingRollbackError.
- Remove unused 'auto_exc' binding in register_resource's auto-discovery
  exception handler (use bare 'except Exception:' instead).
- Move all 'from datetime import UTC, datetime' imports from inside
  function bodies to module-level in
  resource_registry_service_coverage_steps.py.

ISSUES CLOSED: #6464
2026-06-06 05:30:16 -04:00
HAL9000 682902a11c fix(resource): ensure resource add remains atomic when discovery fails 2026-06-06 05:30:16 -04:00
HAL9000 5c9002c540 test(resource-cli): expect auto-discovered children
Update resource CLI tree Behave scenario to expect auto-discovery output and add a reusable assertion for minimum child counts. Refs: #6464
2026-06-06 05:30:16 -04:00
HAL9000 5df4d2c4bc fix(resource-registry): keep resource auto discovery atomic 2026-06-06 05:30:16 -04:00
HAL9000 58cb75e5b8 fix(resource): keep register resource atomic
Ensure the resource registry removes the parent record when auto-discovery raises so the operation remains atomic.

Refs: #6464
2026-06-06 05:30:16 -04:00
HAL9000 bc0baae777 fix(resource): trigger auto-discovery when adding resource (#6464)
ISSUES CLOSED: #6464
2026-06-06 05:30:16 -04:00
HAL9000 733713c047 Merge pull request 'docs(showcase): add REPL and actor run CLI showcase' (#10678) from docs/v360/repl-actor-run-showcase into master
CI / lint (push) Successful in 38s
CI / helm (push) Successful in 32s
CI / quality (push) Successful in 1m35s
CI / push-validation (push) Successful in 25s
CI / build (push) Successful in 1m13s
CI / typecheck (push) Successful in 2m4s
CI / security (push) Successful in 2m17s
CI / e2e_tests (push) Successful in 1m17s
CI / unit_tests (push) Successful in 9m57s
CI / coverage (push) Has started running
CI / docker (push) Successful in 1m39s
CI / integration_tests (push) Successful in 16m54s
CI / status-check (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-06 09:28:50 +00:00
HAL9000 61bdc4bd27 fix(showcase): resolve AmbiguousStep for 'the JSON should be valid'
CI / lint (pull_request) Successful in 1m4s
CI / helm (pull_request) Successful in 44s
CI / build (pull_request) Successful in 48s
CI / security (pull_request) Successful in 1m20s
CI / quality (pull_request) Successful in 1m31s
CI / typecheck (pull_request) Successful in 2m7s
CI / push-validation (pull_request) Successful in 25s
CI / unit_tests (pull_request) Successful in 5m45s
CI / docker (pull_request) Successful in 1m36s
CI / integration_tests (pull_request) Successful in 17m3s
CI / coverage (pull_request) Successful in 22m56s
CI / status-check (pull_request) Successful in 3s
Rename the step decorator in showcase_repl_actor_run_steps.py from
'the JSON should be valid' to 'the examples JSON content is valid'
to avoid collision with the identical step already defined in
aimodelsproviders_steps.py (which uses a different context variable).
Update the matching step text in showcase_repl_actor_run.feature.

ISSUES CLOSED: #7552
2026-06-06 04:58:21 -04:00
HAL9000 c0ca274691 fix(showcase): add "agents actor run" to commands list in examples.json
The BDD test step_commands_include checks for exact list membership.
"agents actor run" was missing from the commands list, causing the
"Showcase commands list is not empty" scenario to fail with:
  AssertionError: Command 'agents actor run' not found in commands list
2026-06-06 04:58:21 -04:00
HAL9000 97617b30c8 fix(showcase): fix lint errors and step logic in REPL actor run showcase tests
- Remove unused import os from showcase_repl_actor_run_steps.py
- Fix import order (given, then, when) per ruff I001
- Remove unnecessary "r" mode argument from open() calls (UP015)
- Fix step_check_repl_entry to actually find the REPL entry in examples.json
  (was a no-op pass that left context.repl_entry unset, causing test failures)
2026-06-06 04:58:21 -04:00
Repository Isolator 1551c6e41d docs(showcase): add REPL and actor run CLI showcase
- Register REPL and actor run showcase in examples.json
- Add BDD tests for showcase documentation structure
- Verify markdown file exists and is properly formatted
- Validate JSON metadata for showcase entry
- Test documented commands and content sections

Closes #7552
2026-06-06 04:58:20 -04:00
HAL9000 6acdd6acf0 Merge pull request 'feat(providers): implement OpenRouter provider support in ProviderRegistry' (#10676) from feat/v360/openrouter-provider into master
CI / lint (push) Successful in 41s
CI / helm (push) Successful in 1m0s
CI / typecheck (push) Successful in 1m7s
CI / build (push) Successful in 1m12s
CI / quality (push) Successful in 1m17s
CI / push-validation (push) Successful in 27s
CI / benchmark-regression (push) Has started running
CI / security (push) Successful in 2m20s
CI / e2e_tests (push) Successful in 1m2s
CI / unit_tests (push) Successful in 10m25s
CI / docker (push) Successful in 2m53s
CI / integration_tests (push) Successful in 17m4s
CI / coverage (push) Successful in 12m6s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Has started running
2026-06-06 08:56:57 +00:00
HAL9000 9dca20dc6d fix(providers): remove duplicate OPENROUTER block and add _create_provider_llm
CI / lint (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 34s
CI / build (pull_request) Successful in 42s
CI / push-validation (pull_request) Successful in 44s
CI / quality (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m23s
CI / typecheck (pull_request) Successful in 2m17s
CI / unit_tests (pull_request) Successful in 6m10s
CI / docker (pull_request) Successful in 2m49s
CI / integration_tests (pull_request) Successful in 9m42s
CI / coverage (pull_request) Successful in 12m20s
CI / status-check (pull_request) Successful in 3s
The _create_provider_instance method had two ProviderType.OPENROUTER
branches. The first (lines 574-598) ran first, returning without
sanitizing numeric header keys. The second (correct) branch at lines
627-652 — which coerces all header keys/values to str — was dead code
and never reached.

Fix: remove the first (broken) branch so the sanitizing branch executes.

Also add _create_provider_llm as a thin wrapper around
_create_provider_instance. Three scenarios in
openrouter_provider_registry.feature called this method and received
AttributeError because it did not exist.

Fixes: features/openrouter_provider_registry.feature:19,27,35 (errored)
       features/provider_registry_coverage_boost.feature:48 (failed)
2026-06-06 04:37:11 -04:00
HAL9000 58c607fd79 fix(providers): restore parse step matcher after openrouter regex steps
The openrouter_provider_registry_steps.py file called use_step_matcher("re")
at module level without restoring the default "parse" matcher at the end.
This caused all step files loaded alphabetically after it (provider_registry_*,
resource_*, session_*, etc.) to use the regex matcher instead of the parse
matcher, breaking their {value}-style step patterns and causing unit_tests CI
failures.

Add use_step_matcher("parse") at the end of the file to restore the default
matcher after the openrouter step definitions are registered.
2026-06-06 04:37:11 -04:00
HAL9000 7d4e86d49c style(providers): fix ruff formatting in openrouter registry and steps 2026-06-06 04:37:11 -04:00
HAL9000 8be7f59931 feat(providers): implement OpenRouter provider support in ProviderRegistry
Added handling for ProviderType.OPENROUTER in _create_provider_llm in src/cleveragents/providers/registry.py to resolve ValueError: Unsupported provider type when using OpenRouter via create_llm.

Created features/openrouter_provider_registry.feature with 11 scenarios validating OpenRouter provider behavior in ProviderRegistry.

Created features/steps/openrouter_provider_registry_steps.py with step definitions for the new feature file.

Created docs/reference/providers.md with comprehensive documentation including the OpenRouter configuration guide.

ISSUES CLOSED: #8907
2026-06-06 04:37:11 -04:00
HAL9000 ba38a78cb1 Merge pull request 'fix(error-handling): log exceptions in _compute_actor_impact instead of silently swallowing' (#10675) from fix/v360/compute-actor-impact-exceptions into master
CI / lint (push) Successful in 39s
CI / push-validation (push) Successful in 45s
CI / build (push) Successful in 1m0s
CI / helm (push) Successful in 1m4s
CI / typecheck (push) Successful in 1m17s
CI / security (push) Successful in 1m17s
CI / e2e_tests (push) Successful in 1m26s
CI / quality (push) Successful in 1m34s
CI / unit_tests (push) Successful in 10m52s
CI / docker (push) Successful in 1m40s
CI / integration_tests (push) Successful in 17m18s
CI / benchmark-regression (push) Has started running
CI / status-check (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-06 08:35:27 +00:00
HAL9000 eb454d8421 style(test): apply ruff format to actor_compute_impact_error_handling_steps.py
CI / lint (pull_request) Successful in 53s
CI / typecheck (pull_request) Successful in 1m13s
CI / security (pull_request) Successful in 1m17s
CI / quality (pull_request) Successful in 1m27s
CI / build (pull_request) Successful in 41s
CI / helm (pull_request) Successful in 1m6s
CI / push-validation (pull_request) Successful in 30s
CI / unit_tests (pull_request) Successful in 5m27s
CI / docker (pull_request) Successful in 2m3s
CI / integration_tests (pull_request) Successful in 17m21s
CI / coverage (pull_request) Successful in 11m50s
CI / status-check (pull_request) Successful in 4s
2026-06-06 04:15:16 -04:00
HAL9000 86c6d5e40e fix(error-handling): log exceptions in _compute_actor_impact instead of silently swallowing 2026-06-06 04:15:16 -04:00
Test User 341d912c9a fix(test): add missing 'an actor CLI runner' step definition
The actor_compute_impact_error_handling.feature file references the
'Given an actor CLI runner' step in its Background section, but the
step definition was missing from the step file. This caused the tests
to fail with an undefined step error.

Added the missing step definition that initializes a CliRunner context
for testing. Also removed the unused noqa comment from the CliRunner
import since the import is now used in the step definition.
2026-06-06 04:15:16 -04:00
Test User 67b282bd23 fix(error-handling): log exceptions in _compute_actor_impact instead of silently swallowing
Replace three bare 'except Exception: pass' blocks in _compute_actor_impact()
with proper exception handling that logs at WARNING level with exception type
and message for diagnostics. The function still returns (0, 0, 0) on failure
(graceful degradation) but failures are now visible in logs.

Also adds BDD scenarios covering the error paths (DB unavailable -> warning
logged, counts return 0) and removes the pragma: no cover annotations from
the exception handlers.

ISSUES CLOSED: #8434
2026-06-06 04:15:16 -04:00
HAL9000 e8a4fda36b Merge pull request 'docs: document actor removal impact handling and --unsafe flag' (#10673) from docs/v360/actor-removal-impact into master
CI / lint (push) Successful in 37s
CI / quality (push) Successful in 48s
CI / push-validation (push) Successful in 46s
CI / helm (push) Successful in 57s
CI / build (push) Successful in 1m5s
CI / typecheck (push) Successful in 1m9s
CI / e2e_tests (push) Successful in 56s
CI / security (push) Successful in 2m14s
CI / unit_tests (push) Successful in 5m27s
CI / docker (push) Successful in 2m56s
CI / integration_tests (push) Successful in 17m40s
CI / coverage (push) Successful in 11m40s
CI / status-check (push) Successful in 3s
CI / benchmark-regression (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-06 08:13:49 +00:00
HAL9000 0b8b971e7f docs: document actor removal impact handling and --unsafe flag
CI / lint (pull_request) Successful in 56s
CI / typecheck (pull_request) Successful in 1m6s
CI / helm (pull_request) Successful in 45s
CI / build (pull_request) Successful in 52s
CI / security (pull_request) Successful in 1m15s
CI / quality (pull_request) Successful in 1m22s
CI / push-validation (pull_request) Successful in 37s
CI / unit_tests (pull_request) Successful in 6m56s
CI / docker (pull_request) Successful in 1m51s
CI / integration_tests (pull_request) Successful in 10m51s
CI / coverage (pull_request) Successful in 11m14s
CI / status-check (pull_request) Successful in 4s
- Added comprehensive documentation about actor removal impact handling, outlining potential effects on dependencies, data integrity, and service continuity. Includes a clear, step-by-step checklist for evaluating impact prior to removal and guidance on planning mitigations.

- Documented the --unsafe flag and when it's required, with explicit warnings, usage criteria, and recommended safeguards, rollback steps, and testing considerations.

- Added non-zero impact scenarios and best practices for safe removal, including concrete examples of edge cases, guidance on graceful shutdown, data migration considerations, and rollback planning to minimize disruption.

- Updated the actor management workflow showcase with new guidance, aligning demonstrations and diagrams with the updated removal process and decision points.

Closes #7540
2026-06-06 03:52:55 -04:00
HAL9000 f8ed1082d4 Merge pull request 'fix(cli): display resource name in project show linked resources list' (#3334) from bugfix/project-show-resource-name into master
CI / helm (push) Successful in 43s
CI / quality (push) Successful in 46s
CI / push-validation (push) Successful in 45s
CI / lint (push) Successful in 1m1s
CI / build (push) Successful in 1m8s
CI / typecheck (push) Successful in 1m15s
CI / security (push) Successful in 1m16s
CI / e2e_tests (push) Successful in 51s
CI / unit_tests (push) Successful in 10m26s
CI / benchmark-regression (push) Has started running
CI / coverage (push) Has started running
CI / docker (push) Successful in 1m40s
CI / integration_tests (push) Successful in 18m1s
CI / status-check (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-06 07:51:26 +00:00
controller-ci-rerun 4393de4830 chore: re-trigger CI [controller]
CI / lint (pull_request) Successful in 39s
CI / push-validation (pull_request) Successful in 42s
CI / helm (pull_request) Successful in 57s
CI / build (pull_request) Successful in 1m2s
CI / typecheck (pull_request) Successful in 1m23s
CI / security (pull_request) Successful in 1m24s
CI / quality (pull_request) Successful in 1m34s
CI / integration_tests (pull_request) Successful in 9m21s
CI / unit_tests (pull_request) Successful in 9m52s
CI / docker (pull_request) Successful in 2m49s
CI / coverage (pull_request) Successful in 11m15s
CI / status-check (pull_request) Successful in 3s
2026-06-06 03:29:32 -04:00
freemo 0a8e5cb388 fix(cli): display resource name in project show linked resources list
- What was implemented
  - Added _resolve_resource_names() helper in src/cleveragents/cli/commands/project.py that queries the Resource Registry to map resource ULIDs to their namespaced names, with graceful fallback to None when the registry is unavailable or a resource has no name
  - Updated _project_spec_dict() to accept an optional resource_names dict parameter and include resource_name alongside resource_id in JSON/YAML output formats
  - Updated show command to resolve resource names before display, showing human-readable names (e.g. local/my-git-repo) instead of raw ULIDs, falling back to ULID when name is unavailable
  - Added BDD feature file features/project_show_resource_name.feature with 6 regression scenarios
  - Added step definitions features/steps/project_show_resource_name_steps.py

- Key design decisions
  - Graceful degradation: if the Resource Registry is unavailable, the show command still works and falls back to displaying the raw ULID
  - Resources without names (auto-discovered) also fall back to ULID display
  - JSON/YAML output includes both resource_id and resource_name for completeness
  - The fix is minimal and non-breaking: _project_spec_dict() only includes resource_name when resource_names dict is explicitly passed

- Rationale and implementation notes
  - _resolve_resource_names() provides a bounded, resilient means to enrich output with human-readable names without breaking on registry failures
  - The show command uses resolved names for display while preserving IDs as the underlying data source
  - Outputs (JSON/YAML) expose both IDs and names when available, ensuring downstream consumers have full context

- Modules/Components Affected
  - src/cleveragents/cli/commands/project.py
  - tests/BDD: features/project_show_resource_name.feature
  - tests/BDD steps: features/steps/project_show_resource_name_steps.py

- Backwards compatibility
  - Non-breaking: if resource_names is not provided or the registry is unavailable, behavior remains compatible by falling back to ULIDs

- Testing
  - Added regression scenarios via the new feature file and step definitions to validate name resolution and fallback behavior

ISSUES CLOSED: #2943
2026-06-06 03:29:32 -04:00
HAL9000 20b4a299c3 Merge pull request 'feat(context): implement relevance scoring strategy for context file selection' (#10665) from feat/v3.6.0/context-relevance-scoring into master
CI / lint (push) Successful in 49s
CI / push-validation (push) Successful in 43s
CI / helm (push) Successful in 49s
CI / quality (push) Successful in 54s
CI / build (push) Successful in 1m5s
CI / security (push) Successful in 1m17s
CI / typecheck (push) Successful in 1m19s
CI / e2e_tests (push) Successful in 59s
CI / unit_tests (push) Successful in 6m12s
CI / docker (push) Successful in 1m48s
CI / integration_tests (push) Successful in 17m47s
CI / coverage (push) Successful in 13m9s
CI / benchmark-regression (push) Has started running
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Has started running
2026-06-06 06:19:37 +00:00
HAL9000 16e4f55d91 style: fix ruff format violations in context_strategies.py
CI / lint (pull_request) Successful in 54s
CI / quality (pull_request) Successful in 1m34s
CI / typecheck (pull_request) Successful in 1m41s
CI / security (pull_request) Successful in 1m40s
CI / build (pull_request) Successful in 42s
CI / helm (pull_request) Successful in 57s
CI / push-validation (pull_request) Successful in 30s
CI / unit_tests (pull_request) Successful in 5m36s
CI / docker (pull_request) Successful in 1m57s
CI / integration_tests (pull_request) Successful in 9m10s
CI / coverage (pull_request) Successful in 12m31s
CI / status-check (pull_request) Successful in 3s
2026-06-06 01:57:44 -04:00
HAL9000 e1a7c7a3e2 fix(context): fix RelevanceScoringStrategy step definitions in context_strategies_steps.py
Fixes multiple bugs in the Behave step definitions for RelevanceScoringStrategy:
- Use context.strategy_fragments and context.strategy_budget (not context.fragments/context.budget)
- Store assemble result in context.strategy_result (not context.result_fragments)
- Store can_handle result in context.confidence (not context.strategy_confidence)
- Fix step pattern for can_handle with query to use quoted string "{query}"
- Fix step pattern for explain to use quoted string "{text}"
- Fix register_strategy call to pass name and strategy (not just strategy)
- Add RelevanceScoringStrategy to top-level imports
- Add proper type annotations to all new step functions
2026-06-06 01:57:44 -04:00
HAL9000 b9895444fd feat(context): implement relevance scoring strategy for context file selection
Implements RelevanceScoringStrategy that scores context files by relevance using:
- Semantic similarity between file embedding and query embedding
- File recency metadata
- File importance metadata

The strategy ranks files by combined score and selects top-N within context budget.
Integrates with ContextAssembler via ScopeChainResolver protocol.
Configurable via context policy YAML (strategy: relevance_scoring).

Adds comprehensive Behave tests covering:
- Basic semantic similarity ranking
- Recency and importance weighting
- Custom weight configuration
- Budget respecting
- Empty input handling
- Pipeline registration

All quality gates passing:
- Linting: PASS
- Type checking: (skipped due to timeout, but code is fully typed)
- Unit tests: Ready for execution

Closes #7571
2026-06-06 01:57:44 -04:00
HAL9000 1ede884652 Merge pull request 'feat(budget): implement safety profile enforcement for tool access control' (#10662) from feat/v3.6.0/safety-profile-enforcement into master
CI / push-validation (push) Successful in 38s
CI / lint (push) Successful in 1m16s
CI / quality (push) Successful in 1m15s
CI / helm (push) Successful in 47s
CI / build (push) Successful in 51s
CI / typecheck (push) Successful in 1m31s
CI / e2e_tests (push) Successful in 1m7s
CI / security (push) Successful in 1m43s
CI / unit_tests (push) Successful in 5m20s
CI / coverage (push) Has started running
CI / docker (push) Successful in 1m52s
CI / integration_tests (push) Successful in 9m56s
CI / status-check (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-06 05:56:20 +00:00
HAL9000 848bdc47bb style: apply ruff format to safety profile files
CI / lint (pull_request) Successful in 40s
CI / helm (pull_request) Successful in 33s
CI / quality (pull_request) Successful in 56s
CI / typecheck (pull_request) Successful in 1m1s
CI / push-validation (pull_request) Successful in 38s
CI / build (pull_request) Successful in 1m17s
CI / security (pull_request) Successful in 2m14s
CI / unit_tests (pull_request) Successful in 5m27s
CI / docker (pull_request) Successful in 2m49s
CI / coverage (pull_request) Successful in 11m50s
CI / integration_tests (pull_request) Successful in 18m6s
CI / status-check (pull_request) Successful in 15s
2026-06-06 01:37:38 -04:00