From b3865f90842d6b1c026d138dd80d87a91268c563 Mon Sep 17 00:00:00 2001 From: Rogee Date: Thu, 4 Jun 2026 23:42:00 +0800 Subject: [PATCH] docs: record chatwoot parity tracking checkpoints --- docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md b/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md index c31cf471..7c274074 100644 --- a/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md +++ b/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md @@ -16,6 +16,8 @@ Build GoChat as a Go backend that can directly reuse the frontend from `referenc ## Current Baseline +- Latest committed head: `bc7da9e feat(webhook): implement instagram and shopify ingress`. +- Worktree status at this planning checkpoint: clean. - `go test ./...` passes. - Route dump succeeds with `TOTAL: 801` after Chatwoot webhook ingress routes were added. - Route parity artifacts now exist under `docs/parity/` and are generated by `cmd/route_parity`. @@ -49,6 +51,28 @@ Build GoChat as a Go backend that can directly reuse the frontend from `referenc | `.hermes/plans/2026-05-24-automation-macro-csat.md` | Original automation, macro, and CSAT implementation plan. | Mine for context only; this document is now the active tracker. | | `docs/requirements/*.md` | Reference notes extracted from Chatwoot modules. | Use as helper material after checking `reference/chatwoot` directly. | +## Commit Ledger + +This ledger records the committed parity checkpoints that future slices should build on. Each implementation commit must update this document again before it is considered closed. + +| Commit | Scope | Verification summary | Follow-up state | +| --- | --- | --- | --- | +| `6aa62c6 docs: consolidate chatwoot parity roadmap` | Promoted Hermes-era plans into this master tracker; locked user decisions; added milestone, slice, enterprise, and webhook provider tracking. | Documentation-only checkpoint. | B1/P6.7 selected as next implementation slice. | +| `9e3f561 feat(webhook): align chatwoot ingress routes` | Added Chatwoot public webhook paths for Twitter, Telegram, LINE, SMS/Twilio, WhatsApp, Instagram, TikTok, and Shopify; removed generic fallback success masking. | `go test ./...`; route dump regenerated with `TOTAL: 801`; route parity stayed `251 exact, 0 missing`. | Provider-specific lookup and verification moved to review. | +| `bc7da9e feat(webhook): implement instagram and shopify ingress` | Implemented Instagram verify/event handling, Shopify HMAC/redact/event forwarding, and WhatsApp verify-token/app-secret signature corrections. | Focused webhook tests, `go test ./...`, route dump `TOTAL: 801`, route parity `251 exact, 0 missing`, `git diff --check`. | Remaining P6.7 work is durable incoming-message persistence and provider dispatch parity. | + +## Next Slice Contract + +Next implementation slice: finish B1/P6.7 webhook ingress by replacing provider parse/log boundaries with real incoming message persistence and idempotent dispatch. + +| Step | Required result | Reference source | Verification | +| --- | --- | --- | --- | +| N1 | Establish one persistence boundary for provider `IncomingMessage` objects. It must find or create contact, contact inbox, open conversation, and incoming message records. | Chatwoot channel webhook controllers and conversation/message builders. | Unit tests covering create, reuse, and duplicate source ID behavior. | +| N2 | Wire Telegram, LINE, SMS/Twilio, WhatsApp, Instagram, TikTok, and supported Meta/Shopify message-producing paths through the boundary where the provider yields customer messages. | `reference/chatwoot/app/controllers/webhooks/*` and channel provider services. | Focused provider webhook tests assert persisted message/conversation records, not only `200 OK`. | +| N3 | Keep provider verification rules intact while making invalid external payloads provider-safe where Chatwoot acknowledges to avoid retries. | Provider-specific Chatwoot controllers. | Tests cover valid signature/token, invalid signature/token, and safe ack cases. | +| N4 | Regenerate route artifacts only if routes change; otherwise preserve `TOTAL: 801` and `251 exact, 0 missing`. | `cmd/dump_routes`, `cmd/route_parity`. | Route commands run when applicable. | +| N5 | Update this tracker in the same commit with P6.7 provider statuses and a progress-log entry. | This document. | `git diff --check`; `go test ./...` for Go changes. | + ## Immediate Execution Queue This is the ordered queue for the next implementation slices. Do not skip the route and test gates even when working on deeper business behavior.