Skip to content

refactor(acp): centralize ACP session config wiring to prevent feature drift #1812

@bug-ops

Description

@bug-ops

Problem

Every new feature added to the main agent loop requires a separate hotfix PR to wire it into ACP sessions. In the 3-day window 2026-03-13–15, there were 7 ACP fix commits all fixing the same root cause:

  • fix(acp): apply graph memory config (#1645)
  • fix(acp): apply document RAG and graph memory config (#1653)
  • fix(acp): wire anomaly detector and orchestration config (#1667)
  • fix(acp): forward /scheduler, /graph, /plan slash commands (#1675)
  • fix(acp): invert slash command routing to allowlist (#1679)
  • fix(acp): emit flush after non-LLM slash commands (#1689)
  • fix(scheduler): initialize scheduler in ACP mode (#1602)

Root Cause

There is no centralized place that assembles ACP session configuration from the agent config. Config structs are manually threaded into ACP sessions ad-hoc, so every new feature requires a dedicated ACP wiring PR.

Proposed Fix

Introduce a single constructor or builder method (e.g. AcpSessionConfig::from_agent_config() or AgentBuilder::build_acp_session()) that derives the full ACP session config from the main AgentConfig in one place. Any new field added to AgentConfig is automatically propagated without a separate ACP fix PR.

Acceptance Criteria

  • New feature added to agent config does NOT require a separate ACP wiring PR
  • Existing ACP behavior unchanged (all 280 zeph-acp tests pass)
  • ACP integration test verifies that graph memory, orchestration, anomaly detector, and scheduler config are all wired correctly in a single session

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions