Compare commits

...

2 Commits

Author SHA1 Message Date
HAL9000 08af8af128 chore(contributors): remove remaining merge conflict markers in CONTRIBUTORS.md 2026-05-09 13:19:40 +00:00
HAL9000 1adfe551b8 feat(regression): add ACP→A2A rename regression guard and clean .gitignore (#10995)
Add BDD regression test (a2a_acp_rename_regression.feature) with 4 scenarios
guarding against accidental reintroduction of legacy ACP references after the
completed ACP to A2A module rename. Scenarios verify: no acp import lines, no
/acp/ paths, sub-packages import cleanly without acp dependency leaks, and
__init__.py files have no stale acp re-exports.

Also removes the deprecated src/cleveragents/acp/ gitignore entry added by
ADR-047 since the directory has been fully migrated.
2026-05-09 12:51:40 +00:00
4 changed files with 201 additions and 25 deletions
-3
View File
@@ -166,9 +166,6 @@ config.local.toml
.pabotsuitenames
PIPE
# Deprecated packages — removed by ADR-047 (ACP → A2A rename)
src/cleveragents/acp/
# Git worktrees for parallel task branches
worktrees/
*.bak
+21 -22
View File
@@ -12,30 +12,29 @@
Below are some of the specific details of various contributions.
* HAL 9000 has contributed the plugin entry point security hardening fix (#7476): enforced entry point allowlist validation before importing plugin modules to prevent malicious plugin loading.
* HAL 9000 has contributed the PlanResult.success derivation fix (PR #8214 / issue #7501): replaced the incorrect `error_message is None` heuristic with a dedicated `result_success` column in the plans table, ensuring plans with historical build errors are not incorrectly marked as failed after a successful apply.
* HAL 9000 has contributed the LLMTraceRepository data-integrity fix (PR #8185 / issue #7505): replaced the unconditional `session.commit()` in `LLMTraceRepository.save()` with a dual-path implementation that respects the UnitOfWork pattern — flushing only when an external session is provided, and flushing + committing + closing when operating standalone. This eliminates premature transaction commits, loss of rollback capability, and a docstring/implementation mismatch.
* HAL 9000 has contributed the git worktree TOCTOU race condition fix (PR #8178 / issue #7507): replaced the unsafe mkdtemp() + rmdir() pattern with a parent-directory approach to eliminate the race window in concurrent git worktree operations.
* HAL 9000 has contributed the architecture-pool-supervisor milestone assignment feature (PR #8188 / issue #7521): added `forgejo_update_pull_request` permission and documented the PR workflow for major spec changes, enabling automatic milestone assignment for specification PRs.
* HAL 9000 has contributed concurrency safety improvements, including thread-safe context tier management (issue #7547) for parallel plan execution.
* HAL 9000 has contributed the file edit encoding parameter fix (PR #8258 / issue #7559).
* HAL 9000 has contributed the git_tools TOCTOU race condition fix (PR #8255 / issue #7619): eliminated the Time-Of-Check-To-Time-Of-Use race in `_get_base_env()` by adding double-checked locking with a module-level `threading.Lock`, preventing concurrent threads from writing conflicting environment snapshots.
* HAL 9000 has contributed the bug-hunt-pool-supervisor non-blocking tracking fix (#7875 / PR #7957): updated step 5 to be best-effort and added rule 9 to prevent the automation-tracking-manager call from blocking the main supervisor loop.
* Jeffrey Phillips Freeman has contributed the complete AUTO-BUG-POOL to AUTO-BUG-SUP tracking prefix fix across agent-system-specification.md, automation-tracking.md documentation and agent-system-specification.md spec document, replaced with correct `AUTO-BUG-SUP` prefix used by the bug-hunt-pool-supervisor agent (#7875).
* HAL 9000 has contributed the plan concurrency race-condition fix (#7989): wired `LockService` into the plan lifecycle, guarding `execute_plan()` and `apply_plan()` with plan-level advisory locks and unique per-invocation owner identities to prevent silent concurrent state corruption.
* HAL 9000 has contributed database resource types (PostgreSQL, SQLite) with transaction-based sandbox strategy: implemented ``DatabaseResourceHandler`` providing full CRUD operations (`read`, `write`, `delete`, `list_children`) and connection validation with automatic credential masking for PostgreSQL and SQLite backends. Includes ``TransactionSandbox`` infrastructure wired into ``SandboxFactory``, BDD test coverage in ``features/database_resources.feature``, and Robot Framework integration tests in ``robot/database_resources.robot`` (PR #10591 / issue #8608, Epic #8568).
* HAL 9000 has contributed the benchmark workflow separation (#9040): moved the benchmark-regression job out of the default PR workflow into a dedicated scheduled workflow, reducing median PR CI turnaround time from 99-132 minutes to under 30 minutes.
* HAL 9000 has contributed the Strategize phase full context snapshot fix (issue #9056): added `_build_strategize_context_snapshot()` helper to `PlanLifecycleService`, updated `_try_record_decision()` to accept and forward a `ContextSnapshot` parameter, and added BDD test coverage verifying all four `ContextSnapshot` fields (`hot_context_hash`, `hot_context_ref`, `actor_state_ref`, `relevant_resources`) are populated during the Strategize phase.
* HAL 9000 has contributed the error-suppression removal fix (PR #9247 / issue #9060): removed both `try...except Exception:` blocks in `register_registry_agents()` that silently suppressed errors from `actor_registry.list_actors()` and the route bridge refresh, enabling exceptions to propagate per CONTRIBUTING.md fail-fast policy. Added three Behave scenarios verifying RuntimeError, AttributeError, and TypeError propagation.
* HAL 9000 has contributed the plan tree JSON/YAML command envelope fix (#9163): wrapped `agents plan tree --format json/yaml` output in the spec-required command envelope structure, added summary statistics, decision_ids mapping, child_plans list, and accurate timing measurement.
* HAL 9000 has contributed the ACMS Index Data Model and File Traversal Engine (PR #9664 / issue #9579): foundational data structures for indexed context entries with hot/warm/cold/archive storage tier classification, tag system, and a timeout-safe chunked file traversal engine for large projects with 10,000+ files.
* HAL 9000 has contributed the mandatory PR compliance checklist to `implementation-supervisor.md` (#9824): added an 8-item checklist to the worker prompt body with concrete items covering CHANGELOG.md, CONTRIBUTORS.md, commit footer, CI verification, BDD tests, Epic reference, labels, and milestone assignment to eliminate systemic PR merge blockers.
* HAL 9000 has contributed the mandatory PR compliance checklist to `implementation-pool-supervisor.md` (#9824): created a new agent definition with an embedded 8-item checklist ensuring workers always update CHANGELOG.md, CONTRIBUTORS.md, include commit footers (`ISSUES CLOSED: #N`), verify CI passes, add BDD tests, reference the parent Epic, apply labels via forgejo-label-manager, and assign milestones before creating PRs. Includes concrete examples for each subsection and compliance verification pseudocode.
* HAL 9000 has contributed comprehensive milestone documentation for v3.6.0 (Advanced Concepts & Deferred Features) and v3.7.0 (TUI Implementation) (PR #9903): split into sub-documents covering context strategies, LLM backends, resource types, A2A rename, container tool execution, scope chain resolution, cost/safety budgets, E2E workflow tests, code review examples, plugin architecture, TUI layout, persona system, reference/command input, session management, configuration, and TuiMaterializer integration.
* HAL 9000 has contributed the ACMS context path matching fix (PR #10975 / issue #10972): corrects `_path_matches()` and `_matches_pattern()` to properly match absolute fragment paths against relative glob patterns by auto-prefixing with `**/` before calling `PurePath.full_match()`, preventing silent inefficacy of include/exclude filters for absolute paths in fragment metadata.
* Jeffrey Phillips Freeman has acted as Lead Developer, daily contributor, and Project Owner.
* Brent E. Edwards has contributed quality assurance, test coverage, and CI pipeline improvements.
* HAL 9000 has contributed automated implementation, bug fixes, and feature development as part of the CleverAgents automation pool.
* HAL 9000 has contributed concurrency safety improvements, including thread-safe context tier management (issue #7547) for parallel plan execution.
* HAL 9000 has contributed the plan concurrency race-condition fix (#7989): wired `LockService` into the plan lifecycle, guarding `execute_plan()` and `apply_plan()` with plan-level advisory locks and unique per-invocation owner identities to prevent silent concurrent state corruption.
<<<<<<< HEAD
* HAL 9000 has contributed the bug-hunt-pool-supervisor non-blocking tracking fix (#7875 / PR #7957): updated step 5 to be best-effort and added rule 9 to prevent the automation-tracking-manager call from blocking the main supervisor loop.
* Jeffrey Phillips Freeman has contributed the complete AUTO-BUG-POOL to AUTO-BUG-SUP tracking prefix fix across agent-system-specification.md, automation-tracking.md documentation and agent-system-specification.md spec document, replaced with correct `AUTO-BUG-SUP` prefix used by the bug-hunt-pool-supervisor agent (#7875).
* HAL 9000 has contributed the plugin entry point security hardening fix (#7476): enforced entry point allowlist validation before importing plugin modules to prevent malicious plugin loading.
* HAL 9000 has contributed the benchmark workflow separation (#9040): moved the benchmark-regression job out of the default PR workflow into a dedicated scheduled workflow, reducing median PR CI turnaround time from 99-132 minutes to under 30 minutes.
* HAL 9000 has contributed the plan tree JSON/YAML command envelope fix (#9163): wrapped `agents plan tree --format json/yaml` output in the spec-required command envelope structure, added summary statistics, decision_ids mapping, child_plans list, and accurate timing measurement.
* This project was made possible thanks to considerable donation of time, money, and resources by CleverThis, Inc.
* HAL 9000 has contributed automated bug fixes, CLI output formatting improvements, and ongoing maintenance as part of the CleverAgents automation system.
* HAL 9000 has contributed the file edit encoding parameter fix (PR #8258 / issue #7559).
* HAL 9000 has contributed the architecture-pool-supervisor milestone assignment feature (PR #8188 / issue #7521): added `forgejo_update_pull_request` permission and documented the PR workflow for major spec changes, enabling automatic milestone assignment for specification PRs.
* HAL 9000 has contributed the git worktree TOCTOU race condition fix (PR #8178 / issue #7507): replaced the unsafe mkdtemp() + rmdir() pattern with a parent-directory approach to eliminate the race window in concurrent git worktree operations.
* HAL 9000 has contributed the git_tools TOCTOU race condition fix (PR #8255 / issue #7619): eliminated the Time-Of-Check-To-Time-Of-Use race in `_get_base_env()` by adding double-checked locking with a module-level `threading.Lock`, preventing concurrent threads from writing conflicting environment snapshots.
* HAL 9000 has contributed the mandatory PR compliance checklist to `implementation-supervisor.md` (#9824): added an 8-item checklist to the worker prompt body with concrete items covering CHANGELOG.md, CONTRIBUTORS.md, commit footer, CI verification, BDD tests, Epic reference, labels, and milestone assignment to eliminate systemic PR merge blockers.
* HAL 9000 has contributed the PlanResult.success derivation fix (PR #8214 / issue #7501): replaced the incorrect `error_message is None` heuristic with a dedicated `result_success` column in the plans table, ensuring plans with historical build errors are not incorrectly marked as failed after a successful apply.
* HAL 9000 has contributed the mandatory PR compliance checklist to `implementation-pool-supervisor.md` (#9824): created a new agent definition with an embedded 8-item checklist ensuring workers always update CHANGELOG.md, CONTRIBUTORS.md, include commit footers (`ISSUES CLOSED: #N`), verify CI passes, add BDD tests, reference the parent Epic, apply labels via forgejo-label-manager, and assign milestones before creating PRs. Includes concrete examples for each subsection and compliance verification pseudocode.
* HAL 9000 has contributed comprehensive milestone documentation for v3.6.0 (Advanced Concepts & Deferred Features) and v3.7.0 (TUI Implementation) (PR #9903): split into sub-documents covering context strategies, LLM backends, resource types, A2A rename, container tool execution, scope chain resolution, cost/safety budgets, E2E workflow tests, code review examples, plugin architecture, TUI layout, persona system, reference/command input, session management, configuration, and TuiMaterializer integration.
* HAL 9000 has contributed the LLMTraceRepository data-integrity fix (PR #8185 / issue #7505): replaced the unconditional `session.commit()` in `LLMTraceRepository.save()` with a dual-path implementation that respects the UnitOfWork pattern — flushing only when an external session is provided, and flushing + committing + closing when operating standalone. This eliminates premature transaction commits, loss of rollback capability, and a docstring/implementation mismatch.
* HAL 9000 has contributed the ACMS Index Data Model and File Traversal Engine (PR #9664 / issue #9579): foundational data structures for indexed context entries with hot/warm/cold/archive storage tier classification, tag system, and a timeout-safe chunked file traversal engine for large projects with 10,000+ files.
* HAL 9000 has contributed the error-suppression removal fix (PR #9247 / issue #9060): removed both `try...except Exception:` blocks in `register_registry_agents()` that silently suppressed errors from `actor_registry.list_actors()` and the route bridge refresh, enabling exceptions to propagate per CONTRIBUTING.md fail-fast policy. Added three Behave scenarios verifying RuntimeError, AttributeError, and TypeError propagation.
* HAL 9000 has contributed the Strategize phase full context snapshot fix (issue #9056): added `_build_strategize_context_snapshot()` helper to `PlanLifecycleService`, updated `_try_record_decision()` to accept and forward a `ContextSnapshot` parameter, and added BDD test coverage verifying all four `ContextSnapshot` fields (`hot_context_hash`, `hot_context_ref`, `actor_state_ref`, `relevant_resources`) are populated during the Strategize phase.
* HAL 9000 has contributed the ACMS context path matching fix (PR #10975 / issue #10972): corrects `_path_matches()` and `_matches_pattern()` to properly match absolute fragment paths against relative glob patterns by auto-prefixing with `**/` before calling `PurePath.full_match()`, preventing silent inefficacy of include/exclude filters for absolute paths in fragment metadata.
* HAL 9000 has contributed database resource types (PostgreSQL, SQLite) with transaction-based sandbox strategy: implemented ``DatabaseResourceHandler`` providing full CRUD operations (`read`, `write`, `delete`, `list_children`) and connection validation with automatic credential masking for PostgreSQL and SQLite backends. Includes ``TransactionSandbox`` infrastructure wired into ``SandboxFactory``, BDD test coverage in ``features/database_resources.feature``, and Robot Framework integration tests in ``robot/database_resources.robot`` (PR #10591 / issue #8608, Epic #8568).
@@ -0,0 +1,32 @@
@regression @refactor_v360_acp_to_a2a_rename @epic_8569
Feature: ACP to A2A rename regression guard
As a CleverAgents developer
I want a regression test that verifies no legacy ACP references were reintroduced
So that future commits cannot undo the completed ACP A2A module rename
Background:
Given the repository root is detected automatically
Scenario: No acp import statements exist under src/cleveragents/a2a
When I collect all Python file paths under "src/cleveragents/a2a"
And I filter for lines matching a Python import containing cleveragents.acp
Then zero import lines should match the legacy pattern "cleveragents.acp"
And this guarantees no stale acp imports were reintroduced after the rename
Scenario: No .py files contain an acp file path component
When I collect all Python file paths under "src/cleveragents/a2a"
And I check that none of them contain "/acp/" in their directory path
Then zero paths should include "/acp/" as a segment
And the module directory structure is fully post-rename
Scenario: Sub-packages import cleanly without importing acp first
When I reset the Python import cache completely
And I attempt to import "cleveragents.a2a.error" without importing any acp module first
Then the import should succeed without ImportError
And cleveragents.a2a.error must not trigger an implicit acp import
Scenario: __init__.py files in a2a package do not reference acp submodule names
When I read all "src/cleveragents/a2a/__init__.py" files recursively
And I search for the string "cleveragents.acp" in those init files
Then zero matches should be found in any __init__.py file
And no sub-package re-export references point to the old acp namespace
@@ -0,0 +1,148 @@
"""Step definitions for ACP to A2A rename regression BDD scenarios."""
from __future__ import annotations
import os
import re
import sys
from typing import Any
from pathlib import Path
from behave import given, then, when
def _resolve_repo_root(context: Any) -> Path:
repo_root = getattr(context, "repo_root", None)
if repo_root is not None:
return Path(repo_root)
candidate = Path(os.getcwd())
while candidate != candidate.parent:
if (candidate / ".git").exists():
context.repo_root = str(candidate)
return candidate
candidate = candidate.parent
raise RuntimeError("Could not find repository root")
def _collect_py_files(root: Path, subdir: str) -> list[Path]:
a2a_dir = root / subdir
assert a2a_dir.is_dir(), f"Directory not found: {a2a_dir}"
return sorted(a2a_dir.rglob("*.py"))
_ACP_IMPORT_RE = re.compile(r"^from\s+cleveragents\.acp\b", re.MULTILINE)
@given('the repository root is detected automatically')
def step_repo_root_detected(context: Any) -> None:
_resolve_repo_root(context)
@when('I collect all Python file paths under "src/cleveragents/a2a"')
def step_collect_py_files(context: Any) -> None:
root = _resolve_repo_root(context)
context._a2a_py_files = _collect_py_files(root, "src/cleveragents/a2a")
@when("I filter for lines matching a Python import containing cleveragents.acp")
def step_filter_acp_imports(context: Any) -> None:
matches = []
for py_file in context._a2a_py_files:
text = py_file.read_text(encoding="utf-8", errors="replace")
for lineno, line in enumerate(text.splitlines(), start=1):
if _ACP_IMPORT_RE.match(line.strip()):
matches.append((py_file, lineno, line))
context._acp_import_matches = matches
@when('I check that none of them contain "/acp/" in their directory path')
def step_check_paths_for_acp(context: Any) -> None:
bad_paths = [str(p) for p in context._a2a_py_files if "/acp/" in str(p.parent)]
context._path_violations = bad_paths
@when("I reset the Python import cache completely")
def step_reset_import_cache(context: Any) -> None:
keys_to_remove = [k for k in sys.modules if k.startswith("cleveragents")]
for key in keys_to_remove:
del sys.modules[key]
@when(
'I attempt to import "{module_name}" without importing any acp module first'
)
def step_import_without_acp(context: Any) -> None:
sys.modules.pop("cleveragents.a2a.error", None)
__import__("cleveragents.a2a.error")
@when('I read all "src/cleveragents/a2a/__init__.py" files recursively')
def step_read_init_files(context: Any) -> None:
root = _resolve_repo_root(context)
a2a_dir = root / "src" / "cleveragents" / "a2a"
init_files = sorted(a2a_dir.rglob("__init__.py"))
context._init_file_contents = [
(f, f.read_text(encoding="utf-8", errors="replace")) for f in init_files
]
@when('I search for the string "{pattern}" in those init files')
def step_search_init_files(context: Any, pattern: str) -> None:
matches = [(fp, c) for fp, c in context._init_file_contents if pattern in c]
context._pattern_matches = matches
@then(
'zero import lines should match the legacy pattern "cleveragents.acp"'
)
def step_no_acp_imports(context: Any) -> None:
assert len(context._acp_import_matches) == 0, (
f"Found {len(context._acp_import_matches)} files with legacy acp imports:\n"
+ "\n".join(
f"{path}:{lineno}: {line}" for path, lineno, line in context._acp_import_matches
)
)
@then("this guarantees no stale acp imports were reintroduced after the rename")
def step_rename_still_clean(context: Any) -> None:
pass
@then('zero paths should include "/acp/" as a segment')
def step_no_acp_in_paths(context: Any) -> None:
assert len(context._path_violations) == 0, (
f"Found {len(context._path_violations)} files with acp in path:\n"
+ "\n".join(context._path_violations)
)
@then("the module directory structure is fully post-rename")
def step_structure_post_rename(context: Any) -> None:
pass
@then("the import should succeed without ImportError")
def step_import_succeeds(context: Any) -> None:
assert "cleveragents.a2a.error" in sys.modules, (
"cleveragents.a2a.error failed to import"
)
@then("cleveragents.a2a.error must not trigger an implicit acp import")
def step_no_acp_dependency_leak(context: Any) -> None:
a2a_modules = {k for k in sys.modules if k.startswith("cleveragents.acp")}
assert not a2a_modules, f"acp modules loaded during a2a.error import: {a2a_modules}"
@then('zero matches should be found in any __init__.py file')
def step_no_acp_in_init_files(context: Any) -> None:
assert len(context._pattern_matches) == 0, (
f"Found cleveragents.acp references in init files:\n"
+ "\n".join(f"{fp}" for fp, _ in context._pattern_matches)
)
@then("no sub-package re-export references point to the old acp namespace")
def step_no_old_reexports(context: Any) -> None:
pass