Sever the Messaging Service from the store/workflow runtime so its architecture gate can pass #1002

Closed
opened 2026-10-27 13:38:38 +00:00 by sam · 0 comments
Owner

Found while verifying archie-core-8cda.6 (AC4). The PRD's stated guard - cmd/archie-messaging/architecture_test.go, verifying go list -deps links zero banned runtime packages - DOES NOT EXIST, and its command by hand shows FOUR banned packages linked:

modernc.org/sqlite (State Store)
internal/store (State Store)
internal/domain/workflow (Workflow engine)
internal/agentexec (Workflow engine, via workflow/agent.go)

All four arrive through ONE import: internal/app/archiemessaging/run.go -> internal/app/controlplane, whose own dependency set contains exactly those four. The messaging service uses THREE symbols from that package (NewRPCClient, RuntimeChatConfig, ChannelSettingsKind); the package also carries the store-backed ResourceStore server, the Definition registry and the workflow step vocabulary.

So the gate was never added because it fails. A messaging process linking a SQLite driver and the workflow engine is a severance hole, not a design choice.

WHY THIS IS ITS OWN BEAD
8cda.6.5 (the gate plus smoke verification) is where the guard belongs, but it is blocked by 8cda.6.8, an unrelated open feature. A gate task that cannot start until a refactor and an unrelated feature both land will never land, and the refactor stays invisible. This bead is the refactor; 6.5 depends on it.

DECISION: SEVER, DO NOT AMEND THE PRD
Amending the guard to tolerate modernc.org/sqlite and internal/store is rejected: it would institutionalise the exact hole the PRD names.

THE WORK
Move the resource document TYPES AND THEIR DECODE out of internal/app/controlplane into a package importing neither internal/store nor internal/domain/workflow. The client half (NewRPCClient, RuntimeChatConfig, the kind constants) goes with them; the server keeps the registry, seeds, validators and schema derivation. Messaging's import set then stops reaching the store, and the gate can land green.

COST AND ROUTING
A multi-file refactor of a package the daemon AND the State Store both depend on. Risk-routed, not a gate-and-merge lane.

FIRST DELIVERABLE, per this repo's scope discipline: the split has no settled design, so the first artifact is a decisive 1-page design doc naming the new package, what moves, what stays, and how both existing consumers keep compiling.

Close reason

51145eda; boundary gate added


Imported from beads archie-core-1ng1 · GitHub #1108 · type chore · priority P2 · created 2026-09-21 · closed 2026-10-17

Found while verifying archie-core-8cda.6 (AC4). The PRD's stated guard - cmd/archie-messaging/architecture_test.go, verifying go list -deps links zero banned runtime packages - DOES NOT EXIST, and its command by hand shows FOUR banned packages linked: modernc.org/sqlite (State Store) internal/store (State Store) internal/domain/workflow (Workflow engine) internal/agentexec (Workflow engine, via workflow/agent.go) All four arrive through ONE import: internal/app/archiemessaging/run.go -> internal/app/controlplane, whose own dependency set contains exactly those four. The messaging service uses THREE symbols from that package (NewRPCClient, RuntimeChatConfig, ChannelSettingsKind); the package also carries the store-backed ResourceStore server, the Definition registry and the workflow step vocabulary. So the gate was never added because it fails. A messaging process linking a SQLite driver and the workflow engine is a severance hole, not a design choice. WHY THIS IS ITS OWN BEAD 8cda.6.5 (the gate plus smoke verification) is where the guard belongs, but it is blocked by 8cda.6.8, an unrelated open feature. A gate task that cannot start until a refactor and an unrelated feature both land will never land, and the refactor stays invisible. This bead is the refactor; 6.5 depends on it. DECISION: SEVER, DO NOT AMEND THE PRD Amending the guard to tolerate modernc.org/sqlite and internal/store is rejected: it would institutionalise the exact hole the PRD names. THE WORK Move the resource document TYPES AND THEIR DECODE out of internal/app/controlplane into a package importing neither internal/store nor internal/domain/workflow. The client half (NewRPCClient, RuntimeChatConfig, the kind constants) goes with them; the server keeps the registry, seeds, validators and schema derivation. Messaging's import set then stops reaching the store, and the gate can land green. COST AND ROUTING A multi-file refactor of a package the daemon AND the State Store both depend on. Risk-routed, not a gate-and-merge lane. FIRST DELIVERABLE, per this repo's scope discipline: the split has no settled design, so the first artifact is a decisive 1-page design doc naming the new package, what moves, what stays, and how both existing consumers keep compiling. ### Close reason 51145eda; boundary gate added --- _Imported from beads `archie-core-1ng1` · GitHub #1108 · type chore · priority P2 · created 2026-09-21 · closed 2026-10-17_
sam added the mediumchore labels 2026-10-27 13:38:38 +00:00
sam self-assigned this 2026-10-27 13:38:38 +00:00
sam closed this issue 2026-10-27 13:38:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1002