044c21e1b053f37b8e7616fdff49fbeab3ea109f
5 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2651e15854 |
fix(cli): replace non-existent Container.resolve() with named provider calls
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 59s
CI / quality (pull_request) Successful in 37s
CI / lint (pull_request) Successful in 3m35s
CI / build (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 4m25s
CI / unit_tests (pull_request) Successful in 4m19s
CI / integration_tests (pull_request) Successful in 4m1s
CI / docker (pull_request) Successful in 11s
CI / e2e_tests (pull_request) Successful in 10m42s
CI / coverage (pull_request) Successful in 9m42s
CI / status-check (pull_request) Successful in 2s
CI / lint (push) Successful in 23s
CI / typecheck (push) Successful in 50s
CI / quality (push) Successful in 53s
CI / security (push) Successful in 1m2s
CI / benchmark-regression (push) Has been skipped
CI / build (push) Successful in 40s
CI / helm (push) Successful in 43s
CI / integration_tests (push) Successful in 4m29s
CI / unit_tests (push) Successful in 5m7s
CI / docker (push) Successful in 1m20s
CI / e2e_tests (push) Successful in 11m58s
CI / coverage (push) Successful in 14m35s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 33m38s
CI / benchmark-regression (pull_request) Successful in 1h2m19s
The three plan.py call sites (tree, explain, correct) that originally used container.resolve(DecisionService) were already fixed in master. This commit completes the fix by aligning the Robot Framework test mocks to match the corrected production code: - robot/helper_m3_decision_validation_smoke.py: mock_container.resolve → mock_container.decision_service (plan correct dry-run path) - robot/helper_m4_correction_subplan_smoke.py: container.resolve → container.decision_service (correction subplan path) Both helpers previously passed silently because MagicMock auto-creates any attribute, masking the mismatch between mock setup and actual code. Added spec=Container to both mock containers so that accessing non-existent attributes raises AttributeError, matching real container behavior. Updated comment wording in features/container_resolve_crash.feature to clarify that the bug is fixed and the scenarios serve as permanent regression guards. The @tdd_expected_fail tag was already removed by the TDD branch before this fix branch was created; the permanent @tdd_issue and @tdd_issue_647 tags remain per TDD tag lifecycle rules. Added CHANGELOG.md entry describing the fix. ISSUES CLOSED: #647 |
||
|
|
d88dad94f6 |
fix(test): resolve race condition in M4 validation integration test
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 25s
CI / quality (pull_request) Successful in 25s
CI / build (pull_request) Successful in 26s
CI / typecheck (pull_request) Successful in 1m9s
CI / security (pull_request) Successful in 1m18s
CI / integration_tests (pull_request) Successful in 3m43s
CI / unit_tests (pull_request) Successful in 4m8s
CI / docker (pull_request) Successful in 43s
CI / coverage (pull_request) Successful in 5m35s
CI / benchmark-regression (pull_request) Successful in 32m44s
Three-pronged fix for intermittent pabot-parallel race condition in M4 validation integration tests: 1. Composable Setup Database Isolation keyword in common.resource gives each suite a unique CLEVERAGENTS_DATABASE_URL so concurrent pabot workers never contend on the same SQLite file. 2. Per-suite CLEVERAGENTS_HOME directories prevent shared temp directory cleanup from racing between workers. 3. Centralised reset_global_state() in robot/helpers_common.py clears Settings singleton, DI container, provider registry, and engine cache between chained CLI invocations in helper processes. Also: - Setup Test Environment now accepts optional mock_ai and auto_apply_migrations arguments (default TRUE) for backward compatibility while allowing suites to opt out. - Added Suite Teardown to cli_plan_context_commands.robot. - Fixed _COMMANDS typing in two helpers to eliminate type: ignore. - Updated docs/development/testing.md to reflect helpers_common delegation pattern. - Added timeout=30s to all Run Process calls in m4_e2e_verification.robot. Fixes: #563 |
||
|
|
61fc70d84b |
fix(cli): pass decision tree and influence edges to CorrectionService in plan correct handler (#639)
CI / lint (push) Successful in 15s
CI / build (push) Successful in 18s
CI / quality (push) Successful in 18s
CI / security (push) Successful in 35s
CI / typecheck (push) Successful in 37s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m11s
CI / docker (push) Successful in 42s
CI / integration_tests (push) Successful in 3m12s
CI / coverage (push) Successful in 4m40s
CI / benchmark-publish (push) Successful in 16m46s
## Summary Fixes the `plan correct` CLI handler which never passes the decision tree or influence edges to `CorrectionService`, producing single-node impact analysis regardless of the plan's actual decision structure. Closes #606 ## Root Cause The `correct_decision()` handler in `plan.py` created a bare `CorrectionService()` and called `analyze_impact()` and `execute_correction()` without passing `decision_tree` or `influence_edges`. Both parameters default to `None` -> empty dicts, causing `_compute_affected_subtree()` BFS to return only the single target decision, ignoring all descendants and influence-DAG dependents. ## Changes ### Production Fix (`src/cleveragents/cli/commands/plan.py`) - Resolve `DecisionService` via `get_container()` (following the pattern used by `plan explain` and `plan tree`) - Build structural tree adjacency list from `decision_svc.list_decisions(plan_id)` using `parent_decision_id` relationships - Fetch influence edges from `decision_svc.get_influence_edges(plan_id)` - Pass both `decision_tree` and `influence_edges` to `svc.analyze_impact()` and `svc.execute_correction()` ### Existing Test Fixups - Updated 4 step definition files that mock `CorrectionService` to also mock the new `DecisionService` resolution path ### New Tests - **Behave BDD**: 3 scenarios verifying tree/edge forwarding (dry-run subtree, execution subtree, leaf node) - **Robot Framework**: 3 integration smoke tests - **ASV Benchmark**: Tree building and analyze_impact overhead benchmarks ## Quality Gates - `nox -s lint` — PASSED - `nox -s typecheck` — 0 errors - `nox -s unit_tests` — 9,109 scenarios, 0 failures - `nox -s coverage_report` — 97% ISSUES CLOSED: #606 Reviewed-on: #639 Co-authored-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> Co-committed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> |
||
|
|
93730067a2 |
fix(test): address review findings in M3 smoke tests
CI / lint (pull_request) Successful in 24s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 47s
CI / quality (pull_request) Successful in 28s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / integration_tests (pull_request) Successful in 5m7s
CI / unit_tests (pull_request) Successful in 20m55s
CI / benchmark-regression (pull_request) Successful in 25m40s
CI / docker (pull_request) Successful in 14s
CI / coverage (pull_request) Successful in 1h48m41s
- Replace dead after_scenario() hook with context.add_cleanup() calls so patchers are properly stopped (Behave only runs hooks from environment.py) - Fix invalid ULID constants: pad DECISION/CORRECTION to 26 chars, replace invalid 'I' with 'J' in INVARIANT_ULID - Add temp file cleanup for NamedTemporaryFile(delete=False) via context.add_cleanup() in behave steps and try/finally in robot helper - Remove decision-persistence doc sections from testing.md that belong in PR #438, not this PR |
||
|
|
ace7311de4 |
test(e2e): add M3 decision + validation suites
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 19s
CI / build (pull_request) Successful in 20s
CI / security (pull_request) Successful in 55s
CI / typecheck (pull_request) Successful in 1m5s
CI / integration_tests (pull_request) Successful in 4m4s
CI / benchmark-regression (pull_request) Successful in 22m21s
CI / unit_tests (pull_request) Failing after 34m7s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Has been cancelled
|