Commit Graph

1086 Commits

Author SHA1 Message Date
eugen.thaci 4b2cf19f4a Fixed some missing spaces in certain places in the table 2026-03-13 18:29:33 +00:00
hamza.khyari 232ef965f5 Merge pull request 'feat(acms): implement UKO Layer 2 Paradigm Vocabularies (uko-oo, uko-func, uko-proc)' (#657) from feature/m6-uko-layer2-paradigm-vocabularies into master
CI / lint (push) Successful in 16s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 18s
CI / security (push) Successful in 33s
CI / e2e_tests (push) Successful in 23s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m17s
CI / integration_tests (push) Successful in 2m46s
CI / docker (push) Successful in 55s
CI / coverage (push) Successful in 5m23s
CI / benchmark-publish (push) Successful in 18m40s
CI / benchmark-publish (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 3m48s
CI / quality (pull_request) Successful in 18s
CI / unit_tests (pull_request) Successful in 2m12s
CI / typecheck (pull_request) Successful in 34s
CI / build (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 14s
CI / docker (pull_request) Successful in 50s
CI / e2e_tests (pull_request) Successful in 27s
CI / security (pull_request) Successful in 33s
CI / coverage (pull_request) Successful in 5m13s
CI / benchmark-regression (pull_request) Failing after 19m26s
Reviewed-on: #657
Reviewed-by: Aditya Chhabra <aditya.chhabra@cleverthis.com>
2026-03-13 18:28:11 +00:00
hamza.khyari 3c014a9565 feat(acms): implement UKO Layer 2 Paradigm Vocabularies (uko-oo, uko-func, uko-proc)
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 19s
CI / e2e_tests (pull_request) Successful in 23s
CI / typecheck (pull_request) Successful in 32s
CI / security (pull_request) Successful in 43s
CI / unit_tests (pull_request) Successful in 2m2s
CI / integration_tests (pull_request) Successful in 2m41s
CI / docker (pull_request) Successful in 49s
CI / coverage (pull_request) Successful in 5m32s
CI / benchmark-regression (pull_request) Successful in 36m2s
2026-03-13 18:21:50 +00:00
hurui200320 317d015260 test(e2e): validate M4 acceptance criteria for v3.3.0 milestone closure
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 18s
CI / e2e_tests (pull_request) Successful in 27s
CI / security (pull_request) Successful in 38s
CI / typecheck (pull_request) Successful in 39s
CI / unit_tests (pull_request) Successful in 3m0s
CI / docker (pull_request) Successful in 10s
CI / integration_tests (pull_request) Successful in 3m29s
CI / coverage (pull_request) Successful in 5m54s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 17s
CI / security (push) Successful in 38s
CI / e2e_tests (push) Successful in 36s
CI / typecheck (push) Successful in 39s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m59s
CI / integration_tests (push) Successful in 3m24s
CI / docker (push) Successful in 38s
CI / coverage (push) Successful in 5m54s
CI / benchmark-publish (push) Successful in 19m34s
CI / benchmark-regression (pull_request) Successful in 36m21s
Strengthen M4 E2E CLI acceptance tests and address all review findings
from the self-review on PR #681 (3 blocking, 7 non-blocking issues).

Blocking fixes:
- Remove tautological domain assertions from cli_plan_execute() that
  verified values the test itself constructed via _mock_parent_plan and
  could never fail.  Replace with a comment documenting that subplan
  info cannot be verified from CLI output alone.
- Fix unguarded positional arg access in plan_diff() that would raise
  IndexError if the production CLI passes plan_id as a keyword argument.
  Now uses kwargs-with-positional-fallback pattern.
- Split the 1074-line helper_m4_e2e_verification.py into four focused
  modules under the CONTRIBUTING.md 500-line limit:
    helper_m4_e2e_common.py (237 lines) — constants, helpers, factories
    helper_m4_e2e_domain.py (495 lines) — domain model tests
    helper_m4_e2e_cli.py    (426 lines) — CLI integration tests
    helper_m4_e2e_verification.py (81 lines) — thin dispatcher

Non-blocking improvements:
- Add ProjectLink isinstance type guard before iterating project_links.
- Wrap all assert_called_once*() calls in try/except with _fail()
  pattern to produce standardised FAIL: diagnostics instead of raw
  AssertionError.
- Make project_links extraction symmetric with action_name (kwargs +
  positional fallback at index 1).
- Replace broad "execute" substring match with word-boundary regex
  r"\bexecute\b" to avoid false positives from incidental substrings.
- Extract _make_subplan_status() factory, _assert_exit_code() and
  _assert_mock_called_once*() wrappers to eliminate DRY violations
  (SubplanStatus construction repeated 3x, exit-code checks 4x).
- Replace non-deterministic datetime.now() calls with frozen constant
  _FROZEN_NOW = datetime(2026, 3, 1, 12, 0, 0) for deterministic
  fixtures.
- Rename generic _DECISION_ULID_N constants to descriptive names
  (_DECISION_PROMPT_DEF, _DECISION_STRATEGY, _DECISION_PARALLEL_SPAWN,
  _DECISION_SPAWN_API, _DECISION_SPAWN_UI).

Quality gates:
- lint: PASS
- format: PASS (1404 files unchanged)
- typecheck: PASS (0 errors)
- unit_tests: 10,431 scenarios, 0 failures
- integration_tests: 1,452 tests, 0 failures
- coverage_report: PASS (98%, threshold 97%)
- security_scan: PASS
- dead_code: PASS
- docs: PASS
- build: PASS

ISSUES CLOSED: #495
2026-03-13 14:03:37 +08:00
hurui200320 eb770643c2 test(e2e): validate M5 acceptance criteria for v3.4.0 milestone closure
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 19s
CI / e2e_tests (pull_request) Successful in 32s
CI / security (pull_request) Successful in 37s
CI / typecheck (pull_request) Successful in 39s
CI / unit_tests (pull_request) Successful in 3m1s
CI / integration_tests (pull_request) Successful in 3m39s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 6m49s
CI / lint (push) Successful in 12s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 17s
CI / e2e_tests (push) Successful in 30s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 49s
CI / unit_tests (push) Successful in 3m16s
CI / integration_tests (push) Successful in 3m37s
CI / docker (push) Successful in 51s
CI / coverage (push) Successful in 6m40s
CI / benchmark-publish (push) Successful in 20m12s
CI / benchmark-regression (pull_request) Successful in 37m11s
Add four CLI-based integration test cases to the M5 E2E verification suite
that exercise the exact commands from the v3.4.0 milestone description via
real subprocess calls to `python -m cleveragents`.

CLI test cases:
- CLI Project Create Large Project: `agents project create local/large-project`
- CLI Resource Add Git Checkout: `agents resource add git-checkout ...`
- CLI Project Link Resource: `agents project link-resource ...`
- CLI Project Show Displays Linked Resource: `agents project show ...`

Each test creates an isolated temp directory with its own CLEVERAGENTS_HOME,
initialises a workspace via `agents init`, runs the target CLI command as a
subprocess with `on_timeout=kill`, asserts zero exit code and verifies
expected output, then tears down the temp directory.

Bug fix: ProjectResourceLinkRepository.create_link() and remove_link() only
called session.flush() without session.commit(), causing linked resource data
to be silently lost between sessions. Added session.commit() to both methods,
plus finally: session.close() to match the session-factory lifecycle pattern
used by all other mutating repository methods. Added session.refresh() and
session.expunge() before return in create_link() so the returned ORM instance
is fully loaded and usable in detached state after session close.

Regression guard: Added two cross-session persistence Behave scenarios
(project_repository.feature) that open a new session from the same engine
after create_link/remove_link and verify the operation was durably committed.

Test improvements from review feedback (rounds 1 and 2):
- Per-test CLEVERAGENTS_HOME isolation via env: override on all Run Process
  calls to prevent shared state between tests.
- Stronger ULID-based assertions: CLI tests capture the resource_id ULID from
  resource show output and verify the exact ID in project show output.
- Regex-based branch assertion (branch.*main) instead of generic string match.
- Test 4 differentiated from Test 3 by verifying resource show independently
  after linking and asserting the specific resource ULID.
- Documentation noting context tier and ACMS criteria are validated at the
  Python API level via helper_m5_e2e_verification.py.
- Updated ProjectResourceLinkRepository class docstring documenting commit
  and close behaviour of mutating methods.
- CHANGELOG entry for both test additions and production bug fix.
- Redundant Library imports removed, --format plain on project list, comments
  explaining fake repo directories, standardised Run Process line style.

Context/ACMS CLI coverage is intentionally not added because the CLI does not
yet expose dedicated context/ACMS inspection commands. These criteria are
validated at the Python API level via helper_m5_e2e_verification.py.

ISSUES CLOSED: #496
2026-03-13 13:32:52 +08:00
CoreRasurae 3e3e9b4b5d feat(observability): wire AuditService.record() into domain services via EventBus auto-dispatch
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 18s
CI / e2e_tests (pull_request) Successful in 30s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 40s
CI / unit_tests (pull_request) Successful in 3m19s
CI / integration_tests (pull_request) Successful in 3m36s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m38s
CI / lint (push) Successful in 12s
CI / quality (push) Successful in 19s
CI / build (push) Successful in 15s
CI / security (push) Successful in 38s
CI / e2e_tests (push) Successful in 28s
CI / typecheck (push) Successful in 42s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m14s
CI / docker (push) Successful in 10s
CI / integration_tests (push) Successful in 3m33s
CI / coverage (push) Successful in 6m3s
CI / benchmark-publish (push) Successful in 19m14s
CI / benchmark-regression (pull_request) Successful in 36m42s
Implements AuditEventSubscriber that subscribes to all 9 security-relevant
EventType members and persists redacted audit entries via AuditService.record().

Key components:
- AuditEventSubscriber: bridges EventBus and AuditService (SEC7)
- SECURITY_EVENT_MAP: maps EventType enum to audit type strings
- Redaction via redact_dict() on event details before persistence
- Graceful error handling: failures logged, never propagated

Post-review fixes applied:
- BUG-1: Remove dead correlation_id null-check guard (DomainEvent.correlation_id
  is always non-None via ULID default_factory)
- SEC-2: Redact exception messages in warning logs via redact_value() to prevent
  potential leakage of sensitive internal state (e.g. DB connection strings)
- PERF-3: Pre-generate unique DomainEvent instances in ASV benchmark setup to
  avoid skew from reusing a single frozen object
- Wire event_bus from the DI container into CorrectionService (plan.py),
  ConfigService (config.py, skill.py x2, server.py), and
  PersistentSessionService (session.py) at their CLI construction sites.

Closes #581
2026-03-12 23:32:48 +00:00
brent.edwards b90f2cccdc Merge pull request 'fix(test): convert M1-M6 E2E suites to real subprocess CLI invocations (closes #658)' (#784) from bugfix/m6-e2e-mock-only-coverage into master
CI / lint (push) Successful in 15s
CI / build (push) Successful in 16s
CI / quality (push) Successful in 18s
CI / e2e_tests (push) Successful in 27s
CI / security (push) Successful in 35s
CI / typecheck (push) Successful in 42s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m14s
CI / integration_tests (push) Successful in 3m30s
CI / docker (push) Successful in 49s
CI / coverage (push) Successful in 6m26s
CI / benchmark-publish (push) Successful in 19m21s
Reviewed-on: #784
2026-03-12 22:13:47 +00:00
brent.edwards 717550c59e Merge branch 'master' into bugfix/m6-e2e-mock-only-coverage
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 18s
CI / build (pull_request) Successful in 21s
CI / e2e_tests (pull_request) Successful in 33s
CI / security (pull_request) Successful in 1m4s
CI / typecheck (pull_request) Successful in 1m11s
CI / unit_tests (pull_request) Successful in 3m4s
CI / integration_tests (pull_request) Successful in 3m47s
CI / docker (pull_request) Successful in 43s
CI / coverage (pull_request) Successful in 6m36s
CI / benchmark-regression (pull_request) Successful in 37m38s
2026-03-12 22:03:28 +00:00
brent.edwards 9141676329 Merge pull request 'test(e2e): TDD failing tests for E2E mock-only coverage (bug #658)' (#738) from tdd/m6-e2e-mock-only-coverage into master
CI / lint (push) Successful in 14s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 18s
CI / e2e_tests (push) Successful in 27s
CI / security (push) Successful in 36s
CI / typecheck (push) Successful in 37s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m12s
CI / integration_tests (push) Successful in 3m42s
CI / docker (push) Successful in 53s
CI / coverage (push) Successful in 5m39s
CI / benchmark-publish (push) Has been cancelled
Reviewed-on: #738
2026-03-12 22:02:02 +00:00
brent.edwards 94d953246d fix(test): correct mock wiring in plan_correct_tree_wiring Robot helper
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 3m0s
CI / integration_tests (pull_request) Successful in 3m26s
CI / docker (pull_request) Successful in 41s
CI / coverage (pull_request) Successful in 5m26s
CI / benchmark-regression (pull_request) Has been cancelled
Replace container.resolve.return_value with container.decision_service.return_value
to match actual CLI code (plan.py uses container.decision_service()). This was the
residual pattern from before the DI migration in this same PR.

Fixes CI: Robot.Plan Correct Tree Wiring (2 of 3 tests failing with exit code 1)
2026-03-12 21:53:38 +00:00
brent.edwards 703511a28f Merge branch 'master' into tdd/m6-e2e-mock-only-coverage
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 18s
CI / e2e_tests (pull_request) Successful in 34s
CI / security (pull_request) Successful in 37s
CI / typecheck (pull_request) Successful in 39s
CI / unit_tests (pull_request) Successful in 4m46s
CI / integration_tests (pull_request) Successful in 5m11s
CI / docker (pull_request) Successful in 42s
CI / coverage (pull_request) Successful in 5m35s
CI / benchmark-regression (pull_request) Successful in 36m16s
2026-03-12 21:43:23 +00:00
freemo 9c8dc9edd2 Docs: Daily update to timeline
CI / lint (push) Successful in 18s
CI / build (push) Successful in 16s
CI / quality (push) Successful in 20s
CI / e2e_tests (push) Successful in 33s
CI / security (push) Successful in 43s
CI / typecheck (push) Successful in 44s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m10s
CI / integration_tests (push) Successful in 3m23s
CI / docker (push) Successful in 40s
CI / coverage (push) Successful in 5m29s
CI / benchmark-publish (push) Successful in 19m12s
2026-03-12 17:31:04 -04:00
brent.edwards 9d36a7f904 Merge pull request 'fix(cli): handle missing database in session list command' (#723) from bugfix/m3-session-list-error into master
CI / lint (push) Successful in 15s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 19s
CI / e2e_tests (push) Successful in 33s
CI / security (push) Successful in 35s
CI / typecheck (push) Successful in 37s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / unit_tests (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / coverage (push) Has been cancelled
Reviewed-on: #723
Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
2026-03-12 21:30:32 +00:00
brent.edwards 76fb84c3d0 Merge remote-tracking branch 'origin/master' into bugfix/m3-session-list-error
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 20s
CI / build (pull_request) Successful in 20s
CI / e2e_tests (pull_request) Successful in 27s
CI / typecheck (pull_request) Successful in 40s
CI / security (pull_request) Successful in 52s
CI / unit_tests (pull_request) Successful in 3m9s
CI / integration_tests (pull_request) Successful in 3m32s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m41s
CI / benchmark-regression (pull_request) Successful in 36m0s
# Conflicts:
#	CHANGELOG.md
2026-03-12 21:22:20 +00:00
freemo d4a1a0d87b test(e2e): set up E2E test infrastructure — nox session, CI job, Robot Framework @E2E tag
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 18s
CI / e2e_tests (pull_request) Successful in 29s
CI / typecheck (pull_request) Successful in 39s
CI / lint (push) Successful in 12s
CI / security (pull_request) Successful in 41s
CI / build (push) Successful in 19s
CI / quality (push) Successful in 22s
CI / security (push) Successful in 36s
CI / typecheck (push) Successful in 40s
CI / benchmark-regression (push) Has been skipped
CI / e2e_tests (push) Successful in 53s
CI / unit_tests (push) Successful in 3m13s
CI / integration_tests (pull_request) Successful in 4m5s
CI / docker (push) Successful in 42s
CI / unit_tests (pull_request) Successful in 4m31s
CI / docker (pull_request) Successful in 40s
CI / integration_tests (push) Successful in 5m7s
CI / coverage (pull_request) Successful in 5m41s
CI / coverage (push) Successful in 5m39s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (pull_request) Successful in 37m35s
Added dedicated E2E test infrastructure completely separate from the existing
integration test suite. E2E tests use zero mocking — they exercise the real
CleverAgents CLI with real LLM API keys.

Key changes:
- New e2e_tests nox session running Robot Framework with --include E2E tag
  filter against robot/e2e/ directory. Uses sequential robot (not pabot)
  since E2E tests hit real API endpoints with rate limits. Propagates
  ANTHROPIC_API_KEY, OPENAI_API_KEY, and GOOGLE_API_KEY from environment.
  Output goes to build/reports/robot-e2e/ to avoid artifact collisions.
- Existing integration_tests session now excludes E2E-tagged tests via
  --exclude E2E on the pabot invocation.
- New robot/e2e/common_e2e.resource provides shared E2E keywords: suite
  setup/teardown with per-suite isolation (no mock AI), graceful skip when
  LLM API keys are absent, CLI runner keyword, flexible output assertions,
  and temporary git repo fixture creation.
- Minimal smoke test (robot/e2e/smoke_test.robot) validates the harness by
  running agents --version and agents --help. Does not require LLM keys.
- Dedicated e2e_tests CI job in .forgejo/workflows/ci.yml injects LLM API
  keys from Forgejo secrets. Runs independently (no needs dependencies)
  and does not block regular CI.
- e2e_tests is deliberately NOT in the default nox sessions list since it
  requires real API keys not present in all environments.

ISSUES CLOSED: #740
2026-03-12 21:11:37 +00:00
brent.edwards 61ba4370f1 fix(cli): address review findings on session commands
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 55s
CI / unit_tests (pull_request) Successful in 2m51s
CI / integration_tests (pull_request) Successful in 3m25s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m33s
CI / benchmark-regression (pull_request) Has been cancelled
- Replace # type: ignore[assignment] with cast() (F1/L1)
- Fix show command format check to include COLOR variant (H1/F3)
- Remove unnecessary AttributeError from all 7 catch tuples (F2)
- Add CHANGELOG.md entry for session DI fix (F4)

Refs: #554, #570
2026-03-12 21:01:55 +00:00
Brent E. Edwards 5e625b22e1 fix(test): convert M1-M6 E2E suites to real subprocess CLI invocations (closes #658)
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 18s
CI / quality (pull_request) Successful in 18s
CI / typecheck (pull_request) Successful in 39s
CI / security (pull_request) Successful in 39s
CI / unit_tests (pull_request) Successful in 3m15s
CI / integration_tests (pull_request) Failing after 3m33s
CI / docker (pull_request) Successful in 2m6s
CI / coverage (pull_request) Successful in 5m20s
CI / benchmark-regression (pull_request) Successful in 36m19s
Replace CliRunner + unittest.mock.patch with subprocess.run for all
21 CLI-facing test functions across the M1-M6 E2E verification helpers.

Application code fixes:
- action.py: _get_lifecycle_service() uses container.plan_lifecycle_service()
- plan.py: _get_lifecycle_service() uses container.plan_lifecycle_service()
- plan.py: three container.resolve(DecisionService) → container.decision_service()

Test infrastructure:
- New robot/helper_e2e_common.py with shared subprocess utilities
  (run_cli, setup_workspace with DB migrations, cleanup_workspace)
- M1-M4, M6 helpers refactored to use run_cli() with real SQLite DB
- M5 unchanged (0 CLI tests, all domain-level)
- TDD detection updated to recognise run_cli() as subprocess invocation
- Remove @tdd_expected_fail from TDD feature + robot tags
- Update 8 Behave step files that mocked container.resolve() to use
  container.decision_service() / container.plan_lifecycle_service()
2026-03-12 20:42:14 +00:00
Luis Mendes c8cd7eab82 feat(testing): implement @tdd_expected_fail tag handling in Behave environment
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 40s
CI / typecheck (pull_request) Successful in 55s
CI / unit_tests (pull_request) Successful in 3m0s
CI / integration_tests (pull_request) Successful in 3m26s
CI / docker (pull_request) Successful in 44s
CI / coverage (pull_request) Successful in 5m28s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 16s
CI / security (push) Successful in 36s
CI / typecheck (push) Successful in 52s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m17s
CI / integration_tests (push) Successful in 3m29s
CI / docker (push) Successful in 42s
CI / coverage (push) Successful in 6m47s
CI / benchmark-publish (push) Successful in 18m40s
CI / benchmark-regression (pull_request) Successful in 37m4s
Implemented the three-tag TDD bug-capture system in Behave environment hooks:

- Added tag validation in before_scenario: @tdd_bug_<N> requires @tdd_bug,
  @tdd_expected_fail requires both @tdd_bug and @tdd_bug_<N>
- Added result inversion via Scenario.run() wrapper installed in before_all:
  scenarios tagged @tdd_expected_fail that fail are reported as passed
  (expected failure), and scenarios that unexpectedly pass are reported as
  failed with guidance to remove the tag
- Added helper functions validate_tdd_tags() and should_invert_result()
- Added inline documentation referencing CONTRIBUTING.md > TDD Bug Test Tags
- Added Behave test scenarios for tag validation and inversion behavior
- Extract apply_tdd_inversion() as a public, testable function that
  encapsulates all inversion logic with proper guards
- Refactored handle_tdd_expected_fail() to delegate to apply_tdd_inversion()
  after tag validation, eliminating ~55 lines of duplicated inversion logic
- Tag validation errors in handle_tdd_expected_fail() are now logged at
  WARNING level instead of being silently swallowed
- Add hook_failed guard: never invert infrastructure/hook errors
- Add was_dry_run guard: skip inversion when no test actually ran
- Add non-AssertionError guard: warn and skip inversion for exceptions
  that likely indicate infrastructure problems, not the captured bug
- Log exception details at DEBUG level before clearing (previously
  discarded silently)
- Attach synthetic AssertionError to last step on unexpected pass so
  the failure reason appears in standard Behave formatter output

ISSUES CLOSED: #627
2026-03-12 19:49:11 +00:00
Brent E. Edwards 6806ef3620 test(e2e): TDD failing tests for E2E mock-only coverage (bug #658)
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / lint (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 20s
CI / typecheck (pull_request) Successful in 38s
CI / security (pull_request) Successful in 47s
CI / unit_tests (pull_request) Successful in 3m19s
CI / docker (pull_request) Successful in 40s
CI / integration_tests (pull_request) Successful in 5m17s
CI / coverage (pull_request) Successful in 5m38s
CI / benchmark-regression (pull_request) Successful in 35m56s
Add Behave and Robot Framework TDD tests that use AST analysis to
inspect the M1-M6 E2E verification helper files and prove that all
21 CLI-facing test functions use unittest.mock.patch + CliRunner
instead of exercising the real CLI via subprocess invocation.

The tests verify three properties that currently fail (proving #658):
- At least one CLI-facing test uses subprocess instead of CliRunner
- At least one CLI-facing test exercises the real service layer
- Every suite with CLI tests has at least one unmocked test

Tagged @tdd_expected_fail so the tests pass CI while the bug is
present.  The @tdd_expected_fail tag inverts the result: the tests
pass because the underlying assertions fail (confirming the bug).
Once #658 is fixed, the tag is removed and the tests run normally.

Files added:
- features/tdd_e2e_mock_only_coverage.feature (3 scenarios)
- features/steps/tdd_e2e_mock_only_coverage_steps.py
- robot/tdd_e2e_mock_only_coverage.robot (3 test cases)
- robot/helper_tdd_e2e_mock_only_coverage.py

ISSUES CLOSED: #697
2026-03-12 18:35:54 +00:00
brent.edwards e732c32981 fix(cli): handle missing database in session list command
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 3m3s
CI / integration_tests (pull_request) Successful in 3m32s
CI / docker (pull_request) Successful in 41s
CI / coverage (pull_request) Successful in 8m43s
CI / benchmark-regression (pull_request) Successful in 38m51s
Register PersistentSessionService in the DI Container so that
'agents session list' (and all other session subcommands) no longer
throw AttributeError due to a missing 'db' provider.

Changes:
- Add _build_session_service() factory and session_service provider to
  Container, with targeted table creation for session/session_messages
  only (avoids bypassing Alembic for the full schema).
- Add auto_commit parameter to SessionRepository and
  SessionMessageRepository; when True each method commits and closes
  its own database session, preventing resource leaks in CLI context.
- Rewrite _get_session_service() to resolve via container.session_service()
  with module-level caching.
- Add (DatabaseError, AttributeError) error handling with logging to all
  seven session subcommands (list, create, show, delete, export, import,
  tell).
- Remove @tdd_expected_fail tags from all session test files so they run
  as proper regression tests.

ISSUES CLOSED: #554, #570, #680
2026-03-12 16:16:41 +00:00
freemo ec0b7631d0 refactor(a2a): rename ACP module and symbols to A2A standard
CI / lint (push) Successful in 12s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 23s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 46s
CI / unit_tests (push) Successful in 3m3s
CI / integration_tests (push) Successful in 3m31s
CI / docker (push) Successful in 40s
CI / coverage (push) Successful in 5m34s
CI / benchmark-publish (push) Successful in 19m15s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 13s
CI / build (pull_request) Successful in 14s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
Renamed src/cleveragents/acp/ to src/cleveragents/a2a/ and all 13
Acp* classes to A2a* per ADR-047 (A2A Standard Adoption). Updated
all imports, structlog event names (acp.* → a2a.*), field names
(acp_version → a2a_version), and test references across the entire
codebase. This is a cosmetic rename only — no behavioral changes.

ISSUES CLOSED: #688
2026-03-12 14:38:57 +00:00
CoreRasurae 1ec525599b fix(test): skip redundant Alembic migration check for existing test databases
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 2m59s
CI / docker (pull_request) Successful in 10s
CI / integration_tests (pull_request) Successful in 3m28s
CI / coverage (pull_request) Successful in 6m35s
CI / benchmark-regression (pull_request) Successful in 35m34s
CI / lint (push) Successful in 12s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 16s
CI / security (push) Successful in 35s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m6s
CI / docker (push) Successful in 10s
CI / integration_tests (push) Successful in 3m26s
CI / coverage (push) Successful in 5m22s
CI / benchmark-publish (push) Successful in 19m46s
When a test database already exists and is non-empty (created by a prior
step like `I have initialized a project`), _fast_init_or_upgrade in
features/environment.py was falling through to _original_init_or_upgrade,
running a full Alembic migration version check every time.  This created
redundant SQLAlchemy engines, caused SQLite lock contention under
parallel execution, and triggered cumulative overhead from @database_retry
decorators (wait_fixed(0.5) × 3 attempts on ~100 repository methods),
leading to intermittent hangs and CI timeouts.

The fix changes the existing-non-empty-database branch to return
immediately instead of delegating to the original migration runner.
This is safe because test databases are either template-copied (already
at Alembic HEAD) or created by a prior step that already ran the full
migration.  The _SCENARIO_DB_PREFIXES guard ensures non-scenario
databases (migration-runner unit tests) remain unaffected.

Verified: 15/15 scenarios pass with both --processes 1 and --processes 16.

ISSUES CLOSED: #726
2026-03-12 12:39:49 +00:00
CoreRasurae 7ac3f1352c feat(devcontainer): add container-aware tool execution and I/O forwarding
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 20s
CI / lint (pull_request) Successful in 26s
CI / security (pull_request) Successful in 37s
CI / typecheck (pull_request) Successful in 57s
CI / unit_tests (pull_request) Successful in 3m14s
CI / integration_tests (pull_request) Successful in 3m33s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 5m29s
CI / lint (push) Successful in 16s
CI / quality (push) Successful in 16s
CI / build (push) Successful in 16s
CI / security (push) Successful in 35s
CI / typecheck (push) Successful in 47s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m1s
CI / integration_tests (push) Successful in 3m31s
CI / docker (push) Successful in 52s
CI / coverage (push) Successful in 5m47s
CI / benchmark-publish (push) Successful in 19m3s
CI / benchmark-regression (pull_request) Successful in 35m19s
Implement ContainerToolExecutor for delegating tool invocations to
devcontainer environments with full I/O forwarding. Add PathMapper for
bidirectional host/container path translation. Wire container routing
into ToolRunner with graceful fallback when no executor is configured.
Add container_metadata field to ToolInvocation for tracking execution
context.

New modules:
- tool/container_executor.py: ContainerToolExecutor, ContainerConfig,
  ContainerMetadata, ContainerExecutionError, ContainerTimeoutError
- tool/path_mapper.py: PathMapper with host_to_container/container_to_host

Modified:
- tool/runner.py: container execution routing via ExecutionEnvironment
- domain/models/core/change.py: container_metadata on ToolInvocation
- tool/__init__.py: new public exports

Review fixes applied:
- Add Alembic migration m6_004 for container_metadata_json column
- Enforce _MAX_OUTPUT_BYTES (50 MiB) truncation in _run_command()
- Fix path traversal in sync_results_to_host (Path.is_relative_to)
- Allow spaces in _looks_like_path() for valid filesystem paths
- Preserve negative exit codes from signal kills in metadata
- Add default=str to json.dumps(invocation.arguments) safety net
- Log warnings when path mapping recursion depth exceeded
- Warn when devcontainer binary not found on PATH
- Use default allow_nan for host-path JSON validation in runner.py
  (only container path requires RFC 7159 strict mode)
- Reject URL-like patterns in _looks_like_path() to avoid false
  positives on API routes, protocol-relative URIs, and query strings
- Add extract_container_metadata() static helper on
  ContainerToolExecutor as bridge for ToolInvocation wiring
- Use raw_stdout bytes in sync_results_to_host to prevent
  binary file corruption from text-mode decode/re-encode
- Apply posixpath.normpath() in workspace_folder validator and
  reject path components containing '..'
- Check result.timed_out in sync_results_to_host and raise
  ContainerTimeoutError instead of always raising ContainerExecutionError
- Detect overlapping host_root/container_root in PathMapper and
  raise ValueError to prevent corrupt bidirectional mappings
- Wrap host-side I/O in sync_results_to_host with try/except
  OSError to produce ContainerExecutionError on write failure
- Enforce int(timeout) in _build_exec_command to prevent shell
  injection via malicious objects with __str__ methods
- Change ToolResult validator from 'not self.error' to
  'self.error is None' so empty-string errors are accepted
- Iterate required list directly in ToolRunner schema validation
  to detect fields listed in required but absent from properties

Closes #515
2026-03-12 10:31:37 +00:00
Brent E. Edwards b5fc903425 test(cli): TDD failing tests for session list missing database (bug #680)
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 38s
CI / security (pull_request) Successful in 53s
CI / unit_tests (pull_request) Successful in 2m58s
CI / integration_tests (pull_request) Successful in 3m30s
CI / docker (pull_request) Successful in 1m9s
CI / coverage (pull_request) Successful in 5m30s
CI / benchmark-regression (pull_request) Successful in 35m22s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 16s
CI / quality (push) Successful in 21s
CI / security (push) Successful in 35s
CI / typecheck (push) Successful in 48s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 3m25s
CI / unit_tests (push) Successful in 3m43s
CI / docker (push) Successful in 10s
CI / coverage (push) Successful in 5m39s
CI / benchmark-publish (push) Successful in 19m41s
Add Behave and Robot Framework TDD tests that exercise the session list
command when no database file exists.  Tagged @tdd_expected_fail so that
the tests pass CI while the bug is present (the Container has no db
provider, causing AttributeError).  Once the bugfix removes the tag,
these become permanent regression tests.

ISSUES CLOSED: #683
2026-03-11 22:50:37 +00:00
freemo 3959565723 Docs: Daily update to timeline
CI / lint (push) Successful in 14s
CI / build (push) Successful in 16s
CI / quality (push) Successful in 17s
CI / typecheck (push) Successful in 38s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 38s
CI / unit_tests (push) Successful in 3m12s
CI / integration_tests (push) Successful in 3m51s
CI / docker (push) Successful in 40s
CI / coverage (push) Successful in 5m45s
CI / benchmark-publish (push) Successful in 18m44s
2026-03-11 16:47:22 -04:00
freemo a8bb543f96 Docs: Updated contributings general section to include prohibition on integration test mocks
CI / lint (push) Successful in 15s
CI / build (push) Successful in 17s
CI / quality (push) Successful in 19s
CI / security (push) Successful in 36s
CI / typecheck (push) Successful in 39s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 5m16s
CI / unit_tests (push) Successful in 6m4s
CI / coverage (push) Successful in 5m53s
CI / docker (push) Successful in 52s
CI / benchmark-publish (push) Successful in 18m57s
2026-03-11 15:32:21 -04:00
freemo b16bd27667 Docs: daily update to timeline 2026-03-11 15:32:16 -04:00
CoreRasurae 4d3499dcfb feat(async): wire retry policies into services
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 18s
CI / security (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 2m43s
CI / integration_tests (pull_request) Successful in 3m20s
CI / docker (pull_request) Successful in 51s
CI / coverage (pull_request) Successful in 6m18s
CI / build (push) Successful in 14s
CI / lint (push) Successful in 21s
CI / quality (push) Successful in 29s
CI / typecheck (push) Successful in 35s
CI / security (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m17s
CI / docker (push) Successful in 9s
CI / integration_tests (push) Successful in 3m29s
CI / coverage (push) Successful in 7m3s
CI / benchmark-publish (push) Successful in 19m50s
CI / benchmark-regression (pull_request) Successful in 40m6s
Wire per-service retry policies and circuit breakers into the service
layer via ServiceRetryWiring, backed by ServiceRetryPolicyRegistry and
configurable through Settings environment variables.

Production hardening from code review:
- Fix TOCTOU race in CircuitBreaker._on_success (half-open state)
- Add half-open probe limit to prevent unbounded concurrent requests
- Track all exception types for circuit breaker failure counting
- Detect async callables wrapped in functools.partial and callable objects
- Enforce spec-compliant 2s minimum for linear backoff strategy
- Enforce 0.1s floor for fixed backoff strategy
- Add retry amplification guard via contextvars nesting depth tracking
- Cap total retry wall-clock time at 300s (MAX_RETRY_TOTAL_TIMEOUT)
- Sanitize exception messages in retry logs to prevent secret leakage
- Fix wrap_service_method TOCTOU by holding cache lock for full operation
- Deep-copy default policies to prevent cross-policy mutation
- Warn on unknown override keys in apply_overrides
- Guard apply_overrides against non-dict and deeply nested JSON values
- Read circuit breaker state under lock in is_circuit_open
- Catch RecursionError in JSON config parsing
- Add total_timeout + nesting guard to retry_service_operation decorator
- Extend secret sanitization to Authorization headers, private_key,
  connection_string, and access_key patterns
- Enforce 0.1s floor on jitter backoff strategy
- Cache wait strategies per service in ServiceRetryWiring (M3)
- Reset failure_count to 0 when entering half-open from open (M6)
- Use cached _get_wait_strategy() in execute()/async_execute()
- Move circuit-open logging out of _on_failure lock scope to prevent
  holding the lock during potentially slow I/O (F1)
- Pass total_timeout=MAX_RETRY_TOTAL_TIMEOUT to wrap_service_method
  retry_service_operation call for consistency with execute() (F4)
- Capture failure_count into local variable inside lock scope before
  logging outside the lock, preventing stale reads from concurrent
  threads in CircuitBreaker.call() and async_call() (F1)
- Deep-copy module-level DEFAULT_DATABASE_RETRY and DEFAULT_CIRCUIT_BREAKER
  in ServiceRetryPolicyRegistry.get() for auto-generated unknown service
  policies, preventing shared mutable state corruption (F1)
- Unify CircuitBreaker to a single threading.Lock for sync and async (P1-1)
- Restore BaseException permit in half-open path to prevent permit leak (P1-6)
- Prevent CircuitBreakerOpen cascading into failure_count (S2)
- Protect all logger calls with contextlib.suppress (S3, S4)
- Replace time.time() with time.monotonic() for monotonic timing (S5)
- Add distinct log events for half-open and closed transitions (S11, S12)
- Track pre-existing services so second apply_settings_defaults only
  targets newly registered services (P1-2)
- Lazy circuit breaker creation via _get_or_create_cb() (P1-3)
- Reject async callables in sync execute() with TypeError (P1-5)
- Strengthen retry predicate to retry_if_exception_type(Exception) &
  retry_if_not_exception_type(CircuitBreakerOpen) (S1)
- Add lock on _get_wait_strategy cache access (P2-16)
- Truncate raw JSON to 80 chars in override warning (P2-17)
- Warn on non-dict JSON overrides (P2-29)
- Debug log for nesting guard bypass (S13)
- Deep-copy from get() and all_policies() in registry (P1-4)
- Thread-safe registry with threading.Lock (P2-15)
- Robust exception handling in apply_overrides get() (P2-18)
- Log ValidationError details on override failure (P2-19)
- Sanitize service_name via _safe_service_name() (P2-28)
- Warn on non-dict sub-key values in overrides (P2-30)
- Allowlist for is_read_only_plan_operation phases (P2-10)
- Cap retry_auto_debug sleep at 60s (P2-11)
- Use is-not-None instead of falsy checks for error values (P2-12)
- Extend secret regex with bearer, session_id, auth_token,
  refresh_token, client_secret patterns (P2-25)
- Pre-truncate error messages to 2000 chars before regex (P2-26)
- Add upper bounds on retry Settings fields (P2-7)
- Add cross-field validator max_delay >= base_delay (P2-8)
- Case-insensitive backoff strategy validation (P2-21)
- Add half_open_max_successes setting (S10)
- Remove phantom ContextFragment from services __all__ (ImportError fix)
- Export ServiceRetryWiring from application.services package
- Include sanitised error context in TypeError logging fallback
- Initialise RetryContext.attempt_count to 1 for bare context-manager usage
- Introduce CircuitBreakerState StrEnum replacing raw string literals
- Fix vacuous CircuitBreakerOpen propagation assertions in BDD steps
- Replace tautological logging test with structlog capture verification
- Assert circuit breaker existence instead of silently skipping on None
- Add Unicode control-char rejection validator to ServiceRetryPolicy.service_name
- Add name parameter with service= in all log calls
- Add extra="forbid" to all 3 Pydantic models
- Deep-copy _SERVICE_DEFAULTS construction
- Key normalisation (.strip()) in get() and apply_overrides()
- Add cooldown <= recovery_timeout validator
- Async guard on RetryContext.execute()
- Nesting guard on RetryContext.execute()/async_execute()
- stop_after_delay(300.0) on RetryContext
- retry_auto_debug async-only guard, dict result fix, sleep guard
- Retry-attempt logging in RetryContext
- Module-level docs for contextlib.suppress(TypeError) rationale
- Exhaustion log on retry failure
- Startup log in __init__; name=service_name to CircuitBreaker
- log_after_retry guarded to not fire on first-attempt success
- get_retry_decorator now includes logging callbacks
- Changed retry_backoff_strategy from str to RetryStrategy StrEnum

Closes #313
2026-03-11 17:42:13 +00:00
freemo d5b122d4a3 Docs: Updated to A2A and integrating rest standard
CI / lint (push) Successful in 14s
CI / quality (push) Successful in 21s
CI / security (push) Successful in 36s
CI / build (push) Successful in 36s
CI / typecheck (push) Successful in 39s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m57s
CI / integration_tests (push) Successful in 3m23s
CI / docker (push) Successful in 53s
CI / coverage (push) Successful in 5m58s
CI / benchmark-publish (push) Successful in 19m27s
2026-03-11 13:19:55 -04:00
freemo 674c5b8a6b Docs: Daily update to timeline
CI / lint (push) Successful in 23s
CI / build (push) Successful in 27s
CI / quality (push) Successful in 43s
CI / typecheck (push) Successful in 45s
CI / security (push) Successful in 45s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 3m38s
CI / unit_tests (push) Successful in 4m49s
CI / docker (push) Successful in 1m1s
CI / coverage (push) Successful in 5m33s
CI / benchmark-publish (push) Failing after 7m2s
2026-03-11 10:05:25 -04:00
freemo e98c8e6c79 Docs: Added and revised server-client protocol details
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / benchmark-regression (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
2026-03-11 10:02:27 -04:00
freemo 82def1112b docs(tui): promote TUI to top-level section and fix mkdocs nav warnings
CI / lint (push) Successful in 14s
CI / build (push) Successful in 16s
CI / quality (push) Successful in 18s
CI / typecheck (push) Successful in 38s
CI / security (push) Successful in 38s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m6s
CI / docker (push) Successful in 10s
CI / integration_tests (push) Successful in 3m26s
CI / coverage (push) Successful in 6m18s
CI / benchmark-publish (push) Successful in 18m34s
Restructure the TUI specification from a nested subsection under
"Behavior > UI / Interaction Model" to a top-level "## TUI" section,
giving it equal standing with Core Concepts, Behavior, Configuration,
and Architecture. All headings within the TUI section are promoted one
level (#### → ###, ##### → ####).

Fix mkdocs build nav warnings by adding ADR-044/045/046 to the
mkdocs.yml nav and registering three missing reference pages
(acms_fusion, context_indexing, resource_type_inheritance) in the
gen_ref_pages.py nav builder.
2026-03-11 00:39:57 -04:00
freemo c129ea5098 docs(tui): add exhaustive detail for block cursor, settings, notifications, per-window hotkeys, and secondary screens
Expand the TUI specification section with comprehensive detail that was
identified as missing in a gap analysis against the original design prompt
and Toad TUI feature inventory. The flat "Global Hotkey Reference" table
is replaced with 16 per-window/overlay hotkey tables.

New specification content:

Block Cursor and Context Menu:
- Block cursor navigation (alt+up/down, space, enter)
- Floating context menu with 7 actions: copy to clipboard (c), copy to
  prompt (p), export as Markdown (e), export as SVG (v), maximize (m),
  retry (r), show raw data (d)
- New diagram: context menu popup

Conversation Block Details:
- Tool call states with 4 lifecycle phases (pending, completed collapsed,
  completed expanded, failed) and tools.expand setting (never/always/
  success/fail/both)
- Actor thought block with collapsed (max 10 lines) and expanded states
- Permission question widget with allow/reject options and queue behavior
- New diagrams: tool call states, thought block, question widget

Prompt Architecture Detail:
- History navigation with per-mode JSONL files (prompt vs shell), up/down
  at start/end of TextArea, 10K entry cap
- Key passthrough from conversation Window to prompt on printable chars
- Multiline detection (newlines, triple backticks, shift+enter)
- Shell danger detection with heuristic patterns (rm -rf, chmod 777, dd,
  fork bombs, mkfs, sudo) and configurable shell.warn_dangerous setting

Notification System:
- Flash messages (4 semantic styles: default, success, warning, error)
- Desktop notifications via notifypy (never/on-blur/always), 5 trigger
  events, low-severity suppression
- Terminal title management with VT escape sequences, state-dependent
  icons, and configurable blink on input-needed
- Sound effects (4 event sounds, graceful degradation)

Clipboard Operations:
- Auto-copy on selection (ui.auto_copy), block copy via context menu,
  pyperclip with OSC 52 fallback

Session Persistence and Resume:
- SQLite storage schema (10 columns) at ~/.local/state/cleveragents/tui.db
- 6-step resume workflow via ctrl+r or /session:import

Sessions Screen:
- New diagram: sessions modal with active + saved session sections
- Time formatting, session state indicators, keyboard bindings

Settings Screen:
- New diagram: schema-driven settings modal with search
- Complete settings schema: 7 categories, 30+ settings with types,
  defaults, ranges, and descriptions (UI, notifications, sidebar, agent,
  tools, shell, diff)

Additional Features:
- Conversation content pruning (prune_low_mark/prune_excess thresholds)
- Double-tap safety (ctrl+c 5s quit window, escape 400ms terminal exit)
- Loading states (rainbow throbber + rotating quotes alternative)
- Conversation export (JSON, Markdown, per-block SVG)
- Column width and scrollbar configuration

Per-Window Hotkey Tables (16 tables replacing 1 flat table):
- Global, MainScreen prompt, MainScreen conversation/cursor, block context
  menu, terminal focused, sidebar visible, sidebar fullscreen, reference
  picker (search + tree modes), slash command overlay, plan detail modal,
  project detail modal, persona editor modal, permissions screen, settings
  screen, sessions screen, question widget, help panel
2026-03-11 00:39:57 -04:00
freemo 56f3b49725 docs(tui): add comprehensive TUI specification with 18 aligned ASCII mockup diagrams
Add the complete TUI (Terminal User Interface) specification section to
docs/specification.md, covering architecture, layout, navigation, persona
system, reference picker, slash commands, shell mode, session management,
and keyboard shortcuts. The section includes 18 HTML-styled ASCII mockup
diagrams using the Dracula color palette that render with actual colors
in MkDocs.

Key specification areas:
- MainScreen layout with right-side collapsible sidebar (3 states:
  hidden, visible, fullscreen cycled by shift+tab)
- Direct-to-chat launch with first-run actor selection overlay
- Persona system bundling actor + arguments + project/plan scope,
  cycled with tab; argument presets cycled with ctrl+tab
- @ reference picker with fuzzy search for projects/plans/resources
- / slash commands mirroring CLI noun:verb patterns (session:new,
  plan:list, project:show, actor:switch, etc.)
- ! shell mode for direct command execution
- Multi-session tabs with independent personas and conversations
- Escape-cascading navigation back to main screen
- Plan detail view with decision tree navigation
- Project detail view with resource DAG
- Permission approval workflow with diff view
- Complete keyboard shortcut reference table

New ADR files:
- ADR-044: TUI Architecture and Framework (Textual >= 1.0)
- ADR-045: TUI Persona System
- ADR-046: TUI Reference and Command System (CLI-aligned commands)

Also adds TUI mockup CSS classes to docs/stylesheets/extra.css for
Dracula-palette diagram rendering (.tui-primary, .tui-secondary,
.tui-success, .tui-warning, .tui-error, .tui-dim, .tui-bold,
.tui-bold-primary, .tui-bold-warning, .tui-primary-u, .tui-rainbow).
2026-03-11 00:39:57 -04:00
brent.edwards 76c3d5b731 Merge pull request 'fix(actor): handle empty actor list without validation error' (#594) from feature/m3-fix-actor-list-empty into master
CI / lint (push) Successful in 15s
CI / quality (push) Successful in 19s
CI / build (push) Successful in 21s
CI / typecheck (push) Successful in 38s
CI / security (push) Successful in 38s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m43s
CI / docker (push) Successful in 38s
CI / integration_tests (push) Successful in 3m57s
CI / coverage (push) Successful in 5m49s
CI / benchmark-publish (push) Successful in 18m36s
Reviewed-on: #594
Reviewed-by: Rui Hu <rui.hu@cleverthis.com>
2026-03-11 04:01:31 +00:00
brent.edwards f5b562c104 fix(test): remove @tdd_expected_fail tags since bug #592 is fixed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 21s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 39s
CI / unit_tests (pull_request) Successful in 2m58s
CI / integration_tests (pull_request) Successful in 3m28s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m27s
CI / benchmark-regression (pull_request) Successful in 36m5s
This branch contains the fix for bug #592 (actor name slash sanitisation).
The TDD tests from PR #655 are tagged @tdd_expected_fail which expects
the bug to be present, but since the fix is on this branch the tests
pass unexpectedly, causing CI failures.

Remove the @tdd_expected_fail tags from both Behave and Robot test files
so the tests run as normal regression tests alongside the fix.

ISSUES CLOSED: #592
2026-03-11 03:54:46 +00:00
brent.edwards f2e44b2cf1 Merge remote-tracking branch 'origin/master' into feature/m3-fix-actor-list-empty
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 36s
CI / unit_tests (pull_request) Failing after 2m55s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 3m28s
CI / coverage (pull_request) Successful in 5m33s
CI / benchmark-regression (pull_request) Has been cancelled
# Conflicts:
#	features/mocks/fake_provider.py
2026-03-11 03:40:37 +00:00
brent.edwards 5b9f0554c0 Merge pull request 'test(actor): add TDD failing tests for actor list empty validation error' (#655) from tdd/actor-list-validation into master
CI / lint (push) Successful in 14s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 18s
CI / security (push) Successful in 36s
CI / typecheck (push) Successful in 38s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m37s
CI / docker (push) Successful in 9s
CI / integration_tests (push) Successful in 3m22s
CI / coverage (push) Successful in 5m29s
CI / benchmark-publish (push) Successful in 20m39s
Reviewed-on: #655
Reviewed-by: Hamza Khyari <hamza.khyari@cleverthis.com>
2026-03-11 03:37:23 +00:00
brent.edwards 1a1d0a7fbb fix(test): remove self-inversion from actor list Robot helper
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 18s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 57s
CI / unit_tests (pull_request) Successful in 2m50s
CI / docker (pull_request) Successful in 9s
CI / integration_tests (pull_request) Successful in 3m23s
CI / coverage (pull_request) Successful in 5m26s
CI / benchmark-regression (pull_request) Successful in 35m30s
The helper was written before the tdd_expected_fail_listener existed and
inverted pass/fail internally.  After merging master the listener is now
active, causing a double inversion that made all three tdd_bug_592 Robot
tests fail with 'bug appears to be fixed — remove the tag'.

Switch to the real-outcome convention: exit 0 + sentinel when the bug is
fixed, exit 1 when the bug is still present, and let the listener handle
inversion.

ISSUES CLOSED: #634
2026-03-11 03:21:50 +00:00
brent.edwards 205e94eb52 Merge remote-tracking branch 'origin/master' into feature/m3-fix-actor-list-empty
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 18s
CI / security (pull_request) Successful in 39s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 3m6s
CI / integration_tests (pull_request) Successful in 3m19s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 5m24s
CI / benchmark-regression (pull_request) Has been cancelled
# Conflicts:
#	CHANGELOG.md
#	noxfile.py
2026-03-11 03:12:52 +00:00
brent.edwards 5c5de082f2 Merge remote-tracking branch 'origin/master' into tdd/actor-list-validation
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 38s
CI / security (pull_request) Successful in 51s
CI / unit_tests (pull_request) Successful in 2m43s
CI / docker (pull_request) Successful in 9s
CI / integration_tests (pull_request) Failing after 3m38s
CI / coverage (pull_request) Successful in 5m29s
CI / benchmark-regression (pull_request) Has been cancelled
# Conflicts:
#	benchmarks/tdd_session_create_di_bench.py
#	features/steps/tdd_session_create_di_steps.py
#	robot/helper_tdd_session_create_di.py
#	robot/tdd_session_create_di.robot
2026-03-11 03:07:42 +00:00
brent.edwards 70da5572a6 Merge pull request 'test(session): add TDD failing tests for session create DI error' (#654) from tdd/session-create-di-error into master
CI / lint (push) Successful in 16s
CI / build (push) Successful in 17s
CI / quality (push) Successful in 18s
CI / security (push) Successful in 36s
CI / typecheck (push) Successful in 38s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m48s
CI / integration_tests (push) Successful in 3m17s
CI / docker (push) Successful in 40s
CI / coverage (push) Successful in 5m44s
CI / benchmark-publish (push) Successful in 18m40s
Reviewed-on: #654
2026-03-11 02:50:22 +00:00
brent.edwards aa5d5eeaf5 test(session): add TDD failing tests for session create DI error
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 18s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 2m42s
CI / integration_tests (pull_request) Successful in 3m13s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 6m15s
CI / benchmark-regression (pull_request) Successful in 34m51s
Implement TDD bug-capture tests for bug #570 where `agents session create`
fails because `_get_session_service()` calls `container.db()` which does
not exist on the DI Container class (AttributeError). Same root cause as
bug #554.

Behave BDD scenarios tagged @tdd_bug @tdd_bug_570 @tdd_expected_fail
exercise the real DI path (no mocks). Includes Robot Framework integration
smoke tests with self-inverting helper and ASV benchmark baseline.

ISSUES CLOSED: #631
2026-03-11 02:42:13 +00:00
hamza.khyari afaae615f2 Merge pull request 'feat(acms): implement Temporal Data Model (Revision-Aware RDF) with 3 storage tiers' (#615) from feature/m6-temporal-data-model-revision-aware-rdf into master
CI / lint (push) Successful in 15s
CI / build (push) Successful in 16s
CI / quality (push) Successful in 17s
CI / typecheck (push) Successful in 39s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 51s
CI / unit_tests (push) Successful in 2m39s
CI / docker (push) Successful in 40s
CI / integration_tests (push) Successful in 3m28s
CI / coverage (push) Successful in 5m30s
CI / benchmark-publish (push) Successful in 18m31s
Reviewed-on: #615
Reviewed-by: Brent Edwards <brent.edwards@cleverthis.com>
2026-03-11 01:43:38 +00:00
hamza.khyari d5f7f15215 feat(acms): implement Temporal Data Model (Revision-Aware RDF) with 3 storage tiers
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 14s
CI / quality (pull_request) Successful in 20s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 39s
CI / unit_tests (pull_request) Successful in 2m50s
CI / integration_tests (pull_request) Successful in 3m22s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m49s
CI / benchmark-regression (pull_request) Successful in 35m15s
Temporal metadata fields (validFrom, validUntil, isCurrent, isRevisionOf)
on UKO InformationUnit nodes enable revision chain tracking: when code
changes, old nodes are marked historical and new revision nodes are
created with back-links. Three storage tiers (hot/warm/cold) filter
nodes by temporal scope (current/recent/all) with configurable retention
(warm_retention_hours default 24h, cold_retention_days default 90d).

Includes TemporalMetadata, TemporalNode, RevisionChain, TierQueryResult,
TierRetentionConfig frozen domain models, TemporalBackend protocol,
InMemoryTemporalBackend stub, TemporalService with structlog and DI,
BackendSet.temporal typing upgrade from object|None to TemporalBackend|None.
67 Behave scenarios, 8 Robot Framework tests, ASV benchmarks, and
reference documentation.

ISSUES CLOSED: #577
2026-03-11 01:36:06 +00:00
hamza.khyari 95808fdf77 Merge pull request 'feat(acms): implement Real-time Index Sync / UKOIndexer with pluggable analyzers' (#612) from feature/m5-realtime-index-sync-ukoindexer into master
CI / lint (push) Successful in 13s
CI / build (push) Successful in 17s
CI / quality (push) Successful in 21s
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 3m6s
CI / integration_tests (push) Successful in 3m24s
CI / docker (push) Successful in 1m1s
CI / coverage (push) Successful in 6m20s
CI / benchmark-publish (push) Has been cancelled
Reviewed-on: #612
Reviewed-by: Brent Edwards <brent.edwards@cleverthis.com>
2026-03-11 01:33:38 +00:00
hamza.khyari 12b026e100 Merge remote-tracking branch 'origin/master' into feature/m5-realtime-index-sync-ukoindexer
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 37s
CI / unit_tests (pull_request) Successful in 2m40s
CI / integration_tests (pull_request) Successful in 3m20s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m35s
CI / benchmark-regression (pull_request) Successful in 34m56s
2026-03-11 01:26:26 +00:00
brent.edwards 0a7892b030 Merge pull request 'test(session): add TDD failing tests for session list DI error' (#653) from tdd/session-list-di-error into master
CI / quality (push) Successful in 18s
CI / lint (push) Successful in 21s
CI / build (push) Successful in 22s
CI / security (push) Successful in 36s
CI / typecheck (push) Successful in 38s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m49s
CI / docker (push) Successful in 9s
CI / integration_tests (push) Successful in 3m47s
CI / coverage (push) Successful in 6m20s
CI / benchmark-publish (push) Successful in 18m36s
Reviewed-on: #653
Reviewed-by: Aditya Chhabra <aditya.chhabra@cleverthis.com>
2026-03-11 00:49:26 +00:00
Brent E. Edwards bed7072dde fix(tdd): restore tdd_expected_fail tags and fix Robot helper inversion
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 21s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 42s
CI / unit_tests (pull_request) Successful in 2m35s
CI / docker (pull_request) Successful in 8s
CI / integration_tests (pull_request) Successful in 3m30s
CI / coverage (pull_request) Successful in 5m17s
CI / benchmark-regression (pull_request) Successful in 35m10s
Bug #554 is NOT yet fixed — the DI container still lacks a db provider.
The previous commit incorrectly removed tdd_expected_fail tags, exposing
the real failures in Behave unit tests (13 scenarios).

Root cause: the Robot helper had its own pass/fail inversion (a workaround
from before tdd_expected_fail_listener existed).  The master merge brought
in the listener, causing double inversion that made Robot tests appear to
pass.  This commit:

- Rewrites the helper to report real outcomes (exit 0 = bug fixed)
- Restores tdd_expected_fail on all 16 Robot + Behave scenarios
- Lets the listener (Robot) and environment.py (Behave) handle inversion
2026-03-11 00:40:35 +00:00
hamza.khyari 1e606553d4 feat(acms): implement Real-time Index Sync / UKOIndexer with pluggable analyzers
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 18s
CI / security (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 2m32s
CI / integration_tests (pull_request) Successful in 3m18s
CI / docker (pull_request) Successful in 49s
CI / coverage (pull_request) Successful in 5m29s
CI / benchmark-regression (pull_request) Successful in 33m48s
Implement the UKOIndexer service that produces UKO triples from resources
using pluggable domain-specific analyzers, wraps each triple with provenance
metadata, and simultaneously indexes into text, vector, and graph backends.

Key design decisions and components:

- UKOIndexer orchestrates the full index lifecycle: add_resource,
  update_resource (remove-then-add), remove_resource, and maintenance
  triggers. Each operation fires lifecycle hooks (on_indexed, on_removed,
  on_error) so callers can observe progress.

- Analyzer selection is pluggable via ContentAnalyzer protocol. The indexer
  accepts a registry mapping resource types to analyzers. PythonAnalyzer
  and MarkdownAnalyzer are provided as built-in implementations.

- LocationContentReader protocol abstracts file I/O with a base_dir
  parameter for path-traversal prevention (post-resolve validation rejects
  paths escaping the base directory and non-regular files).

- UKOTriple model includes a @model_validator ensuring at least one of
  object_uri or object_value is populated, preventing empty triples at
  construction time.

- Triple removal uses scoped deletion via uko:sourceResource predicate to
  avoid shared-subject collision — only triples originating from the
  specific resource are removed, not all triples for a shared subject.

- _resource_subjects.pop is deferred until after all backend removal
  operations succeed, preventing inconsistent state on partial failure.

- analyzer.analyze() is wrapped in try/except so that analyzer errors
  produce an IndexResult with error details rather than propagating
  exceptions to callers.

- All lifecycle hook calls are guarded via _fire_on_indexed,
  _fire_on_removed, and _fire_on_error helpers that catch and log hook
  exceptions without disrupting the indexing pipeline.

- max_triples parameter (default 50,000) bounds analyzer output size to
  prevent runaway resource consumption.

- ResourceFileWatcher monitors filesystem paths via watchdog and triggers
  re-indexing callbacks on file changes with configurable debouncing.
  Emits RESOURCE_MODIFIED domain events via EventBus when file changes
  are detected. Debounce timers coalesce rapid edits into a single
  callback invocation. Thread-safe design with daemon threads for clean
  shutdown.

- SearchResult.__post_init__ validates score is in [0.0, 1.0], correctly
  rejecting NaN values.

- Placeholder embedding uses [1.0] instead of [float(len(content))] to
  avoid leaking content size information.

- isinstance check on graph_backend ensures GraphIndexBackend protocol
  compliance at runtime.

- Test doubles extracted to features/mocks/uko_indexer_mocks.py for reuse
  across BDD steps and Robot helpers.

Spec reference: Architecture > ACMS > Real-time Index Synchronization
(specification.md lines ~43205-43300).

ISSUES CLOSED: #578
2026-03-11 00:40:07 +00:00