Commit Graph

990 Commits

Author SHA1 Message Date
HAL9000 f2b60cc3d6 fix(cli): restore session list json contract
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 35s
CI / push-validation (pull_request) Successful in 21s
CI / build (pull_request) Successful in 52s
CI / lint (pull_request) Successful in 1m0s
CI / quality (pull_request) Successful in 1m33s
CI / security (pull_request) Successful in 1m45s
CI / typecheck (pull_request) Successful in 1m49s
CI / integration_tests (pull_request) Successful in 3m58s
CI / e2e_tests (pull_request) Successful in 4m32s
CI / unit_tests (pull_request) Successful in 5m55s
CI / docker (pull_request) Successful in 1m31s
CI / coverage (pull_request) Successful in 10m47s
CI / status-check (pull_request) Successful in 3s
CI / build (push) Successful in 47s
CI / lint (push) Successful in 57s
CI / helm (push) Successful in 28s
CI / quality (push) Successful in 1m11s
CI / typecheck (push) Successful in 1m34s
CI / security (push) Successful in 1m36s
CI / push-validation (push) Successful in 21s
CI / benchmark-publish (push) Failing after 40s
CI / integration_tests (push) Successful in 3m47s
CI / e2e_tests (push) Successful in 4m9s
CI / unit_tests (push) Successful in 7m0s
CI / docker (push) Successful in 1m31s
CI / coverage (push) Successful in 10m40s
CI / status-check (push) Successful in 3s
Ensure the session list helper only emits the documented fields so downstream consumers stay compliant, and tighten the Behave coverage to enforce the contract.\n\nISSUES CLOSED: #6436
2026-04-26 19:40:00 +00:00
HAL9000 b92f0270c2 fix(cli): fix session show/list JSON output to not redact input messages (#6436)
ISSUES CLOSED: #6436
2026-04-26 19:40:00 +00:00
HAL9000 92feab2a2d fix(lock): address reviewer suggestions — add ValueError handling and ISO string test scenario 2026-04-26 18:23:48 +00:00
HAL9000 e249f80339 fix(lock): replace fragile ISO string comparison with datetime comparison in LockService
Added a new helper function _to_aware_datetime() in lock_service.py that normalizes ORM timestamp values to timezone-aware datetime objects, handling naive datetimes, timezone-aware datetimes, and ISO strings.
Fixed LockService.acquire() to use datetime comparison instead of fragile string comparison for lock expiry detection (bug #10483).
Fixed LockService.renew() similarly to use datetime comparison.
Added a new TDD Behave feature file features/tdd_lock_service_naive_datetime_expiry.feature with a scenario that proves the fix works.
Added step definitions features/steps/tdd_lock_service_naive_datetime_expiry_steps.py.

ISSUES CLOSED: #10483
2026-04-26 18:23:48 +00:00
HAL9000 2db01fbc17 fix(cli): resolve merge conflict and address all reviewer blockers for #993
CI / push-validation (push) Successful in 22s
CI / helm (push) Successful in 27s
CI / lint (push) Successful in 1m7s
CI / build (push) Successful in 1m5s
CI / quality (push) Successful in 1m35s
CI / typecheck (push) Successful in 1m35s
CI / security (push) Successful in 2m13s
CI / benchmark-publish (push) Failing after 42s
CI / integration_tests (push) Successful in 4m36s
CI / e2e_tests (push) Successful in 5m33s
CI / unit_tests (push) Successful in 6m32s
CI / docker (push) Successful in 1m27s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 1m15s
CI / quality (pull_request) Successful in 1m17s
CI / typecheck (pull_request) Successful in 1m32s
CI / security (pull_request) Successful in 1m25s
CI / build (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 26s
CI / push-validation (pull_request) Successful in 30s
CI / coverage (push) Successful in 11m9s
CI / status-check (push) Successful in 13s
CI / integration_tests (pull_request) Successful in 3m38s
CI / e2e_tests (pull_request) Successful in 3m48s
CI / unit_tests (pull_request) Successful in 6m27s
CI / docker (pull_request) Successful in 1m21s
CI / coverage (pull_request) Successful in 11m32s
CI / status-check (pull_request) Successful in 5s
- Resolve merge conflict in config_service.py: integrate PR's emit_config_changed() helper with master's scoped config infrastructure
  (write_scoped_config, scoped set_value)
- Remove # type: ignore[assignment] by introducing typed _AutoDiscover sentinel class for project_root parameter
- Add exc_info=True to emit_config_changed warning log
- Fix server.py: remove invalid scope='global' from emit_config_changed rollback calls; use svc._config_path instead of hardcoded path
- Add ReactiveEventBus.close() method for proper resource cleanup
- Fix BDD test steps: call event_bus.close() in cleanup handler
- Update CHANGELOG.md and CONTRIBUTORS.md

Closes #993
2026-04-26 17:36:29 +00:00
freemo b9a4fa519d fix(test): update _FailingConfigService.set_value() to match scoped signature
Update the test double to accept the scope keyword argument added by
master's scoped config changes, and pass project_root=None to avoid
auto-discovery in test environments.

ISSUES CLOSED: #993
2026-04-26 17:34:52 +00:00
brent.edwards c2d84c6f09 bug(cli): server_connect writes three config values non-atomically — partial update on failure
Make server_connect config persistence all-or-nothing by snapshotting ~/.cleveragents/config.toml before the three set_value calls and restoring the exact prior bytes on any exception. This preserves existing config-change audit events on success while preventing partially written server URL/namespace/TLS state after mid-sequence failures.\n\nAlso promote the #993 TDD feature from expected-fail to active regression coverage and tighten a flaky resource DAG Robot scenario by using a shared session with explicit commits to keep integration gates stable under parallel execution.

ISSUES CLOSED: #993
2026-04-26 17:34:52 +00:00
HAL9000 446f447c03 style(test): apply ruff format to tdd_lsp_path_containment_steps.py
CI / push-validation (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 31s
CI / build (pull_request) Successful in 49s
CI / lint (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m21s
CI / quality (pull_request) Successful in 1m23s
CI / security (pull_request) Successful in 1m43s
CI / e2e_tests (pull_request) Successful in 3m59s
CI / integration_tests (pull_request) Successful in 5m54s
CI / unit_tests (pull_request) Successful in 7m44s
CI / docker (pull_request) Successful in 1m21s
CI / coverage (pull_request) Successful in 11m19s
CI / status-check (pull_request) Successful in 2s
CI / status-check (push) Blocked by required conditions
CI / benchmark-regression (push) Waiting to run
CI / benchmark-publish (push) Waiting to run
CI / lint (push) Successful in 59s
CI / helm (push) Successful in 26s
CI / build (push) Successful in 48s
CI / quality (push) Successful in 1m21s
CI / typecheck (push) Successful in 1m34s
CI / security (push) Successful in 1m34s
CI / push-validation (push) Successful in 21s
CI / coverage (push) Has started running
CI / integration_tests (push) Successful in 3m26s
CI / e2e_tests (push) Successful in 4m21s
CI / unit_tests (push) Successful in 5m10s
CI / docker (push) Successful in 1m29s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 1h4m13s
2026-04-26 12:19:34 +00:00
HAL9000 e619c1be58 test(lsp/runtime): fix TDD tag to reference bug issue #10490 and add safe-file scenario
Corrected @tdd_issue_10489 → @tdd_issue_10490 so the tag references the
actual bug issue (path traversal vulnerability) rather than the TDD issue
itself.  Added a positive scenario verifying _read_file can still read
files inside the workspace, as suggested in review.

ISSUES CLOSED: #10489
2026-04-26 12:19:34 +00:00
HAL9000 b5110761c2 lsp/runtime: add failing test proving LspRuntime._read_file has no workspace path containment check
Added features/tdd_lsp_path_containment.feature: Introduces a TDD Behave feature with a @tdd_expected_fail scenario to demonstrate that LspRuntime._read_file() does not enforce workspace path containment, guiding a fix.
Added features/steps/tdd_lsp_path_containment_steps.py: Provides step definitions for executing the new test.

ISSUES CLOSED: #10489
2026-04-26 12:19:34 +00:00
HAL9000 1b515d529c fix(tests): align LLM trace test session factory with flush-based save
CI / lint (pull_request) Successful in 1m22s
CI / typecheck (pull_request) Successful in 1m35s
CI / quality (pull_request) Successful in 1m39s
CI / push-validation (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 27s
CI / build (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m46s
CI / integration_tests (pull_request) Successful in 4m42s
CI / e2e_tests (pull_request) Successful in 4m26s
CI / unit_tests (pull_request) Successful in 6m3s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 12m11s
CI / status-check (pull_request) Successful in 3s
CI / lint (push) Successful in 55s
CI / build (push) Successful in 50s
CI / helm (push) Successful in 27s
CI / push-validation (push) Successful in 20s
CI / quality (push) Successful in 1m13s
CI / typecheck (push) Successful in 1m18s
CI / security (push) Successful in 1m31s
CI / integration_tests (push) Successful in 3m55s
CI / e2e_tests (push) Successful in 4m5s
CI / unit_tests (push) Successful in 5m28s
CI / docker (push) Successful in 1m45s
CI / coverage (push) Successful in 13m14s
CI / benchmark-publish (pull_request) Has been skipped
CI / status-check (push) Successful in 4s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Has started running
CI / benchmark-regression (pull_request) Failing after 1h5m16s
Use a shared session in test setup so that data flushed (but not committed) by LLMTraceRepository.save() remains visible to subsequent read operations within the same test scenario.  This matches the production UnitOfWork pattern where a single session is shared across repository calls.

Also fixes ruff format violations (single quotes, string concatenation) that caused the CI lint gate to fail.

ISSUES CLOSED: #10034
2026-04-26 11:19:10 +00:00
HAL9000 2a5a37d774 fix: remove type: ignore comments and use proper method assignment
Removed type: ignore[method-assign] comments from spy function assignments in test code.

Replaced direct method assignment with object.__setattr__ to properly handle method replacement without type suppression, maintaining code quality standards.
2026-04-26 11:19:10 +00:00
HAL9000 b4b6fe6484 fix: replace session.commit() with session.flush() in LLMTraceRepository.save()
Refactor: replace session.commit() with session.flush() in LLMTraceRepository.save()
to ensure changes are persisted within the UnitOfWork without prematurely committing
the database transaction.

- Updated LLMTraceRepository.save() to call session.flush() instead of session.commit()
  in src/cleveragents/infrastructure/database/llm_trace_repository.py.
- Added two new BDD scenarios to features/llm_trace.feature:
  - 'Repository save() calls flush not commit' to verify save() uses flush not commit.
  - 'LLM trace rolled back when UnitOfWork transaction rolls back' to verify rollback.
- Added corresponding step definitions to features/steps/llm_trace_steps.py.

ISSUES CLOSED: #10034
2026-04-26 11:19:10 +00:00
HAL9000 48dd67eb84 test: add TDD bug-capture test for #991 — AuditService TOCTOU race
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 31s
CI / build (pull_request) Successful in 1m5s
CI / lint (pull_request) Successful in 1m27s
CI / quality (pull_request) Successful in 1m29s
CI / typecheck (pull_request) Successful in 1m32s
CI / security (pull_request) Successful in 1m32s
CI / e2e_tests (pull_request) Successful in 4m56s
CI / integration_tests (pull_request) Successful in 6m29s
CI / unit_tests (pull_request) Successful in 8m32s
CI / docker (pull_request) Successful in 1m33s
CI / coverage (pull_request) Successful in 11m7s
CI / status-check (pull_request) Successful in 4s
CI / helm (push) Successful in 28s
CI / build (push) Successful in 53s
CI / lint (push) Successful in 1m10s
CI / quality (push) Successful in 1m10s
CI / typecheck (push) Successful in 1m19s
CI / security (push) Successful in 1m35s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Has started running
CI / push-validation (push) Successful in 22s
CI / integration_tests (push) Successful in 4m28s
CI / e2e_tests (push) Successful in 5m13s
CI / unit_tests (push) Successful in 5m44s
CI / docker (push) Successful in 1m27s
CI / coverage (push) Successful in 13m15s
CI / status-check (push) Successful in 3s
CI / benchmark-regression (pull_request) Successful in 1h2m50s
Rebase onto latest master to resolve CHANGELOG.md merge conflict.
All test files unchanged from the approved PR commit (6c411be1).
CHANGELOG entry added to the ### Added section under ## [Unreleased].

ISSUES CLOSED: #1095
2026-04-26 08:50:22 +00:00
HAL9000 ef5b8bf986 test(agents/graphs/auto_debug): add expected-fail test for _analyze_error in-place state mutation
Added a TDD-style test for issue #10494 by introducing a new features/tdd_auto_debug_analyze_error_mutation.feature with a scenario tagged @tdd_issue @tdd_issue_10494 @tdd_expected_fail, and implemented Behave steps in features/steps/tdd_auto_debug_analyze_error_mutation_steps.py. The test captures the bug that _analyze_error mutates the state in-place and returns the full state object instead of a dict of updates, violating the LangGraph node contract. The @tdd_expected_fail tag inverts the test outcome so CI remains green while the bug exists.

ISSUES CLOSED: #10494
2026-04-25 04:21:23 +00:00
hamza.khyari 12fc9e089f fix(plan): implement error recovery for execute phase per spec §35958 and §18323
CI / lint (pull_request) Successful in 1m8s
CI / quality (pull_request) Successful in 1m7s
CI / typecheck (pull_request) Successful in 1m31s
CI / security (pull_request) Successful in 1m39s
CI / helm (pull_request) Successful in 28s
CI / push-validation (pull_request) Successful in 24s
CI / build (pull_request) Successful in 36s
CI / integration_tests (pull_request) Successful in 4m21s
CI / unit_tests (pull_request) Successful in 4m45s
CI / e2e_tests (pull_request) Successful in 4m8s
CI / docker (pull_request) Successful in 1m29s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 11m24s
CI / status-check (pull_request) Successful in 4s
CI / benchmark-regression (pull_request) Successful in 1h10m52s
Two recovery paths for execute/errored plans using the domain model's
classify_error() for canonical error classification:

1. Transient failures (§28530/§35958): rate limit, timeout, connection
   errors — reset to execute/queued and re-execute with the same
   strategy.  Preserves strategy_decisions_json for decision
   hierarchy reconstruction.

2. Non-transient failures (§18323-18329): strategy constraint,
   authentication, unknown — delegate to
   service.try_auto_revert_from_execute() which enforces
   MAX_REVERSIONS loop guard, increments reversion_count, records a
   reversion decision, and respects the delete_content automation
   threshold.  Error findings are redacted via redact_error_details()
   and stored as JSON for the strategy actor (§18329).

Error classification uses the domain model's classify_error() and
ErrorCategory enum — single source of truth, no parallel frozenset.
AuthenticationError correctly classified as non-transient per domain
model.

ISSUES CLOSED: #10843
2026-04-24 22:46:41 +00:00
HAL9000 4beeb747d0 test: add regression for unexpected migration prompt failure
ISSUES CLOSED: #7503
2026-04-24 19:01:56 +00:00
HAL9000 49ed394d11 fix(migration): reject migrations on prompt failure instead of auto-approving
Fixed MigrationRunner._default_prompt_for_migration silently auto-approving
destructive database migrations when the interactive prompt raised any exception.

The bare 'except Exception' handler was swallowing all errors and returning True
(auto-approve), which could apply destructive schema migrations to production
databases without user consent when stdin is broken, typer is unavailable, or
any other prompt failure occurs.

Changes:
- Narrow exception handler from 'except Exception' to 'except (OSError, EOFError)'
  to only catch genuine non-interactive environment signals
- Re-raise KeyboardInterrupt so Ctrl-C always works
- Return False (reject) instead of True (auto-approve) on prompt failure
- Log at WARNING level instead of DEBUG so the rejection is visible
- Non-interactive environments (stdin not a TTY) now also return False by default
- Updated docstring to document the new safe-default behavior
- Added BDD regression tests for all new code paths
- Added TDD feature file tdd_migration_prompt_auto_approve_7503.feature

ISSUES CLOSED: #7503
2026-04-24 19:01:56 +00:00
HAL9000 a567a78948 style(memory): apply ruff formatting to entity persistence files
Apply ruff auto-formatting to fix CI lint gate failures. Two files had
formatting issues detected by ruff format --check:
- features/steps/tdd_memory_service_entity_persistence_steps.py
- src/cleveragents/application/services/memory_service.py

Changes are purely cosmetic: line wrapping adjustments, parenthesization
style, and string formatting alignment per ruff rules.

Refs: #10455
2026-04-24 11:05:02 +00:00
HAL9000 719315a30b fix(memory): implement entity persistence in MemoryService or remove stub
Added Behave scenario to ensure EntityStore metadata and mention counts persist across restarts.
Implemented new step definitions to track metadata updates and assert mention counts.
Kept existing persistence behavior unchanged while expanding TDD coverage to validate regression safety.

ISSUES CLOSED: #10455
2026-04-24 11:05:02 +00:00
HAL9000 0f4824c26c fix(memory): implement entity persistence in MemoryService or remove stub
Implemented EntityStore._load_from_persistence() to load entities from a
SQLite database on initialization using SQLAlchemy. Implemented
EntityStore._persist_if_needed() to write dirty entities to the database
using SQLAlchemy. Both methods raise RuntimeError on persistence failures
instead of silently failing, eliminating the silent data-loss bug.

Added import json to support entity serialization/deserialization.
Added TDD Behave feature file with 4 scenarios verifying entity round-trip
through persistence. All 4 TDD scenarios pass, all existing tests continue
to pass. Coverage at 97.1%.

ISSUES CLOSED: #10455
2026-04-24 11:05:02 +00:00
hamza.khyari f0923e08ba feat(plan): create per-project sandboxes for multi-project plans
CI / helm (pull_request) Successful in 34s
CI / push-validation (pull_request) Successful in 27s
CI / build (pull_request) Successful in 1m17s
CI / lint (pull_request) Successful in 1m36s
CI / quality (pull_request) Successful in 1m37s
CI / typecheck (pull_request) Successful in 1m51s
CI / security (pull_request) Successful in 2m5s
CI / integration_tests (pull_request) Successful in 4m4s
CI / e2e_tests (pull_request) Successful in 4m21s
CI / unit_tests (pull_request) Successful in 8m0s
CI / docker (pull_request) Successful in 1m41s
CI / coverage (pull_request) Successful in 12m36s
CI / status-check (pull_request) Successful in 3s
CI / lint (push) Successful in 50s
CI / helm (push) Successful in 32s
CI / push-validation (push) Successful in 30s
CI / build (push) Successful in 45s
CI / quality (push) Successful in 1m16s
CI / typecheck (push) Successful in 1m19s
CI / security (push) Successful in 1m33s
CI / e2e_tests (push) Successful in 4m8s
CI / integration_tests (push) Successful in 4m56s
CI / unit_tests (push) Successful in 5m58s
CI / docker (push) Successful in 2m17s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (push) Successful in 12m21s
CI / status-check (push) Successful in 4s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-regression (pull_request) Failing after 1h12m31s
CI / benchmark-publish (push) Successful in 1h17m21s
Per spec §19310-19312, each resource gets its own sandbox and Apply
commits each sandbox separately.

When a plan is linked to multiple projects with git-checkout resources:
- _create_sandbox_for_plan creates a worktree for EACH resource
  (not just the first), returning a list of _SandboxInfo objects
- LLM output is written to the first resource's worktree (primary)
- _route_sandbox_files_to_worktrees moves files that belong to
  other resources into their worktrees by matching against each
  resource's git ls-files output
- Each worktree is committed independently
- _apply_sandbox_changes merges each resource's worktree separately,
  showing per-resource Apply Summary and Sandbox Cleanup panels
- Partial apply: if one resource's merge fails, others still proceed

Single-resource plans are fully backward compatible — same behavior
as before.

ISSUES CLOSED: #7270
2026-04-24 10:32:15 +00:00
HAL9000 8e25e31218 style(decomposition): fix ruff format violations in decision correction files
CI / lint (pull_request) Failing after 0s
CI / typecheck (pull_request) Failing after 0s
CI / security (pull_request) Failing after 1s
CI / quality (pull_request) Failing after 1s
CI / coverage (pull_request) Has been skipped
CI / helm (pull_request) Failing after 0s
CI / build (pull_request) Failing after 1s
CI / push-validation (pull_request) Failing after 0s
CI / integration_tests (pull_request) Successful in 3m51s
CI / e2e_tests (pull_request) Successful in 4m10s
CI / unit_tests (pull_request) Successful in 4m18s
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 1h14m10s
Apply ruff format to decomposition_decision_correction_steps.py and
decomposition_service.py to fix CI lint job format check failures.

ISSUES CLOSED: #10012
2026-04-24 05:45:20 +00:00
HAL9000 e1f3b00322 feat(decomposition): implement selective subtree recomputation for decision correction
- Added DecisionCorrectionResult model to decomposition_models.py to track
  which nodes were recomputed vs preserved during selective subtree recomputation.
- Implemented recompute_subtree(node_id, existing_result, config) in
  DecompositionService, which identifies the subtree rooted at the given node
  using DecompositionNode.children_ids, recomputes only that subtree while
  preserving sibling branches and ancestor nodes, and returns a
  DecisionCorrectionResult with recomputed_nodes, preserved_nodes, and metrics.
- Added BDD feature file features/decomposition_decision_correction.feature
  containing 9 scenarios covering: selective subtree recomputation for leaf,
  middle, and root nodes; sibling branch preservation; ancestor node
  preservation; DecisionCorrectionResult model validation; custom config
  support; error handling for unknown nodes; metrics tracking.
- Added step definitions in features/steps/decomposition_decision_correction_steps.py

ISSUES CLOSED: #10012
2026-04-24 05:45:20 +00:00
HAL9000 9d21ba5b64 style(test): rename _orig_time_sleep/_orig_asyncio_sleep to _original_time_sleep/_original_asyncio_sleep for consistency 2026-04-24 04:11:54 +00:00
HAL9000 5812e0599a [AUTO-INF-3B] features/environment.py uses # type: ignore comments in _install_fast_sleep_patch() violating CONTRIBUTING.md strict typing policy
Removed 6 `# type: ignore` suppressions from `_install_fast_sleep_patch()` in `features/environment.py`.
Used `cast(Any, module)` + direct attribute assignment instead of `setattr()` (which ruff B010 disallows) and `# type: ignore` comments.
Added `from collections.abc import Callable` and `from typing import cast` imports.
Added new feature file `features/test_infra_sleep_patch.feature` with 4 scenarios verifying the behavior.
Added new steps file `features/steps/test_infra_sleep_patch_steps.py`.

ISSUES CLOSED: #9993
2026-04-24 04:11:54 +00:00
HAL9000 0050a0ed50 fix: detect dollar prefix as shell mode trigger in InputModeRouter
The spec requires both ! and dollar sign to activate shell mode, but
detect_mode() only recognised ! as the shell mode trigger. This caused
dollar-prefixed inputs like dollar-sign-echo-hello to be routed to NORMAL
mode instead of SHELL mode.

- Add dollar sign to detect_mode() shell prefix check alongside !
- Add BDD tests for dollar prefix shell mode detection
- Add step definitions for detect_mode() direct testing

Closes #10412
2026-04-24 03:01:13 +00:00
HAL9000 8380c8b848 feat(architecture-pool-supervisor): add milestone assignment to spec PRs
Add milestone assignment step to the PR workflow for major specification changes.
The architecture-pool-supervisor agent now assigns created PRs to the current active
milestone using forgejo_update_pull_request, improving traceability and ensuring
spec PRs are properly tracked within project milestone planning.

Changes:
- Add 'PR Workflow for Major Changes' section to architecture-pool-supervisor.md
- Document milestone assignment using forgejo_update_pull_request
- Document milestone querying using forgejo_list_repo_milestones
- Add graceful error handling for missing active milestones
- Add support for multi-milestone spec PRs (use earliest milestone)
- Allow forgejo_update_pull_request in agent permissions
- Add comprehensive BDD tests for milestone assignment feature

ISSUES CLOSED: #7521

# Conflicts:
#	CONTRIBUTORS.md
2026-04-24 02:04:29 +00:00
HAL9000 96ca3ecffa style: fix ruff formatting in tui_permission_question_widget_steps.py
CI / push-validation (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 34s
CI / build (pull_request) Successful in 55s
CI / lint (pull_request) Successful in 1m2s
CI / quality (pull_request) Successful in 1m30s
CI / typecheck (pull_request) Successful in 1m32s
CI / security (pull_request) Successful in 1m37s
CI / e2e_tests (pull_request) Successful in 4m13s
CI / integration_tests (pull_request) Successful in 4m21s
CI / unit_tests (pull_request) Successful in 5m46s
CI / docker (pull_request) Successful in 1m31s
CI / coverage (pull_request) Successful in 11m42s
CI / status-check (pull_request) Successful in 4s
CI / lint (push) Successful in 1m16s
CI / quality (push) Successful in 1m16s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (push) Successful in 45s
CI / helm (push) Successful in 31s
CI / typecheck (push) Successful in 1m46s
CI / security (push) Successful in 1m47s
CI / push-validation (push) Successful in 45s
CI / integration_tests (push) Successful in 4m4s
CI / e2e_tests (push) Successful in 5m10s
CI / unit_tests (push) Successful in 6m15s
CI / benchmark-regression (push) Has been skipped
CI / docker (push) Successful in 2m3s
CI / coverage (push) Successful in 11m8s
CI / status-check (push) Successful in 5s
CI / benchmark-regression (pull_request) Successful in 1h11m34s
CI / benchmark-publish (push) Successful in 1h29m22s
Collapse unnecessary parentheses in assert statement to satisfy ruff
format check. No functional changes.
2026-04-23 23:01:46 +00:00
HAL9000 0799369407 fix(tui): render inline diffs in PermissionQuestionWidget
Enabled inline diff rendering by default in PermissionQuestionWidget when diffs are available.

Added a public show_diff property with getter and setter to control diff visibility, and updated refresh to honor this property.

Extended Behave feature scenarios to cover default diff rendering, visibility toggling, and no-diff behavior.

Introduced supporting step definitions for toggling show_diff and asserting absence of diff text.

ISSUES CLOSED: #8303
2026-04-23 23:01:46 +00:00
HAL9000 deed7acbb2 style(tui): apply ruff format to tdd_slash_overlay_keyboard_nav_steps
CI / benchmark-regression (pull_request) Failing after 0s
CI / lint (pull_request) Failing after 0s
CI / typecheck (pull_request) Failing after 0s
CI / security (pull_request) Failing after 0s
CI / quality (pull_request) Failing after 0s
CI / unit_tests (pull_request) Failing after 1s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Failing after 1s
CI / integration_tests (pull_request) Failing after 1s
CI / build (pull_request) Failing after 1s
CI / helm (pull_request) Failing after 0s
CI / push-validation (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 1s
Remove unnecessary parentheses around f-string assert messages to
satisfy ruff format --check in CI lint job.
2026-04-23 18:29:11 +00:00
HAL9000 a74c495a1f test(tui): add BDD keyboard navigation for SlashCommandOverlay (#10442)
Implements keyboard navigation support for SlashCommandOverlay:
- navigate_up(): move selection up, clamped to index 0
- navigate_down(): move selection down, clamped to last command
- select_current(): return the currently highlighted SlashCommandSpec
- dismiss(): clear overlay and reset state (Escape key action)
- selected_index: tracks current highlighted position

Adds BDD feature file and step definitions covering all navigation
scenarios including boundary conditions (clamp at 0 and max index).

Closes #10442
2026-04-23 18:29:11 +00:00
hurui200320 f829e68911 fix(actor): resolve registry.add() rejection of spec-compliant actor YAML
CI / benchmark-regression (push) Has been skipped
CI / helm (push) Successful in 29s
CI / build (push) Successful in 50s
CI / lint (push) Successful in 1m3s
CI / typecheck (push) Successful in 1m23s
CI / quality (push) Successful in 1m38s
CI / security (push) Successful in 1m43s
CI / push-validation (push) Successful in 27s
CI / integration_tests (push) Successful in 3m36s
CI / e2e_tests (push) Successful in 4m6s
CI / unit_tests (push) Successful in 4m53s
CI / docker (push) Successful in 1m29s
CI / coverage (push) Successful in 11m4s
CI / status-check (push) Successful in 4s
CI / benchmark-publish (push) Successful in 1h23m24s
CI / lint (pull_request) Successful in 1m10s
CI / typecheck (pull_request) Successful in 1m16s
CI / security (pull_request) Successful in 1m15s
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 36s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 51s
CI / quality (pull_request) Successful in 1m37s
CI / integration_tests (pull_request) Successful in 3m57s
CI / e2e_tests (pull_request) Successful in 4m13s
CI / unit_tests (pull_request) Successful in 4m27s
CI / docker (pull_request) Successful in 1m30s
CI / coverage (pull_request) Successful in 10m39s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Successful in 1h4m37s
The ActorRegistry.add() method rejected spec-compliant YAML that uses the
actors: map format with nested config: blocks because it only looked for
provider/model at the top level of the blob.  Four changes fix this:

1. _extract_v2_actor() now handles both the spec-canonical actors: key and
   the legacy agents: key, with actors: taking precedence.  It also supports
   the combined actor field format (e.g. "openai/gpt-4") from the spec.

2. _extract_v2_options() mirrors the same actors:/agents: support.

3. registry.add() now unconditionally calls _extract_v2_actor() so that
   nested unsafe flags and graph descriptors are always captured — even
   when top-level provider/model are present.  This eliminates the
   behavioural asymmetry with from_blob().

4. The unsafe confirmation gate now runs before the duplicate-actor check,
   and the graph_descriptor resolution uses explicit is-not-None checks
   to distinguish "not set" from "set to empty dict".

Review fixes (cycle 4):
- Added 9 new Behave scenarios: _extract_v2_options edge cases (empty map,
  None, list, missing options key), _extract_v2_actor with unsafe=True,
  add() with missing name field, top-level unsafe: true (rejection +
  acceptance), and multi-actor unsafe limitation documentation.
- Added graph descriptor assertions to all _extract_v2_actor direct
  scenarios that were missing them.
- Fixed unsafe field coercion to use explicit boolean check (is True or
  == 1) instead of bool() to prevent truthy non-boolean values like
  "no" from being treated as unsafe.
- Added legacy graph key fallback (blob.get("graph")) in add() for
  consistency with from_blob().
- Fixed _StubActorService.upsert_actor to handle set_default parameter
  and pass non-None config_blob to Actor.compute_hash().
- Updated stale CLI comment about registry.add() capabilities.
- Applied ruff format to step definitions.

Review fixes (cycle 5 — external review):
- T1/T2/T3: Added unsafe coercion edge-case tests for 1.0 (float→True),
  2 (int>1→False), and 0 (int zero→False).
- T4/T5/T6: Added _extract_v2_options tests for non-dict first entry,
  missing config block, and actors: preference over agents:.
- T7: Added integration test for top-level graph_descriptor key.
- T8: Added integration tests for top-level provider_type/model_id aliases.
- T9: Added integration tests for top-level unsafe string coercion ("yes"/"no").
- S1: effective_unsafe now includes unsafe/allow_unsafe params to match
  from_blob() and spec rule.
- S2: CHANGELOG entry expanded with multi-actor rejection, options
  preservation, and coercion fix.
- B1: Changed v2_options guard from truthiness to is-not-None check.
- P1: _extract_v2_options() now returns a shallow copy.
- P2: Nested options overwrite non-dict top-level options values.
- Q3: Fixed comment variable name (unsafe_raw → top_unsafe_raw).
- S3: Added spec-extension comment for provider_type/model_id aliases.
- S4/B3: Cached actors_raw in multi-actor guard; added cross-ref comment.
- Q5: Added TODO(#10832) to _StubActorService duplicate.
- Q6: Replaced misleading (M2) label with (unsafe coercion).

Review fixes (cycle 6 — agent review):
- MAJ-1: Removed allow_unsafe from effective_unsafe computation.
  allow_unsafe is a permission flag, not an assertion; it should not
  mark a non-unsafe actor as unsafe.  Updated docstring to clarify
  the semantic difference between unsafe and allow_unsafe.
- MIN-1: Changed provider/model alias resolution in _extract_v2_actor()
  from or-based to is-not-None checks for consistency with
  _resolve_actors_map() and add().
- MIN-2: Added test scenario for allow_unsafe=True on non-unsafe YAML.
- MIN-3: Added test scenarios for top-level unsafe: 1 (integer)
  rejection without flag and acceptance with flag.
- MIN-4: Added test scenario for graph descriptor additional keys loop
  (routes key propagation).
- MIN-5: Added test scenario for non-dict top-level options with nested
  options.
- MIN-9: Applied ruff format to step file (removed unnecessary parens).
- NIT-1: Differentiated redundant scenario to test graph descriptor
  agent key value instead of duplicating assertions.
- NIT-2: Added test scenario verifying config_blob source: "yaml" default.
- NIT-5: Changed _resolve_actors_map() return type to use
  Literal["actors", "agents"] for stronger type safety.

Includes 78 Behave scenarios covering spec-compliant actors: map,
legacy agents: map, top-level fields, rejection of missing provider/model,
combined actor field edge cases, update=True path, schema_version and
compiled_metadata forwarding, actors-as-list edge case, empty actors dict
blocking agents fallback, malformed actor field parts, reverse precedence
for the combined actor field, _extract_v2_options edge cases, unsafe=True
detection, missing name rejection, top-level unsafe, multi-actor
rejection, unsafe coercion edge cases (1.0, 2, 0, "yes", "no"),
top-level graph_descriptor, provider_type/model_id aliases,
_extract_v2_options structural parity with _extract_v2_actor,
allow_unsafe on non-unsafe YAML, top-level unsafe: 1 (integer),
graph descriptor additional keys, non-dict top-level options,
and config_blob source default.

ISSUES CLOSED: #4466
2026-04-23 16:15:49 +00:00
HAL9000 6d0622c698 test(schema): add BDD scenarios for uncovered server-qualified name validator branches
Add rejection scenarios for actor names with empty server prefix and
server prefix without namespace slash to cover all error branches in
the updated validate_name method. Add skill rejection scenario for
server-qualified names with multiple slashes for parity with actor tests.

ISSUES CLOSED: #9074
2026-04-23 12:19:50 +00:00
HAL9000 8738d6b921 fix(schema): add provider field to actor name test template for master compatibility
The merge with master introduced a new 'provider' field requirement for
LLM and GRAPH actors. Updated the step_given_actor_with_name test
template to include 'provider: openai' so server-qualified name
acceptance scenarios pass with the new validation rule.

ISSUES CLOSED: #9074
2026-04-23 12:19:50 +00:00
HAL9000 86525a4ba4 fix(schema): add BDD scenarios and fix lint for server-qualified name validators
Add BDD test scenarios for server-qualified name acceptance in:
- features/actor_schema.feature: Accept/reject scenarios for server:namespace/name format
- features/skill_schema.feature: Accept scenarios for server:namespace/name format
- features/consolidated_tool.feature: Accept scenarios for server:namespace/name format

Also fix lint issues in the previous commit:
- Remove trailing whitespace from actor/schema.py docstring
- Split long NAMESPACED_NAME_RE line in skills/schema.py

ISSUES CLOSED: #9074
2026-04-23 12:19:50 +00:00
HAL9000 3b66bf08f5 feat(acms): implement context analysis engine with tier distribution and budget utilization metrics
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 31s
CI / build (pull_request) Successful in 57s
CI / lint (pull_request) Successful in 1m17s
CI / quality (pull_request) Successful in 1m29s
CI / security (pull_request) Successful in 1m33s
CI / typecheck (pull_request) Successful in 1m45s
CI / integration_tests (pull_request) Successful in 3m38s
CI / e2e_tests (pull_request) Successful in 4m0s
CI / unit_tests (pull_request) Successful in 5m5s
CI / docker (pull_request) Successful in 1m49s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 11m41s
CI / status-check (pull_request) Successful in 3s
CI / push-validation (push) Successful in 25s
CI / helm (push) Successful in 33s
CI / quality (push) Successful in 1m15s
CI / build (push) Successful in 58s
CI / lint (push) Successful in 1m39s
CI / typecheck (push) Successful in 1m45s
CI / security (push) Successful in 1m45s
CI / integration_tests (push) Successful in 3m56s
CI / e2e_tests (push) Successful in 4m34s
CI / unit_tests (push) Successful in 5m21s
CI / docker (push) Successful in 1m49s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Has started running
CI / coverage (push) Successful in 11m24s
CI / status-check (push) Successful in 4s
CI / benchmark-regression (pull_request) Successful in 1h4m44s
Introduces a new ContextAnalysisEngine service to unify ACMS context analysis across tiered storage.
It computes and exposes key observability metrics and provides flexible formatting for tooling and dashboards.
Metrics include:
- entry_count(): total entries across all tiers
- tier_distribution(): per-tier counts and sizes (hot, warm, cold)
- budget_utilization(): current total size vs. configured max, as a percentage
- top_files(n): top-N entries by access_count in descending order
- analyze(top_n): combined analysis result aggregating the above metrics
- format_json() and format_text() static formatters for machine- and human-friendly output

A new CLI command context analyze has been added at src/cleveragents/cli/commands/context.py to surface the feature from the command line.
Unit tests live under features/acms_context_analysis_engine.feature (29 scenarios) with step definitions in features/steps/acms_context_analysis_engine_steps.py.
The commit wires the new command into the CLI, enables test-driven validation of the metrics, and lays the groundwork for integration with dashboards.

ISSUES CLOSED: #9984
2026-04-23 11:46:36 +00:00
HAL9000 4f23ece138 style: apply ruff formatting to lsp_path_containment_steps.py
CI / lint (pull_request) Successful in 1m14s
CI / typecheck (pull_request) Successful in 1m27s
CI / security (pull_request) Successful in 1m26s
CI / helm (pull_request) Successful in 30s
CI / push-validation (pull_request) Successful in 28s
CI / build (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 3m45s
CI / e2e_tests (pull_request) Successful in 4m1s
CI / unit_tests (pull_request) Successful in 11m3s
CI / docker (pull_request) Successful in 1m50s
CI / coverage (pull_request) Successful in 11m15s
CI / status-check (pull_request) Successful in 3s
CI / build (push) Failing after 0s
CI / lint (push) Successful in 56s
CI / typecheck (push) Successful in 1m23s
CI / helm (push) Successful in 41s
CI / security (push) Successful in 1m25s
CI / quality (push) Successful in 1m30s
CI / push-validation (push) Successful in 45s
CI / e2e_tests (push) Successful in 4m24s
CI / unit_tests (push) Failing after 5m51s
CI / docker (push) Has been skipped
CI / integration_tests (push) Successful in 6m4s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (push) Successful in 11m1s
CI / status-check (push) Failing after 3s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-regression (pull_request) Successful in 1h4m8s
CI / benchmark-publish (push) Successful in 1h16m50s
Fix CI lint failure by running ruff format on the step definitions file
that was missing auto-formatting before the PR was submitted.
2026-04-23 09:22:33 +00:00
HAL9000 d08084236a fix(lsp/runtime): add workspace path containment check to _read_file
LspRuntime._read_file had no check that the requested file path was contained within the workspace directory, allowing path traversal attacks to read arbitrary files on the filesystem.

Changes:
- Add _workspace_paths dict to LspRuntime to track per-server workspace roots
- start_server now stores the resolved workspace path for each server
- stop_server and stop_all clean up workspace path entries
- _read_file now accepts an optional workspace_path parameter; when
  provided, it resolves both paths and raises LspError if the file
  is outside the workspace (prevents ../../etc/passwd style attacks)
- get_diagnostics, get_completions, get_hover, get_definitions all
  pass the registered workspace path to _read_file
- Add features/lsp_path_containment.feature with 10 BDD scenarios
- Add features/steps/lsp_path_containment_steps.py step definitions

ISSUES CLOSED: #10490
2026-04-23 09:22:33 +00:00
HAL9000 47b37c43f0 fix(autonomy-guardrail): fix BDD test assertions and error handling
- Replace no-op assertions in step_assert_in_sync and step_assert_both_in_sync with meaningful state validation checks
- Set context.error in addition to context.load_error so generic validation error steps work correctly
- Add missing step definition for "I have metadata with valid guardrails"
- Store plan_id in context during load steps for use in assertion steps

All atomic load BDD tests now pass with proper validation of guardrail and audit trail state.
2026-04-23 09:08:11 +00:00
HAL9000 ef532c5302 fix(autonomy-guardrail): make load_from_metadata atomic
Refactor load_from_metadata() to validate both AutonomyGuardrails and
GuardrailAuditTrail models before writing either to state. This ensures
atomicity: if any validation fails, no state is modified.

Previously, guardrails were written before audit trail validation,
leaving the system in an inconsistent state if the second validation
failed.

Changes:
- Validate both models in Phase 1 before any writes
- Write both models atomically in Phase 2 only after validation succeeds
- Add comprehensive BDD tests for atomic load behavior
- Update pyproject.toml to ignore import sorting in features/steps

ISSUES CLOSED: #7504
2026-04-23 09:08:11 +00:00
HAL9000 7523a50db8 refactor(tui): PromptInput uses TextArea instead of Input
CI / push-validation (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 32s
CI / build (pull_request) Successful in 3m53s
CI / lint (pull_request) Successful in 4m4s
CI / quality (pull_request) Successful in 4m25s
CI / typecheck (pull_request) Successful in 4m33s
CI / security (pull_request) Successful in 4m45s
CI / integration_tests (pull_request) Successful in 6m42s
CI / e2e_tests (pull_request) Successful in 7m10s
CI / unit_tests (pull_request) Successful in 7m35s
CI / docker (pull_request) Successful in 1m29s
CI / coverage (pull_request) Successful in 14m7s
CI / status-check (pull_request) Successful in 3s
CI / push-validation (push) Successful in 23s
CI / helm (push) Successful in 28s
CI / build (push) Successful in 3m50s
CI / lint (push) Successful in 3m58s
CI / quality (push) Successful in 4m21s
CI / typecheck (push) Successful in 4m29s
CI / security (push) Successful in 4m38s
CI / integration_tests (push) Successful in 6m39s
CI / e2e_tests (push) Successful in 6m57s
CI / unit_tests (push) Successful in 7m24s
CI / docker (push) Successful in 1m29s
CI / coverage (push) Successful in 13m59s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (push) Has been skipped
CI / benchmark-regression (pull_request) Successful in 1h4m50s
CI / benchmark-publish (push) Successful in 1h16m58s
Replaced the PromptInput base widget from textual.widgets.Input to textual.widgets.TextArea and updated related code to use the multi-line TextArea API. This includes switching from .value to .text, adjusting consume_text(), and updating all callers and tests accordingly. Also added UI test coverage for multi-line input, including new feature and steps files.

ISSUES CLOSED: #10410
2026-04-22 14:06:42 +00:00
hurui200320 58fa90b1b5 Merge branch 'master' into bugfix/m3-node-stream-on-next-noop
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 3m48s
CI / lint (pull_request) Successful in 3m53s
CI / quality (pull_request) Successful in 4m18s
CI / security (pull_request) Successful in 4m35s
CI / typecheck (pull_request) Successful in 4m38s
CI / integration_tests (pull_request) Successful in 6m48s
CI / e2e_tests (pull_request) Successful in 7m16s
CI / unit_tests (pull_request) Successful in 8m49s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 15m26s
CI / benchmark-regression (push) Waiting to run
CI / benchmark-publish (push) Waiting to run
CI / status-check (pull_request) Successful in 2s
CI / push-validation (push) Successful in 22s
CI / helm (push) Successful in 29s
CI / build (push) Successful in 3m52s
CI / lint (push) Successful in 3m57s
CI / quality (push) Successful in 4m21s
CI / typecheck (push) Successful in 4m29s
CI / security (push) Successful in 4m46s
CI / e2e_tests (push) Successful in 7m22s
CI / integration_tests (push) Successful in 7m28s
CI / unit_tests (push) Successful in 8m38s
CI / docker (push) Successful in 1m36s
CI / coverage (push) Successful in 15m44s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 37m45s
2026-04-22 07:33:46 +00:00
HAL9000 d194ee0d95 bug(uko): add missing layer 2 indexing scenario to uko_runtime.feature
Add layer 2 (paradigm/OO) triple emission to PythonAnalyzer and add the
missing Scenario for layer 2 indexing in uko_runtime.feature.

- PythonAnalyzer._extract_class() now emits a rdf:type uko-oo:Class
  triple (layer 2) in addition to rdf:type uko-py:Class (layer 3),
  ensuring UKOIndexer emits layer 2 triples when indexing Python OOP
  constructs (classes).
- Added Scenario: Indexing a Python file populates layer 2 (paradigm)
  to features/uko_runtime.feature, completing the four-layer guarantee
  verification (layers 0, 1, 2, 3) at the runtime/indexing level.

ISSUES CLOSED: #9351
2026-04-22 06:37:17 +00:00
brent.edwards 7355e59682 fix(config): don't resolve explicitly-set database URLs; update a2a test
CI / benchmark-regression (pull_request) Waiting to run
CI / benchmark-publish (pull_request) Waiting to run
CI / helm (pull_request) Failing after 0s
CI / push-validation (pull_request) Successful in 22s
CI / build (pull_request) Successful in 3m52s
CI / lint (pull_request) Successful in 3m57s
CI / quality (pull_request) Successful in 4m21s
CI / typecheck (pull_request) Successful in 4m37s
CI / security (pull_request) Successful in 4m41s
CI / unit_tests (pull_request) Failing after 5m29s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 6m56s
CI / integration_tests (pull_request) Successful in 7m20s
CI / coverage (pull_request) Successful in 13m41s
CI / status-check (pull_request) Failing after 3s
Two unit test failures on the PR branch:

1. settings_configuration.feature:200 — CLEVERAGENTS_DATABASE_URL env var
   overrides the default

   The _resolve_database_urls model validator applied _resolve_sqlite_url()
   to ALL database_url values, including values explicitly provided by the
   user via CLEVERAGENTS_DATABASE_URL.  When a user set a relative SQLite
   path (e.g. sqlite:///custom/path/mydb.db), the validator converted it
   to an absolute CWD-based path, breaking the assertion.

   Fix: skip resolution when the corresponding env var is set to a non-empty
   value.  Only DEFAULT values (generated by the default_factory when no env
   var is present) are resolved against CLEVERAGENTS_HOME / CWD.

2. tdd_a2a_sdk_dependency.feature:21 — a2a SDK provides the A2AClient class

   In a2a-sdk >=1.0.0 the A2AClient class was renamed to Client.
   a2a.client no longer exports A2AClient, so getattr(a2a.client,
   'A2AClient', None) returns None and the test fails.

   Fix: update the scenario to check for Client (the current canonical name).

Also update settings_steps.py so the 'no environment variables are set'
step clears CLEVERAGENTS_DATABASE_URL, CLEVERAGENTS_TEST_DATABASE_URL, and
CLEVERAGENTS_HOME.  Previously these were left in the environment, meaning
tests that set them explicitly had to contend with whatever before_scenario
injected, making the scenarios harder to reason about.

ISSUES CLOSED: #1024
2026-04-22 00:45:09 +00:00
HAL9000 069ed786a9 fix(config): update database_url default to use CLEVERAGENTS_HOME when set
When CLEVERAGENTS_HOME is set, the Settings database_url default now
resolves to CLEVERAGENTS_HOME/cleveragents.db instead of
~/.cleveragents/cleveragents.db. This ensures test isolation when
CLEVERAGENTS_HOME points to a temp directory.

Also update coverage_boost_steps.py to remove CLEVERAGENTS_HOME before
creating Settings instances so the test uses the true default path.
2026-04-22 00:45:09 +00:00
freemo 2b6ac00263 fix(config): resolve database_url relative to CLEVERAGENTS_HOME, not CWD
Ensure that when database_url is a relative path (like sqlite:///cleveragents.db),
it resolves relative to CLEVERAGENTS_HOME instead of the current working directory.
This fixes E2E test isolation where data from previous runs persisted across runs
at CWD, causing UNIQUE constraint failures.

Changes:
- Added _resolve_database_urls model validator in Settings to rewrite relative
  SQLite paths to absolute paths under CLEVERAGENTS_HOME
- Updated get_database_url() in container.py to use CLEVERAGENTS_HOME as base
  directory and create parent directories when CLEVERAGENTS_HOME is explicitly set
- Updated _check_database() in system.py to walk up directory tree for writable
  ancestor check, handling cases where intermediate directories have not yet been
  created
- Removed @tdd_expected_fail from TDD test (now passes genuinely)

ISSUES CLOSED: #1024
2026-04-22 00:45:09 +00:00
CoreRasurae f8233000cc fix(db): add missing link_type, FK constraints, and partial index per spec DDL
CI / push-validation (pull_request) Successful in 28s
CI / helm (pull_request) Successful in 36s
CI / build (pull_request) Successful in 4m1s
CI / lint (pull_request) Successful in 4m14s
CI / quality (pull_request) Successful in 4m33s
CI / typecheck (pull_request) Successful in 4m54s
CI / security (pull_request) Successful in 4m55s
CI / unit_tests (pull_request) Successful in 7m48s
CI / e2e_tests (pull_request) Successful in 7m51s
CI / integration_tests (pull_request) Successful in 7m59s
CI / docker (pull_request) Successful in 2m7s
CI / coverage (pull_request) Successful in 15m56s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-publish (push) Waiting to run
CI / benchmark-regression (push) Waiting to run
CI / push-validation (push) Successful in 22s
CI / helm (push) Successful in 27s
CI / build (push) Successful in 3m47s
CI / lint (push) Successful in 3m56s
CI / quality (push) Successful in 4m21s
CI / typecheck (push) Successful in 4m34s
CI / security (push) Successful in 4m44s
CI / e2e_tests (push) Successful in 6m43s
CI / unit_tests (push) Successful in 7m19s
CI / integration_tests (push) Successful in 7m44s
CI / docker (push) Successful in 1m29s
CI / coverage (push) Successful in 15m57s
CI / status-check (push) Successful in 4s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 1h9m42s
Align resource_links, checkpoint_metadata, and decisions schema behavior with the spec DDL. Add SQLite runtime trigger guards for checkpoint foreign-key semantics and migration-focused Behave/Robot checks that orphan checkpoint references are rejected.

ISSUES CLOSED: #922
2026-04-21 16:53:08 +00:00
CoreRasurae 7f29874156 fix: address code review findings from PR #1175 (issue #10267)
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 37s
CI / build (pull_request) Successful in 3m48s
CI / lint (pull_request) Successful in 3m55s
CI / quality (pull_request) Successful in 4m18s
CI / typecheck (pull_request) Successful in 4m32s
CI / security (pull_request) Successful in 4m35s
CI / integration_tests (pull_request) Successful in 6m47s
CI / e2e_tests (pull_request) Successful in 6m56s
CI / unit_tests (pull_request) Successful in 7m23s
CI / docker (pull_request) Successful in 1m30s
CI / coverage (pull_request) Successful in 14m31s
CI / benchmark-regression (push) Waiting to run
CI / benchmark-publish (push) Waiting to run
CI / status-check (pull_request) Successful in 3s
CI / helm (push) Successful in 27s
CI / push-validation (push) Successful in 26s
CI / build (push) Successful in 3m43s
CI / lint (push) Successful in 3m54s
CI / quality (push) Successful in 4m16s
CI / typecheck (push) Successful in 4m28s
CI / security (push) Successful in 4m43s
CI / integration_tests (push) Successful in 7m3s
CI / e2e_tests (push) Successful in 7m13s
CI / unit_tests (push) Successful in 7m25s
CI / docker (push) Successful in 1m36s
CI / coverage (push) Successful in 13m40s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 14m31s
Implement comprehensive fixes for all P2:should-fix and P3:nit findings
from the Strategy Actor code review:

Update 5 step functions that were calling the private _execute_with_llm() method
directly to instead use the new strategy_tree field from StrategizeResult:

 - step_execute_and_inspect_tree (line 619)
 - step_parse_self_dep (line 877)
 - step_parse_duplicate_step_numbers (line 968)
 - step_parse_non_sequential_steps (line 1075)
 - step_parse_non_sequential_steps_and_inspect (line 1755)
 - step_build_decisions_from_llm_tree (line 1299) - also added execute() call

This eliminates the fragile double-execution pattern that produced divergent ULIDs
and couples tests to private implementation details. Tests now use the public
StrategizeResult.strategy_tree field.

P2:should-fix Fixes:
 - Move json import to module level in plan_executor_coverage_steps.py
 - Remove redundant Exception clause in plan_executor.py exception handler
 - Add logging to silent config service fallback in plan.py
 - Improve structured content block handling in _extract_content() to properly
   extract text from LangChain MessageContent dicts
 - Remove duplicated _DEFAULT_ACTOR_NAME constant and import from canonical
   source (strategy_resolution.py)
 - Add strategy_tree field to StrategizeResult to expose tree for test inspection
   without coupling to private _execute_with_llm() method

P3:nit Fixes:
 - Improved docstrings and code clarity

Refs: #10267
2026-04-21 15:36:09 +01:00
hamza.khyari 5d8bbf22b5 test(plan): add Behave scenarios for stale worktree cleanup (#7271)
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 3m50s
CI / lint (pull_request) Successful in 4m4s
CI / quality (pull_request) Successful in 4m13s
CI / typecheck (pull_request) Successful in 4m39s
CI / security (pull_request) Successful in 4m47s
CI / integration_tests (pull_request) Successful in 8m26s
CI / e2e_tests (pull_request) Successful in 8m36s
CI / unit_tests (pull_request) Successful in 8m47s
CI / docker (pull_request) Successful in 1m39s
CI / coverage (pull_request) Successful in 15m1s
CI / docker (push) Blocked by required conditions
CI / status-check (push) Blocked by required conditions
CI / coverage (push) Blocked by required conditions
CI / benchmark-regression (push) Waiting to run
CI / benchmark-publish (push) Waiting to run
CI / status-check (pull_request) Successful in 5s
CI / push-validation (push) Successful in 42s
CI / helm (push) Successful in 1m10s
CI / build (push) Successful in 3m46s
CI / lint (push) Successful in 3m55s
CI / quality (push) Successful in 4m17s
CI / typecheck (push) Successful in 4m28s
CI / e2e_tests (push) Successful in 7m17s
CI / integration_tests (push) Successful in 7m50s
CI / unit_tests (push) Successful in 8m52s
CI / security (push) Failing after 15m17s
CI / benchmark-regression (pull_request) Has been cancelled
CI / benchmark-publish (pull_request) Has been cancelled
Add 3 Behave scenarios covering GitWorktreeSandbox.cleanup_stale():
- Removes existing branch and worktree directory
- Idempotent when no branch exists (returns False)
- create() succeeds after cleanup_stale removes stale branch

ISSUES CLOSED: #7271
2026-04-21 11:56:19 +00:00