Fourth extraction in the resolved order. Telegram/email/webhook adapters
(internal/channels) become a peer service that calls Gateway's
ChatContract directly -- no UI HTTP detour. Every async channel becomes a
first-class peer, and webui is no longer in any message path (the
Telegram task-action detour was already closed in Phase 1, but this phase
makes Messaging a standalone deployable rather than a package linked into
the daemon).
Depends on Phase 3 (UI extraction) per the resolved extraction order.
Full reasoning: docs/inspiration/service-decomposition-open-questions-research-2026-09-05.md#1
(Phase 4 section) and the PRD's target-services table entry for
Messaging Service (channel-plugin contract: Telegram, email, Discord,
Teams, ...).
Acceptance criteria
New Messaging Service binary/process hosting the channel-plugin
contract, wrapping the existing internal/channels adapters (Telegram
at minimum, per the currently-implemented channel).
The Messaging Service calls Gateway's ChatContract directly over gRPC
for turn dispatch and task actions; no HTTP call into a UI process
anywhere in the message path.
internal/channels/telegram's existing invariants (dropPendingUpdates
before b.Start, command menu registration to
default/all_private_chats/all_group_chats) are preserved unchanged in
the new service.
task check passes; a live Telegram round-trip (or equivalent channel
smoke test) is exercised against the extracted service.
Notes
WORKTREE HAZARD (from session 01a0b58e, 2026-09-19 10:0x): the main worktree /work/apps/archie-core is checked out on branch feat/q9au-inline-review-comments, NOT main. The uncommitted Phase 4 work (cmd/archie-messaging/, internal/app/archiemessaging/, docs/prds/messaging-service-boundary.md, and the modification to docs/architecture/migration-decisions.md) currently sits in that checkout. A git commit there lands it on the q9au branch and bundles a whole service extraction into PR #891. Please 'git switch -c ' (or main) BEFORE committing so it keeps its own PR. Nothing has been touched, stashed or cleaned by anyone else; the work is intact as of this note.
HAZARD MATERIALISED (2026-09-19, session 01a0b912): the Phase 4 work was committed on feat/q9au-inline-review-comments as 3c426b0c..e63dff2c (four feat(messaging) commits, sitting above 3b2aef3e remediate) and pushed to origin (github.com/samcharles93/archie-core), so PR #891 now carries the whole Messaging Service extraction. Nothing was rewritten: three other sessions are live in the same checkout. Repair (needs the maintainer's force-push authorisation): 'git branch feat/messaging-service e63dff2c' then 'git rebase --onto 1a92cf6f 3b2aef3e feat/messaging-service' -- the messaging commits have ZERO file overlap with the two commits below them, so the replay should be clean -- then reset q9au to 95de01e1 + c0dfdef3 and force-push.
RESOLVED the worktree hazard (session 01a0b58e, 2026-09-19): your four Phase 4 commits (3c426b0c..e63dff2c) had landed on feat/q9au-inline-review-comments and were riding inside PR #891. Per Sam's call I extracted them: branch feat/messaging-service, rebased --onto main (no conflicts — the messaging paths have zero file overlap with #891's change or the remediate commit below it). The full gate passes standalone on that branch (task check exit 0, incl. 229 UI tests). Pushed, with DRAFT PR #894 (https://github.com/samcharles93/archie-core/pull/894) as the carrier. Your authorship is untouched and I have claimed none of the work; the PR is a draft precisely because 8cda.6 is still in progress. Continue on feat/messaging-service and mark it ready when the slice is done, or close#894 if you would rather open your own. Still outstanding and NOT in that PR: the 8cda.6.1 deliverables (docs/prds/messaging-service-boundary.md + the migration-decisions.md edit) remain uncommitted in the shared worktree — see the note on 8cda.6.1.
RESOLVED 2026-09-19: the extraction landed on main in e0b6aa61 — the #891 squash, 108 files, which carried the Phase 4 messaging commits together with q9au, the remediate workflow and the Dockerfile fix. The hazard I reported (your commits riding inside the q9au PR) resolved by that PR being squash-merged wholesale, so the extraction landed without the focused review PR #894 was meant to give it. #894 is closed as redundant; branch feat/messaging-service remains a clean rebase onto main, useful for diffing against e0b6aa61 if you want to review what actually landed.
CORRECTION (session 01a0b58e, verified independently): the uncommitted files are STALE DUPLICATES, not lost work. I diffed each against origin/main myself — cmd/archie-messaging/main.go, all 11 files under internal/app/archiemessaging/, docs/prds/messaging-service-boundary.md and the migration-decisions.md edit are all byte-identical to main. Nothing needs rescuing; the earlier 'durability gap' framing no longer applies (my note on 8cda.6.1 is corrected too). Status update: the extraction landed in e0b6aa61 (the #891 squash), and follow-up work landed via merged PR #899 'feat(messaging): Messaging Service operator surface, chat report rendering, and the diff-cap config fix'. #894 was closed as redundant. Remaining question for the maintainer: this bead is still IN_PROGRESS with a lease expired ~7h while cmd/archie-messaging, internal/app/archiemessaging, internal/domain/messaging, internal/contracts/gateway/v1 and internal/infrastructure/gatewayrpc are all present in main — it either has scope beyond what landed (Discord/Teams channel plugins, per the PRD target-services table) or it just needs closing.
AC4 ARCHITECTURE HALF UNMET (verified 2d1344c3, /tmp/8cda6-gate.log): AC1-AC3 verified green, but the PRD's guard cmd/archie-messaging/architecture_test.go does not exist, and go list -deps shows four banned packages linked (modernc.org/sqlite, internal/store, internal/domain/workflow, internal/agentexec) - all through one import of internal/app/controlplane. The gate was never added because it fails. Refactor filed as , which now blocks 8cda.6.5. Decision: SEVER, do not amend the guard to tolerate the store. Host-install half is covered by 1c01/2d1344c3 and does not overlap these criteria.
CORRECTION to the previous note: the refactor bead is archie-core-1ng1 (the earlier line was written before the ID existed and printed it empty).
UPDATE (a7d6cc8c): AC4's architecture half is now SATISFIABLE. The severance landed - cmd/archie-messaging/architecture_test.go measures the linked binary against the PRD's banned list and PASSES, with internal/domain/workflow/task as an exception checked in both directions (same precedent as the UI gate; its own dependency set verified clean). Deviation from the 1ng1 doc, measured rather than assumed: no second workflow-aware client package was needed, because internal/app/controlplane was the only direct import dragging a banned runtime; the app Client embeds the new client so the validated watch stays defined once. What remains on 8cda.6.5 is the end-to-end smoke verification, not the gate; its only remaining blocker is 8cda.6.8.
Close reason
Shipped: archie-messaging is its own service. Remaining child 8cda.6.9 moved under archie-core-6vfu.
Imported from beads archie-core-8cda.6 · GitHub #745 · type task · priority P3 · created 2026-09-05 · closed 2026-10-03
Fourth extraction in the resolved order. Telegram/email/webhook adapters
(internal/channels) become a peer service that calls Gateway's
ChatContract directly -- no UI HTTP detour. Every async channel becomes a
first-class peer, and webui is no longer in any message path (the
Telegram task-action detour was already closed in Phase 1, but this phase
makes Messaging a standalone deployable rather than a package linked into
the daemon).
Depends on Phase 3 (UI extraction) per the resolved extraction order.
Full reasoning: docs/inspiration/service-decomposition-open-questions-research-2026-09-05.md#1
(Phase 4 section) and the PRD's target-services table entry for
Messaging Service (channel-plugin contract: Telegram, email, Discord,
Teams, ...).
### Acceptance criteria
- New Messaging Service binary/process hosting the channel-plugin
contract, wrapping the existing internal/channels adapters (Telegram
at minimum, per the currently-implemented channel).
- The Messaging Service calls Gateway's ChatContract directly over gRPC
for turn dispatch and task actions; no HTTP call into a UI process
anywhere in the message path.
- internal/channels/telegram's existing invariants (dropPendingUpdates
before b.Start, command menu registration to
default/all_private_chats/all_group_chats) are preserved unchanged in
the new service.
- task check passes; a live Telegram round-trip (or equivalent channel
smoke test) is exercised against the extracted service.
### Notes
WORKTREE HAZARD (from session 01a0b58e, 2026-09-19 10:0x): the main worktree /work/apps/archie-core is checked out on branch feat/q9au-inline-review-comments, NOT main. The uncommitted Phase 4 work (cmd/archie-messaging/, internal/app/archiemessaging/, docs/prds/messaging-service-boundary.md, and the modification to docs/architecture/migration-decisions.md) currently sits in that checkout. A git commit there lands it on the q9au branch and bundles a whole service extraction into PR #891. Please 'git switch -c <your-branch>' (or main) BEFORE committing so it keeps its own PR. Nothing has been touched, stashed or cleaned by anyone else; the work is intact as of this note.
HAZARD MATERIALISED (2026-09-19, session 01a0b912): the Phase 4 work was committed on feat/q9au-inline-review-comments as 3c426b0c..e63dff2c (four feat(messaging) commits, sitting above 3b2aef3e remediate) and pushed to origin (github.com/samcharles93/archie-core), so PR #891 now carries the whole Messaging Service extraction. Nothing was rewritten: three other sessions are live in the same checkout. Repair (needs the maintainer's force-push authorisation): 'git branch feat/messaging-service e63dff2c' then 'git rebase --onto 1a92cf6f 3b2aef3e feat/messaging-service' -- the messaging commits have ZERO file overlap with the two commits below them, so the replay should be clean -- then reset q9au to 95de01e1 + c0dfdef3 and force-push.
RESOLVED the worktree hazard (session 01a0b58e, 2026-09-19): your four Phase 4 commits (3c426b0c..e63dff2c) had landed on feat/q9au-inline-review-comments and were riding inside PR #891. Per Sam's call I extracted them: branch feat/messaging-service, rebased --onto main (no conflicts — the messaging paths have zero file overlap with #891's change or the remediate commit below it). The full gate passes standalone on that branch (task check exit 0, incl. 229 UI tests). Pushed, with DRAFT PR #894 (https://github.com/samcharles93/archie-core/pull/894) as the carrier. Your authorship is untouched and I have claimed none of the work; the PR is a draft precisely because 8cda.6 is still in progress. Continue on feat/messaging-service and mark it ready when the slice is done, or close #894 if you would rather open your own. Still outstanding and NOT in that PR: the 8cda.6.1 deliverables (docs/prds/messaging-service-boundary.md + the migration-decisions.md edit) remain uncommitted in the shared worktree — see the note on 8cda.6.1.
RESOLVED 2026-09-19: the extraction landed on main in e0b6aa61 — the #891 squash, 108 files, which carried the Phase 4 messaging commits together with q9au, the remediate workflow and the Dockerfile fix. The hazard I reported (your commits riding inside the q9au PR) resolved by that PR being squash-merged wholesale, so the extraction landed without the focused review PR #894 was meant to give it. #894 is closed as redundant; branch feat/messaging-service remains a clean rebase onto main, useful for diffing against e0b6aa61 if you want to review what actually landed.
CORRECTION (session 01a0b58e, verified independently): the uncommitted files are STALE DUPLICATES, not lost work. I diffed each against origin/main myself — cmd/archie-messaging/main.go, all 11 files under internal/app/archiemessaging/, docs/prds/messaging-service-boundary.md and the migration-decisions.md edit are all byte-identical to main. Nothing needs rescuing; the earlier 'durability gap' framing no longer applies (my note on 8cda.6.1 is corrected too). Status update: the extraction landed in e0b6aa61 (the #891 squash), and follow-up work landed via merged PR #899 'feat(messaging): Messaging Service operator surface, chat report rendering, and the diff-cap config fix'. #894 was closed as redundant. Remaining question for the maintainer: this bead is still IN_PROGRESS with a lease expired ~7h while cmd/archie-messaging, internal/app/archiemessaging, internal/domain/messaging, internal/contracts/gateway/v1 and internal/infrastructure/gatewayrpc are all present in main — it either has scope beyond what landed (Discord/Teams channel plugins, per the PRD target-services table) or it just needs closing.
AC4 ARCHITECTURE HALF UNMET (verified 2d1344c3, /tmp/8cda6-gate.log): AC1-AC3 verified green, but the PRD's guard cmd/archie-messaging/architecture_test.go does not exist, and go list -deps shows four banned packages linked (modernc.org/sqlite, internal/store, internal/domain/workflow, internal/agentexec) - all through one import of internal/app/controlplane. The gate was never added because it fails. Refactor filed as , which now blocks 8cda.6.5. Decision: SEVER, do not amend the guard to tolerate the store. Host-install half is covered by 1c01/2d1344c3 and does not overlap these criteria.
CORRECTION to the previous note: the refactor bead is archie-core-1ng1 (the earlier line was written before the ID existed and printed it empty).
UPDATE (a7d6cc8c): AC4's architecture half is now SATISFIABLE. The severance landed - cmd/archie-messaging/architecture_test.go measures the linked binary against the PRD's banned list and PASSES, with internal/domain/workflow/task as an exception checked in both directions (same precedent as the UI gate; its own dependency set verified clean). Deviation from the 1ng1 doc, measured rather than assumed: no second workflow-aware client package was needed, because internal/app/controlplane was the only direct import dragging a banned runtime; the app Client embeds the new client so the validated watch stays defined once. What remains on 8cda.6.5 is the end-to-end smoke verification, not the gate; its only remaining blocker is 8cda.6.8.
### Close reason
Shipped: archie-messaging is its own service. Remaining child 8cda.6.9 moved under archie-core-6vfu.
---
_Imported from beads `archie-core-8cda.6` · GitHub #745 · type task · priority P3 · created 2026-09-05 · closed 2026-10-03_
sam
added the lowtask labels 2026-10-27 13:35:00 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fourth extraction in the resolved order. Telegram/email/webhook adapters
(internal/channels) become a peer service that calls Gateway's
ChatContract directly -- no UI HTTP detour. Every async channel becomes a
first-class peer, and webui is no longer in any message path (the
Telegram task-action detour was already closed in Phase 1, but this phase
makes Messaging a standalone deployable rather than a package linked into
the daemon).
Depends on Phase 3 (UI extraction) per the resolved extraction order.
Full reasoning: docs/inspiration/service-decomposition-open-questions-research-2026-09-05.md#1
(Phase 4 section) and the PRD's target-services table entry for
Messaging Service (channel-plugin contract: Telegram, email, Discord,
Teams, ...).
Acceptance criteria
contract, wrapping the existing internal/channels adapters (Telegram
at minimum, per the currently-implemented channel).
for turn dispatch and task actions; no HTTP call into a UI process
anywhere in the message path.
before b.Start, command menu registration to
default/all_private_chats/all_group_chats) are preserved unchanged in
the new service.
smoke test) is exercised against the extracted service.
Notes
WORKTREE HAZARD (from session 01a0b58e, 2026-09-19 10:0x): the main worktree /work/apps/archie-core is checked out on branch feat/q9au-inline-review-comments, NOT main. The uncommitted Phase 4 work (cmd/archie-messaging/, internal/app/archiemessaging/, docs/prds/messaging-service-boundary.md, and the modification to docs/architecture/migration-decisions.md) currently sits in that checkout. A git commit there lands it on the q9au branch and bundles a whole service extraction into PR #891. Please 'git switch -c ' (or main) BEFORE committing so it keeps its own PR. Nothing has been touched, stashed or cleaned by anyone else; the work is intact as of this note.
HAZARD MATERIALISED (2026-09-19, session 01a0b912): the Phase 4 work was committed on feat/q9au-inline-review-comments as 3c426b0c..e63dff2c (four feat(messaging) commits, sitting above 3b2aef3e remediate) and pushed to origin (github.com/samcharles93/archie-core), so PR #891 now carries the whole Messaging Service extraction. Nothing was rewritten: three other sessions are live in the same checkout. Repair (needs the maintainer's force-push authorisation): 'git branch feat/messaging-service e63dff2c' then 'git rebase --onto
1a92cf6f3b2aef3e feat/messaging-service' -- the messaging commits have ZERO file overlap with the two commits below them, so the replay should be clean -- then reset q9au to 95de01e1 + c0dfdef3 and force-push.RESOLVED the worktree hazard (session 01a0b58e, 2026-09-19): your four Phase 4 commits (3c426b0c..e63dff2c) had landed on feat/q9au-inline-review-comments and were riding inside PR #891. Per Sam's call I extracted them: branch feat/messaging-service, rebased --onto main (no conflicts — the messaging paths have zero file overlap with #891's change or the remediate commit below it). The full gate passes standalone on that branch (task check exit 0, incl. 229 UI tests). Pushed, with DRAFT PR #894 (https://github.com/samcharles93/archie-core/pull/894) as the carrier. Your authorship is untouched and I have claimed none of the work; the PR is a draft precisely because 8cda.6 is still in progress. Continue on feat/messaging-service and mark it ready when the slice is done, or close #894 if you would rather open your own. Still outstanding and NOT in that PR: the 8cda.6.1 deliverables (docs/prds/messaging-service-boundary.md + the migration-decisions.md edit) remain uncommitted in the shared worktree — see the note on 8cda.6.1.
RESOLVED 2026-09-19: the extraction landed on main in
e0b6aa61— the #891 squash, 108 files, which carried the Phase 4 messaging commits together with q9au, the remediate workflow and the Dockerfile fix. The hazard I reported (your commits riding inside the q9au PR) resolved by that PR being squash-merged wholesale, so the extraction landed without the focused review PR #894 was meant to give it. #894 is closed as redundant; branch feat/messaging-service remains a clean rebase onto main, useful for diffing againste0b6aa61if you want to review what actually landed.CORRECTION (session 01a0b58e, verified independently): the uncommitted files are STALE DUPLICATES, not lost work. I diffed each against origin/main myself — cmd/archie-messaging/main.go, all 11 files under internal/app/archiemessaging/, docs/prds/messaging-service-boundary.md and the migration-decisions.md edit are all byte-identical to main. Nothing needs rescuing; the earlier 'durability gap' framing no longer applies (my note on 8cda.6.1 is corrected too). Status update: the extraction landed in
e0b6aa61(the #891 squash), and follow-up work landed via merged PR #899 'feat(messaging): Messaging Service operator surface, chat report rendering, and the diff-cap config fix'. #894 was closed as redundant. Remaining question for the maintainer: this bead is still IN_PROGRESS with a lease expired ~7h while cmd/archie-messaging, internal/app/archiemessaging, internal/domain/messaging, internal/contracts/gateway/v1 and internal/infrastructure/gatewayrpc are all present in main — it either has scope beyond what landed (Discord/Teams channel plugins, per the PRD target-services table) or it just needs closing.AC4 ARCHITECTURE HALF UNMET (verified
2d1344c3, /tmp/8cda6-gate.log): AC1-AC3 verified green, but the PRD's guard cmd/archie-messaging/architecture_test.go does not exist, and go list -deps shows four banned packages linked (modernc.org/sqlite, internal/store, internal/domain/workflow, internal/agentexec) - all through one import of internal/app/controlplane. The gate was never added because it fails. Refactor filed as , which now blocks 8cda.6.5. Decision: SEVER, do not amend the guard to tolerate the store. Host-install half is covered by 1c01/2d1344c3 and does not overlap these criteria.CORRECTION to the previous note: the refactor bead is archie-core-1ng1 (the earlier line was written before the ID existed and printed it empty).
UPDATE (
a7d6cc8c): AC4's architecture half is now SATISFIABLE. The severance landed - cmd/archie-messaging/architecture_test.go measures the linked binary against the PRD's banned list and PASSES, with internal/domain/workflow/task as an exception checked in both directions (same precedent as the UI gate; its own dependency set verified clean). Deviation from the 1ng1 doc, measured rather than assumed: no second workflow-aware client package was needed, because internal/app/controlplane was the only direct import dragging a banned runtime; the app Client embeds the new client so the validated watch stays defined once. What remains on 8cda.6.5 is the end-to-end smoke verification, not the gate; its only remaining blocker is 8cda.6.8.Close reason
Shipped: archie-messaging is its own service. Remaining child 8cda.6.9 moved under archie-core-6vfu.
Imported from beads
archie-core-8cda.6· GitHub #745 · type task · priority P3 · created 2026-09-05 · closed 2026-10-03