Commit Graph

3224 Commits

Author SHA1 Message Date
HAL9000 bd18f10040 fix(tui): apply ruff format and expand behave coverage for new TUI screens
- session_management.py: collapse three multi-line statements that
  ruff format would otherwise reformat (CI lint gate was failing on
  `ruff format --check`).
- features/tui_settings_session_screens.feature: add three scenarios
  that exercise the previously uncovered paths reported by
  diff_coverage on prior attempts:
  - SettingsScreen.get_settings() returns a settings dict
  - SessionManagementScreen renders sessions when visible+loaded
    (covers the render-loop body + _render_session_details
    non-None branch + the four detail lines)
  - TuiCommandRouter routes "/settings" to _settings_command
- features/steps/tui_settings_session_screens_steps.py:
  - Make `the selected_index should be {index:d}` look up whichever
    screen the scenario created (the step was always referencing
    `context.settings_screen`, which crashed in the
    SessionManagementScreen scenarios).
  - Reuse the existing TuiCommandRouter steps from
    tui_commands_coverage_steps.py for the /settings scenario.

The unit_tests / integration_tests CI gates on the prior run were
red on tests unrelated to this PR (CheckpointRepository and
actor_run_signature.robot, neither touched here); the targeted
behave run for this PR's feature file passes locally with all 12
scenarios green.
2026-06-13 16:54:29 -04:00
controller-ci-rerun 329b04422f chore: re-trigger CI [controller] 2026-06-13 16:54:29 -04:00
controller-ci-rerun d4120ff5c1 chore: re-trigger CI [controller] 2026-06-13 16:54:29 -04:00
HAL9000 d54cea6b91 feat(tui): implement SettingsScreen and SessionManagementScreen 2026-06-13 16:54:29 -04:00
HAL9000 45d98c3e2e Merge pull request 'fix(lsp): cleanup subprocess on failed initialization in StdioTransport.start()' (#11020) from pr_fix/lsp-transport-subprocess-cleanup into master
CI / build (push) Successful in 37s
CI / lint (push) Successful in 41s
CI / quality (push) Successful in 53s
CI / typecheck (push) Successful in 1m9s
CI / helm (push) Successful in 1m16s
CI / security (push) Successful in 1m29s
CI / push-validation (push) Successful in 26s
CI / unit_tests (push) Successful in 6m16s
CI / docker (push) Successful in 1m49s
CI / integration_tests (push) Successful in 10m7s
CI / coverage (push) Successful in 12m3s
CI / status-check (push) Successful in 5s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
2026-06-13 20:37:22 +00:00
controller-ci-rerun 1313570efe chore: re-trigger CI [controller]
CI / lint (pull_request) Successful in 58s
CI / quality (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m25s
CI / build (pull_request) Successful in 47s
CI / security (pull_request) Successful in 2m41s
CI / push-validation (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 48s
CI / unit_tests (pull_request) Successful in 10m46s
CI / docker (pull_request) Successful in 1m39s
CI / integration_tests (pull_request) Successful in 18m16s
CI / coverage (pull_request) Successful in 14m5s
CI / status-check (pull_request) Successful in 3s
2026-06-13 16:10:40 -04:00
controller-ci-rerun 07b1b9ecc1 chore: re-trigger CI [controller] 2026-06-13 16:10:40 -04:00
controller-ci-rerun ccaea056b9 chore: re-trigger CI [controller] 2026-06-13 16:10:40 -04:00
controller-ci-rerun 60cb92938a chore: re-trigger CI [controller] 2026-06-13 16:10:40 -04:00
controller-ci-rerun b6530a9c5d chore: re-trigger CI [controller] 2026-06-13 16:10:40 -04:00
HAL9000 c8232c17f4 fix(lsp): cleanup subprocess on failed initialization in StdioTransport.start()
When subprocess.Popen() fails during LSP server initialization (e.g.
FileNotFoundError for missing command or general OSError), partially-allocated
pipe resources and internal file descriptors could be left in an inconsistent
state. This was caused by _process potentially containing a stale reference if
an exception occurred between pipe allocation and the Popen object being fully
returned.

Fix: Add explicit self._process = None resets in three places:
1) Before subprocess.Popen() — ensures clean initial state even across retries
2) In FileNotFoundError handler — guards against intermediate error states
3) In OSError handler — general safety net for all subprocess failures

This prevents:
- Orphaned child processes never terminated (zombie processes)
- File descriptor leaks from partially-allocated pipes
- Transports stuck in ambiguous 'started but not live' state

Tests added: Two new Behave scenarios verify _process is None after both
FileNotFoundError and OSError during start().

ISSUES CLOSED: #10597
2026-06-13 16:10:40 -04:00
HAL9000 c958545147 Merge pull request 'fix(e2e): add tdd_expected_fail tag and full test body to WF18 container clone' (#11124) from bugfix/m3-wf18-oom-sigkill into master
CI / push-validation (push) Successful in 30s
CI / build (push) Successful in 46s
CI / lint (push) Successful in 58s
CI / quality (push) Successful in 57s
CI / helm (push) Successful in 1m0s
CI / security (push) Successful in 1m16s
CI / typecheck (push) Successful in 1m19s
CI / unit_tests (push) Successful in 5m38s
CI / docker (push) Successful in 1m47s
CI / integration_tests (push) Failing after 13m24s
CI / coverage (push) Successful in 11m18s
CI / status-check (push) Failing after 5s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
2026-06-13 19:50:14 +00:00
controller-ci-rerun 8c18bfe407 chore: re-trigger CI [controller]
CI / lint (pull_request) Successful in 39s
CI / typecheck (pull_request) Successful in 1m18s
CI / security (pull_request) Successful in 1m21s
CI / quality (pull_request) Successful in 52s
CI / build (pull_request) Successful in 54s
CI / helm (pull_request) Successful in 46s
CI / push-validation (pull_request) Successful in 26s
CI / unit_tests (pull_request) Successful in 6m22s
CI / integration_tests (pull_request) Successful in 10m58s
CI / docker (pull_request) Successful in 1m29s
CI / coverage (pull_request) Successful in 14m7s
CI / status-check (pull_request) Successful in 3s
2026-06-13 15:27:36 -04:00
controller-ci-rerun 3622a84a7c chore: re-trigger CI [controller] 2026-06-13 15:27:36 -04:00
controller-ci-rerun 6908c61266 chore: re-trigger CI [controller] 2026-06-13 15:27:36 -04:00
controller-ci-rerun bfe2edcb31 chore: re-trigger CI [controller] 2026-06-13 15:27:36 -04:00
controller-ci-rerun bcd4142631 chore: re-trigger CI [controller] 2026-06-13 15:27:36 -04:00
HAL9000 926665eec8 fix(e2e): fix WF18 Suite Setup tag separator to two spaces
Robot Framework requires ≥2 spaces (or a tab) to separate multiple
values in a [Tags] setting. The WF18 Suite Setup keyword had a single
space between tdd_issue and tdd_issue_4188, causing RF to parse them
as a single tag with a space in its name rather than two distinct tags.
The tdd_expected_fail_listener validates that tdd_issue_N requires a
standalone tdd_issue tag — the single-space bug was silently breaking
that validation.

Fix: change `tdd_issue tdd_issue_4188` to `tdd_issue    tdd_issue_4188`
(four-space separator, matching the rest of the file's style).

ISSUES CLOSED: #10815
2026-06-13 15:27:36 -04:00
controller-ci-rerun 6435673fe2 chore: re-trigger CI [controller] 2026-06-13 15:27:36 -04:00
HAL9000 52ebfa981a fix(e2e): add tdd_expected_fail tag and full test body to WF18 container clone
The wf18_container_clone.robot E2E test had an empty test case body —
after Skip If No LLM Keys the test contained no steps, but when LLM
keys are present the container clone workflow caused the CLI process to
be killed by SIGKILL (rc=-9, OOM) in the memory-constrained CI
environment.

Added tdd_expected_fail (with tdd_issue_10815) so CI correctly inverts
the OOM failure to a pass until the container execution environment is
tuned to operate within CI memory limits.

Also added the full WF18 test body implementing all acceptance criteria:
- container-instance resource registration with --clone-into flag
- two-step project creation and resource linking
- action creation with trusted automation profile
- full plan lifecycle: plan use → plan execute → plan apply
- WF18 Test Teardown keyword for diagnostic logging on failure

The fixture repo (Create Remote Clone Repo) creates a local git repo
using file:// URI so the --clone-into clone can operate without
requiring an external network host.

ISSUES CLOSED: #10815
2026-06-13 15:27:36 -04:00
HAL9000 6183e709ea Merge pull request 'fix(acms): normalize context path matching for absolute paths in _path_matches' (#11026) from bugfix/m6-acms-path-matching-absolute into master
CI / push-validation (push) Successful in 30s
CI / lint (push) Successful in 41s
CI / build (push) Successful in 44s
CI / helm (push) Successful in 47s
CI / typecheck (push) Successful in 1m18s
CI / quality (push) Successful in 1m20s
CI / security (push) Successful in 1m26s
CI / unit_tests (push) Successful in 6m24s
CI / integration_tests (push) Successful in 8m37s
CI / docker (push) Successful in 1m50s
CI / coverage (push) Successful in 11m12s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
2026-06-13 19:27:31 +00:00
controller-ci-rerun 745044be86 chore: re-trigger CI [controller]
CI / push-validation (pull_request) Successful in 37s
CI / build (pull_request) Successful in 53s
CI / lint (pull_request) Successful in 57s
CI / helm (pull_request) Successful in 1m18s
CI / security (pull_request) Successful in 1m31s
CI / typecheck (pull_request) Successful in 1m43s
CI / quality (pull_request) Successful in 1m44s
CI / unit_tests (pull_request) Successful in 5m39s
CI / docker (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 10m20s
CI / coverage (pull_request) Successful in 11m53s
CI / status-check (pull_request) Successful in 3s
2026-06-13 15:07:27 -04:00
controller-ci-rerun 7cced73c9b chore: re-trigger CI [controller] 2026-06-13 15:07:27 -04:00
controller-ci-rerun bf18c42081 chore: re-trigger CI [controller] 2026-06-13 15:07:27 -04:00
HAL9000 f312cc4555 style(features): apply ruff format to phase analysis steps
Wrap the long @given decorator string to satisfy the 88-char line
length limit enforced by ruff format.

ISSUES CLOSED: #10972
2026-06-13 15:07:27 -04:00
controller-ci-rerun 05c7c86737 chore: re-trigger CI [controller] 2026-06-13 15:07:27 -04:00
HAL9000 6b95320d5f fix(acms): normalize context path matching for absolute paths in _path_matches
Fixes issue #10972 where _path_matches() in execute_phase_context_assembler.py
used PurePath.full_match(pattern) which required the entire path to match.
Since fragment metadata stores absolute paths (e.g. /app/.opencode/skills/
SKILL.md) while project context include/exclude settings produce relative
globs (.opencode/**, docs/*), the include/exclude filters were silently
ineffective.

Added _glob_matches() static helper in execute_phase_context_assembler.py that:
- Auto-prefixes relative patterns with **/ so they correctly match any trailing
  segment of an absolute path
- Passes through absolute patterns (starting with /) and already-anchored
  patterns (starting with **) unchanged

Updated _path_matches() to delegate to _glob_matches(). Fixed _matches_pattern()
in context_phase_analysis.py with the same auto-prefix logic plus zero-depth
compatibility shim.

Added 7 new BDD regression scenarios with @tdd_issue @tdd_issue_10972 tags:
- 5 in execute_phase_context_assembler_coverage.feature (absolute path matching)
- 1 extra trailing ** glob exclusion test
- 1 in project_context_phase_analysis.feature (phase analysis exclusion)

Updated CHANGELOG.md under [Unreleased] and CONTRIBUTORS.md.

ISSUES CLOSED: #10972
2026-06-13 15:07:27 -04:00
HAL9000 3d6237e9e6 Merge pull request 'fix(plan): use structured alternatives objects in plan explain output per spec' (#9407) from timeline/day-104-2026-04-14-auto-time-2 into master
CI / lint (push) Successful in 46s
CI / typecheck (push) Successful in 1m14s
CI / security (push) Successful in 1m23s
CI / quality (push) Successful in 56s
CI / push-validation (push) Successful in 41s
CI / build (push) Successful in 59s
CI / helm (push) Successful in 1m1s
CI / unit_tests (push) Successful in 6m31s
CI / coverage (push) Has started running
CI / docker (push) Successful in 1m46s
CI / integration_tests (push) Successful in 10m48s
CI / status-check (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
2026-06-13 19:07:21 +00:00
HAL9000 4a06885dfb fix(actor): catch typer.Exit in actor run commands and test steps
CI / push-validation (pull_request) Successful in 29s
CI / lint (pull_request) Successful in 37s
CI / build (pull_request) Successful in 45s
CI / helm (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 52s
CI / typecheck (pull_request) Successful in 1m7s
CI / security (pull_request) Successful in 1m25s
CI / unit_tests (pull_request) Successful in 6m40s
CI / docker (pull_request) Successful in 1m51s
CI / integration_tests (pull_request) Successful in 9m30s
CI / coverage (pull_request) Successful in 15m22s
CI / status-check (pull_request) Successful in 3s
typer.Exit (v0.26.7) inherits from typer._click.exceptions.Exit and
RuntimeError, not click.exceptions.Exit. The existing
`except click.exceptions.Exit: raise` guards in actor.py and
actor_run.py therefore did not re-raise Exit(code=2) from
_resolve_config_files; it fell through to `except Exception` and was
re-raised as Exit(code=3). Similarly, step definitions catching
(SystemExit, click.exceptions.Exit) failed to intercept typer.Exit,
causing resolve_config_files error-path scenarios to error instead of
fail cleanly.

Fix the except clauses in both CLI entry-points and in the three
affected step files. Also correct the plan_explain step that created
a decision with none of the alternatives matching chosen_option, so
exactly one alternative now has chosen=True as the spec requires.

ISSUES CLOSED: #9166
2026-06-13 14:44:45 -04:00
controller-ci-rerun 378de0a362 chore: re-trigger CI [controller] 2026-06-13 14:44:45 -04:00
controller-ci-rerun dd97494a7b chore: re-trigger CI [controller] 2026-06-13 14:44:45 -04:00
HAL9000 ed7cf00d7f fix(plan): update robot helper to assert alternatives key in explain output
The robot/helper_plan_explain.py integration test helper was still
asserting the old field name alternatives_considered in the explain
dict output. Since _build_explain_dict() now outputs alternatives
(structured objects with index/description/chosen fields per spec),
the assertion was failing the CI integration_tests job.

Updated the assertion to check for alternatives and also verify
it is a list, matching the new structured output format.
2026-06-13 14:44:45 -04:00
HAL9000 9c49bbc4db fix(plan): use structured alternatives objects in plan explain output per spec
Convert alternatives_considered list of strings to structured objects with
index (1-based), description, and chosen fields in _build_explain_dict().
Rename output field from alternatives_considered to alternatives.
Update BDD tests in plan_explain.feature, plan_explain_cli_coverage.feature,
and plan_explain_steps.py to validate the new structured format.

Closes #9166
2026-06-13 14:44:45 -04:00
HAL9000 3b36e26b82 Merge pull request 'fix(tui): implement SQLite session persistence at ~/.local/state/cleveragents/tui.db' (#10648) from fix/v370/tui-session-persistence into master
CI / push-validation (push) Successful in 28s
CI / build (push) Successful in 43s
CI / helm (push) Successful in 49s
CI / lint (push) Successful in 57s
CI / quality (push) Successful in 56s
CI / typecheck (push) Successful in 1m23s
CI / security (push) Successful in 1m24s
CI / integration_tests (push) Failing after 13m26s
CI / unit_tests (push) Failing after 13m26s
CI / coverage (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
2026-06-13 18:30:12 +00:00
controller-ci-rerun 75cadad62c chore: re-trigger CI [controller]
CI / push-validation (pull_request) Successful in 29s
CI / lint (pull_request) Successful in 39s
CI / helm (pull_request) Successful in 42s
CI / build (pull_request) Successful in 50s
CI / quality (pull_request) Successful in 53s
CI / typecheck (pull_request) Successful in 1m33s
CI / security (pull_request) Successful in 1m34s
CI / unit_tests (pull_request) Successful in 6m50s
CI / integration_tests (pull_request) Successful in 8m30s
CI / docker (pull_request) Successful in 1m30s
CI / coverage (pull_request) Successful in 15m42s
CI / status-check (pull_request) Successful in 3s
2026-06-13 14:07:02 -04:00
controller-ci-rerun d6f01afd84 chore: re-trigger CI [controller] 2026-06-13 14:07:02 -04:00
controller-ci-rerun 0a6386e503 chore: re-trigger CI [controller] 2026-06-13 14:07:02 -04:00
controller-ci-rerun b13b2d26ba chore: re-trigger CI [controller] 2026-06-13 14:07:02 -04:00
HAL9000 e2d302dcaf fix(tui): resolve format, AmbiguousStep, and coverage gaps in session persistence
- Apply ruff format to store.py (split multi-arg conn.execute calls) and
  steps file (collapse single-arg execute to one line)
- Fix AmbiguousStep: add literal quotes to @given/@then patterns so
  'a session with id "{session_id}"' is unambiguous vs the
  'in the database' variant; update all dependent then-steps consistently
- Mark if TYPE_CHECKING block with # pragma: no cover (never executed)
- Add scenario + step for default db_path to cover store.py lines 32-34
  (uses unittest.mock.patch on Path.home to avoid touching real homedir)

ISSUES CLOSED: #10648
2026-06-13 14:07:02 -04:00
controller-ci-rerun a03dcbfa18 chore: re-trigger CI [controller] 2026-06-13 14:07:02 -04:00
HAL9000 5d479c4924 feat(tui): implement SQLite session persistence at ~/.local/state/cleveragents/tui.db 2026-06-13 14:07:02 -04:00
HAL9000 448b3a4a06 Merge pull request 'fix(cleanup): invalidate sandbox_dirs_cache after purge (#7527)' (#8257) from fix/cleanup-service-sandbox-cache-invalidation into master
CI / typecheck (push) Failing after 1s
CI / lint (push) Failing after 1s
CI / security (push) Failing after 0s
CI / quality (push) Failing after 0s
CI / unit_tests (push) Failing after 1s
CI / coverage (push) Has been skipped
CI / docker (push) Has been skipped
CI / integration_tests (push) Failing after 1s
CI / build (push) Failing after 0s
CI / helm (push) Failing after 0s
CI / push-validation (push) Successful in 25s
CI / status-check (push) Failing after 13s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
2026-06-13 14:29:29 +00:00
controller-ci-rerun e764166c9a chore: re-trigger CI [controller]
CI / push-validation (pull_request) Successful in 29s
CI / build (pull_request) Successful in 53s
CI / helm (pull_request) Successful in 56s
CI / lint (pull_request) Successful in 58s
CI / quality (pull_request) Successful in 58s
CI / typecheck (pull_request) Successful in 1m20s
CI / security (pull_request) Successful in 1m34s
CI / unit_tests (pull_request) Successful in 5m59s
CI / integration_tests (pull_request) Successful in 12m17s
CI / docker (pull_request) Successful in 2m35s
CI / coverage (pull_request) Successful in 16m24s
CI / status-check (pull_request) Successful in 1s
2026-06-13 09:30:27 -04:00
CleverAgents Bot 7034b90c92 ci: stop master workflow on PR updates
Remove the stale pull_request trigger from master.yml so PR branch commits do not launch the master workflow.

Maintenance patch for PR #8257.
2026-06-13 09:30:27 -04:00
HAL9000 8f6dc11cc6 fix(cleanup): invalidate sandbox_dirs_cache after purge (#7527)
Implemented cache invalidation for CleanupService to fix stale sandbox paths
being reported after purge() completes. The _sandbox_dirs_cache is now
invalidated after _purge_sandboxes() so subsequent scan() calls re-read the
filesystem instead of returning already-deleted paths.

Changes:
- Added self._sandbox_dirs_cache = None at end of _purge_sandboxes()
- Updated docstring to document cache invalidation behavior
- Created comprehensive BDD test coverage with 5 scenarios under new
  features/cleanup_service_cache_invalidation.feature and step definitions
- Updated CHANGELOG.md with bug fix entry
- Updated CONTRIBUTORS.md with PR #8257

ISSUES CLOSED: #7527
2026-06-13 09:29:11 -04:00
HAL9000 88ccf5488f Merge pull request 'feat(acms): implement hot storage tier as in-memory LRU cache with configurable capacity' (#10783) from feat/acms-hot-storage-tier-lru-cache into master
CI / lint (push) Successful in 40s
CI / build (push) Successful in 38s
CI / security (push) Successful in 1m8s
CI / quality (push) Successful in 1m8s
CI / typecheck (push) Successful in 1m17s
CI / helm (push) Successful in 53s
CI / push-validation (push) Successful in 27s
CI / e2e_tests (push) Successful in 58s
CI / unit_tests (push) Successful in 5m48s
CI / docker (push) Successful in 1m50s
CI / integration_tests (push) Successful in 10m51s
CI / coverage (push) Successful in 12m47s
CI / status-check (push) Successful in 3s
CI / benchmark-regression (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
2026-06-13 09:19:04 +00:00
HAL9000 7866e2c1f5 fix(acms): disambiguate hot tier size_bytes step from TierDistribution
CI / push-validation (pull_request) Successful in 27s
CI / lint (pull_request) Successful in 42s
CI / quality (pull_request) Successful in 53s
CI / build (pull_request) Successful in 1m5s
CI / helm (pull_request) Successful in 1m17s
CI / typecheck (pull_request) Successful in 1m24s
CI / security (pull_request) Successful in 1m25s
CI / unit_tests (pull_request) Successful in 5m49s
CI / docker (pull_request) Successful in 1m36s
CI / integration_tests (pull_request) Successful in 10m8s
CI / coverage (pull_request) Successful in 12m59s
CI / status-check (pull_request) Successful in 4s
The new step `the hot tier size_bytes should be {n:d}` in
features/steps/acms_hot_storage_tier_steps.py shared the matched
pattern of the existing
`the hot tier size_bytes should be {expected:d}` step in
features/steps/acms_context_analysis_engine_steps.py — Behave's
step registry strips parameter names when computing the pattern,
so both compile to the same regex. Every scenario hitting the
step raised AmbiguousStep at run-time, which Behave reports as
"errored" (not "failed"); that produced the 6 errored scenarios
on `features/acms_hot_storage_tier.feature` (lines 9, 96, 101,
149, 202, 210) seen in CI unit_tests.

Rename the new step and its `at most` companion to
`the hot storage tier size_bytes should be ...` (mirroring the
HotStorageTier class name) so the patterns no longer collide
with the analysis-engine TierDistribution step. Update the 8
feature-file references in `acms_hot_storage_tier.feature` to
match. The other-metric steps (entry_count, hit_count, miss_count,
max_entries, max_bytes) keep their `the hot tier` prefix because
they have no analogous collision — the analysis-engine file uses
`count` (not `entry_count`), so they are already unambiguous.

ISSUES CLOSED: #9972
2026-06-13 04:59:44 -04:00
controller-ci-rerun 9940b8bfdc chore: re-trigger CI [controller] 2026-06-13 04:59:44 -04:00
controller-ci-rerun 70558400df chore: re-trigger CI [controller] 2026-06-13 04:59:44 -04:00
HAL9000 6cd7e69f25 ci: retrigger CI (infrastructure recovery) 2026-06-13 04:59:44 -04:00