docs/developer-setup-guide
1928 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ee01e2b826 |
Merge pull request 'test: add TDD bug-capture test for #993 — server_connect non-atomic writes' (#1128) from tdd/m6-server-connect-non-atomic into master
CI / build (push) Successful in 23s
CI / lint (push) Successful in 3m17s
CI / quality (push) Successful in 3m38s
CI / security (push) Successful in 3m44s
CI / typecheck (push) Successful in 3m47s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 8m29s
CI / integration_tests (push) Successful in 6m25s
CI / docker (push) Successful in 8s
CI / e2e_tests (push) Successful in 9m42s
CI / coverage (push) Successful in 10m35s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 27m42s
Reviewed-on: #1128 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> |
||
|
|
52511533b5 |
Merge remote-tracking branch 'origin/master' into merge-master-tmp
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 34s
CI / lint (pull_request) Successful in 5m4s
CI / typecheck (pull_request) Successful in 5m21s
CI / quality (pull_request) Successful in 5m21s
CI / security (pull_request) Successful in 5m39s
CI / integration_tests (pull_request) Successful in 10m26s
CI / unit_tests (pull_request) Successful in 10m45s
CI / docker (pull_request) Successful in 9s
CI / e2e_tests (pull_request) Successful in 13m21s
CI / coverage (pull_request) Successful in 11m48s
CI / status-check (pull_request) Successful in 2s
CI / benchmark-regression (pull_request) Successful in 1h18m2s
|
||
|
|
3e704ff9c5 |
test: add TDD bug-capture test for #1076 — use_action automation_profile propagation (#1116)
CI / lint (push) Successful in 3m22s
CI / integration_tests (push) Failing after 12m3s
CI / unit_tests (push) Failing after 12m3s
CI / security (push) Failing after 12m5s
CI / typecheck (push) Failing after 12m5s
CI / e2e_tests (push) Successful in 10m57s
CI / coverage (push) Has been skipped
CI / docker (push) Has been skipped
CI / build (push) Failing after 15m3s
CI / quality (push) Failing after 17m4s
CI / benchmark-publish (push) Successful in 29m8s
CI / benchmark-regression (push) Has been skipped
CI / status-check (push) Failing after 1s
## Summary Add Behave BDD scenarios that capture the bug described in #1076 where `PlanLifecycleService.use_action()` does not resolve or propagate the `automation_profile` from the Action (or any other source in the spec's precedence chain) to the created Plan. This is the TDD counterpart to bug #1076, following the project's [Bug Fix Workflow](CONTRIBUTING.md#bug-fix-workflow). The test proves the bug exists and will serve as a regression guard once the fix is merged. ### Changes - **`features/tdd_use_action_automation_profile.feature`** — Three Behave scenarios tagged `@tdd_expected_fail @tdd_bug @tdd_bug_1076`: 1. Action with `automation_profile="full-auto"` — Plan's `automation_profile` should be `AutomationProfileRef(profile_name="full-auto", provenance=ACTION)` but is `None`. 2. Action without `automation_profile` but with project-scoped config `"trusted"` — Plan's `automation_profile` should be `AutomationProfileRef(profile_name="trusted", provenance=PROJECT)` but is `None`. 3. Action without `automation_profile` — Plan's `automation_profile` should resolve to the global default `"supervised"` with `provenance=GLOBAL` but is `None`. - **`features/steps/tdd_use_action_automation_profile_steps.py`** — Step definitions exercising `PlanLifecycleService.use_action()` and asserting the expected behavior per the specification (docs/specification.md lines 18919, 18967). Shared `_use_action_on_project()` helper eliminates duplicate When step bodies. Guard assertion on `Action.automation_profile` after `create_action()` ensures the Action itself stores the profile correctly. - **`CHANGELOG.md`** — Entry added under `## Unreleased` describing the TDD test addition. ### How It Works All three scenarios fail at the assertion level (confirming the bug exists), but the `@tdd_expected_fail` tag inverts the result so the test suite passes CI. When the bug is fixed in #1076, the `@tdd_expected_fail` tag will be removed and the tests will run normally. ### Quality Gates | Gate | Result | |------|--------| | `nox -s lint` | PASS | | `nox -s typecheck` | PASS | | `nox -s unit_tests` | PASS (463 features, 12236 scenarios, 0 failures) | | `nox -s integration_tests` | Pre-existing Pabot infrastructure failure (identical on master) | | `nox -s e2e_tests` | PASS (37/37) | | `nox -s coverage_report` | PASS (98%, threshold 97%) | Closes #1098 Reviewed-on: #1116 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com> |
||
|
|
8ccda647a8 |
Merge remote-tracking branch 'origin/master' into merge-master-tmp
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / lint (pull_request) Successful in 4m34s
CI / quality (pull_request) Successful in 4m54s
CI / typecheck (pull_request) Successful in 5m33s
CI / security (pull_request) Successful in 5m48s
CI / integration_tests (pull_request) Successful in 7m50s
CI / unit_tests (pull_request) Successful in 9m37s
CI / docker (pull_request) Successful in 1m11s
CI / e2e_tests (pull_request) Successful in 10m44s
CI / coverage (pull_request) Successful in 11m39s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
|
||
|
|
0e407f7f19 |
test: add TDD bug-capture test for #1022 — InvariantService persistence (#1109)
CI / build (push) Successful in 27s
CI / lint (push) Successful in 3m20s
CI / quality (push) Successful in 3m54s
CI / typecheck (push) Successful in 4m6s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 6m55s
CI / unit_tests (push) Successful in 7m6s
CI / security (push) Successful in 8m4s
CI / e2e_tests (push) Successful in 10m47s
CI / docker (push) Successful in 1m9s
CI / coverage (push) Successful in 14m37s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Failing after 24m9s
## Summary Add Behave BDD and Robot Framework integration tests that capture bug #1022 — `InvariantService` stores invariants in an in-memory dict only, losing them across CLI process invocations. ### Motivation Per the project's TDD Bug Fix Workflow (CONTRIBUTING.md), every bug must first have a test written that captures the buggy behavior before the fix is implemented. This PR fulfills the TDD counterpart issue #1032 for bug #1022. ### What was done **Behave tests** (`features/tdd_invariant_persistence.feature`): Four scenarios tagged `@tdd_expected_fail @tdd_bug @tdd_bug_1022 @mock_only` that simulate separate CLI invocations via fresh `InvariantService` instances and assert cross-instance data visibility: 1. Project invariant persistence across service instances 2. Global invariant persistence across service instances 3. CLI add/list across separate invocations 4. Cross-instance soft-delete by invariant ID Step definitions in `features/steps/tdd_invariant_persistence_steps.py`. **Robot integration tests** (`robot/tdd_invariant_persistence.robot`): Three integration test cases with a helper script (`robot/helper_tdd_invariant_persistence.py`) that exercises add-then-list and add-then-remove across fresh service instances. ### How it passes CI All tests carry `@tdd_expected_fail`, which inverts the test result via the environment hooks (Behave) and listener (Robot). The underlying assertions fail (proving the bug exists), but are reported as passed to CI. The `@tdd_expected_fail` tag will be removed when bug #1022 is fixed, at which point the tests will run normally and must pass. ### Review fixes applied - **M1**: Moved `InvariantScope` import from function body in `robot/helper_tdd_invariant_persistence.py` to module-level top imports. - **m1**: Added `@mock_only` tag to `features/tdd_invariant_persistence.feature` — these tests use purely in-memory services and never touch the database. - **m2**: Added `exit_code == 0` assertion to `step_invoke_list_cli` in `features/steps/tdd_invariant_persistence_steps.py`, matching the pattern used in `step_invoke_add_cli`. - **m3**: Changed all `context: Any` parameter types to `context: Context` (from `behave.runner`), following the project-wide convention used in 335+ step files. - **m4**: Narrowed `except Exception` to `except NotFoundError` in `robot/helper_tdd_invariant_persistence.py`, matching the specific error being tested. - **n3**: Branch rebased onto latest `master`. ### Quality Gates - **lint**: ✅ passed - **typecheck**: ✅ passed (Pyright, 0 errors) - **unit_tests**: ✅ 1 feature, 4 scenarios, 16 steps — all passed via `@tdd_expected_fail` - **coverage**: ≥ 97% (test-only changes, no source modifications) Closes #1032 Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Reviewed-on: #1109 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com> |
||
|
|
822f999ebb |
fix(test): increase container resolve regression timeouts to 120s
CI / build (pull_request) Successful in 32s
CI / lint (pull_request) Successful in 3m22s
CI / quality (pull_request) Successful in 3m42s
CI / typecheck (pull_request) Successful in 3m55s
CI / security (pull_request) Successful in 4m2s
CI / integration_tests (pull_request) Successful in 6m42s
CI / unit_tests (pull_request) Successful in 7m4s
CI / docker (pull_request) Successful in 1m10s
CI / e2e_tests (pull_request) Successful in 9m49s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
|
||
|
|
498dca8137 |
Merge remote-tracking branch 'origin/master' into merge-master-tmp
CI / build (pull_request) Successful in 38s
CI / lint (pull_request) Successful in 5m22s
CI / typecheck (pull_request) Successful in 5m50s
CI / security (pull_request) Successful in 6m19s
CI / quality (pull_request) Successful in 6m22s
CI / unit_tests (pull_request) Successful in 9m30s
CI / integration_tests (pull_request) Failing after 9m39s
CI / benchmark-publish (pull_request) Has been skipped
CI / docker (pull_request) Successful in 1m11s
CI / e2e_tests (pull_request) Successful in 11m15s
CI / coverage (pull_request) Failing after 13m55s
CI / benchmark-regression (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
|
||
|
|
3d961fa0aa |
test: add TDD bug-capture test for #988 — ReactiveEventBus.emit swallows exceptions (#1106)
CI / build (push) Successful in 23s
CI / lint (push) Successful in 3m20s
CI / typecheck (push) Successful in 3m50s
CI / security (push) Successful in 4m0s
CI / quality (push) Successful in 4m18s
CI / integration_tests (push) Successful in 9m19s
CI / unit_tests (push) Successful in 9m46s
CI / e2e_tests (push) Successful in 10m27s
CI / docker (push) Successful in 1m9s
CI / coverage (push) Successful in 12m2s
CI / status-check (push) Successful in 1s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Successful in 30m22s
## Summary Add a TDD bug-capture Behave scenario that proves bug #988 exists: `ReactiveEventBus.emit()` exception handler logs only `type(exc).__name__` (e.g., "ValueError") without the exception message (`str(exc)`) or traceback (`exc_info=True`). When a subscriber fails, the log contains zero diagnostic detail, making production debugging impossible. ## What was done - **Feature file**: `features/tdd_event_bus_exception_swallow.feature` — tagged `@tdd_expected_fail @tdd_bug @tdd_bug_988` - **Step definitions**: `features/steps/tdd_event_bus_exception_swallow_steps.py` — subscribes a handler that raises `ValueError("detailed error message for debugging")`, emits an event, captures the structlog warning via `structlog.testing.capture_logs()`, and asserts: 1. The exception message text appears in the log entry (scenario 1) 2. The `exc_info` key is present and truthy, confirming traceback logging (scenario 2) - **Changelog**: Updated `CHANGELOG.md` with the new entry ## How the test works 1. A `ReactiveEventBus` is created with a subscriber that raises `ValueError` with a distinctive message 2. An event is emitted, triggering the failing handler 3. The `emit()` exception handler catches the error and logs a warning via structlog 4. **Scenario 1** asserts the exception **message** (not just the type name) appears in the log entry 5. **Scenario 2** asserts the log entry includes **`exc_info`** (traceback), per bug #988's acceptance criteria requiring `exc_info=True` 6. Both assertions **FAIL** because the current code only logs `type(exc).__name__` — confirming the bug 7. The `@tdd_expected_fail` tag inverts these failures to CI passes ## Test verification - `nox -s unit_tests` ✅ passes (462 features, 12,232 scenarios passed, 0 failed) - Both underlying assertions correctly fail, proving the bug exists - Tag validation rules pass: `@tdd_bug_988` has corresponding `@tdd_bug`, and `@tdd_expected_fail` has both - `nox -s lint` ✅ passes - `nox -s typecheck` ✅ passes (0 errors on changed files) ## Review fixes applied - **C1 (Critical)**: Rebased onto latest `master` (`5f5ef891`) to eliminate unrelated `docs/timeline.md` regression that was overwriting Day 42 data with stale Day 39 content - **m1**: Added docstrings to all four step functions - **m2**: Renamed parameter `ctx` → `context` across all step functions to match project convention (97%+ of codebase uses `context`) - **m3**: Added second scenario "Bug #988 — emit() logs traceback via exc_info when handler raises" with new `step_then_log_contains_traceback` step that verifies the `exc_info=True` requirement from bug #988 acceptance criteria - **n1 (Informational)**: Feature-level tags are valid Gherkin; no change needed - **n2 (Informational)**: `# type: ignore[import-untyped]` on behave imports is the established project convention (106+ files); no change needed ## Robot test N/A — this is a purely unit-level concern (testing a single class's internal error handling, no external services or IPC involved). Closes #1093 Reviewed-on: #1106 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> Co-authored-by: Brent Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent Edwards <brent.edwards@cleverthis.com> |
||
|
|
2802af13d0 |
Merge branch 'master' into tdd/m6-server-connect-non-atomic
CI / build (pull_request) Successful in 40s
CI / lint (pull_request) Successful in 5m20s
CI / quality (pull_request) Successful in 5m33s
CI / typecheck (pull_request) Successful in 5m40s
CI / benchmark-regression (pull_request) Waiting to run
CI / security (pull_request) Successful in 5m54s
CI / integration_tests (pull_request) Successful in 8m58s
CI / unit_tests (pull_request) Successful in 9m13s
CI / docker (pull_request) Successful in 1m5s
CI / e2e_tests (pull_request) Successful in 11m41s
CI / coverage (pull_request) Failing after 20m3s
CI / benchmark-publish (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 5s
|
||
|
|
2abbfff443 |
Merge pull request 'test: add TDD bug-capture test for #986 — CorrectionService checkpoint_service wiring' (#1108) from tdd/m4-correction-checkpoint-wiring into master
CI / build (push) Successful in 32s
CI / lint (push) Successful in 3m20s
CI / typecheck (push) Successful in 3m57s
CI / security (push) Successful in 4m5s
CI / quality (push) Successful in 4m1s
CI / unit_tests (push) Successful in 6m19s
CI / integration_tests (push) Successful in 6m7s
CI / e2e_tests (push) Successful in 9m11s
CI / docker (push) Successful in 1m25s
CI / coverage (push) Successful in 10m42s
CI / status-check (push) Successful in 2s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
Reviewed-on: #1108 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> |
||
|
|
3dee9441a1 |
Merge remote-tracking branch 'origin/master' into tdd/m6-server-connect-non-atomic
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 3m19s
CI / typecheck (pull_request) Successful in 3m46s
CI / quality (pull_request) Successful in 3m43s
CI / security (pull_request) Successful in 3m56s
CI / integration_tests (pull_request) Successful in 7m57s
CI / unit_tests (pull_request) Successful in 8m31s
CI / docker (pull_request) Successful in 1m5s
CI / e2e_tests (pull_request) Successful in 9m30s
CI / coverage (pull_request) Successful in 10m8s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 55m59s
|
||
|
|
3ec5114e01 |
Merge remote-tracking branch 'origin/master' into tdd/m4-correction-checkpoint-wiring
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 3m31s
CI / quality (pull_request) Successful in 3m42s
CI / typecheck (pull_request) Successful in 3m57s
CI / unit_tests (pull_request) Successful in 7m16s
CI / security (pull_request) Successful in 3m58s
CI / integration_tests (pull_request) Successful in 7m59s
CI / e2e_tests (pull_request) Successful in 9m16s
CI / docker (pull_request) Successful in 1m21s
CI / coverage (pull_request) Successful in 11m44s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Failing after 31m40s
|
||
|
|
34c2acc354 |
fix(acms): implement context tier runtime promotion/demotion/eviction
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m18s
CI / typecheck (pull_request) Successful in 4m3s
CI / security (pull_request) Successful in 4m13s
CI / build (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 3m42s
CI / integration_tests (pull_request) Successful in 8m50s
CI / unit_tests (pull_request) Successful in 9m14s
CI / e2e_tests (pull_request) Successful in 9m28s
CI / docker (pull_request) Successful in 1m9s
CI / coverage (pull_request) Successful in 10m24s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Successful in 48m36s
CI / build (push) Successful in 22s
CI / lint (push) Successful in 3m43s
CI / typecheck (push) Successful in 4m19s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m28s
CI / quality (push) Successful in 4m21s
CI / integration_tests (push) Successful in 9m12s
CI / e2e_tests (push) Successful in 9m29s
CI / unit_tests (push) Successful in 9m36s
CI / docker (push) Successful in 1m8s
CI / coverage (push) Successful in 10m33s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 25m40s
Implement the missing runtime logic for the ACMS context tier service. Previously only data models and manual promote()/demote()/evict_lru() methods existed. This commit adds: - Auto-promotion on access: get() now promotes fragments one tier up when access_count reaches the configurable promotion_threshold (default: 5 accesses). The access counter resets after each successful promotion so fragments must accumulate fresh accesses before the next tier transition. - Staleness enforcement: new enforce_staleness() method demotes hot fragments older than hot_ttl (default: 24h) to warm, and warm fragments older than warm_ttl to cold. A snapshot of existing warm-tier IDs prevents double-demotion in a single pass. - Budget enforcement on store and promote: store() and promote() now enforce TierBudget.max_tokens_hot by evicting LRU hot-tier fragments until the token budget is met. The eviction loop uses incremental token tracking to avoid recomputing the sum. - Event emission: Added TIER_PROMOTED, TIER_DEMOTED, TIER_EVICTED event types to EventType enum. All tier transitions emit DomainEvent instances through the optional EventBus. - Configuration: Added context_tier_promotion_threshold, context_tier_hot_ttl_hours, context_tier_warm_ttl_hours settings. The warm TTL setting also accepts the spec-defined env var CLEVERAGENTS_CTX_WARM_HOURS as an alias. - DI wiring: container.py now injects event_bus into context_tier_service. Review fixes applied (code review on PR #1150): - C1: Reset access_count to 0 after each auto-promotion to prevent chain promotion that bypassed the warm tier. - C2: Call _enforce_hot_budget() inside promote() warm-to-hot path so auto-promoted fragments respect the token budget. - H1: Corrected _enforce_hot_budget() docstring: actual complexity is O(n + n*k) not O(n), since min() scans remaining entries on each eviction. - M1: Added CLEVERAGENTS_CTX_WARM_HOURS as an additional env var alias for context_tier_warm_ttl_hours per specification line 30555. Review fixes applied (second code review on PR #1150): - B-CRIT-1: Fixed data loss in promote() warm-to-hot: emit TIER_PROMOTED before _enforce_hot_budget(), and if the promoted fragment is evicted by budget, restore it to the warm tier instead of silently losing it. - B-HIGH-1: Fixed self-eviction on store(): fragments whose token_count exceeds the entire hot-tier budget are now redirected to the warm tier with a warning log. - B-MED-1: Wrapped _emit_tier_event() in try/except so a failing event bus does not break tier operations (best-effort emission). - B-MED-2: Fixed event ordering so TIER_PROMOTED fires before any budget-triggered TIER_EVICTED events. - D-LOW-1: Fixed type hint in Robot helper (dict[str, Callable]). - D-LOW-2: Added __all__ export to context_tiers.py. - S-LOW-1: Added thread-safety docstring note to ContextTierService. Review fixes applied (third code review on PR #1150): - B-MED-1: Added TIER_DEMOTED event emission for oversized fragment redirect in store(), closing the observability gap where the only tier transition without event emission was the hot-to-warm redirect for fragments exceeding the entire hot-tier budget. - S-LOW-1: Added CLEVERAGENTS_CTX_HOT_HOURS as an additional env var alias for context_tier_hot_ttl_hours, for consistency with the warm-tier alias CLEVERAGENTS_CTX_WARM_HOURS. - S-LOW-2: Added docstring note to enforce_staleness() reconciling the hot-tier TTL with the specification statement that hot-tier retention is "Until resource removed" (TTL controls tier placement, not data retention). Review fixes applied (fourth code review on PR #1150): - B-HIGH-1: Reset access_count to 0 on demotion so that demoted fragments must accumulate fresh accesses before re-promotion. Without this reset, a previously popular fragment whose access_count already exceeded the promotion threshold would be re-promoted on the very next get() call, making staleness enforcement ineffective. Review fixes applied (freemo APPROVED review on PR #1150): - #1: Removed all # type: ignore annotations from test files. Fixed _EventCollector, _FailingBus, and _NullBus subscribe() signatures to use Callable[[DomainEvent], None] matching the EventBus protocol. Replaced dict-spread TieredFragment construction with explicit keyword arguments and post-construction assignment. - #2: Extracted runtime policy logic (enforce_staleness, _maybe_auto_promote, _re_fetch_after_promotion, _enforce_hot_budget, _emit_tier_event) into TierRuntimeMixin in tier_runtime.py to reduce context_tiers.py toward the 500-line guideline. - #3: Added fragment_id non-empty validation guard to promote() and demote() per CONTRIBUTING.md argument validation policy. - #8: Renamed _resolve to _re_fetch_after_promotion for clarity. Removed @tdd_expected_fail from TDD tests (Behave + Robot) as the bug is now fixed. All 3 TDD scenarios pass normally. Tests: 27 Behave scenarios (24 feature + 3 TDD), 4 Robot integration tests, 4 ASV benchmark suites. ISSUES CLOSED: #821 |
||
|
|
06130212ed |
test(e2e): workflow example 5 — database schema migration with safety nets (review profile) (#816)
CI / build (push) Successful in 17s
CI / security (push) Successful in 1m7s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m40s
CI / typecheck (push) Successful in 3m48s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Has started running
CI / docker (push) Blocked by required conditions
CI / status-check (push) Blocked by required conditions
CI / integration_tests (push) Has started running
CI / e2e_tests (push) Has started running
CI / coverage (push) Has started running
CI / benchmark-publish (push) Has started running
## Summary E2E test for Workflow Example 5 — database schema migration with safety nets using the **review** automation profile. Exercises the full spec-aligned workflow: - **Custom resource type registration** via `resource type add --config` (postgres-db type with `transaction_rollback` sandbox strategy, `--host`, `--port`, `--database`, `--schema` CLI args with flat `type`/`default` fields per `ResourceTypeArgument` schema) - **Custom resource instantiation** — attempts `resource add` with the custom type to exercise mixed resource types, followed by `project link-resource` to link DB resource to the project - **Custom skill creation** with spec-aligned database tools: `local/query_db` (read-only), `local/execute_migration` (writes, checkpointable), `local/backfill_column` (writes, checkpointable) — registered via `skill add --config`, with namespaced tool reference names per `SkillToolRefSchema` validation - **Action creation** with `automation_profile: review`, `reusable: true`, `state: available`, spec invariants, and typed `arguments` section (`table_name`, `column_name`, `column_type`, `backfill_source` — all required per spec, using `arguments` field per `ActionConfigSchema`) - **Plan use** with `--arg` flags exercising parameterized action invocation including `backfill_source=audit_log`, plus **explicit `--automation-profile review`** flag (action-to-plan profile propagation is not yet wired in `PlanLifecycleService.use_action`) - **Phased child plan verification** via `plan tree --format json` with `decision_count >= 2` hard assertion on framework decisions plus WARN tiers for LLM decomposition quality (`< 3`, `< 5`) - **Plan phase assertion** — hard assertion that phase is populated after execute - **Checkpoint-based rollback** with hard assertions: `rc=0` on rollback success, `rc!=0` on fake checkpoint, None guard for JSON null checkpoint IDs, re-execute with Traceback/INTERNAL checks on success and explanatory comment on failure path - **Plan diff** with hard `rc=0` assertion and content-signal verification - **Migration content verification** — baseline SHA saved before apply, diff against baseline (not `HEAD~1`), WARN-level check on migration keywords (`last_login`, `schema`, `migration`, `column`, `alter`) — flexible per LLM non-determinism - **Commit count** assertion `>= 2` (fixture baseline: Create Temp Git Repo + DB fixture commit), WARN if no additional commits from lifecycle-apply - **Backfill evidence** WARN-level check in plan tree/execution output (`backfill`, `batch`, `populate`, `last_login`) with explanatory comment noting tree covers decomposition plan - **Combined AC #6 gate** — if *both* migration content *and* backfill evidence are absent, explicit WARN visibility for CI debugging - **Terminal state assertion** after `lifecycle-apply` — `plan status` call verifies phase/processing_state reflects terminal or apply-progress outcome - **Automation profile fallback verification** — if `plan use` output omits `automation_profile`, falls back to `plan status` for secondary verification (hard assertion always runs) - **Traceback and INTERNAL checks** on all CLI commands (resource add, project create, resource type add, skill add, action create, plan use, strategize, execute, plan tree, plan status, plan diff, plan rollback, re-execute after rollback, lifecycle-apply) including custom resource error paths - **Dynamic actor selection** — detects available API keys (Anthropic/OpenAI) at suite setup - **Skip If No LLM Keys** guard for graceful CI degradation - **Test-level teardown** with diagnostic logging for both plan status and plan tree on failure - **30-minute timeout** covering worst-case rollback+re-execute path - **Force Tags** for consistency with `m6_acceptance.robot` - **Timeout parameters** (`timeout=60s on_timeout=kill`) on all local `Run Process` git commands - **Sequential section numbering** (1 through 15) for readability Closes #751 ISSUES CLOSED: #751 ## Approach Follows the patterns established by `m6_acceptance.robot` and `m2_acceptance.robot`: - `WF05 Suite Setup` initialises the workspace, generates a unique run suffix, and detects available LLM API keys - `Safe Parse Json Field` from `common_e2e.resource` for JSON field extraction with None guards for JSON null values - All CLI commands use `--format json` for predictable, parseable output - `expected_rc=None` with explicit `Should Be Equal As Integers` for detailed failure messages - Hard assertions on infrastructure/framework behavior (CLI commands, phase transitions, tool registration) - WARN-level assertions on LLM-dependent output (decision decomposition, migration content, backfill evidence, commit count) — per ticket requirement "output validation is flexible" - Traceback and INTERNAL checks on all CLI commands following `m2_acceptance.robot` pattern - Baseline SHA approach for post-apply diff verification eliminates false positives from fixture commits ## Bug Fix: LifecyclePlanRepository.update() UNIQUE Constraint Violation **Root cause**: `LifecyclePlanRepository.update()` called `clear()` on child relationship collections (project_links, arguments, invariants) followed by `append()` with new items, but only flushed at the end. SQLAlchemy's default operation ordering can emit INSERTs before DELETEs within the same flush, causing `UNIQUE constraint failed: plan_arguments.plan_id, plan_arguments.name` when plans have arguments. **Fix**: Group all three `clear()` calls together and flush them before appending new rows. This ensures the DELETEs are committed before any INSERTs, preventing the UNIQUE constraint violation. **Impact**: This was a latent bug affecting ALL plans with arguments when `update()` is called. Previously undetected because existing E2E tests (M1, M2, M5, M6) create plans without `--arg` flags. ## Review Fixes (addressing medium findings from @CoreRasurae review) | # | Finding | Fix | |---|---------|-----| | **BUG-1** | No regression test for UNIQUE constraint fix | Added targeted BDD scenario in `repositories_coverage_boost.feature` — creates plan with argument `x=v1`, updates to `x=v2`, asserts no `IntegrityError` | | **TEST-1** | AC #4 weakened — fragile string counting | Replaced raw `count('"decision_id"')` with proper JSON parsing via `json.loads()`, recursive tree walking for decision counting, structural `children_key_count` and `child_link_count` verification | | **TEST-2** | AC #5 conditionally tested | Added explicit WARN log when no checkpoint_id is present ("AC #5 visibility"); fake checkpoint test now runs unconditionally (moved outside IF/ELSE) with Traceback/INTERNAL checks | | **TEST-3** | No terminal state assertion after lifecycle-apply | Added `plan status` call after apply with phase/processing_state extraction; hard assertion on terminal state or apply-phase progress | | **TEST-4** | AC #6 migration/backfill WARN-only | Added combined gate (`has_ac6_evidence`): if *both* migration and backfill evidence are absent, explicit WARN for CI visibility. WARN-only is intentional per ticket AC "output validation is flexible" | | **TEST-5** | Automation profile silently skipped | Added fallback to `plan status --format json` when `plan use` output omits `automation_profile`; hard assertion (`Should Be Equal As Strings review`) now always executes | | **TEST-8** | Missing Traceback/INTERNAL on custom resource error paths | Added Traceback/INTERNAL checks inside both `resource add` and `project link-resource` ELSE branches with `NoSuchOption` guard | ## Quality Gates - `nox -e lint` ✅ - `nox -e typecheck` ✅ (0 errors) - `nox -e unit_tests` ✅ (471 features, 12,422 scenarios, 0 failures) - `nox -e integration_tests` ✅ (1,727 tests, 0 failures) - `nox -e e2e_tests` ✅ (42 tests, 42 passed, 0 failed) - `nox -e coverage_report` ✅ (98%, meets threshold) ## Manual Verification ### Prerequisites - `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` environment variable set ### Commands ```bash nox -e e2e_tests # Or run just this suite: python -m robot --outputdir build/reports/robot --include E2E robot/e2e/wf05_db_migration.robot ``` Reviewed-on: #816 Reviewed-by: Luis Mendes <luis.mendes@cleverthis.com> Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> |
||
|
|
37c1329257 |
Merge pull request 'feat(acms): context assembly CLI functional (context list/add/show/clear)' (#1138) from feature/m5-context-cli into master
CI / build (push) Successful in 23s
CI / typecheck (push) Successful in 44s
CI / lint (push) Successful in 3m23s
CI / benchmark-regression (push) Has been skipped
CI / quality (push) Successful in 3m47s
CI / security (push) Successful in 3m58s
CI / unit_tests (push) Successful in 6m35s
CI / docker (push) Successful in 1m1s
CI / status-check (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
Reviewed-on: #1138 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> |
||
|
|
2aa2bb6a43 |
fix(e2e): disable git commit signing in temp test repos
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 3m30s
CI / typecheck (pull_request) Successful in 4m0s
CI / quality (pull_request) Successful in 3m37s
CI / security (pull_request) Successful in 4m22s
CI / integration_tests (pull_request) Successful in 7m14s
CI / e2e_tests (pull_request) Successful in 10m12s
CI / coverage (pull_request) Successful in 10m11s
CI / unit_tests (pull_request) Successful in 5m51s
CI / docker (pull_request) Successful in 1m7s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
|
||
|
|
37d55f4321 |
feat(acms): context assembly CLI functional (context list/add/show/clear)
Verified the context assembly CLI commands (context list, add, show, clear) are fully functional and integrated with ContextService and the DI container. Both Robot E2E acceptance tests (ACMS Scoped Context Output Per Phase and Context Policy Clear And Inheritance Fallback) pass, confirming phase-scoped view resolution, size limit narrowing, inheritance fallback on clear, and persistence round-trip correctness. Added 5 new Behave scenarios to m5_acms_smoke.feature covering the required unit test patterns: multiple resources management (list, add, show with multiple files), clear-then-re-add flow, and clear on empty project. All 12,235 unit test scenarios pass. Coverage is 98.38% (threshold >97%). ISSUES CLOSED: #848 |
||
|
|
af5e331b06 |
Merge pull request 'fix(cli): bypass migration prompt entirely when --yes flag is passed' (#1139) from bugfix/m3-init-yes-no-input into master
CI / build (push) Successful in 29s
CI / lint (push) Successful in 3m19s
CI / quality (push) Successful in 3m41s
CI / security (push) Successful in 3m57s
CI / typecheck (push) Successful in 4m15s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 6m54s
CI / e2e_tests (push) Successful in 9m3s
CI / unit_tests (push) Successful in 11m50s
CI / docker (push) Successful in 1m20s
CI / coverage (push) Failing after 21m21s
CI / benchmark-publish (push) Successful in 28m2s
CI / status-check (push) Failing after 1s
Reviewed-on: #1139 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> |
||
|
|
c082c8f022 |
fix(cli): bypass migration prompt entirely when --yes flag is passed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / lint (pull_request) Successful in 3m27s
CI / typecheck (pull_request) Successful in 4m2s
CI / quality (pull_request) Successful in 4m6s
CI / unit_tests (pull_request) Successful in 4m7s
CI / security (pull_request) Successful in 4m10s
CI / docker (pull_request) Successful in 1m18s
CI / integration_tests (pull_request) Successful in 6m45s
CI / e2e_tests (pull_request) Successful in 8m17s
CI / coverage (pull_request) Successful in 11m28s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Failing after 14m1s
Make require_confirmation configurable on UnitOfWork so that when the --yes flag is passed to agents init, the migration runner skips the confirmation prompt entirely rather than calling a prompt that always returns True. The previous approach (injecting a prompt callback that auto-approves) was a workaround that left the require_confirmation=True hardcoded in _ensure_database_initialized, meaning the prompt code path was still exercised unnecessarily. Changes: - Add require_confirmation parameter to UnitOfWork constructor (default True for backward compatibility) - Pass self._require_confirmation to MigrationRunner.init_or_upgrade instead of hardcoded True - Update init_command to pass require_confirmation=False when --yes is set, with the prompt callback retained as belt-and-suspenders The TDD bug-capture tests from #842 (features/tdd_init_yes_no_input.feature, robot/tdd_init_yes_no_input.robot) now run as normal regression tests with @tdd_expected_fail already removed. All nox quality gates pass: - lint, typecheck: clean - unit_tests: 12230 scenarios passed - integration_tests: all passed - coverage_report: 98.38% (threshold >97%) ISSUES CLOSED: #783 |
||
|
|
83c22b8391 |
test(e2e): TDD behavioral test proving ACMS indexing pipeline is not wired into CLI (bug #1028) (#1124)
CI / build (push) Successful in 19s
CI / lint (push) Successful in 3m18s
CI / typecheck (push) Successful in 3m47s
CI / quality (push) Successful in 3m58s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m17s
CI / integration_tests (push) Successful in 6m44s
CI / unit_tests (push) Successful in 6m53s
CI / docker (push) Successful in 56s
CI / e2e_tests (push) Successful in 9m4s
CI / coverage (push) Successful in 10m43s
CI / status-check (push) Successful in 2s
CI / benchmark-publish (push) Successful in 26m37s
## Summary This PR adds a Robot Framework E2E test suite (`robot/e2e/tdd_acms_behavioral_validation.robot`) that proves bug #1028 exists — the ACMS indexing pipeline is not wired into the CLI, so `ContextTierService` starts empty on every invocation. ### Changes - **New file**: `robot/e2e/tdd_acms_behavioral_validation.robot` — 4 E2E test cases tagged `tdd_expected_fail`, `tdd_bug`, `tdd_bug_1028`, `E2E` - **Modified**: `robot/e2e/common_e2e.resource` — Extracted shared keywords (`Run CLI`, `Extract JSON From Stdout`, `Link Resource To Project`, `Create Synthetic Codebase`) from both `m5_acceptance.robot` and `tdd_acms_behavioral_validation.robot` to eliminate ~97 lines of duplication. `Create Synthetic Codebase` is parameterized with `project_label`. - **Modified**: `robot/e2e/m5_acceptance.robot` — Removed duplicated keywords now provided by `common_e2e.resource`. - **CHANGELOG.md**: Added entry under `## Unreleased` documenting the TDD tests for #1029. ### Test Cases - **Test 1**: Context Simulate Returns Non-Empty Tier Data — asserts `fragment_count > 0` (fails, proving bug) - **Test 2**: Context Inspect Shows Indexed Resources — asserts tier metrics total > 0 (fails, proving bug) - **Test 3**: Budget Enforcement Excludes Oversized Files — asserts `fragment_count > 0` with `max_file_size` policy (fails, proving bug). Includes TODO comment for post-fix exclusion assertion. - **Test 4**: Large Project Indexes Without Timeout — generates 10K+ files, asserts `fragment_count > 0` (fails, proving bug). Includes explicit developer responsibility note about git-tracking of generated files. All tests pass CI through result inversion by the `tdd_expected_fail_listener.py` — failing assertions (bug confirmed) are inverted to PASS. ### Documentation & Robustness Improvements - Suite-level documentation expanded with **known limitation** section explaining `tdd_expected_fail` result inversion scope. - Suite setup error messages include `(rc=${var.rc}). Check DEBUG logs above.` for debugging consistency with `m5_acceptance.robot`. - Redundant exit code assertions after `Run CLI` calls removed (Run CLI already validates rc internally). - `Run CLI` keyword documentation includes API key security notes. - Budget enforcement test (Test 3) includes `TODO(bugfix/...)` comment for the bug-fix developer. - Large project test (Test 4) includes explicit NOTE assigning responsibility to the bug-fix developer to evaluate filesystem vs. git-tracked content indexing. ### Review Fix Round Addressed all findings from Luis's review (review #2691): - **C1 (CRITICAL)**: Restored the #845 `CorrectionService` changelog entry (50 lines) accidentally deleted during merge conflict resolution. - **L1 (LOW)**: Extracted ~97 lines of duplicated keywords into `common_e2e.resource` (parameterized `Create Synthetic Codebase`, shared `Run CLI`, `Extract JSON From Stdout`, `Link Resource To Project`). - **M1 (MEDIUM)**: Strengthened NOTE comment about 10K files not being git-committed — explicit developer MUST responsibility. - **L3 (LOW)**: Made suite setup error messages verbose with `(rc=...). Check DEBUG logs above.` - **L2 (LOW)**: Removed redundant exit code assertions after `Run CLI` calls. - **M2 (MEDIUM)**: Acknowledged — partial assertion is acceptable for TDD capture phase (TODO documents the gap). - **I1 (INFO)**: Acknowledged — `tdd_expected_fail` masking is documented and mitigated. ### Motivation Per the Bug Fix Workflow in CONTRIBUTING.md, this TDD issue (#1029) is the prerequisite for bug fix #1028. The tests capture the buggy behavior so that when the fix is implemented, removing the `tdd_expected_fail` tag will cause the tests to pass normally. ### Quality Gates | Gate | Result | |------|--------| | lint | PASS | | typecheck | PASS | | unit_tests | PASS | | integration_tests | PASS | | e2e_tests | PASS (41 tests, 4 TDD) | | coverage_report | PASS (>=97%) | Closes #1029 Reviewed-on: #1124 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> Co-authored-by: Rui Hu <rui.hu@cleverthis.com> Co-committed-by: Rui Hu <rui.hu@cleverthis.com> |
||
|
|
3cf3f1f69e |
feat(validation): implement Fix-then-Revalidate orchestration loop for required validations
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 15s
CI / lint (pull_request) Successful in 3m40s
CI / quality (pull_request) Successful in 4m13s
CI / security (pull_request) Successful in 4m16s
CI / typecheck (pull_request) Successful in 4m16s
CI / integration_tests (pull_request) Successful in 9m11s
CI / unit_tests (pull_request) Successful in 9m23s
CI / docker (pull_request) Successful in 1m18s
CI / coverage (pull_request) Successful in 11m48s
CI / status-check (pull_request) Successful in 7s
CI / e2e_tests (pull_request) Successful in 8m24s
CI / lint (push) Successful in 3m18s
CI / build (push) Failing after 13s
CI / typecheck (push) Successful in 3m54s
CI / benchmark-regression (push) Has been skipped
CI / quality (push) Successful in 4m15s
CI / security (push) Successful in 4m39s
CI / integration_tests (push) Successful in 7m21s
CI / unit_tests (push) Successful in 7m44s
CI / docker (push) Successful in 1m9s
CI / e2e_tests (push) Successful in 11m9s
CI / coverage (push) Successful in 13m41s
CI / status-check (push) Successful in 2s
CI / benchmark-regression (pull_request) Successful in 48m49s
CI / benchmark-publish (push) Successful in 26m25s
Implemented FixThenRevalidateOrchestrator with full diagnosis → self-fix → re-validation → retry limit → strategy revision → user escalation → terminal failure flow. Added retry counting per validation per plan, configurable retry limit (default 3), auto_strategy_revision flag support, and validation_fix_history recording in plan execution metadata. Review fixes applied (round 1): - Added try/except around fix_callback and revalidate_callback (spec: validation errors treated as required failure regardless of mode) - Wired optional EventBus for VALIDATION_FIX_ATTEMPTED/SUCCEEDED/EXHAUSTED events - Fixed total_attempts derivation from fix_history length instead of cumulative retry counts - Updated module docstring to reflect implemented vs caller-responsible steps - Added exhausted-retry logging on re-invocation - Replaced bare assert in Robot helper with explicit _check() function - Added 10 new Behave scenarios covering exception paths, multi-failure, reset, field validation, boundary values, event_bus property, and exhausted re-invocation Review fixes applied (round 2 — PR #711): - B1+B7: Fixed TOCTOU race in _fix_single_validation; atomic claim-per-iteration under RLock; eliminated defaultdict auto-vivification with .get() reads - B2: Added validation_name mismatch check on revalidate_callback return - B3: Added fix_description truncation to 2000 chars before FixAttemptRecord - T1: Switched threading.Lock to threading.RLock for defensive reentrancy - A1: Added model_validator preventing escalated+terminal_failure both True - R1: Added max_length=255 to FixAttemptRecord.validation_name - S7: Fixed misleading docstring about automation_profile integration - D4: Fixed timestamp field description to specify UTC - D1: Renamed misleading benchmark time_fix_after_two_retries - Added 5 new Behave scenarios for truncation, model constraints, name mismatch ISSUES CLOSED: #583 |
||
|
|
e52c79e958 |
test: add TDD bug-capture test for #1024 — SQLite DB URL CWD resolution
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 3m19s
CI / typecheck (pull_request) Successful in 4m3s
CI / quality (pull_request) Successful in 4m3s
CI / security (pull_request) Successful in 4m3s
CI / integration_tests (pull_request) Successful in 6m26s
CI / unit_tests (pull_request) Successful in 7m57s
CI / e2e_tests (pull_request) Successful in 8m23s
CI / docker (pull_request) Successful in 1m8s
CI / coverage (pull_request) Successful in 11m22s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 19s
CI / lint (push) Successful in 3m17s
CI / quality (push) Successful in 3m44s
CI / typecheck (push) Successful in 3m53s
CI / security (push) Successful in 3m54s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 5m53s
CI / unit_tests (push) Successful in 6m59s
CI / docker (push) Successful in 1m2s
CI / e2e_tests (push) Successful in 8m42s
CI / coverage (push) Successful in 9m53s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Successful in 26m34s
CI / benchmark-regression (pull_request) Successful in 55m26s
Add Behave BDD scenarios (tagged @tdd_bug @tdd_bug_1024 @tdd_expected_fail) that verify the default database_url resolves inside CLEVERAGENTS_HOME rather than the current working directory. Two scenarios exercise both the container get_database_url() helper and the Settings model default. Add Robot Framework integration tests with a helper script exercising the same resolution paths via subprocess, verifying database URL resolution and CLI database file placement relative to CLEVERAGENTS_HOME. The tests currently fail as expected because the bug in #1024 is still present: the relative SQLite path sqlite:///cleveragents.db resolves against CWD. The @tdd_expected_fail tag inverts the result so CI passes. ISSUES CLOSED: #1034 |
||
|
|
2e094ef938 |
feat(acms): add text, vector, and graph backend protocol implementations
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 3m44s
CI / quality (pull_request) Successful in 4m9s
CI / typecheck (pull_request) Successful in 4m13s
CI / security (pull_request) Successful in 4m26s
CI / unit_tests (pull_request) Successful in 6m37s
CI / integration_tests (pull_request) Successful in 6m39s
CI / docker (pull_request) Successful in 1m50s
CI / e2e_tests (pull_request) Successful in 8m45s
CI / coverage (pull_request) Successful in 10m3s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 25s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 4m4s
CI / integration_tests (push) Successful in 6m48s
CI / unit_tests (push) Successful in 7m56s
CI / e2e_tests (push) Successful in 9m1s
CI / security (push) Failing after 11m29s
CI / typecheck (push) Failing after 11m29s
CI / benchmark-regression (pull_request) Failing after 26m35s
CI / benchmark-publish (push) Successful in 30m31s
CI / coverage (push) Has been skipped
CI / docker (push) Has been skipped
CI / benchmark-regression (push) Has been skipped
CI / status-check (push) Failing after 4s
Define TextBackend, VectorBackend, and GraphBackend protocols with corresponding result dataclasses. Implement in-memory stub backends for pipeline integration testing. Register backends in DI container with configurable provider selection. ISSUES CLOSED: #498 |
||
|
|
93da31e80f |
fix(skill): resolve skill add persistence regression after PR #640
CI / build (pull_request) Successful in 25s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m46s
CI / quality (pull_request) Successful in 4m9s
CI / security (pull_request) Successful in 4m13s
CI / typecheck (pull_request) Successful in 4m23s
CI / unit_tests (pull_request) Successful in 6m31s
CI / integration_tests (pull_request) Successful in 7m8s
CI / docker (pull_request) Successful in 1m14s
CI / e2e_tests (pull_request) Successful in 8m28s
CI / coverage (pull_request) Successful in 10m19s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 24s
CI / lint (push) Successful in 3m36s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m56s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m4s
CI / integration_tests (push) Successful in 7m1s
CI / coverage (push) Failing after 12m22s
CI / e2e_tests (push) Failing after 16m19s
CI / unit_tests (push) Successful in 18m40s
CI / docker (push) Successful in 57s
CI / status-check (push) Failing after 3s
CI / benchmark-publish (push) Successful in 28m38s
CI / benchmark-regression (pull_request) Successful in 52m22s
Root cause: _build_skill_service in container.py created a SkillRepository pointing at the database but did not ensure the skills/skill_items tables existed. When the tables were missing, SkillRepository.list_all() and create() failed silently (caught by SkillService._load_from_db and _persist_skill exception handlers), causing the service to operate in in-memory-only mode. Skills added in one CLI process were lost when a new process created a fresh SkillService. Additionally, SkillRepository lacked auto_commit support. Each call to session_factory() returned a new session, so the flush in create/update/ delete operated on a different session than the commit in SkillService._commit(), meaning data was never actually persisted even when the tables existed. Fix: 1. Add targeted table creation in _build_skill_service (following the pattern in _build_session_service) — checks for missing skills and skill_items tables and creates them via Base.metadata.create_all. 2. Add auto_commit parameter to SkillRepository (following the pattern in SessionRepository) so each mutating method commits and closes its own session. 3. Pass auto_commit=True from the container builder. 4. Remove @tdd_expected_fail from TDD test (leaving @tdd_bug and @tdd_bug_980 as permanent regression guards). ISSUES CLOSED: #980 |
||
|
|
a6e2bc7842 |
test: add TDD bug-capture test for #980 — skill add cross-process persistence
Write cross-process Behave and Robot tests capturing skill add persistence regression. Tests use subprocess invocations to verify skills persist across CLI process boundaries. The existing persistence tests (skill_add_persist.feature) verify round-trip within the same Python process by creating two SkillService instances sharing the same in-memory database. This approach cannot detect the cross-process regression where _build_skill_service falls back to in-memory storage because the skills table does not exist in the database created by agents init. Behave: features/tdd_skill_add_regression.feature Robot: robot/tdd_skill_add_regression.robot Tags: @tdd_bug, @tdd_bug_980, @tdd_expected_fail ISSUES CLOSED: #981 |
||
|
|
4a5f826f77 |
Merge pull request 'feat(resource): implement ResourceHandler CRUD and discovery methods' (#1054) from feature/resource-handler-crud into master
CI / build (push) Successful in 15s
CI / lint (push) Successful in 3m19s
CI / typecheck (push) Successful in 3m47s
CI / benchmark-regression (push) Has been skipped
CI / quality (push) Successful in 3m56s
CI / security (push) Successful in 3m56s
CI / e2e_tests (push) Successful in 7m53s
CI / integration_tests (push) Successful in 8m47s
CI / unit_tests (push) Successful in 9m2s
CI / docker (push) Successful in 49s
CI / coverage (push) Successful in 11m19s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 27m13s
Reviewed-on: #1054 |
||
|
|
90e5bbb99c |
feat(resource): implement ResourceHandler CRUD and discovery methods
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 3m17s
CI / unit_tests (pull_request) Successful in 3m38s
CI / quality (pull_request) Successful in 3m42s
CI / typecheck (pull_request) Successful in 3m54s
CI / security (pull_request) Successful in 4m2s
CI / docker (pull_request) Successful in 50s
CI / e2e_tests (pull_request) Successful in 8m32s
CI / integration_tests (pull_request) Successful in 6m54s
CI / coverage (pull_request) Successful in 14m10s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 59m15s
Extend the ResourceHandler protocol with six content operations (read, write, delete, list_children, diff, discover_children) and four frozen dataclass result types (Content, WriteResult, DeleteResult, DiffResult). Handler implementations: - GitCheckoutHandler: read via git show (binary-safe), write/delete via filesystem ops, list via git ls-tree, diff via git diff --no-index with locale-safe shortstat parsing, discover via git ls-tree -d - FsDirectoryHandler: full CRUD via pathlib/os/difflib/shutil - DevcontainerHandler: read/write/discover via devcontainer exec - CloudResourceHandler: NotImplementedError stubs for protocol compliance - DatabaseResourceHandler: inherits base NotImplementedError stubs Security: - Path traversal guard (_safe_resolve) on all read/write/delete ops using os.sep-suffixed startswith check to prevent prefix collisions - Empty-path deletion rejected with PermissionError Tests: - 22 Behave scenarios (115 steps): CRUD for FsDirectory and GitCheckout, path traversal rejection (3 scenarios), NotImplementedError defaults - 2 Robot integration tests: read -> write -> diff cycle on real temp directories and git repos ISSUES CLOSED: #827 |
||
|
|
188a9edd49 |
Merge pull request 'feat(resource): add LSP resource types' (#1046) from feature/lsp-resource-types into master
CI / build (push) Successful in 17s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m47s
CI / typecheck (push) Successful in 3m55s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m3s
CI / e2e_tests (push) Successful in 5m23s
CI / integration_tests (push) Successful in 5m54s
CI / unit_tests (push) Successful in 6m55s
CI / docker (push) Successful in 1m2s
CI / coverage (push) Successful in 11m6s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Failing after 41m9s
Reviewed-on: #1046 |
||
|
|
65a2e4db76 |
feat(resource): add LSP resource types
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 3m18s
CI / quality (pull_request) Successful in 3m46s
CI / typecheck (pull_request) Successful in 3m54s
CI / security (pull_request) Successful in 4m3s
CI / unit_tests (pull_request) Successful in 5m57s
CI / integration_tests (pull_request) Successful in 6m45s
CI / docker (pull_request) Successful in 56s
CI / e2e_tests (pull_request) Successful in 8m29s
CI / coverage (pull_request) Successful in 11m12s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Failing after 52m33s
Add 4 LSP-related built-in resource types to the resource registry: - executable: system binary/interpreter/LSP server binary with auto-discovery from container-exec-env and fs-directory (lazy) - lsp-server: LSP server definition with command, language-ids, transport, args, port, initialization-options config; children: lsp-workspace - lsp-workspace: workspace root tracked by LSP server, auto-discovered from lsp-server; children: lsp-document; not user-addable - lsp-document: text document tracked by LSP server, auto-discovered from lsp-workspace; read+write capabilities; not user-addable Type definitions extracted to _resource_registry_lsp.py for consistency with existing type modules. Parent/child hierarchy: lsp-server -> lsp-workspace -> lsp-document. YAML configs with ADR references (ADR-039, ADR-040). All 7 lsp-server CLI args per ADR-040. Behave tests (21 scenarios): YAML loading, user-addable flags, capabilities, parent/child hierarchy, auto-discovery for all 3 discoverable types, BUILTIN_NAMES, DB bootstrap roundtrip, negative tests for manual registration rejection. Robot tests (6 tests): import, BUILTIN_NAMES, DB roundtrip, hierarchy, auto-discovery, user-addable guard. ISSUES CLOSED: #832 |
||
|
|
e07b68221a |
Merge pull request 'feat(lsp): implement functional LSP runtime' (#1044) from feature/lsp-functional-runtime into master
CI / build (push) Successful in 17s
CI / lint (push) Successful in 3m19s
CI / quality (push) Successful in 3m43s
CI / typecheck (push) Successful in 3m49s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 3m57s
CI / integration_tests (push) Successful in 6m43s
CI / unit_tests (push) Successful in 6m44s
CI / docker (push) Successful in 58s
CI / e2e_tests (push) Successful in 8m35s
CI / coverage (push) Successful in 10m32s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Has been cancelled
Reviewed-on: #1044 |
||
|
|
4ff075e0da |
feat(lsp): implement functional LSP runtime
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / quality (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 57s
CI / lint (pull_request) Successful in 3m19s
CI / integration_tests (pull_request) Successful in 3m44s
CI / unit_tests (pull_request) Successful in 6m39s
CI / docker (pull_request) Successful in 1m9s
CI / e2e_tests (pull_request) Successful in 9m38s
CI / coverage (pull_request) Successful in 11m19s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Failing after 1h13m38s
Replace local-mode stubs with real LSP protocol support: - StdioTransport: subprocess management with JSON-RPC framing - LspClient: LSP protocol (initialize/shutdown/diagnostics/completions) - LspLifecycleManager: reference-counted instances, health checks, crash restart - LspRuntime: registry-based server lookup, auto-restart on crash - LspToolAdapter: runtime-delegating handlers with local-mode fallback - LanguageDiscovery: 4-layer detection (extension, shebang, UKO, project) - activate_bindings/deactivate_bindings: actor compiler LSP binding wiring Tests: 27 Behave scenarios, 6 Robot integration tests, 250 existing pass. ISSUES CLOSED: #826 |
||
|
|
a854de7e1f |
Merge pull request 'test(cli): add regression-guard tests for Container.resolve() crash' (#1053) from tdd/m3-container-resolve-crash into master
CI / build (push) Successful in 21s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m40s
CI / typecheck (push) Successful in 3m48s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m1s
CI / integration_tests (push) Successful in 6m44s
CI / unit_tests (push) Successful in 6m54s
CI / docker (push) Successful in 1m10s
CI / e2e_tests (push) Successful in 8m24s
CI / coverage (push) Successful in 9m54s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 25m18s
Reviewed-on: #1053 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> Reviewed-by: Hamza Khyari <hamza.khyari@cleverthis.com> Reviewed-by: Rui Hu <rui.hu@cleverthis.com> |
||
|
|
36c36bc0ee |
test(cli): add regression-guard tests for Container.resolve() crash
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m41s
CI / typecheck (pull_request) Successful in 3m54s
CI / security (pull_request) Successful in 4m2s
CI / integration_tests (pull_request) Successful in 6m41s
CI / unit_tests (pull_request) Successful in 6m49s
CI / docker (pull_request) Successful in 1m9s
CI / e2e_tests (pull_request) Successful in 9m19s
CI / coverage (pull_request) Successful in 11m17s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 50m38s
Add Behave and Robot Framework regression tests for bug #647, where plan tree, plan explain, and plan correct CLI commands crashed with AttributeError when resolving DecisionService from the DI container. Tests use a real DI container with seeded decisions (not MagicMock) to catch the exact class of bug that existing M3 tests missed. Assertions verify successful execution and command-specific output content. Includes Settings.reset() classmethod for robust singleton cleanup in test teardown. Review feedback addressed (hurui200320 Round 5): - Fixed Behave step engine leak by capturing UoW in cleanup closure - Removed dead @then decorator; renamed to private _assert_command_succeeded - Strengthened plan correct assertions with revert/dry-run content checks - Updated misleading get_container() comment to reflect singleton warming - Added test-only warning to Settings.reset() docstring - Added type annotations to 4 settings step functions - Fixed CONTRIBUTORS.md alphabetical ordering and removed duplicate entry - Replaced glob.glob with pathlib suffix iteration in Robot helper - Fixed feature description line break for readability - Removed redundant TYPE_CHECKING import for Decision ISSUES CLOSED: #648 |
||
|
|
9e316b1a3e |
fix(domain): align plan lifecycle model validation with specification
CI / build (pull_request) Successful in 22s
CI / typecheck (pull_request) Successful in 47s
CI / lint (pull_request) Successful in 3m17s
CI / quality (pull_request) Successful in 3m33s
CI / security (pull_request) Successful in 3m59s
CI / unit_tests (pull_request) Successful in 5m31s
CI / docker (pull_request) Successful in 57s
CI / coverage (pull_request) Successful in 12m32s
CI / status-check (pull_request) Successful in 1s
CI / integration_tests (pull_request) Successful in 2m25s
CI / e2e_tests (pull_request) Successful in 7m9s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (push) Successful in 26s
CI / lint (push) Successful in 3m18s
CI / typecheck (push) Successful in 3m54s
CI / security (push) Successful in 4m2s
CI / quality (push) Successful in 3m33s
CI / integration_tests (push) Successful in 5m47s
CI / unit_tests (push) Successful in 7m6s
CI / docker (push) Successful in 39s
CI / benchmark-regression (pull_request) Failing after 21m11s
CI / coverage (push) Failing after 19m3s
CI / benchmark-regression (push) Has been skipped
CI / e2e_tests (push) Failing after 21m14s
CI / status-check (push) Failing after 1s
CI / benchmark-publish (push) Failing after 18m51s
Aligned the plan lifecycle model with the specification: 1. ERRORED is now treated as terminal in is_terminal property, matching the spec table where errored is marked "Terminal? Yes" for all processing phases. 2. Added per-phase state validation via model_validator: APPLIED and CONSTRAINED are only valid in APPLY phase; COMPLETE is only valid in STRATEGIZE or EXECUTE phases. Invalid combinations now raise ValueError at construction time. 3. Updated ProcessingState.COMPLETE docstring to clarify phase-level terminality semantics. 4. Fixed assignment ordering in execute_plan() to set processing_state before phase, consistent with the state-first pattern used in apply_plan() and _perform_reversion(). 5. Added defensive coercion in LifecyclePlanModel.to_domain() to handle legacy DB rows with invalid phase/state combinations (e.g. APPLY/COMPLETE -> APPLY/APPLIED) with warning-level logging for observability. 6. Updated module docstrings: ERRORED description now reflects terminal semantics, terminal outcomes location clarified for all phases, can_revert_to docstring notes ERRORED/CONSTRAINED are terminal but revertable, is_terminal docstring explains the distinction between terminal and permanently irrecoverable and documents why COMPLETE is not plan-terminal despite the spec marking it "Terminal? Yes" (phase-level vs plan-level). 7. Updated PlanResumeService.validate_eligibility() docstring to reflect that ERRORED is now terminal but still eligible for resume. 8. Added CHANGELOG entry. ISSUES CLOSED: #918 |
||
|
|
bd18491b8d |
fix(test): replace shell=True with shell=False in cli_coverage_steps.py subprocess call
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m47s
CI / security (pull_request) Successful in 4m1s
CI / typecheck (pull_request) Successful in 4m7s
CI / unit_tests (pull_request) Successful in 5m46s
CI / docker (pull_request) Successful in 50s
CI / integration_tests (pull_request) Successful in 6m44s
CI / e2e_tests (pull_request) Successful in 9m41s
CI / coverage (pull_request) Successful in 11m37s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (push) Waiting to run
CI / build (push) Successful in 15s
CI / lint (push) Successful in 3m17s
CI / quality (push) Successful in 3m32s
CI / typecheck (push) Successful in 3m51s
CI / benchmark-regression (push) Waiting to run
CI / security (push) Successful in 4m0s
CI / integration_tests (push) Successful in 5m38s
CI / unit_tests (push) Successful in 5m40s
CI / docker (push) Successful in 1m9s
CI / e2e_tests (push) Successful in 7m17s
CI / coverage (push) Successful in 11m4s
CI / status-check (push) Successful in 3s
CI / benchmark-regression (pull_request) Failing after 27m59s
Replaced shell=True with shell=False and shlex.split() for command tokenization in cli_coverage_steps.py, consistent with the pattern already used in cli_plan_context_commands_steps.py. Audited all step files for additional shell=True usages. ISSUES CLOSED: #734 |
||
|
|
1ffb0fddbe |
feat(plan): decision correction recomputes only affected subtree
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 3m18s
CI / typecheck (pull_request) Successful in 4m11s
CI / security (pull_request) Successful in 4m13s
CI / integration_tests (pull_request) Successful in 5m56s
CI / coverage (pull_request) Successful in 10m2s
CI / quality (pull_request) Successful in 3m40s
CI / unit_tests (pull_request) Successful in 6m6s
CI / docker (pull_request) Successful in 1m2s
CI / status-check (pull_request) Successful in 1s
CI / e2e_tests (pull_request) Successful in 8m19s
CI / build (push) Successful in 14s
CI / lint (push) Successful in 3m35s
CI / typecheck (push) Successful in 3m53s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 5m54s
CI / unit_tests (push) Successful in 7m17s
CI / e2e_tests (push) Successful in 9m39s
CI / coverage (push) Successful in 11m22s
CI / benchmark-regression (pull_request) Successful in 58m8s
CI / benchmark-publish (push) Successful in 32m8s
CI / quality (push) Successful in 3m29s
CI / security (push) Successful in 3m40s
CI / docker (push) Successful in 51s
CI / status-check (push) Successful in 1s
Enhanced the CorrectionService to properly isolate correction scope:
1. analyze_impact() now populates excluded_decisions by computing
the set difference between all plan decisions and the affected
subtree, ensuring root and sibling decisions are tracked.
2. Added rollback_tier computation that counts parent hops from
the target decision to the root, enabling depth-aware rollback
strategies (tier 0 = root targeted, tier N = N levels deep).
3. Enhanced dry-run report with excluded decisions list, rollback
tier, and tier-0 warning when entire tree is affected.
4. Added subtree isolation validation confirming root exclusion
and sibling non-contamination for non-root corrections.
5. Fixed status state-machine regression in execute_revert() where
analyze_impact() overwrote status back to ANALYZING from EXECUTING.
Guard now only transitions to ANALYZING when status is PENDING.
execute_revert() now transitions through ANALYZING before EXECUTING
for correct lifecycle ordering.
6. Fixed validate_subtree_isolation() to use structural-only BFS for
the sibling invariant check, so that influence-DAG-caused sibling
reachability is not misreported as an isolation violation (per spec
§ Affected Subtree Computation).
7. Fixed false-positive cycle-detection warnings from convergent
(diamond) topologies by replacing per-node seen_this_round with a
global enqueued set in BFS, preventing duplicate queue insertions
from different parents.
8. Added dry_run enforcement guard in _assert_executable() to prevent
execution of dry-run-only corrections per spec (§ plan correct
--dry-run: "Show impact without executing").
9. Fixed generate_dry_run_report() to preserve request status so that
generating a preview does not advance the correction lifecycle
(dry-run is non-mutating per spec). Status restoration now uses
try/finally to guarantee recovery even when analyze_impact() raises
after transitioning the status.
10. Improved cycle-detection log message accuracy to cover both
structural tree and influence DAG sources.
11. Extracted cost/time estimation constants (_COST_PER_DECISION,
_RECOMPUTE_SECONDS_PER_DECISION) from magic numbers.
12. Added terminal-state guard in analyze_impact() to reject
re-analysis after execution (APPLIED/FAILED/CANCELLED/REJECTED),
preventing audit-data corruption. Promoted terminal-status set
to a module-level _TERMINAL_STATUSES frozenset constant.
13. Added mode validation in execute_revert()/execute_append() to
prevent mode-mismatched execution (e.g. calling execute_revert
on an APPEND correction).
14. Fixed _collect_all_decisions() to always include the target
decision in the universe, preventing broken partition invariant
for isolated single-node plans.
15. Fixed tier-0 dry-run warning to only trigger when the target
is genuinely in the structural tree (avoiding false warnings for
nodes not present in the tree).
16. Removed duplicate as_cli_dict regression scenarios in
resource_type_deferred_physical.feature.
ISSUES CLOSED: #845
|
||
|
|
231ed59ad2 |
test: add TDD bug-capture test for #993 — server_connect non-atomic writes
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 37s
CI / lint (pull_request) Successful in 5m18s
CI / quality (pull_request) Successful in 5m36s
CI / typecheck (pull_request) Successful in 5m53s
CI / security (pull_request) Successful in 5m59s
CI / integration_tests (pull_request) Successful in 8m40s
CI / unit_tests (pull_request) Successful in 8m49s
CI / docker (pull_request) Successful in 1m0s
CI / e2e_tests (pull_request) Successful in 10m19s
CI / coverage (pull_request) Successful in 11m10s
CI / status-check (pull_request) Successful in 2s
CI / benchmark-regression (pull_request) Failing after 46m26s
Add 3 Behave scenarios tagged @tdd_expected_fail @tdd_bug @tdd_bug_993 that prove bug #993 exists: server_connect() in server.py makes three sequential set_value() calls with no transaction or rollback. When a middle call fails (simulated via _FailingConfigService subclass), the earlier values are already persisted, leaving the config in a half- written state. Scenarios: 1. Second set_value fails — asserts server.url rolled back (FAILS: server.url retains the new value, proving non-atomicity). 2. Third set_value fails — asserts both url and namespace rolled back (FAILS: both retain new values). 3. Empty config + second call fails — asserts server.url not persisted (FAILS: server.url was written despite subsequent failure). All assertions fail as expected (the bug exists), and the @tdd_expected_fail tag inverts these to CI passes. When the fix in #993 removes the tag, the tests will run normally and must pass. Robot integration test: N/A — the non-atomic write behavior is internal to server_connect and ConfigService.set_value; no external system integration is involved. Quality gates verified: - lint: pass - typecheck: pass (0 errors) - unit_tests: 462 features / 12233 scenarios / 46803 steps — all pass - integration_tests: 1537 tests — all pass - e2e_tests: 37 tests — all pass - coverage_report: 98% (threshold 97%) ISSUES CLOSED: #1097 |
||
|
|
a3c3a5c530 |
Docs: daily update to timeline
CI / lint (push) Successful in 3m19s
CI / build (push) Successful in 30s
CI / typecheck (push) Successful in 4m0s
CI / benchmark-regression (push) Has been skipped
CI / quality (push) Successful in 4m2s
CI / security (push) Successful in 4m22s
CI / unit_tests (push) Successful in 9m2s
CI / integration_tests (push) Successful in 9m3s
CI / e2e_tests (push) Successful in 8m27s
CI / docker (push) Successful in 1m9s
CI / coverage (push) Successful in 11m1s
CI / status-check (push) Successful in 2s
CI / benchmark-publish (push) Successful in 25m27s
|
||
|
|
fc4397f845 |
test: add TDD bug-capture test for #986 — CorrectionService checkpoint_service wiring
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 3m55s
CI / quality (pull_request) Successful in 3m59s
CI / security (pull_request) Successful in 4m4s
CI / lint (pull_request) Failing after 13m51s
CI / e2e_tests (pull_request) Failing after 18m49s
CI / integration_tests (pull_request) Failing after 18m49s
CI / unit_tests (pull_request) Failing after 18m50s
CI / coverage (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
Add a Behave feature with two scenarios that verify the DI container wires checkpoint_service into CorrectionService. Both assertions currently fail — proving bug #986 exists — and the @tdd_expected_fail tag inverts the result so the test passes CI while the bug is unfixed. Scenario 1 asserts _checkpoint_service is not None after resolving CorrectionService from the container. Scenario 2 additionally verifies the injected object is a CheckpointService instance. When bug #986 is fixed (checkpoint_service=checkpoint_service added to the container registration), both assertions will pass and the developer must remove @tdd_expected_fail per the TDD bug workflow. Tags: @tdd_expected_fail @tdd_bug @tdd_bug_986 @mock_only Quality gates verified: - lint: pass - typecheck: pass (0 errors) - unit_tests: 462 features, 12232 scenarios, 0 failures - coverage: 98% (threshold 97%) - tag_validation: 19/19 scenarios pass - e2e_tests: 37/37 pass ISSUES CLOSED: #1030 |
||
|
|
5f5ef891a2
|
Docs: daily update to timeline
CI / lint (push) Successful in 3m18s
CI / build (push) Successful in 21s
CI / typecheck (push) Successful in 4m11s
CI / benchmark-regression (push) Has been skipped
CI / quality (push) Successful in 4m17s
CI / security (push) Successful in 4m35s
CI / integration_tests (push) Successful in 7m13s
CI / unit_tests (push) Successful in 7m45s
CI / docker (push) Successful in 1m10s
CI / e2e_tests (push) Successful in 9m49s
CI / coverage (push) Successful in 11m9s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 25m21s
|
||
|
|
a2113deace |
fix(a2a): suppress stdout/stderr in facade bootstrap to prevent test pollution
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 41s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m44s
CI / typecheck (pull_request) Successful in 3m56s
CI / security (pull_request) Successful in 4m5s
CI / e2e_tests (pull_request) Successful in 8m33s
CI / integration_tests (pull_request) Successful in 8m37s
CI / unit_tests (pull_request) Successful in 8m42s
CI / docker (pull_request) Successful in 1m12s
CI / coverage (pull_request) Successful in 10m58s
CI / status-check (pull_request) Successful in 1s
CI / lint (push) Successful in 3m28s
CI / build (push) Successful in 14s
CI / typecheck (push) Successful in 3m52s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m0s
CI / quality (push) Successful in 4m5s
CI / integration_tests (push) Successful in 6m56s
CI / unit_tests (push) Successful in 7m15s
CI / docker (push) Successful in 1m12s
CI / e2e_tests (push) Successful in 8m36s
CI / coverage (push) Successful in 11m35s
CI / status-check (push) Successful in 2s
CI / benchmark-publish (push) Successful in 28m44s
CI / benchmark-regression (pull_request) Successful in 51m20s
The _notify_facade and _facade_dispatch functions call get_container() during lazy facade construction. This can trigger structlog output that corrupts CLI stdout captured by CliRunner in tests. Wrap facade construction in redirect_stdout/redirect_stderr to suppress any side-effect output. Also reset the facade singleton in after_scenario for test isolation. |
||
|
|
4f2aa4189c |
fix(test): guard result.stderr access against ValueError
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m20s
CI / typecheck (pull_request) Successful in 3m56s
CI / build (pull_request) Successful in 37s
CI / security (pull_request) Successful in 4m2s
CI / quality (pull_request) Successful in 4m8s
CI / unit_tests (pull_request) Failing after 4m13s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 7m10s
CI / e2e_tests (pull_request) Successful in 9m34s
CI / coverage (pull_request) Successful in 11m1s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-regression (pull_request) Has been cancelled
Click/Typer CliRunner.Result.stderr is a property that raises ValueError when stderr was not separately captured (mix_stderr=True is the default). Wrap all result.stderr accesses in try/except to handle this gracefully. |
||
|
|
0c301ac581 |
fix(test): update facade operation count from 11 to 42
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 44s
CI / lint (pull_request) Successful in 3m19s
CI / unit_tests (pull_request) Failing after 3m42s
CI / quality (pull_request) Successful in 3m48s
CI / typecheck (pull_request) Successful in 4m55s
CI / security (pull_request) Successful in 5m6s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 5m9s
CI / integration_tests (pull_request) Successful in 6m52s
CI / coverage (pull_request) Failing after 19m27s
CI / benchmark-regression (pull_request) Successful in 48m13s
CI / status-check (pull_request) Failing after 1s
The A2A facade now exposes 42 operations (31 extension + 11 legacy) after the spec-aligned _cleveragents/ extension methods were added. Update the BDD assertion and docs to match the actual count. |
||
|
|
24aad463a1 |
feat(a2a): A2A facade session and plan lifecycle operations functional via CLI
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m20s
CI / unit_tests (pull_request) Failing after 3m30s
CI / build (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 3m54s
CI / quality (pull_request) Successful in 4m0s
CI / security (pull_request) Successful in 4m14s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 7m8s
CI / e2e_tests (pull_request) Successful in 9m32s
CI / coverage (pull_request) Failing after 13m20s
CI / benchmark-regression (pull_request) Successful in 48m39s
CI / status-check (pull_request) Failing after 1s
Wire CLI session and plan lifecycle commands through the A2A local facade, establishing the A2A protocol data flow: CLI -> A2aLocalFacade.dispatch() -> Service -> Domain. Key changes: - Added cli_bootstrap.py module providing get_facade() which lazily constructs a process-wide A2aLocalFacade instance wired to the DI container (plan_lifecycle_service, session_service, resource_registry_service, tool_registry). Service wiring is best-effort via contextlib.suppress. - Session CLI create command now notifies the A2A facade after session creation for protocol bookkeeping and telemetry. - Plan CLI commands (use, execute, lifecycle-apply) now notify the A2A facade via _notify_facade() helper after operations complete. The notification is best-effort (exceptions are suppressed) to avoid breaking CLI functionality if the facade is not available. - Added Behave feature (a2a_cli_facade_integration.feature) with 8 scenarios covering: facade bootstrap wiring, all 11 operations supported, session/plan dispatch through facade, and best-effort error suppression. The facade notification pattern preserves backward compatibility: CLI commands still perform the primary work via direct service calls, then notify the facade for A2A protocol compliance. This allows incremental migration toward full facade-first routing. ISSUES CLOSED: #852 |
||
|
|
f138bab5ff |
feat(a2a): implement SSE streaming for task updates and artifacts
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 3m38s
CI / quality (pull_request) Successful in 4m5s
CI / typecheck (pull_request) Successful in 4m21s
CI / security (pull_request) Successful in 4m31s
CI / e2e_tests (pull_request) Successful in 8m45s
CI / integration_tests (pull_request) Successful in 9m5s
CI / unit_tests (pull_request) Successful in 9m9s
CI / docker (pull_request) Successful in 1m9s
CI / coverage (pull_request) Successful in 10m46s
CI / status-check (pull_request) Successful in 2s
CI / lint (push) Successful in 3m18s
CI / build (push) Successful in 22s
CI / quality (push) Successful in 3m39s
CI / security (push) Successful in 4m0s
CI / typecheck (push) Successful in 4m12s
CI / benchmark-regression (push) Has been skipped
CI / e2e_tests (push) Successful in 8m20s
CI / integration_tests (push) Successful in 8m38s
CI / unit_tests (push) Successful in 8m42s
CI / docker (push) Successful in 1m13s
CI / coverage (push) Successful in 10m49s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 29m24s
CI / benchmark-regression (pull_request) Successful in 51m28s
Add Server-Sent Events (SSE) streaming infrastructure to the A2A event system, enabling real-time delivery of task status updates and artifact notifications. Key changes: - Defined SSE event type constants: TASK_STATUS_UPDATE (TaskStatusUpdateEvent) and TASK_ARTIFACT_UPDATE (TaskArtifactUpdateEvent) per the A2A protocol specification. - Added SseEventFormatter class that converts A2aEvent instances to text/event-stream format with event, id, and data fields. Includes keepalive formatting for long-lived connections. - Added EventBusBridge class that subscribes to the internal EventBus (ReactiveEventBus) and translates DomainEvent instances into A2aEvent instances published to the A2aEventQueue. Maps plan lifecycle events (PLAN_CREATED, PLAN_PHASE_CHANGED, etc.) to TaskStatusUpdateEvent and checkpoint events to TaskArtifactUpdateEvent. - Bridge handles closed queue gracefully via contextlib.suppress. - Added 8 Behave scenarios covering SSE formatting, event type constants, EventBusBridge translation for both status and artifact events, closed queue handling, and JSON payload validation. ISSUES CLOSED: #875 |
||
|
|
c2a2c5c4bf |
fix(cli): make plan correct accept plan_id as primary identifier (#1055)
CI / build (push) Successful in 23s
CI / lint (push) Successful in 3m40s
CI / typecheck (push) Successful in 4m14s
CI / benchmark-regression (push) Has been skipped
CI / quality (push) Successful in 4m9s
CI / security (push) Successful in 4m24s
CI / unit_tests (push) Successful in 6m55s
CI / integration_tests (push) Successful in 7m7s
CI / docker (push) Successful in 1m14s
CI / e2e_tests (push) Successful in 9m24s
CI / coverage (push) Successful in 11m20s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 24m27s
## Summary - **`plan correct` now accepts a plan_id** as its positional argument (in addition to decision_id). When a plan_id is given, the root decision is automatically selected as the correction target. - The positional parameter is renamed from `decision_id` to `identifier` with updated help text reflecting dual use. - Backward compatibility is fully preserved: decision_id inputs continue to work exactly as before. ## How it works 1. Try `container.plan_lifecycle_service().get_plan(identifier)` to check if the identifier is a plan_id 2. If it resolves to a real `Plan` object, use it as `resolved_plan_id` and auto-select the root decision (`parent_decision_id is None`) 3. If lookup fails (`ResourceNotFoundError`) or the result is not a `Plan` instance, fall back to treating the identifier as a decision_id (original behavior) ## Verification - `nox -s lint` — All checks passed - `nox -s typecheck` — 0 errors, 1 pre-existing warning - `nox -s unit_tests` (correction features) — 150 scenarios passed, 683 steps passed, 0 failures ISSUES CLOSED: #969 Reviewed-on: #1055 Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com> |
||
|
|
34c6972a05 |
feat(tool): implement BuiltinAdapter class and MCP automatic resource slot creation (#964)
CI / build (push) Successful in 18s
CI / lint (push) Successful in 3m20s
CI / typecheck (push) Successful in 3m56s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m1s
CI / quality (push) Successful in 4m8s
CI / unit_tests (push) Successful in 6m40s
CI / integration_tests (push) Successful in 6m40s
CI / docker (push) Successful in 1m19s
CI / e2e_tests (push) Failing after 17m17s
CI / coverage (push) Failing after 18m20s
CI / benchmark-publish (push) Successful in 31m37s
CI / status-check (push) Failing after 1s
## Summary Implement `BuiltinAdapter` class and MCP automatic resource slot creation. Two main changes: ### 1. BuiltinAdapter Class (`tool/builtins/adapter.py`) Formal adapter implementing the tool adapter lifecycle pattern for built-in tools: - `discover()` — returns all built-in tool descriptors (file, git, subplan tools) - `register(registry)` — registers all tools in a ToolRegistry, returns registered names - `activate()`/`deactivate()` — no-ops (built-in tools are always available) - Wraps existing `ALL_FILE_TOOLS`, `ALL_GIT_TOOLS`, `ALL_SUBPLAN_TOOLS` lists - Backward compatible — existing registration functions still work ### 2. MCP Resource Slot Inference (`mcp/adapter.py`) New `infer_resource_slots()` static method on `MCPToolAdapter`: - Scans MCP tool parameter schemas for file/directory/repo patterns - Creates `ResourceSlot` objects with appropriate type, access mode, binding mode - Mapping: `file_path`→file(rw), `directory`→directory(ro), `repo_path`→git-checkout(rw) - Slots stored in `source_metadata["resource_slots"]` on registered `ToolSpec` objects ### Quality Gates | Session | Result | |---|---| | `nox -s lint` | PASS | | `nox -s typecheck` | PASS (0 errors) | | `nox -s unit_tests` | PASS (10,817 scenarios) | | `nox -s integration_tests` | PASS (6 new tests) | | `nox -s coverage_report` | 97% (>= 97%) | Closes #882 Reviewed-on: #964 Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com> |
||
|
|
b88bc0ec1b |
feat(perf): large project scaling tests (#984)
CI / build (push) Successful in 19s
CI / lint (push) Successful in 3m19s
CI / quality (push) Successful in 3m43s
CI / typecheck (push) Successful in 3m55s
CI / security (push) Successful in 4m2s
CI / unit_tests (push) Successful in 6m39s
CI / integration_tests (push) Successful in 6m48s
CI / docker (push) Successful in 1m7s
CI / e2e_tests (push) Successful in 9m7s
CI / benchmark-regression (push) Has been skipped
CI / coverage (push) Failing after 16m36s
CI / benchmark-publish (push) Successful in 25m51s
CI / status-check (push) Failing after 4s
## Summary Add large project scaling benchmarks and tests at production scale (10K–100K files). ### New ASV Benchmarks **IndexingScalingSuite** (`large_project_scaling_bench.py`): - `time_walk_and_index` at 1K/10K/50K/100K files - `time_incremental_refresh` (1% modified files) - `track_indexed_file_count`, `track_tokens_per_second` **ContextAssemblyScalingSuite** (`context_assembly_scaling_bench.py`): - `time_full_pipeline` at 100/1K/5K/10K fragments - `time_tiered_strategy`, `time_recency_strategy` - `track_assembled_tokens`, `track_fragments_per_second` **ExecutionThroughputSuite** (`execution_throughput_bench.py`): - `time_sequential_plans` at 10/50/100 plans - `time_executor_construction`, `time_decision_tree_scaling` ### Scale Fixture Updates - Added `xlarge` (50K files) and `xxlarge` (100K files) profiles to `scale_metadata.json` - Added 50K/100K thresholds to `baseline_thresholds.json` - Added `context_assembly` and `execution_throughput` threshold sections ### Tests & Documentation - 15 Behave scenarios validating profiles, thresholds, monotonicity, memory budgets - 6 Robot integration tests including live 1K-file indexing throughput check - `docs/reference/scaling_baselines.md` documenting all baseline metrics ### Quality Gates | Session | Result | |---|---| | `nox -s lint` | PASS | | `nox -s typecheck` | PASS (0 errors) | | `nox -s unit_tests` | PASS (10,910 scenarios) | | `nox -s integration_tests` | PASS (1,526 tests) | | `nox -s coverage_report` | 97% (>= 97%) | Closes #859 Reviewed-on: #984 Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com> |
||
|
|
8a87262f86 |
feat(sandbox): implement overlay filesystem sandbox strategy (#994)
CI / build (push) Successful in 17s
CI / lint (push) Successful in 3m41s
CI / quality (push) Successful in 3m47s
CI / unit_tests (push) Successful in 3m58s
CI / typecheck (push) Successful in 4m17s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m22s
CI / docker (push) Successful in 1m22s
CI / e2e_tests (push) Successful in 8m57s
CI / coverage (push) Successful in 11m16s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Successful in 19m45s
CI / integration_tests (push) Failing after 20m53s
## Summary Implement the overlay filesystem sandbox strategy with OverlayFS support and userspace fallback. ### Implementation **`OverlaySandbox`** (`infrastructure/sandbox/overlay.py`, 497 lines): - Detects OverlayFS availability at runtime via `/proc/filesystems` + `os.geteuid() == 0` check - **Real OverlayFS mode** (requires root): creates upper/work/merged dirs, mounts overlay filesystem, captures writes in upper layer - **Userspace fallback** (default in CI/containers): `shutil.copytree` the original into merged dir, tracks changes via `filecmp` diff on commit - `create()`: sets up directory structure, mounts if available - `commit()`: copies changed/added files from overlay to original, removes deleted files - `rollback()`: unmounts (or removes) merged, recreates from scratch - `cleanup()`: unmounts, removes all temp dirs, idempotent ### Domain Model Updates - Added `OVERLAY = "overlay"` to `SandboxStrategy` enum in both `resource_type.py` and `resource.py` - Added `STRATEGY_OVERLAY` to `SandboxFactory`, registered for `fs-mount`, `fs-directory`, `fs-file` resources ### Tests - **22 Behave scenarios**: full lifecycle (create/commit/rollback/cleanup), status transitions, path traversal guard, fallback detection, error handling - **6 Robot integration tests**: end-to-end overlay sandbox operations ### Quality Gates | Session | Result | |---|---| | `nox -s lint` | PASS | | `nox -s typecheck` | PASS (0 errors) | | `nox -s unit_tests` | PASS (10,917 scenarios) | | `nox -s coverage_report` | 97% (>= 97%) | Closes #880 Reviewed-on: #994 Co-authored-by: Brent Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent Edwards <brent.edwards@cleverthis.com> |
||
|
|
6531440431 |
feat(actor): implement estimation actor type (#962)
CI / build (push) Successful in 24s
CI / lint (push) Successful in 3m16s
CI / quality (push) Successful in 3m45s
CI / typecheck (push) Successful in 3m52s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m1s
CI / unit_tests (push) Successful in 7m8s
CI / integration_tests (push) Successful in 7m1s
CI / docker (push) Successful in 1m6s
CI / e2e_tests (push) Successful in 9m49s
CI / coverage (push) Successful in 12m22s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 19m34s
## Summary Implement the estimation actor as a functional actor type. The estimation actor provides cost, time, and resource estimates for plan operations, running after Strategize completes (before Execute). Estimation is informational only and optional — plans work without an estimation actor configured. ### Changes **New files:** - `src/cleveragents/domain/models/core/estimation.py` — `EstimationResult` frozen Pydantic model with fields for cost (USD), tokens, steps, child plans, time, risk level/factors, summary - `features/estimation_actor.feature` — 12 Behave test scenarios (model validation, serialization, stub actor, plan integration, optional behavior) - `features/steps/estimation_actor_steps.py` — Step definitions - `robot/estimation_actor.robot` — 6 Robot integration tests - `robot/helper_estimation_actor.py` — Robot test helper **Modified files:** - `domain/models/acms/tiers.py` — Added `ESTIMATOR` to `ActorRole` enum - `domain/models/core/plan.py` — Added `estimation_result: EstimationResult | None` field, estimation data in `as_cli_dict()` - `application/services/plan_executor.py` — Added `EstimationStubActor` class - `application/services/plan_lifecycle_service.py` — Added `_run_estimation()` method, invoked in `execute_plan()` - `cli/commands/plan.py` — Display estimation results in plan status - `vulture_whitelist.py` — Added 12 new public symbols ### Quality Gates | Session | Result | |---|---| | `nox -s lint` | PASS | | `nox -s typecheck` | PASS (0 errors) | | `nox -s unit_tests` | PASS (10,818 scenarios) | | `nox -s integration_tests` | PASS (1,512 tests) | | `nox -s coverage_report` | 98% (>= 97%) | Closes #890 Reviewed-on: #962 Co-authored-by: Brent Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent Edwards <brent.edwards@cleverthis.com> |