[AUTO-GUARD-1] Technical Debt: 17 unresolved TODO comments indicating incomplete wiring and placeholder implementations #9988

Open
opened 2026-04-16 10:19:44 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Scan ID: AUTO-GUARD-1
  • Detected by: Architecture Guard (automated scan)
  • Branch: main (cross-cutting — multiple modules affected)
  • Commit: N/A — automated static analysis report

Background and Context

The codebase contains 17 TODO comments marking incomplete implementations, unwired integrations, and placeholder code. Several of these are blocking critical functionality including LLM response format wiring, ACMS pipeline integration, and embedding model integration.

Critical TODOs (blocking functionality)

src/cleveragents/application/services/llm_actors.py (lines 150, 393):

# TODO(#650): Wire actor-configured response_format into provider calls

This appears twice — once in the execute actor and once in the strategy actor path. The response format is not being passed to LLM providers, meaning actor-configured output schemas are silently ignored.

src/cleveragents/application/services/uko_indexer_internals.py (line 333):

# TODO(#578): integrate real embedding model — placeholder vector

The UKO indexer is using a placeholder vector instead of a real embedding model. This means semantic search is non-functional.

src/cleveragents/a2a/facade.py (line 477):

# TODO: Wire to ACMS ContextAssemblyPipeline once available.

The A2A facade is not wired to the ACMS pipeline, meaning context assembly is bypassed in A2A mode.

src/cleveragents/application/services/plan_lifecycle_service.py (line 354):

# TODO: Replace EstimationStubActor with real actor dispatch

Plan estimation uses a stub actor instead of real actor dispatch.

Infrastructure TODOs

src/cleveragents/application/services/cleanup_service.py (lines 311, 319):

# TODO(CONC3): Wire DB session query when Container is ...
# TODO(CONC3): Wire DB session deletion when Container is ...

Container cleanup is not wired to the database.

src/cleveragents/application/services/phase_gating.py (line 79):

# TODO(pg-migration): TOCTOU — The phase is read here but the ...

Known race condition in phase gating.

src/cleveragents/application/services/service_retry_wiring.py (line 96):

# TODO: This class conflates factory/config, execution, and caching

Self-documented design problem.

CLI TODOs

src/cleveragents/cli/commands/plan.py (lines 367, 377):

# TODO: derive strategy from plan's actual sandbox configuration

Sandbox strategy is hardcoded instead of derived from plan configuration.

src/cleveragents/cli/commands/plan.py (line 1834):

# TODO: Migrate to EstimationResult.as_display_dict() to reduce duplication

Display logic is duplicated.

src/cleveragents/cli/commands/skill.py (line 1023):

# TODO: When MCP adapter integration is available, call ...

MCP adapter integration is incomplete.

src/cleveragents/mcp/adapter.py (line 611):

# TODO(#882): resource_slots are stored in source_metadata but ...

Resource slot handling is incomplete in MCP adapter.

src/cleveragents/tool/runner.py (line 295):

# TODO: pass pref.target_resource to the resolver / ...

Tool runner is not passing resource preferences to the resolver.

Impact

  • Semantic search (UKO) is non-functional (placeholder vectors)
  • LLM response format configuration is silently ignored
  • Plan estimation uses stub actors
  • Container cleanup is not persisted
  • Known TOCTOU race condition in phase gating

Expected Behavior

All TODO comments are resolved: incomplete wiring is completed, placeholder implementations are replaced with real ones, and known design problems are addressed. The codebase has no unresolved TODO markers for critical or infrastructure functionality.


Acceptance Criteria

  • llm_actors.py (lines 150, 393): response_format is wired into provider calls for both execute and strategy actor paths
  • uko_indexer_internals.py (line 333): Real embedding model is integrated; placeholder vector is removed; semantic search is functional
  • a2a/facade.py (line 477): A2A facade is wired to ACMS ContextAssemblyPipeline
  • plan_lifecycle_service.py (line 354): EstimationStubActor is replaced with real actor dispatch
  • cleanup_service.py (lines 311, 319): Container cleanup DB session query and deletion are wired
  • phase_gating.py (line 79): TOCTOU race condition is resolved
  • service_retry_wiring.py (line 96): Class responsibilities are separated (factory/config, execution, caching)
  • cli/commands/plan.py (lines 367, 377): Sandbox strategy is derived from plan's actual sandbox configuration
  • cli/commands/plan.py (line 1834): Display logic migrated to EstimationResult.as_display_dict()
  • cli/commands/skill.py (line 1023): MCP adapter integration is completed
  • mcp/adapter.py (line 611): Resource slot handling is completed in MCP adapter
  • tool/runner.py (line 295): pref.target_resource is passed to the resolver
  • All 17 TODO comments are removed or converted to tracked issues with linked PRs
  • Test coverage remains ≥ 97% after changes

Subtasks

  • Triage all 17 TODOs: link numbered ones (e.g., #578, #650, #882) to their existing issues
  • Fix uko_indexer_internals.py:333 — integrate real embedding model (blocks semantic search)
  • Fix llm_actors.py:150 — wire response_format in execute actor path
  • Fix llm_actors.py:393 — wire response_format in strategy actor path
  • Fix a2a/facade.py:477 — wire to ACMS ContextAssemblyPipeline
  • Fix plan_lifecycle_service.py:354 — replace EstimationStubActor with real dispatch
  • Fix cleanup_service.py:311,319 — wire DB session query and deletion for container cleanup
  • Fix phase_gating.py:79 — resolve TOCTOU race condition
  • Refactor service_retry_wiring.py:96 — separate class responsibilities
  • Fix cli/commands/plan.py:367,377 — derive sandbox strategy from plan configuration
  • Fix cli/commands/plan.py:1834 — migrate to EstimationResult.as_display_dict()
  • Fix cli/commands/skill.py:1023 — complete MCP adapter integration
  • Fix mcp/adapter.py:611 — complete resource slot handling
  • Fix tool/runner.py:295 — pass pref.target_resource to resolver
  • Verify test coverage ≥ 97% after all changes

Definition of Done

This issue should be closed when:

  1. All 17 TODO comments have been resolved (either implemented or converted to separate tracked issues)
  2. Critical blocking TODOs (uko_indexer_internals.py, llm_actors.py, a2a/facade.py, plan_lifecycle_service.py) are fully implemented and tested
  3. The TOCTOU race condition in phase_gating.py is fixed
  4. All related PRs are merged to main
  5. Test coverage remains ≥ 97%
  6. A follow-up architecture guard scan confirms zero unresolved TODO markers in the affected files

References

  • src/cleveragents/application/services/llm_actors.py:150,393
  • src/cleveragents/application/services/uko_indexer_internals.py:333
  • src/cleveragents/a2a/facade.py:477
  • src/cleveragents/application/services/plan_lifecycle_service.py:354
  • src/cleveragents/application/services/cleanup_service.py:311,319
  • src/cleveragents/application/services/phase_gating.py:79
  • src/cleveragents/cli/commands/plan.py:367,377,1834
  • src/cleveragents/mcp/adapter.py:611
  • src/cleveragents/tool/runner.py:295

Automated by CleverAgents Bot
Agent: new-issue-creator
Supervisor: Architecture Guard | Agent: architecture-guard-pool-supervisor

## Metadata - **Scan ID:** AUTO-GUARD-1 - **Detected by:** Architecture Guard (automated scan) - **Branch:** `main` (cross-cutting — multiple modules affected) - **Commit:** N/A — automated static analysis report --- ## Background and Context The codebase contains 17 TODO comments marking incomplete implementations, unwired integrations, and placeholder code. Several of these are blocking critical functionality including LLM response format wiring, ACMS pipeline integration, and embedding model integration. ### Critical TODOs (blocking functionality) **`src/cleveragents/application/services/llm_actors.py`** (lines 150, 393): ```python # TODO(#650): Wire actor-configured response_format into provider calls ``` This appears twice — once in the execute actor and once in the strategy actor path. The response format is not being passed to LLM providers, meaning actor-configured output schemas are silently ignored. **`src/cleveragents/application/services/uko_indexer_internals.py`** (line 333): ```python # TODO(#578): integrate real embedding model — placeholder vector ``` The UKO indexer is using a placeholder vector instead of a real embedding model. This means semantic search is non-functional. **`src/cleveragents/a2a/facade.py`** (line 477): ```python # TODO: Wire to ACMS ContextAssemblyPipeline once available. ``` The A2A facade is not wired to the ACMS pipeline, meaning context assembly is bypassed in A2A mode. **`src/cleveragents/application/services/plan_lifecycle_service.py`** (line 354): ```python # TODO: Replace EstimationStubActor with real actor dispatch ``` Plan estimation uses a stub actor instead of real actor dispatch. ### Infrastructure TODOs **`src/cleveragents/application/services/cleanup_service.py`** (lines 311, 319): ```python # TODO(CONC3): Wire DB session query when Container is ... # TODO(CONC3): Wire DB session deletion when Container is ... ``` Container cleanup is not wired to the database. **`src/cleveragents/application/services/phase_gating.py`** (line 79): ```python # TODO(pg-migration): TOCTOU — The phase is read here but the ... ``` Known race condition in phase gating. **`src/cleveragents/application/services/service_retry_wiring.py`** (line 96): ```python # TODO: This class conflates factory/config, execution, and caching ``` Self-documented design problem. ### CLI TODOs **`src/cleveragents/cli/commands/plan.py`** (lines 367, 377): ```python # TODO: derive strategy from plan's actual sandbox configuration ``` Sandbox strategy is hardcoded instead of derived from plan configuration. **`src/cleveragents/cli/commands/plan.py`** (line 1834): ```python # TODO: Migrate to EstimationResult.as_display_dict() to reduce duplication ``` Display logic is duplicated. **`src/cleveragents/cli/commands/skill.py`** (line 1023): ```python # TODO: When MCP adapter integration is available, call ... ``` MCP adapter integration is incomplete. **`src/cleveragents/mcp/adapter.py`** (line 611): ```python # TODO(#882): resource_slots are stored in source_metadata but ... ``` Resource slot handling is incomplete in MCP adapter. **`src/cleveragents/tool/runner.py`** (line 295): ```python # TODO: pass pref.target_resource to the resolver / ... ``` Tool runner is not passing resource preferences to the resolver. ### Impact - Semantic search (UKO) is non-functional (placeholder vectors) - LLM response format configuration is silently ignored - Plan estimation uses stub actors - Container cleanup is not persisted - Known TOCTOU race condition in phase gating --- ## Expected Behavior All TODO comments are resolved: incomplete wiring is completed, placeholder implementations are replaced with real ones, and known design problems are addressed. The codebase has no unresolved TODO markers for critical or infrastructure functionality. --- ## Acceptance Criteria - [ ] `llm_actors.py` (lines 150, 393): `response_format` is wired into provider calls for both execute and strategy actor paths - [ ] `uko_indexer_internals.py` (line 333): Real embedding model is integrated; placeholder vector is removed; semantic search is functional - [ ] `a2a/facade.py` (line 477): A2A facade is wired to `ACMS ContextAssemblyPipeline` - [ ] `plan_lifecycle_service.py` (line 354): `EstimationStubActor` is replaced with real actor dispatch - [ ] `cleanup_service.py` (lines 311, 319): Container cleanup DB session query and deletion are wired - [ ] `phase_gating.py` (line 79): TOCTOU race condition is resolved - [ ] `service_retry_wiring.py` (line 96): Class responsibilities are separated (factory/config, execution, caching) - [ ] `cli/commands/plan.py` (lines 367, 377): Sandbox strategy is derived from plan's actual sandbox configuration - [ ] `cli/commands/plan.py` (line 1834): Display logic migrated to `EstimationResult.as_display_dict()` - [ ] `cli/commands/skill.py` (line 1023): MCP adapter integration is completed - [ ] `mcp/adapter.py` (line 611): Resource slot handling is completed in MCP adapter - [ ] `tool/runner.py` (line 295): `pref.target_resource` is passed to the resolver - [ ] All 17 TODO comments are removed or converted to tracked issues with linked PRs - [ ] Test coverage remains ≥ 97% after changes --- ## Subtasks - [ ] Triage all 17 TODOs: link numbered ones (e.g., `#578`, `#650`, `#882`) to their existing issues - [ ] Fix `uko_indexer_internals.py:333` — integrate real embedding model (blocks semantic search) - [ ] Fix `llm_actors.py:150` — wire `response_format` in execute actor path - [ ] Fix `llm_actors.py:393` — wire `response_format` in strategy actor path - [ ] Fix `a2a/facade.py:477` — wire to `ACMS ContextAssemblyPipeline` - [ ] Fix `plan_lifecycle_service.py:354` — replace `EstimationStubActor` with real dispatch - [ ] Fix `cleanup_service.py:311,319` — wire DB session query and deletion for container cleanup - [ ] Fix `phase_gating.py:79` — resolve TOCTOU race condition - [ ] Refactor `service_retry_wiring.py:96` — separate class responsibilities - [ ] Fix `cli/commands/plan.py:367,377` — derive sandbox strategy from plan configuration - [ ] Fix `cli/commands/plan.py:1834` — migrate to `EstimationResult.as_display_dict()` - [ ] Fix `cli/commands/skill.py:1023` — complete MCP adapter integration - [ ] Fix `mcp/adapter.py:611` — complete resource slot handling - [ ] Fix `tool/runner.py:295` — pass `pref.target_resource` to resolver - [ ] Verify test coverage ≥ 97% after all changes --- ## Definition of Done This issue should be closed when: 1. All 17 TODO comments have been resolved (either implemented or converted to separate tracked issues) 2. Critical blocking TODOs (`uko_indexer_internals.py`, `llm_actors.py`, `a2a/facade.py`, `plan_lifecycle_service.py`) are fully implemented and tested 3. The TOCTOU race condition in `phase_gating.py` is fixed 4. All related PRs are merged to `main` 5. Test coverage remains ≥ 97% 6. A follow-up architecture guard scan confirms zero unresolved TODO markers in the affected files --- ## References - `src/cleveragents/application/services/llm_actors.py:150,393` - `src/cleveragents/application/services/uko_indexer_internals.py:333` - `src/cleveragents/a2a/facade.py:477` - `src/cleveragents/application/services/plan_lifecycle_service.py:354` - `src/cleveragents/application/services/cleanup_service.py:311,319` - `src/cleveragents/application/services/phase_gating.py:79` - `src/cleveragents/cli/commands/plan.py:367,377,1834` - `src/cleveragents/mcp/adapter.py:611` - `src/cleveragents/tool/runner.py:295` --- **Automated by CleverAgents Bot** Agent: new-issue-creator Supervisor: Architecture Guard | Agent: architecture-guard-pool-supervisor
Author
Owner

Triage Comment

Triaged on: 2026-04-16
Triaged by: Implementation Pool Supervisor

Assessment

Medium-priority technical debt with critical blocking TODOs. Most urgent: placeholder embedding vector in uko_indexer_internals.py and unwired response_format in llm_actors.py.

Triage Decision

  • Status: Verified - issue is legitimate and actionable
  • Priority: Medium overall, critical sub-items
  • Recommended milestone: v3.4.0

Next Steps

  1. Link numbered TODOs (#578, #650, #882) to existing issues
  2. Fix uko_indexer_internals.py:333 (blocks semantic search)
  3. Fix llm_actors.py:150,393 (blocks response format)
  4. Track TOCTOU race condition in phase_gating.py:79 as separate bug

Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

## Triage Comment **Triaged on:** 2026-04-16 **Triaged by:** Implementation Pool Supervisor ### Assessment Medium-priority technical debt with critical blocking TODOs. Most urgent: placeholder embedding vector in uko_indexer_internals.py and unwired response_format in llm_actors.py. ### Triage Decision - **Status:** Verified - issue is legitimate and actionable - **Priority:** Medium overall, critical sub-items - **Recommended milestone:** v3.4.0 ### Next Steps 1. Link numbered TODOs (#578, #650, #882) to existing issues 2. Fix uko_indexer_internals.py:333 (blocks semantic search) 3. Fix llm_actors.py:150,393 (blocks response format) 4. Track TOCTOU race condition in phase_gating.py:79 as separate bug --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
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.

Dependencies

No dependencies set.

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