Skip to main content

ADR-005: Remove pushCorrections() dead code

Date: 2026-05-13 Status: Accepted Issue: Dead code cleanup (rag-pipeline-1.2)

Contextโ€‹

pushCorrections() in agent.client.ts was designed to push expert corrections from the NestJS platform to the Python agent service. It was deprecated when the architecture shifted to platform-as-RAG-owner: corrections are now captured by LearningService, stored in Postgres, and consumed by a NestJS-side BullMQ processor (#303) that writes refinement documents into Haystack. The agent never needs corrections pushed to it.

Decisionโ€‹

Delete pushCorrections() method and AgentCorrection interface from agent.client.ts. Delete associated test in agent-client.spec.ts. Zero production callers exist.

Consequencesโ€‹

  • ~40 lines of dead code removed
  • Correction flow is unambiguously: Expert โ†’ LearningService โ†’ Postgres โ†’ BullMQ processor โ†’ Haystack KB