Skip to content

refactor: rename cmd/charon → cmd/responsed, add cmd/proxyd, cmd/conversationd stubs #77

Description

@elevran

Scope

Structural rename and stub creation — no new functionality. The current cmd/charon binary embeds both the Charon storage/resolution service and an optional proxy layer in a single binary controlled by --proxy. This issue splits that into three purpose-named binaries:

Binary Description
cmd/responsed Current Charon behaviour: internal storage/resolution service (/responses, /staging, /healthz, /readyz)
cmd/proxyd Current cmd/proxy: client-facing Responses API proxy
cmd/conversationd Stub only — compiles and starts, returns 501 Not Implemented on all /conversations routes

The combined single-binary mode (proxy + charon in one process for testing) is preserved by building cmd/responsed with an embedded cmd/proxyd handler, gated by a --proxy flag, matching the existing --proxy behavior in the current binary.

Changes required

  • Rename cmd/charon/cmd/responsed/; update all internal import paths and package names
  • Extract cmd/proxy/ handler registration logic and wire it as a standalone main in cmd/proxyd/
  • Create cmd/conversationd/ stub: compiles, logs startup, returns 501 on POST /conversations, GET /conversations/{id}, DELETE /conversations/{id}, PUT /conversations/{id}/messages
  • Update Makefile: add targets build-responsed, build-proxyd, build-conversationd, build-all; preserve existing build target pointing at cmd/responsed
  • Add stub Dockerfile.responsed, Dockerfile.proxyd, Dockerfile.conversationd (copy from existing Dockerfile, adjust binary names)
  • Update cmd/responsed/main.go to embed cmd/proxyd handler in combined mode

Acceptance criteria

  • go build ./cmd/responsed/... produces a binary that behaves identically to today's cmd/charon
  • go build ./cmd/proxyd/... produces a binary that behaves identically to today's cmd/proxy
  • go build ./cmd/conversationd/... compiles; all /conversations routes return 501
  • All existing tests pass (no behaviour change)
  • make presubmit passes
  • Each binary has a dedicated Makefile target and Dockerfile stub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions