Commit Graph

1442 Commits

Author SHA1 Message Date
brent.edwards 3b58432ecc docs(merge): merge new docs into branch 2026-02-25 19:41:56 +00:00
freemo c4f71e930d feat(concurrency): add plan resume
Implement step-level progress persistence and plan resume with graceful
shutdown handling.

- Add ResumeCheckpoint, ResumeMetadata, ResumeEligibility, ResumeSummary
  domain models (resume.py)
- Add PlanResumeService with validate_eligibility(), build_resume_summary(),
  resume_plan(dry_run), record_step_checkpoint(), record_shutdown()
- Add last_completed_step and last_checkpoint_id fields to Plan model
- Add 'plan resume' CLI command with --dry-run flag
- Update plan lifecycle docs (ADR-006) with resume behavior section
- Add Behave tests (24 scenarios in plan_resume.feature)
- Add Robot Framework integration tests (10 tests)
- Add ASV benchmarks for resume overhead

Closes #328
2026-02-25 14:00:04 -05:00
freemo 134dce896a feat(provider): add cost controls and fallback
Add token/cost tracking, budget enforcement (per-plan and per-day),
provider fallback selection with capability filtering, and cost
metadata for plan models.

New modules:
- providers/cost_table.py: CostEntry + ProviderCostTable with default
  pricing for OpenAI, Anthropic, Google, Groq, Together, Cohere, Mock
- providers/cost_tracker.py: BudgetStatus enum, BudgetCheckResult,
  CostTracker with warn-at-90%/block-at-100% enforcement
- providers/fallback_selector.py: FallbackSelector with capability
  filtering (tool_calls, streaming, vision, json_mode) and budget
- domain/models/core/cost_metadata.py: CostMetadata + BudgetExhaustionEvent

Modified:
- config/settings.py: budget_per_plan, budget_per_day, fallback_providers
- domain/models/core/plan.py: cost_metadata field + CLI dict surfacing
- providers/__init__.py: public exports for new classes

Testing:
- 71 Behave scenarios in features/cost_controls.feature (all pass)
- 6 Robot Framework integration tests (all pass)
- ASV benchmarks in benchmarks/cost_controls_bench.py
- nox lint, typecheck, format, docs, build, dead_code, security_scan pass

Closes #324
2026-02-25 12:08:01 -05:00
freemo 7a298ede6e feat(concurrency): add plan and project locks
Implemented plan-level and project-level locking with configurable timeouts.
Added locks table via Alembic migration storing owner_id, resource_type,
resource_id, acquired_at, and expires_at. Locks enforced in
PlanLifecycleService transitions. Support for re-entrant acquisition,
lock renewal, graceful shutdown release, and startup cleanup of expired
locks. Added diagnostics check for stale lock reporting.

ISSUES CLOSED: #327
2026-02-25 10:48:05 -05:00
aditya 2f9707cfdf refactor(mcp): fix mock placement, type annotation, and constructor validation
- Extract MockMCPTransport to features/mocks/mock_mcp_transport.py
- Use ToolRegistry type with TYPE_CHECKING in register_tools()
- Move transport config validation into __init__ via _validate_config()
2026-02-25 14:17:34 +00:00
aditya 2deddd3fe2 chore(changelog): add MCP adapter entry 2026-02-25 13:24:19 +00:00
aditya ee82d6101e feat(skill): add MCP adapter for external tools
Implement MCPToolAdapter to connect to external MCP servers, enumerate
tools, and register them in ToolRegistry with source="mcp". Includes
connect/reconnect/disconnect lifecycle with timeout enforcement, input
validation on invoke, capability inference, Behave/Robot/ASV tests, and
docs/reference/mcp_adapter.md.

ISSUES CLOSED: #159
2026-02-25 13:17:26 +00:00
aditya 72b3a49984 chore(changelog): add entry for feat(actor) hierarchical YAML schema and loader 2026-02-25 11:06:42 +00:00
aditya 913fd31e07 Merge branch 'master' into feature/m2-actor-yaml 2026-02-25 10:31:07 +00:00
aditya e476d2de0e feat(actor): extend hierarchical actor YAML schema and loader
Extend actor YAML schema to support hierarchical graphs with explicit
node types (agent, tool, conditional, subgraph), per-node LSP bindings
(lsp_binding with server, languages, auto, capabilities), and tool-source
references (skills, mcp_servers, agent_skills).

Add schema validation for namespaced actor references, duplicate node IDs,
edge target existence, and graph reachability — all nodes must be reachable
from entry_node via explicit edges or conditional node routing targets.

Update loader to report YAML parse errors with precise line/column positions
and schema validation errors with dotted field paths and remediation hints
pointing to docs/reference/actor_config.md.

Add docs/reference/actor_config.md as the practical configuration reference
covering hierarchical graph examples, node type table, topology rules, and
common error cases with fix guidance.

Refresh examples/actors/graph_workflow.yaml to replace deprecated actor_path
with actor_ref. Add benchmarks/actor_yaml_bench.py for schema load overhead.

Tests: 95 Behave scenarios, 10 Robot smoke tests (including hierarchical
loader smoke test), security scan clean, coverage 99% (threshold 97%).

ISSUES CLOSED: #157
2026-02-25 10:30:42 +00:00
CoreRasurae 17ea9c53fb fix: Implementation issues found in the review for features #186 and #303 2026-02-25 10:07:30 +00:00
CoreRasurae 0e8d43c04b chore: Update CHANGELOG and CONTRIBUTORS for the implemented features in PR 417 2026-02-25 10:07:16 +00:00
CoreRasurae f5e4771e78 test(unit): fix failing unit tests 2026-02-25 10:07:09 +00:00
CoreRasurae 8119f439a1 style: fix style checks 2026-02-25 10:07:05 +00:00
CoreRasurae 55cee9b711 test(robot): fix failing integration tests related to security_secrets 2026-02-25 10:07:02 +00:00
CoreRasurae d6c58344d1 test(coverage): add 32 BDD scenarios to boost coverage from 97.0% to 97.2%
Add coverage boost tests targeting low-coverage modules:
- skills/registry.py: validate_skill error paths
- cli/formatting.py: format_output_session, _format_table branches
- cli/commands/system.py: health check functions
- cli/commands/session.py: CRUD command edge cases
- cli/commands/cleanup.py: error handling paths
- cli/commands/audit.py: audit service creation
- application/container.py: container init/reset

All 32 new scenarios pass alongside existing 29 security template
scenarios. Full nox -s coverage_report confirmed at 97.2%.
2026-02-25 10:06:59 +00:00
CoreRasurae a7dc917021 fix(security): harden template rendering
ISSUES CLOSED: #319
2026-02-25 10:06:27 +00:00
CoreRasurae 8604bc66b6 fix(security): enforce explicit exception handling
ISSUES CLOSED: #320
2026-02-25 10:05:57 +00:00
CoreRasurae d70a5d84ae feat(plan): add error recovery patterns and CLI hints
ISSUES CLOSED: #186
2026-02-25 10:05:10 +00:00
CoreRasurae fe69d132f1 feat(dod): enforce definition-of-done gating
ISSUES CLOSED: #178
2026-02-25 10:04:31 +00:00
CoreRasurae 4874f2ad6f feat(validation): add validation pipeline and results model
ISSUES CLOSED: #175
2026-02-25 10:03:57 +00:00
CoreRasurae 57fcc880c3 feat(apply): run validation attachments
ISSUES CLOSED: #176
2026-02-25 10:03:21 +00:00
CoreRasurae 95b6ed57c2 feat(change): add diff review artifacts
ISSUES CLOSED: #303
2026-02-25 10:02:38 +00:00
CoreRasurae ab6a3fd732 feat(apply): add validation-gated apply pipeline
ISSUES CLOSED: #155
2026-02-25 10:01:57 +00:00
brent.edwards 986107ecb2 Merge branch 'test/m2-e2e-verification' into develop-brent-4 2026-02-25 06:36:54 +00:00
brent.edwards 5be1deda67 Merge branch 'test/m1-e2e-verification' into develop-brent-4 2026-02-25 06:36:49 +00:00
brent.edwards e230700857 Merge feature/m1-e2e-sourcecode into develop-brent-4 2026-02-25 06:36:45 +00:00
brent.edwards dbc9be9fc0 Merge feature/m2-actor-tool-smoke into develop-brent-4 2026-02-25 06:35:44 +00:00
brent.edwards ba78617994 Merge branch 'master' into test/m2-e2e-verification 2026-02-25 06:07:59 +00:00
brent.edwards f5ff0e34cf Merge branch 'master' into test/m1-e2e-verification 2026-02-25 06:07:48 +00:00
brent.edwards 5bf1908708 Merge branch 'master' into feature/m1-e2e-sourcecode 2026-02-25 06:07:09 +00:00
brent.edwards 479c275c9d test(e2e): verify M2 success criteria — actor compiler and tool routing v3.1.0 2026-02-25 04:51:15 +00:00
brent.edwards 0397a00eb6 test(e2e): add M1 source-code plan lifecycle suite 2026-02-25 04:50:43 +00:00
brent.edwards af212bc432 test(e2e): verify M1 success criteria — minimal plan execution flow
Add Robot Framework end-to-end test suite that verifies the complete M1
success criteria: action creation from YAML, git resource registration,
project creation and resource linking, plan use/execute/diff/apply
lifecycle, SQLite persistence, ChangeSet from tool invocations, git
worktree sandbox isolation, and post-apply commit verification.
v3.0.0
2026-02-25 04:49:27 +00:00
brent.edwards 9bf87a20d9 chore(pr): address code review feedback for PR #421
- Added CHANGELOG.md entry for M2 E2E test suite (CONTRIBUTING.md §6)
- Added Brent E. Edwards to CONTRIBUTORS.md (CONTRIBUTING.md §8)
- Fixed docs/development/testing.md: corrected M2 Behave scenario count
  from 11 to 10 to match actual feature file
- Added standard explanatory comments to benchmark sys.path setup
  for consistency with project convention (advisory)
- Replaced untyped lambda handler with typed _m2_noop_handler function
  in step definitions (advisory)

All nox stages pass: lint, typecheck, format, unit_tests (280 features /
5846 scenarios / 0 failures), integration_tests (682 passed),
coverage_report (97.2%).

ISSUES CLOSED: #169
2026-02-25 04:13:55 +00:00
brent.edwards d5c7780a53 Merge branch 'master' into feature/m2-actor-tool-smoke 2026-02-25 03:08:57 +00:00
brent.edwards 3a66ce4d02 Merge branch 'master' into feature/m4-cli-extension-tests 2026-02-25 02:58:58 +00:00
brent.edwards f3ddb48faf chore(pr): address code review feedback for PR #420
Added CHANGELOG entry for CLI extension test suite. Added Brent Edwards
to CONTRIBUTORS.md. Replaced broad except Exception with specific
ValidationError catch in benchmark. Moved import json to module
top-level in robot helper script.

ISSUES CLOSED: #326
2026-02-25 02:55:40 +00:00
freemo 1282bc03b3 Docs: Updated timeline 2026-02-24 17:18:02 -05:00
brent.edwards a2a91c3d9c Merge branch 'master' into feature/m2-actor-tool-smoke 2026-02-24 21:59:58 +00:00
brent.edwards c8434e21f3 Merge branch 'master' into feature/m4-cli-extension-tests 2026-02-24 21:56:43 +00:00
brent.edwards 093a74953f test(e2e): add M2 actor + tool source smoke suite
Add comprehensive E2E test suite for M2 (Actor Graphs + Tool Sources) epic:

- Behave BDD: 10 scenarios covering actor YAML loading, skill registry,
  tool lifecycle (discover/activate/execute/deactivate), and MCP stub
- Robot Framework: 6 integration tests via CLI helper script
- ASV benchmarks: 12 benchmarks for actor loading, skill registry,
  tool lifecycle, and MCP stub performance baselines
- MCP stub server mock: in-process fake with 3 tools (search/fetch/transform)
- Fixtures: hierarchical graph actor YAML + skill pack with tool refs and
  inline tools
- Docs: updated testing.md with M2 smoke suite section

Closes #169
2026-02-24 21:55:24 +00:00
mngrif 7ec06d5db8 Merge pull request 'asv runners have the same machine name now' (#388) from mngrif-asv-test into master
Reviewed-on: cleveragents/cleveragents-core#388
Reviewed-by: Brent Edwards <brent.edwards@cleverthis.com>
2026-02-24 21:51:41 +00:00
mngrif 4e750b9b87 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 800835f6a0 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 57ff467321 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 5f76637b21 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif ce4bbd4303 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 8105117c10 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
brent.edwards 2c21611ad5 test(cli): cover action and plan extensions
Added comprehensive test coverage for CLI extension features from #325:
- Behave scenarios for automation_profile resolution, invariant ordering,
  and actor override error cases
- Output snapshot assertions for JSON/YAML/table formats
- Robot integration test for action show with optional actors/invariants
- ASV benchmark for extended CLI scenario runtime baseline
- Updated testing.md with CLI extension test fixture documentation

ISSUES CLOSED: #326
2026-02-24 20:11:42 +00:00