Commit Graph

14 Commits

Author SHA1 Message Date
brent.edwards 01b6eb1804 feat(autonomy): parallel execution scales to 10+ concurrent subplans (#1201)
## Summary

Add M6 parallel-scaling coverage for 10+ concurrent subplans:

- **15-subplan parallel scenario** with explicit peak-concurrency bound checks (`max_parallel=10`) and thread-safe concurrency tracking via `_build_executor()`.
- **Deep hierarchical decomposition** coverage (4+ levels) with adjusted leaf condition that only stops early when hitting `max_depth` or when the workset is trivially small (`min_files_per_subplan`).
- **Non-progress guard** in `_build_hierarchy` to prevent pathological recursion when clustering cannot meaningfully split the file set.
- **Small-project regression test** (< 50 files) verifying decomposition depth does not increase unexpectedly with the relaxed leaf condition.
- **ASV benchmark** for 15-subplan parallel execution with `max_parallel=10` to track scaling behavior.

### Removed from this PR

The `_build_hierarchy` child-linkage correctness fix (returning `node_id` from recursive calls instead of using `nodes[-1].node_id`) has been **removed** per review feedback — it is a separate bug fix and will be submitted as an independent issue/PR per CONTRIBUTING.md §Atomic Commits.

## Approach

- **Concurrency tracking:** The `_build_executor()` closure in step definitions detects `context.concurrency_counter` / `context.concurrency_lock` and performs thread-safe peak tracking in a try/finally block.
- **Leaf condition:** Replaced the `max_files_per_subplan` / `max_tokens_per_subplan` leaf check with a `min_files_per_subplan` check to allow deeper decomposition for large projects. Added a non-progress guard so clustering that cannot split the file set terminates immediately rather than recursing to `max_depth`.
- **Deterministic IDs:** `_ids_for_count()` preserves legacy fixed IDs for the first 5 subplans and generates additional deterministic IDs for scale scenarios.

## Validation

### Passing
- `nox -s lint` — all checks passed
- `nox -s typecheck` — 0 errors, 0 warnings
- `nox -s unit_tests` — 12,988 scenarios passed, 0 failed
- `nox -s coverage_report` — 97% (passes `--fail-under=97`)

Closes #855

Reviewed-on: cleveragents/cleveragents-core#1201
Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
2026-03-31 23:57:39 +00:00
brent.edwards 3eecb79003 test(plan): TDD failing tests for checkpoint real rollback (bug #822)
TDD expected-fail tests proving bug #822 exists:
CheckpointService.rollback_to_checkpoint() returns a successful
RollbackResult but does not execute git reset --hard. Files modified
after the checkpoint remain unchanged after rollback.

Also fixes Robot Framework timeout robustness across the entire test
suite: all Run Process calls now use on_timeout=kill (prevents
SIGTERM-induced -15 exit codes under CI load) and timeouts increased
to 120s (prevents premature kills during heavy parallel execution).

ISSUES CLOSED: #839
2026-03-16 01:45:50 +00:00
brent.edwards e4705822b1 fix(test): increase subprocess timeouts in cli.robot and cli_core.robot
- Add timeout=60s to all Run Process calls in cli.robot (previously had
  no timeout, causing hangs under CI parallel load)
- Increase cli_core.robot timeouts from 30s to 60s to match other robot
  files
- Relax performance assertions from <30s to <60s to account for Python
  cold-start overhead under pabot parallel execution
2026-02-19 01:35:09 +00:00
khyari hamza 02c75fb4bb feat(cli): enhance version/info/diagnostics with --format and --check
Add structured data builders and Rich renderers for version, info, and
diagnostics commands. Support --format rich/plain/json/yaml output parity
and --check flag for diagnostics (exits non-zero on errors).

Includes Behave scenarios, Robot smoke tests, ASV benchmarks, and updates
existing tests to match the new Rich panel output format.
2026-02-18 12:18:03 +00:00
Jeffrey Phillips Freeman f7d2f63ab8 feat(cli): add resource commands (core) 2026-02-16 16:46:54 -05:00
brent.edwards e8aa5ac268 fix(ci): restore venv PATH, use absolute resource paths, and add timeouts in robot tests
- Restore session.env["PATH"] in integration_tests nox session to ensure
  Run Process uses venv Python instead of system Python
- Convert bare Resource references to ${CURDIR}/ absolute paths across
  30 robot files to fix CI resolution failures
- Add timeout=30s to all Run Process calls in rxpy_route_validation.robot
  to prevent hanging tests
- Tag 2 rxpy tests as slow (require running actors unavailable on CI)
- Fix LangGraph test to use correct config file (LANGGRAPH_CONFIG)
- All 204 tests pass (4 excluded: 2 slow + 2 discovery)
2026-02-13 02:42:57 +00:00
freemo 3a0b9ebfc7 tests: Fixed integration and unit tests, found several bugs and missing features 2026-02-07 23:02:50 -05:00
freemo 162b1e35d0 Build: Made Robot integration tests run in parallel 2025-12-20 10:28:51 -05:00
freemo adf04a7b60 Tests: fixed some minor bugs in our tests 2025-11-25 01:07:09 -05:00
freemo 6d2f26bef2 Feat: Added in plan and project commands and functionality 2025-11-16 20:38:02 -05:00
freemo 9008f1a99d Tentatively finishing phase 1 2025-11-05 17:07:35 -05:00
CleverAgents Dev fb6f559780 feat(architecture): Added skeleton for phase 1 2025-11-05 15:11:03 -05:00
freemo 12fe4413f0 Completed nox code coverage tasks 2025-11-01 20:56:38 -04:00
freemo f74688e5f9 Refactored the boilerplate code to CleverAgents 2025-11-01 19:04:29 -04:00