UAT: cleveragents.acp module still importable via stale __pycache__ — violates v3.6.0 deliverable #1 #5566

Open
opened 2026-04-09 07:35:29 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Summary

The v3.6.0 deliverable #1 requires: "No acp references in public API; all imports use a2a namespace" (spec §A2A Protocol — Module Structure). However, cleveragents.acp is still importable in the current codebase because the src/cleveragents/acp/__pycache__/ directory contains stale compiled bytecode (.pyc files) from the old ACP module. Python can load modules from __pycache__ even when the source .py files have been deleted.

Steps to Reproduce

import cleveragents.acp
print(cleveragents.acp.__file__)  # Returns None — loaded from __pycache__

Result: Module imports successfully (no ImportError).

Expected: ImportError: No module named 'cleveragents.acp'

Evidence

$ ls /app/src/cleveragents/acp/
__pycache__/

$ ls /app/src/cleveragents/acp/__pycache__/
__init__.cpython-313.pyc
clients.cpython-313.pyc
errors.cpython-313.pyc
events.cpython-313.pyc
facade.cpython-313.pyc
models.cpython-313.pyc
server_config.cpython-313.pyc
transport.cpython-313.pyc
versioning.cpython-313.pyc

The source .py files were correctly removed as part of issue #688 (refactor(a2a): rename ACP module and symbols to A2A standard), but the __pycache__ directory was not cleaned up.

Impact

  • Spec violation: v3.6.0 deliverable #1 is not met — cleveragents.acp is still importable
  • Confusion risk: Code that accidentally imports from cleveragents.acp will silently succeed in the current environment, masking the rename
  • CI risk: Tests that verify "no acp imports" may pass in a fresh environment but fail in environments with stale bytecode
  • Verified by: UAT runtime test — import cleveragents.acp succeeds with __file__ = None

Root Cause

The src/cleveragents/acp/__pycache__/ directory was not removed when the source files were deleted during the ACP→A2A rename (issue #688).

Fix

Remove the stale __pycache__ directory:

rm -rf src/cleveragents/acp/__pycache__/

Also consider removing the empty src/cleveragents/acp/ directory itself to prevent future confusion:

rm -rf src/cleveragents/acp/

Spec Reference

  • v3.6.0 Deliverable #1: "ACP → A2A module rename and symbol standardization complete — No acp references in public API; all imports use a2a namespace"
  • §A2A Protocol — Module Structure
  • ADR-047: A2A Standard Adoption

Metadata

  • Commit message: fix(a2a): remove stale acp __pycache__ directory left from ACP→A2A rename
  • Branch name: fix/m7-remove-stale-acp-pycache

Subtasks

  • Remove src/cleveragents/acp/__pycache__/ directory
  • Remove src/cleveragents/acp/ directory (now empty)
  • Add a test that verifies import cleveragents.acp raises ImportError
  • Verify nox passes after cleanup

Definition of Done

  • import cleveragents.acp raises ImportError in all environments
  • src/cleveragents/acp/ directory does not exist in the repository
  • All tests pass

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report ### Summary The v3.6.0 deliverable #1 requires: **"No `acp` references in public API; all imports use `a2a` namespace"** (spec §A2A Protocol — Module Structure). However, `cleveragents.acp` is still importable in the current codebase because the `src/cleveragents/acp/__pycache__/` directory contains stale compiled bytecode (`.pyc` files) from the old ACP module. Python can load modules from `__pycache__` even when the source `.py` files have been deleted. ### Steps to Reproduce ```python import cleveragents.acp print(cleveragents.acp.__file__) # Returns None — loaded from __pycache__ ``` **Result**: Module imports successfully (no `ImportError`). **Expected**: `ImportError: No module named 'cleveragents.acp'` ### Evidence ``` $ ls /app/src/cleveragents/acp/ __pycache__/ $ ls /app/src/cleveragents/acp/__pycache__/ __init__.cpython-313.pyc clients.cpython-313.pyc errors.cpython-313.pyc events.cpython-313.pyc facade.cpython-313.pyc models.cpython-313.pyc server_config.cpython-313.pyc transport.cpython-313.pyc versioning.cpython-313.pyc ``` The source `.py` files were correctly removed as part of issue #688 (refactor(a2a): rename ACP module and symbols to A2A standard), but the `__pycache__` directory was not cleaned up. ### Impact - **Spec violation**: v3.6.0 deliverable #1 is not met — `cleveragents.acp` is still importable - **Confusion risk**: Code that accidentally imports from `cleveragents.acp` will silently succeed in the current environment, masking the rename - **CI risk**: Tests that verify "no acp imports" may pass in a fresh environment but fail in environments with stale bytecode - **Verified by**: UAT runtime test — `import cleveragents.acp` succeeds with `__file__ = None` ### Root Cause The `src/cleveragents/acp/__pycache__/` directory was not removed when the source files were deleted during the ACP→A2A rename (issue #688). ### Fix Remove the stale `__pycache__` directory: ```bash rm -rf src/cleveragents/acp/__pycache__/ ``` Also consider removing the empty `src/cleveragents/acp/` directory itself to prevent future confusion: ```bash rm -rf src/cleveragents/acp/ ``` ### Spec Reference - v3.6.0 Deliverable #1: "ACP → A2A module rename and symbol standardization complete — No `acp` references in public API; all imports use `a2a` namespace" - §A2A Protocol — Module Structure - ADR-047: A2A Standard Adoption ### Metadata - **Commit message**: `fix(a2a): remove stale acp __pycache__ directory left from ACP→A2A rename` - **Branch name**: `fix/m7-remove-stale-acp-pycache` ## Subtasks - [ ] Remove `src/cleveragents/acp/__pycache__/` directory - [ ] Remove `src/cleveragents/acp/` directory (now empty) - [ ] Add a test that verifies `import cleveragents.acp` raises `ImportError` - [ ] Verify `nox` passes after cleanup ## Definition of Done - `import cleveragents.acp` raises `ImportError` in all environments - `src/cleveragents/acp/` directory does not exist in the repository - All tests pass --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.6.0 milestone 2026-04-09 07:37:34 +00:00
Author
Owner

Hierarchical Compliance Fix: This issue was detected as an orphan (no parent Epic).

Solution: Linked to Epic #5177 (ACP → A2A Module Rename & Symbol Standardization) as removing stale __pycache__ from the old ACP module is part of the rename cleanup scope.

Hierarchy: Issue #5566 → Epic #5177 → Legendary #4945


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

**Hierarchical Compliance Fix**: This issue was detected as an orphan (no parent Epic). **Solution**: Linked to Epic #5177 (ACP → A2A Module Rename & Symbol Standardization) as removing stale `__pycache__` from the old ACP module is part of the rename cleanup scope. **Hierarchy**: Issue #5566 → Epic #5177 → Legendary #4945 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
Author
Owner

Hierarchical Compliance Fix: This issue was detected as an orphan (no parent Epic).

Solution: Linked to Epic #5177 (ACP → A2A Module Rename & Symbol Standardization) based on scope alignment — stale acp module cache is a direct consequence of the rename work.

Hierarchy: Issue #5566 → Epic #5177


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

**Hierarchical Compliance Fix**: This issue was detected as an orphan (no parent Epic). **Solution**: Linked to Epic #5177 (ACP → A2A Module Rename & Symbol Standardization) based on scope alignment — stale acp module cache is a direct consequence of the rename work. **Hierarchy**: Issue #5566 → Epic #5177 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5566
No description provided.