Commit Graph

1100 Commits

Author SHA1 Message Date
freemo 09f1d621bf Docs: Daily update to timeline 2026-03-14 18:26:12 -04:00
freemo ec450e9085 fix(test): fix tolerant exit code and missing RC check in resource CLI test
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 34s
CI / quality (pull_request) Successful in 34s
CI / build (pull_request) Successful in 24s
CI / typecheck (pull_request) Successful in 40s
CI / e2e_tests (pull_request) Successful in 29s
CI / security (pull_request) Successful in 1m10s
CI / unit_tests (pull_request) Successful in 5m27s
CI / integration_tests (pull_request) Successful in 5m41s
CI / coverage (pull_request) Successful in 5m56s
CI / docker (pull_request) Successful in 1m9s
CI / lint (push) Successful in 22s
CI / quality (push) Successful in 31s
CI / e2e_tests (push) Successful in 50s
CI / typecheck (push) Successful in 56s
CI / security (push) Successful in 57s
CI / benchmark-regression (push) Has been skipped
CI / build (push) Successful in 41s
CI / unit_tests (push) Successful in 3m36s
CI / integration_tests (push) Successful in 3m46s
CI / docker (push) Successful in 1m7s
CI / coverage (push) Successful in 6m57s
CI / benchmark-publish (push) Successful in 19m47s
CI / benchmark-regression (pull_request) Successful in 44m27s
- Replace `rc == 0 or rc == 1` with strict `rc == 0` in resource type
  list test so failures are no longer silently accepted
- Capture and assert the return code of the Suite Setup database schema
  creation to fail fast if the setup itself is broken

apply strict RC checks to resource_cli.robot

- Capture return value of Run Process in Suite Setup and assert rc==0
- Replace tolerant RC check (rc==0 or rc==1) with strict Should Be Equal
  As Integers check for resource type list test case

broaden exception handling in resource CLI commands

Add catch-all `except Exception` handler after each `except
CleverAgentsError` block in all 14 resource CLI command handlers.
This ensures unexpected exceptions (e.g. sqlalchemy.exc.OperationalError)
are caught and displayed gracefully instead of producing raw tracebacks.

re-raise typer.Abort/Exit in broad exception handlers

The `except Exception` handlers added in the previous commit
inadvertently caught typer.Abort and typer.Exit, which are
subclasses of Exception (via click.exceptions).  This turned
successful CLI exits into aborts and double-handled already-caught
errors, breaking integration tests that rely on normal typer exit
behaviour.

Add an isinstance guard to re-raise typer.Abort and typer.Exit
before the catch-all handler runs.

Fixes #896
2026-03-14 15:47:03 -04:00
freemo 447328a92d fix(test): remove retry masking and output filtering in database integration test
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 19s
CI / e2e_tests (pull_request) Successful in 23s
CI / security (pull_request) Successful in 31s
CI / typecheck (pull_request) Successful in 32s
CI / lint (pull_request) Successful in 43s
CI / unit_tests (pull_request) Successful in 2m10s
CI / docker (pull_request) Successful in 36s
CI / integration_tests (pull_request) Successful in 3m26s
CI / coverage (pull_request) Successful in 5m51s
CI / lint (push) Successful in 12s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 15s
CI / e2e_tests (push) Successful in 25s
CI / typecheck (push) Successful in 29s
CI / security (push) Successful in 29s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m6s
CI / integration_tests (push) Successful in 2m39s
CI / docker (push) Successful in 36s
CI / coverage (push) Successful in 5m0s
CI / benchmark-publish (push) Successful in 18m54s
CI / benchmark-regression (pull_request) Successful in 36m22s
2026-03-14 03:56:18 +00:00
freemo 9ef8502570 fix(database): reset session factory after engine disposal in init_database 2026-03-14 03:56:18 +00:00
freemo 8c9d9c8c33 fix(providers): add missing module docstring to providers package
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 16s
CI / build (pull_request) Successful in 23s
CI / e2e_tests (pull_request) Successful in 26s
CI / security (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 33s
CI / unit_tests (pull_request) Successful in 2m35s
CI / docker (pull_request) Successful in 36s
CI / integration_tests (pull_request) Successful in 3m27s
CI / coverage (pull_request) Successful in 4m56s
CI / lint (push) Successful in 11s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 17s
CI / e2e_tests (push) Successful in 25s
CI / typecheck (push) Successful in 31s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 35s
CI / integration_tests (push) Successful in 2m39s
CI / unit_tests (push) Successful in 3m9s
CI / docker (push) Successful in 35s
CI / coverage (push) Successful in 4m58s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (pull_request) Successful in 35m21s
2026-03-14 03:45:18 +00:00
freemo a69af285a8 fix(test): remove retry masking and output filtering in database integration test
- Remove silent retry logic in Run Python Script that masked intermittent
  failures by retrying on empty stdout + non-zero RC
- Change output filter from 'in' to 'startswith' so only lines beginning
  with log prefixes are filtered, not lines containing them mid-string
- Remove [error from the filter list so error lines are never silently
  discarded from test output

Fixes #898
2026-03-14 03:45:18 +00:00
freemo 00c46c12fd fix(test): convert soft warnings to hard failures in architecture test
Replace Run Keyword And Return Status soft checks with direct assertions
in three test cases:

- Docstring check now uses Should Contain directly instead of logging
  WARN, so missing docstrings cause a hard test failure.
- Settings file (config/settings.py) existence is now a hard File Should
  Exist assertion instead of a conditional that silently skips all
  checks when the file is absent.
- Exceptions file (core/exceptions.py) existence is now a hard File
  Should Exist assertion instead of a conditional that silently skips
  the exception hierarchy checks when the file is absent.
2026-03-14 03:45:18 +00:00
freemo 9148590542 fix(providers): add missing module docstring to providers package
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 16s
CI / e2e_tests (pull_request) Successful in 24s
CI / security (pull_request) Successful in 31s
CI / typecheck (pull_request) Successful in 38s
CI / integration_tests (pull_request) Successful in 2m41s
CI / unit_tests (pull_request) Successful in 5m4s
CI / coverage (pull_request) Successful in 4m59s
CI / docker (pull_request) Successful in 43s
CI / lint (push) Successful in 12s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 15s
CI / e2e_tests (push) Successful in 26s
CI / security (push) Successful in 29s
CI / typecheck (push) Successful in 35s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m5s
CI / integration_tests (push) Successful in 2m36s
CI / docker (push) Successful in 42s
CI / coverage (push) Successful in 4m59s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (pull_request) Successful in 34m34s
2026-03-14 03:33:37 +00:00
freemo 64e606099c fix(test): convert soft warnings to hard failures in architecture test
Replace Run Keyword And Return Status soft checks with direct assertions
in three test cases:

- Docstring check now uses Should Contain directly instead of logging
  WARN, so missing docstrings cause a hard test failure.
- Settings file (config/settings.py) existence is now a hard File Should
  Exist assertion instead of a conditional that silently skips all
  checks when the file is absent.
- Exceptions file (core/exceptions.py) existence is now a hard File
  Should Exist assertion instead of a conditional that silently skips
  the exception hierarchy checks when the file is absent.
2026-03-14 03:33:37 +00:00
freemo 586ea4557f fix(test): add return code checks to intermediate commands in core CLI test
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 / e2e_tests (pull_request) Successful in 27s
CI / security (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 32s
CI / unit_tests (pull_request) Successful in 2m2s
CI / docker (pull_request) Successful in 9s
CI / integration_tests (pull_request) Successful in 2m46s
CI / coverage (pull_request) Successful in 5m2s
CI / lint (push) Successful in 11s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 15s
CI / e2e_tests (push) Successful in 23s
CI / security (push) Successful in 29s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m10s
CI / integration_tests (push) Successful in 2m41s
CI / docker (push) Successful in 37s
CI / coverage (push) Successful in 6m58s
CI / benchmark-publish (push) Successful in 19m25s
CI / benchmark-regression (pull_request) Successful in 35m29s
Add rc == 0 assertions to ~11 intermediate Run Process calls in core_cli_commands.robot that were used as setup steps without any return code verification. If any setup command (init, tell, build, context add, plan new) fails silently, subsequent test assertions could pass for wrong reasons. All setup commands now capture their result and assert rc == 0.
2026-03-14 01:35:49 +00:00
hamza.khyari 14884ba15e Merge pull request 'refactor(a2a): update test files for ACP to A2A rename' (#737) from refactor/m7-acp-to-a2a-tests 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 25s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 33s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m22s
CI / docker (push) Successful in 9s
CI / integration_tests (push) Successful in 2m38s
CI / coverage (push) Successful in 5m9s
CI / benchmark-publish (push) Has been cancelled
Reviewed-on: #737
Reviewed-by: Brent Edwards <brent.edwards@cleverthis.com>
2026-03-14 01:35:33 +00:00
hamza.khyari 4133c46aff refactor(a2a): update test files for ACP to A2A rename
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 / e2e_tests (pull_request) Successful in 25s
CI / typecheck (pull_request) Successful in 33s
CI / security (pull_request) Successful in 34s
CI / unit_tests (pull_request) Successful in 2m12s
CI / docker (pull_request) Successful in 8s
CI / integration_tests (pull_request) Successful in 2m37s
CI / coverage (pull_request) Successful in 5m6s
CI / benchmark-regression (pull_request) Successful in 35m40s
Replace two remaining 'ACP' references with 'A2A' in vulture_whitelist.py
comments (lines 633, 957) missed by the source rename in PR #705.

Closes #689
2026-03-14 01:28:27 +00:00
freemo c169cb201d fix(test): remove skip guard and soft assertions from scientific paper E2E test
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 16s
CI / security (pull_request) Successful in 31s
CI / e2e_tests (pull_request) Successful in 30s
CI / typecheck (pull_request) Successful in 32s
CI / integration_tests (pull_request) Successful in 2m39s
CI / unit_tests (pull_request) Successful in 5m23s
CI / coverage (pull_request) Successful in 4m59s
CI / docker (pull_request) Successful in 38s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 15s
CI / e2e_tests (push) Successful in 23s
CI / typecheck (push) Successful in 31s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 35s
CI / unit_tests (push) Successful in 2m16s
CI / docker (push) Successful in 8s
CI / integration_tests (push) Successful in 2m36s
CI / coverage (push) Successful in 4m59s
CI / benchmark-publish (push) Successful in 18m41s
CI / benchmark-regression (pull_request) Successful in 36m52s
- Remove Require OpenAI Key skip guard that silently skipped the suite
- Replace Run Keyword And Return Status soft RC check with direct assertion
- Convert conditional LaTeX presence check to hard assertions
- Convert conditional latex_source context field check to hard assertion
- Remove dead stderr checks (stderr redirected to stdout via stderr=STDOUT)
2026-03-14 00:50:29 +00:00
freemo 77a7813f0e fix(test): tighten diagnostics check exit code assertion in CLI core test
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / e2e_tests (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 29s
CI / security (pull_request) Successful in 31s
CI / typecheck (pull_request) Successful in 55s
CI / integration_tests (pull_request) Successful in 2m39s
CI / unit_tests (pull_request) Successful in 2m57s
CI / docker (pull_request) Successful in 11s
CI / coverage (pull_request) Successful in 5m14s
CI / lint (push) Successful in 12s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 17s
CI / e2e_tests (push) Successful in 23s
CI / typecheck (push) Successful in 30s
CI / security (push) Successful in 30s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m5s
CI / docker (push) Successful in 38s
CI / integration_tests (push) Successful in 2m44s
CI / coverage (push) Successful in 5m14s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (pull_request) Successful in 36m14s
Replace the tolerant "rc == 0 or rc == 1" assertion with a strict
"rc == 0" check for the diagnostics --check command. In a clean test
environment, diagnostics should complete without finding errors, and the
previous assertion could not distinguish a legitimate diagnostic failure
from a command crash.
2026-03-14 00:37:34 +00:00
freemo eb2c2362bd fix(test): remove skip guard from scientific paper basic test
CI / lint (pull_request) Successful in 18s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 19s
CI / benchmark-publish (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 31s
CI / typecheck (pull_request) Successful in 35s
CI / security (pull_request) Successful in 42s
CI / unit_tests (pull_request) Successful in 2m22s
CI / docker (pull_request) Successful in 54s
CI / integration_tests (pull_request) Successful in 3m37s
CI / coverage (pull_request) Successful in 6m21s
CI / benchmark-regression (pull_request) Successful in 35m46s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 14s
CI / e2e_tests (push) Successful in 25s
CI / quality (push) Successful in 29s
CI / typecheck (push) Successful in 30s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 36s
CI / unit_tests (push) Successful in 2m28s
CI / docker (push) Successful in 9s
CI / integration_tests (push) Successful in 2m45s
CI / coverage (push) Successful in 5m19s
CI / benchmark-publish (push) Has been cancelled
Remove the Require OpenAI Key keyword and its call from Suite Setup.
Tests now fail with a real error when OPENAI_API_KEY is absent,
providing honest signal instead of silently skipping.
2026-03-13 23:55:27 +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