docs: lock parity execution tracker

This commit is contained in:
2026-06-06 04:00:41 +08:00
parent c38ad40a85
commit 09095c5746
+25 -2
View File
@@ -14,11 +14,32 @@ Build GoChat as a Go backend that can directly reuse the frontend from `referenc
- Search: final implementation must use Meilisearch. DB/LIKE search is not acceptable as the final engine.
- Enterprise scope: exclude SSO/SAML/LDAP/OIDC. Include the remaining paid features already present in planning and code: SLA, Audit, CustomRole, AgentCapacity, Captain/Copilot, CSAT, InboxLimit, automation, macros, assignment policies, and related limits/workflows.
## Authoritative Tracking Contract
This file is the only active execution tracker. The `.hermes/plans/*` files and older reports under `docs/` are retained as source notes, but any runnable work must be represented here before it is considered owned.
| Decision axis | Locked rule | Tracking consequence |
| --- | --- | --- |
| Product surface | Reuse the `reference/chatwoot` frontend without adapters. | Backend routes, payloads, status codes, pagination, errors, permissions, jobs, and realtime side effects must be Chatwoot-compatible. |
| Reference order | Local `reference/chatwoot` beats prior docs and assumptions. | Every parity slice records inspected reference controllers, Jbuilder views, models, jobs, and frontend API clients. |
| Test order | Keep the Go suite green before expanding behavior. | A checkpoint cannot close without focused tests, `go test ./...`, and `git diff --check`; docs-only checkpoints require at least `git diff --check`. |
| Search | Meilisearch is mandatory for final behavior. | DB search can exist only as explicit local fallback and must not be the production parity path. |
| Enterprise | SSO/SAML/LDAP/OIDC are out. All other paid features in this tracker are in. | SLA, Audit, CustomRole, AgentCapacity, Captain/Copilot, CSAT, InboxLimit, automation, macros, assignment policies, and limits stay tracked until verified or explicitly split. |
| Commit hygiene | Code, tests, generated route artifacts, and tracker updates land together. | If a route changes, regenerate `docs/parity/gochat_routes.txt`; if the tracked set changes, regenerate `docs/parity/route_parity.md`. |
Hermes plan landing map:
| Hermes source | Landed tracker area | Remaining rule |
| --- | --- | --- |
| `.hermes/plans/2025-05-24-global-search-meilisearch.md` | `Phase 1: Meilisearch Search Engine`, B6 search payload parity, P5.3 durable search indexing. | Future search changes start from Meilisearch behavior and live-shape frontend consumers, not from DB fallback. |
| `.hermes/plans/2026-05-24-automation-macro-csat.md` | B8 CSAT, B9 automation/macro, P5.4/P5.5/P5.6/P5.12 durable automation/CSAT jobs, B12 enterprise smoke. | Future automation, macro, and CSAT gaps must be opened from fresh `reference/chatwoot` inspection or B12 smoke failures. |
| User-confirmed enterprise scope | Phase 4 enterprise feature completion, B7-B11, B12 enterprise smoke. | SSO/SAML/LDAP/OIDC stay excluded; no other paid-feature family may be silently dropped. |
## Current Baseline
- Current tracking checkpoint: 2026-06-06 after this implementation checkpoint, prepared as `feat(help-center): align category payloads`.
- Current tracking checkpoint: 2026-06-06 after this documentation checkpoint, prepared as `docs: lock parity execution tracker`.
- Latest implementation checkpoint: this checkpoint, prepared as `feat(help-center): align category payloads`.
- Latest documentation-only checkpoint: `24a5cb3 docs: land help center parity plan`; this document is now the active follow-up plan and supersedes `.hermes/plans/*`.
- Latest documentation-only checkpoint: this checkpoint, prepared as `docs: lock parity execution tracker`; this document is now the active follow-up plan and supersedes `.hermes/plans/*`.
- Worktree status at this implementation checkpoint: P3.7b help center category parity now matches the reused dashboard `helpCenter/categories.js` client and Chatwoot `CategoriesController`/Jbuilder surface for the category core path: no-trailing-slash `GET/POST /portals/:portal_id/categories` and frontend `PATCH /categories/:category_id` routes are registered; portal route IDs resolve by account-scoped slug with numeric fallback through the portal service; create/update accept raw frontend category bodies plus `{ category: ... }`; index returns `{ payload, meta: { current_page, categories_count } }` with locale filtering; show/create/update return `{ payload: category }` with related/parent/root category partials and `meta.articles_count`; delete and reorder return empty `200 OK`; and reorder accepts Chatwoot `positions_hash` while preserving legacy `positions` arrays. P3.7a help-center portal parity is already in Review. Campaign create/update already mirrors Chatwoot `Campaign#ensure_correct_campaign_attributes`; account campaign CRUD already matches the reused dashboard `campaigns` store and Chatwoot Jbuilder contract. Fresh help-center article drift remains tracked as P3.7c below. Agent/settings/profile/notification/contact/custom-field/report enterprise drifts listed below remain at their prior checkpoint states. The fresh placeholder audit found remaining `chatwootParityStub` routes only in webhook handler-not-injected fallbacks, not in the reused dashboard account/contact/conversation/message/inbox critical path. P3.6 custom filters/custom attribute definitions and label CRUD are already in Review. B11.1a-B11.3e Captain/Copilot slices remain in Review; B12.1/B12.2/B12.3 smoke harnesses remain in Review; P5 durable job work through P5.13b is in Review. Next active implementation slice is P3.7c help center article and bulk-action parity.
- `go test ./...` passes.
- Route dump succeeds with `TOTAL: 853` after adding no-trailing-slash category index/create aliases and frontend-used category PATCH update route.
@@ -148,6 +169,7 @@ This ledger records the committed parity checkpoints that future slices should b
| Commit | Scope | Verification summary | Follow-up state |
| --- | --- | --- | --- |
| `docs: lock parity execution tracker` | Documentation-only checkpoint that makes this file the single active tracker after user confirmation. It locks direct Chatwoot frontend reuse, local `reference/chatwoot` as the only baseline, `go test ./...` first, Meilisearch as mandatory final search, and enterprise scope excluding only SSO/SAML/LDAP/OIDC. It also maps the remaining Hermes search and automation/macro/CSAT notes into the existing Phase 1/B6, B8/B9, Phase 5, B7-B12, and active P3.7 help-center rows. | `git diff --check`. No Go code changed. | Continue P3.7c help-center articles and article bulk actions; future slices update this tracker in the same commit. |
| `feat(help-center): align category payloads` | Advances P3.7b help-center parity by matching Chatwoot `CategoriesController`, category Jbuilder views, and reused dashboard `helpCenter/categories.js` plus category store actions. Category index/create now expose no-trailing-slash routes; update exposes frontend `PATCH`; portal IDs resolve through account-scoped slug lookup with numeric fallback; create/update accept raw frontend category bodies plus wrappers; list returns `{ payload, meta }` with locale filtering; show/create/update return `{ payload: category }` with related/parent/root category partials and `meta.articles_count`; delete returns empty `200 OK`; and reorder accepts Chatwoot `positions_hash` while preserving legacy `positions` arrays. | `go test ./internal/handler/api/v1 -run CategoryHandler -count=1`; `go test ./internal/service ./internal/repository -run Category -count=1`; `go test ./internal/router -run Router -count=1`; `go run ./cmd/dump_routes > docs/parity/gochat_routes.txt`; `go run ./cmd/route_parity`; full `go test ./...`; `git diff --check`. Route dump is `TOTAL: 853`; tracked route parity remains `270 exact, 7 parameter-compatible, 0 missing`. | P3.7b moves to Review; continue P3.7c help-center articles and article bulk actions. |
| `feat(help-center): align portal payloads` | Advances P3.7a help-center parity by matching Chatwoot `PortalsController`, portal Jbuilder views, enterprise SSL status behavior, and reused dashboard `helpCenter/portals.js` plus portal store actions. Portal index/create now expose no-trailing-slash routes; update exposes frontend `PATCH`; archive exposes Chatwoot `PATCH`; route IDs resolve through account-scoped slug lookup with legacy numeric fallback; create/update accept raw frontend portal bodies plus wrappers; index returns `{ payload, meta }`; show/create/update return raw portal objects with `config`, `meta`, logo, and SSL settings; delete/logo/archive return empty `200 OK`; `send_instructions` returns `{ message }`; and SSL status returns `{ status, verification_errors }` or `422` when no custom domain is configured. | `go test ./internal/handler/api/v1 -run PortalHandler -count=1`; `go test ./internal/service ./internal/repository -run Portal -count=1`; `go test ./internal/router -run Router -count=1`; `go run ./cmd/dump_routes > docs/parity/gochat_routes.txt`; `go run ./cmd/route_parity`; full `go test ./...`; `git diff --check`. Route dump is `TOTAL: 850`; tracked route parity remains `270 exact, 7 parameter-compatible, 0 missing`. | P3.7a moves to Review; continue P3.7b help-center categories, then P3.7c articles/bulk actions. |
| `docs: land help center parity plan` | Documentation-only handoff checkpoint after `a02d11e feat(campaigns): derive chatwoot scheduling`. Records the latest clean campaign baseline and turns fresh help-center reference/frontend inspection into executable P3.7a-P3.7c contracts for portals, categories, articles, and article bulk actions. | `git diff --check`. No Go code changed. | Start `feat(help-center): align portal payloads`, then continue categories/articles and route parity regeneration. |
@@ -2094,6 +2116,7 @@ Verification milestone gates:
## Progress Log
- 2026-06-06: Documentation checkpoint prepared as `docs: lock parity execution tracker`; user decisions are now locked into the tracker: reuse Chatwoot frontend directly, treat local `reference/chatwoot` as the only baseline, keep `go test ./...` green before deeper parity, require Meilisearch as final search, exclude only SSO/SAML/LDAP/OIDC, and keep the remaining enterprise families in scope. The older Hermes search and automation/macro/CSAT plans are mapped to active tracker sections so future work can be followed from this document alone. Verification for this docs-only checkpoint: `git diff --check`; next implementation slice remains P3.7c help-center articles and bulk actions.
- 2026-06-06: P3.7b help-center category checkpoint prepared as `feat(help-center): align category payloads`; audited Chatwoot `CategoriesController`, category Jbuilder views, reused dashboard `helpCenter/categories.js`, and category store actions. Account category APIs now accept raw frontend create/update bodies plus wrappers, resolve portal route IDs by account-scoped slug with numeric fallback, return Chatwoot `{ payload, meta }` list payloads and `{ payload: category }` mutation/show payloads, expose no-trailing-slash index/create plus frontend `PATCH`, return empty `200 OK` for delete/reorder, support locale filtering and `meta.articles_count`, and accept Chatwoot reorder `positions_hash` while keeping legacy `positions` arrays. Focused category handler/service/repository tests, router test, route dump/parity, full `go test ./...`, and `git diff --check` passed; continue P3.7c article/bulk-action parity next.
- 2026-06-06: P3.7a help-center portal checkpoint prepared as `feat(help-center): align portal payloads`; audited Chatwoot `PortalsController`, enterprise portal `ssl_status`, portal Jbuilder views, reused dashboard `helpCenter/portals.js`, and portal store actions. Account portal APIs now accept raw frontend create/update bodies plus wrappers, resolve portal route IDs by account-scoped slug with numeric fallback, return Chatwoot raw portal/index payloads, expose no-trailing-slash index/create plus frontend `PATCH`, and return empty `200 OK` for delete/logo/archive. `send_instructions` now returns `{ message: "Instructions sent successfully" }`, while SSL status returns `{ status, verification_errors }` or `422` for missing custom domain. Focused portal handler/service/repository tests, router test, route dump/parity, full `go test ./...`, and `git diff --check` passed; continue P3.7b category parity next.
- 2026-06-06: Documentation checkpoint prepared as `docs: land help center parity plan`; current baseline now points at `a02d11e feat(campaigns): derive chatwoot scheduling`, and direct help-center inspection is converted into P3.7a-P3.7c executable contracts. Audited Chatwoot `PortalsController`, `CategoriesController`, `ArticlesController`, `Articles::BulkActionsController`, portal/category/article Jbuilder views, and reused dashboard `helpCenter/*.js` clients. Current Go gaps are slug-vs-numeric portal resolution, local response envelopes, wrapped mutation bodies, missing no-trailing-slash/PATCH/frontend bulk routes, and non-Chatwoot delete/send-instruction status bodies. Verification for this docs-only checkpoint: `git diff --check`; next implementation commit is `feat(help-center): align portal payloads`.