docs: record sla breach lifecycle checkpoint
This commit is contained in:
@@ -16,9 +16,9 @@ Build GoChat as a Go backend that can directly reuse the frontend from `referenc
|
||||
|
||||
## Current Baseline
|
||||
|
||||
- Latest implementation checkpoint: `a11bb96 feat(sla): persist applied sla on conversations`.
|
||||
- Latest documentation checkpoint before this update: `4cf68d1 docs: record sla policy payload checkpoint`.
|
||||
- Worktree status at this planning checkpoint: clean after the matching implementation checkpoint; next active slice is B7 SLA timer/breach lifecycle.
|
||||
- Latest implementation checkpoint: `213bf2b feat(sla): make sla breach events idempotent`.
|
||||
- Latest documentation checkpoint before this update: `85da0be docs: record applied sla persistence checkpoint`.
|
||||
- Worktree status at this planning checkpoint: clean after the matching implementation checkpoint; next active slice is B7 applied-SLA report/list payload parity.
|
||||
- `go test ./...` passes.
|
||||
- Route dump succeeds with `TOTAL: 829` after adding Chatwoot-compatible nested AgentCapacityPolicy users and inbox-limit routes.
|
||||
- Route parity artifacts now exist under `docs/parity/` and are generated by `cmd/route_parity`.
|
||||
@@ -35,7 +35,7 @@ Build GoChat as a Go backend that can directly reuse the frontend from `referenc
|
||||
| Phase 1 | Meilisearch search engine | Review | B6 payload parity, optional live gate, and DB-fallback hardening are implemented; an actual live Meilisearch run is optional and environment-dependent |
|
||||
| Phase 2 | Route and controller parity audit | Doing | Ruby/Bundler unavailable, so Chatwoot route extraction currently uses static `routes.rb` fallback |
|
||||
| Phase 3 | Data and serializer parity | Doing | JSON fixture coverage is partial and still endpoint-family based |
|
||||
| Phase 4 | Enterprise feature completion | Doing | B7 assignment capacity, SLA policy CRUD payload parity, and applied-SLA conversation persistence are implemented; timer/breach lifecycle remains the active gap |
|
||||
| Phase 4 | Enterprise feature completion | Doing | B7 assignment capacity, SLA policy CRUD payload parity, applied-SLA conversation persistence, and idempotent SLA breach events are implemented; applied-SLA report/list payload parity remains active |
|
||||
| Phase 5 | Background jobs and integrations | Planned | durable worker choice and job parity are open |
|
||||
| Phase 6 | Core placeholder burn-down | Doing | account/contact/conversation/message/inbox placeholder groups remain broad |
|
||||
| Phase 7 | Verification harness | Planned | search live gate and reused-frontend smoke harness are not complete |
|
||||
@@ -98,12 +98,13 @@ This ledger records the committed parity checkpoints that future slices should b
|
||||
| `a98dc2c feat(capacity): enforce inbox assignment limits` | Started B7 assignment/capacity enforcement: manual assignment, team assignment with explicit agent, team overflow fallback, and auto-assignment now respect `account_users.agent_capacity_policy_id` plus matching `inbox_capacity_limits.conversation_limit`; only open conversations in the same inbox count toward capacity and resolved conversations do not block new assignments. | `go test ./internal/service -run 'AssignAgent\|AssignTeam' -count=1`; `go test ./internal/autoassignment -run Capacity -count=1` escalated after sandbox socket denial; `go test ./internal/service -count=1`; `go test ./internal/autoassignment -count=1` escalated after sandbox socket denial; `go test ./internal/handler/api/v1 -run 'Conversation\|AgentCapacity' -count=1`; escalated `go test ./...`; `git diff --check`. No route changes; route dump remains `TOTAL: 829`. | Continue B7 with SLA policy CRUD payload review, applied-SLA persistence for new conversations, and timer/breach lifecycle tests. |
|
||||
| `95224fa feat(sla): align sla policy payloads` | Completed B7.2 SLA policy CRUD payload parity for the reused Chatwoot frontend: create/show/update now return `{ payload: sla_policy }`, index returns `{ payload: [...] }`, destroy returns empty `200 OK`, and the SLA policy serializer emits only the fields from Chatwoot's enterprise SLA policy partial. | `go test ./internal/handler/api/v1 -run SlaPolicy -count=1`; `go test ./internal/service -run Sla -count=1`; `go test ./internal/handler/api/v1 -count=1`; `go test ./...`; `git diff --check`. No route changes; route dump remains `TOTAL: 829`. | Continue B7.3 with applied-SLA persistence for new/open conversations, then B7.4 timer/breach lifecycle. |
|
||||
| `a11bb96 feat(sla): persist applied sla on conversations` | Completed the first B7.3 applied-SLA persistence slice: conversation create/update now accept Chatwoot enterprise `sla_policy_id`, validate account ownership and replacement/removal rules, create one `applied_slas` row when a policy is attached, keep status-only updates idempotent for existing SLA conversations, and serialize `applied_sla` in conversation payloads using Chatwoot's applied-SLA partial fields. | `go test ./internal/service -run 'ConversationService_.*Sla\|ConversationService_Update\|ConversationService_Create' -count=1`; `go test ./internal/handler/api/v1 -run 'ConversationCrudTestSuite/Test(Update_WithSlaPolicy\|Update_Success\|Create_Success)' -count=1`; `go test ./internal/service -run 'Conversation\|AppliedSla\|Sla' -count=1`; `go test ./internal/handler/api/v1 -run 'ConversationCrudTestSuite\|SlaPolicy' -count=1`; `go test ./internal/service -count=1`; `go test ./internal/handler/api/v1 -count=1`; `go test ./...`; `git diff --check`. No route changes; route dump remains `TOTAL: 829`. | Continue B7.4 with idempotent SLA event/timer lifecycle and then B7.5 applied-SLA report/list payload parity. |
|
||||
| `213bf2b feat(sla): make sla breach events idempotent` | Completed B7.4 timer/breach lifecycle core parity: SLA thresholds now use Chatwoot seconds units, FRT/NRT/RT checks treat the exact threshold as breached, missed events are idempotent by `applied_sla_id`, `event_type`, and `meta`, NRT events store the last incoming message ID in `meta`, and resolved active/active-with-misses applied SLAs transition to `hit` or `missed`. | `go test ./internal/service -run 'AppliedSlaService\|ConversationService_Create_AppliesSlaPolicy' -count=1`; `go test ./internal/handler/api/v1 -run 'SlaPolicy\|ConversationCrudTestSuite/TestUpdate_WithSlaPolicy' -count=1`; `go test ./internal/service -run 'AppliedSla\|Sla\|Conversation' -count=1`; `go test ./internal/handler/api/v1 -run 'SlaPolicy\|ConversationCrudTestSuite' -count=1`; `go test ./internal/service -count=1`; `go test ./internal/handler/api/v1 -count=1`; `go test ./...`; `git diff --check`. No route changes; route dump remains `TOTAL: 829`. | Continue B7.5 with applied-SLA report/list payload parity, then review notifications/business-hours depth. |
|
||||
|
||||
## Next Slice Contract
|
||||
|
||||
Completed implementation slice: B5.1-B5.5 now cover inbox serializer shape, Chatwoot frontend create/update binding, working-hours persistence, out-of-office behavior, inbox member assignment payload/mutation semantics, channel-specific config depth, AgentCapacityPolicy/InboxCapacityLimit API data contracts, and dedicated Email/Twilio/LINE channel route response shapes. B6 is now in Review after `a16c23c` and `f08c743`: Chatwoot search response envelopes, frontend query params, Meilisearch sender filters, mocked hit serialization, env-gated live Meilisearch validation, release-mode DB fallback rejection, and reindex Meilisearch-only guard are covered. B7 has started with `a98dc2c`, `95224fa`, and `a11bb96`, enforcing per-inbox capacity limits in manual/automatic assignment paths, aligning SLA policy CRUD payloads, and persisting applied SLA records when SLA policies are attached to conversations. B3 and B4 remain in review for deeper side effects and browser validation.
|
||||
Completed implementation slice: B5.1-B5.5 now cover inbox serializer shape, Chatwoot frontend create/update binding, working-hours persistence, out-of-office behavior, inbox member assignment payload/mutation semantics, channel-specific config depth, AgentCapacityPolicy/InboxCapacityLimit API data contracts, and dedicated Email/Twilio/LINE channel route response shapes. B6 is now in Review after `a16c23c` and `f08c743`: Chatwoot search response envelopes, frontend query params, Meilisearch sender filters, mocked hit serialization, env-gated live Meilisearch validation, release-mode DB fallback rejection, and reindex Meilisearch-only guard are covered. B7 has started with `a98dc2c`, `95224fa`, `a11bb96`, and `213bf2b`, enforcing per-inbox capacity limits, aligning SLA policy CRUD payloads, persisting applied SLA records, and making core FRT/NRT/RT breach events idempotent. B3 and B4 remain in review for deeper side effects and browser validation.
|
||||
|
||||
Next implementation slice: continue B7 with timer/breach lifecycle and idempotent SLA events.
|
||||
Next implementation slice: continue B7 with applied-SLA report/list payload parity.
|
||||
|
||||
| Step | Required result | Reference source | Verification |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -112,8 +113,9 @@ Next implementation slice: continue B7 with timer/breach lifecycle and idempoten
|
||||
| N3 | Keep B7 assignment capacity enforcement as current capacity baseline. | `AssignmentHandler`, `AutoAssignmentHandler`, `AgentCapacityPolicy`, `InboxCapacityLimit`. | Done by `a98dc2c`; manual/team/auto assignment now skip or reject agents at per-inbox capacity. |
|
||||
| N4 | Keep SLA policy CRUD payload review as current SLA API baseline. | `reference/chatwoot/enterprise/app/controllers/api/v1/accounts/sla_policies_controller.rb`, SLA policy Jbuilder views, dashboard SLA store/API. | Done by `95224fa`; create/show/update/index/delete payloads match the frontend-consumed Chatwoot shape. |
|
||||
| N5 | Keep applied-SLA persistence as current conversation SLA baseline. | `reference/chatwoot/enterprise/app/models/enterprise/concerns/conversation.rb`, `AppliedSla#push_event_data`, applied-SLA model partial. | Done by `a11bb96`; `sla_policy_id` attach creates exactly one applied SLA and conversation payloads include Chatwoot-style `applied_sla`. |
|
||||
| N6 | Add SLA timer and breach lifecycle. | `reference/chatwoot/enterprise/app/services/sla/evaluate_applied_sla_service.rb`, `SlaEvent`, SLA processing jobs. | Active applied SLAs create idempotent FRT/NRT/RT miss events, transition to `active_with_misses`, `hit`, or `missed`, and preserve status on repeated evaluation. |
|
||||
| N7 | Update this tracker after every implementation checkpoint. | This document. | `git diff --check`; `go test ./...` for Go changes. |
|
||||
| N6 | Keep SLA timer and breach lifecycle as current SLA lifecycle baseline. | `reference/chatwoot/enterprise/app/services/sla/evaluate_applied_sla_service.rb`, `SlaEvent`, SLA processing jobs. | Done by `213bf2b`; active applied SLAs create idempotent FRT/NRT/RT miss events, transition to `active_with_misses`, `hit`, or `missed`, and preserve status on repeated evaluation. |
|
||||
| N7 | Add applied-SLA report/list payload parity. | `reference/chatwoot/enterprise/app/controllers/api/v1/accounts/applied_slas_controller.rb`, applied-SLA index/metrics/download views, dashboard SLA reports client. | Account-side applied-SLA list/report filters return frontend-compatible payloads and metrics/download shapes. |
|
||||
| N8 | Update this tracker after every implementation checkpoint. | This document. | `git diff --check`; `go test ./...` for Go changes. |
|
||||
|
||||
Current B2 profile checkpoint:
|
||||
|
||||
@@ -298,7 +300,7 @@ Active B7 task board:
|
||||
| B7.1 | Enforce AgentCapacityPolicy/InboxCapacityLimit during manual and automatic assignment. | `AssignmentHandler`, `AutoAssignmentHandler`, `AgentAssignmentService`, `AgentCapacityPolicy`, `InboxCapacityLimit`. | Done | `a98dc2c`; manual assignment, team assignment, overflow fallback, and auto-assignment respect per-inbox open-conversation limits. |
|
||||
| B7.2 | Align SLA policy CRUD payloads and validation. | `sla_policies_controller.rb`, SLA frontend store/API, SLA policy views/entities. | Done | `95224fa`; handler tests prove Chatwoot request wrapper, raw `{ payload }`/list shapes, validation, and empty `200 OK` delete status. |
|
||||
| B7.3 | Persist applied SLA on new/open conversations. | Chatwoot applied SLA model/services and conversation create/status callbacks. | Done | `a11bb96`; `sla_policy_id` create/update creates one applied SLA, validates policy/account/replacement rules, and serializes conversation `applied_sla`. |
|
||||
| B7.4 | Implement SLA timer and breach lifecycle. | First response, next response, resolution targets, business-hours behavior, SLA events/notifications. | Todo | Lifecycle tests cover active, hit, missed, and active-with-misses transitions with idempotent breach events. |
|
||||
| B7.4 | Implement SLA timer and breach lifecycle. | First response, next response, resolution targets, business-hours behavior, SLA events/notifications. | Done | `213bf2b`; lifecycle tests cover FRT/NRT miss idempotency, NRT message meta, hit, missed, and active-with-misses transitions. |
|
||||
| B7.5 | Add SLA report/list payload parity. | `applied_slas` routes, SLA report frontend. | Todo | Account-side applied-SLA list/report filters return frontend-compatible payloads. |
|
||||
|
||||
B7 execution breakdown:
|
||||
@@ -309,8 +311,20 @@ B7 execution breakdown:
|
||||
| B7.2b | Match Chatwoot destroy behavior with empty `200 OK` instead of a local success envelope. | `sla_policies_controller.rb#destroy`, controller spec. | Delete handler test asserts `200 OK` and empty body. | Done by `95224fa` |
|
||||
| B7.3a | Determine applied-SLA policy attachment behavior from Chatwoot callbacks/services and map it to Go conversation create/update/open flows. | `Enterprise::Concerns::Conversation`, `Enterprise::Api::V1::Accounts::ConversationsController#permitted_update_params`, `AppliedSLA`. | Service tests prove explicit `sla_policy_id` attachment, account validation, replacement rejection, and no duplicate applied SLA rows. | Done by `a11bb96` |
|
||||
| B7.3b | Persist `applied_slas` and link `conversations.sla_policy_id` when a conversation enters an SLA-covered state. | Applied SLA model and serializer views. | Conversation create/update tests assert `applied_slas`, `conversations.sla_policy_id`, initial active status, and frontend `applied_sla` payload fields. | Done by `a11bb96` |
|
||||
| B7.4a | Implement first-response, next-response, and resolution target state transitions with idempotent SLA events. | SLA timer jobs/services and event model. | Lifecycle tests cover active, hit, missed, active-with-misses, and duplicate-event prevention. | Todo |
|
||||
| B7.5a | Align applied-SLA metrics/download/list payloads used by the frontend reports. | `applied_slas_controller.rb`, applied-SLA Jbuilder views, dashboard reports. | Handler tests assert filters, envelopes, CSV/download shape, and frontend field names. | Todo |
|
||||
| B7.4a | Implement first-response, next-response, and resolution target state transitions with idempotent SLA events. | `Sla::EvaluateAppliedSlaService`, `SlaEvent`, SLA processing jobs and event model. | Lifecycle tests cover active, hit, missed, active-with-misses, NRT `message_id` meta, exact-threshold breach behavior, and duplicate-event prevention. | Done by `213bf2b` |
|
||||
| B7.5a | Add the Chatwoot account applied-SLA index route and handler if the Go route surface is missing it. | `reference/chatwoot/enterprise/app/controllers/api/v1/accounts/applied_slas_controller.rb#index`, dashboard SLA reports client. | Route artifacts are regenerated only if a route is added; handler tests prove `GET /api/v1/accounts/:account_id/applied_slas` returns the expected envelope. | Todo |
|
||||
| B7.5b | Align applied-SLA index filters and pagination. | `AppliedSlasController#index`, `applied_slas/index.json.jbuilder`, frontend SLA reports filters. | Tests cover `status`, `sla_policy_id`, `inbox_id`, `team_id`, `assigned_agent_id`, `label_list`, `since`, `until`, and Chatwoot's missed scope semantics (`missed` plus `active_with_misses`). | Todo |
|
||||
| B7.5c | Align applied-SLA list item serializers. | `api/v1/models/_applied_sla.json.jbuilder`, `_sla_event.json.jbuilder`, conversation/report Jbuilder views. | Tests assert `applied_sla`, `conversation`, `sla_events`, SLA policy names/descriptions/threshold fields, Unix timestamps, event `meta`, and no local response envelope. | Todo |
|
||||
| B7.5d | Align applied-SLA metrics and download payloads used by the frontend reports. | `applied_slas_controller.rb#metrics/#download`, `metrics.json.jbuilder`, dashboard reports API. | Handler/service tests assert metric keys, hit/miss math, shared filters, CSV/download shape, and frontend field names. | Todo |
|
||||
| B7.5e | Update this tracker and commit immediately after the applied-SLA report/list implementation checkpoint. | This document. | Commit ledger row, B7 status changes, verification commands, and route counts if changed. | Todo |
|
||||
|
||||
B7.5 implementation notes:
|
||||
|
||||
- Inspect the Rails controller, model scopes, Jbuilder views, and `reference/chatwoot/app/javascript/dashboard/api/slaReports.js` before changing Go code.
|
||||
- Keep SLA threshold units in seconds, matching `213bf2b` and the Chatwoot enterprise SLA policy serializer.
|
||||
- Reuse the existing applied-SLA lifecycle data model where possible; add repository query helpers only for report filters and preloads.
|
||||
- If the index route is added, run `go run ./cmd/dump_routes > docs/parity/gochat_routes.txt` and `go run ./cmd/route_parity` before committing.
|
||||
- Exit commands for the implementation checkpoint should include focused applied-SLA handler/service tests, `go test ./...`, and `git diff --check`.
|
||||
|
||||
Active B4 task board:
|
||||
|
||||
@@ -396,7 +410,7 @@ Remaining slice landing plan:
|
||||
| Slice | First implementation checkpoint | Follow-up checkpoints | Done classification rule |
|
||||
| --- | --- | --- | --- |
|
||||
| B6 | Compare current Meilisearch document fields and global/entity search payloads against Chatwoot frontend consumers. | Add optional live Meilisearch integration gate, tighten account-scoped filters, and document DB fallback as development-only. | Done only after mocked tests and live-shape review prove search payloads work without DB-only assumptions. |
|
||||
| B7 | Done: assignment capacity enforcement, SLA policy CRUD payload parity, and applied-SLA conversation persistence. Next: SLA timer/breach lifecycle. | Business-hours timer math, first/next/resolution breach events, capacity-aware assignment policy binding, report/list payloads. | Done only after lifecycle state tests cover active, hit, missed, and active-with-misses transitions. |
|
||||
| B7 | Done: assignment capacity enforcement, SLA policy CRUD payload parity, applied-SLA conversation persistence, and idempotent SLA breach lifecycle. Next: applied-SLA report/list payload parity. | Business-hours timer math, deeper notification delivery, capacity-aware assignment policy binding, report/list payloads. | Done only after report/list payloads and remaining business-hours/notification checks are covered. |
|
||||
| B8 | Account-side CSAT list/metrics/review-note payload parity. | Resolve-triggered survey send idempotency, report/download filters, public/update lock regression, channel-specific send hooks. | Done only after account APIs, public APIs, and resolve listener agree on one message-linked response model. |
|
||||
| B9 | Macro execution side effects for labels, status, assignee/team, priority, private notes, and attachments. | Automation rule condition/action parity, execution logs, webhook delivery retry, email transcript delivery, stop-on-match semantics. | Done only after actions mutate real conversations and async external actions are retryable or explicitly feature-gated. |
|
||||
| B10 | Audit list payload and audit writer boundary for representative mutating core resources. | CustomRole permission-key parity, AccountUser permission resolution, InboxLimit enforcement in inbox/channel creation paths. | Done only after authorization tests prove admin-only surfaces and non-admin denial shapes match Chatwoot. |
|
||||
@@ -672,7 +686,7 @@ Enterprise tracking table:
|
||||
|
||||
| ID | Feature | Existing Go surface | Required next work | Status |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| P4.1 | SLA policies/events | `internal/model/sla_policy.go`, `internal/model/sla_event.go`, `internal/service/sla_policy_service.go`, `internal/service/applied_sla_service.go`, `internal/service/sla_event_service.go`, `internal/handler/api/v1/sla_policy_handler.go` | SLA policy CRUD and applied-SLA conversation attach are done; next wire idempotent lifecycle events, breach tracking, business-hours timers, and report payloads. | Doing |
|
||||
| P4.1 | SLA policies/events | `internal/model/sla_policy.go`, `internal/model/sla_event.go`, `internal/service/sla_policy_service.go`, `internal/service/applied_sla_service.go`, `internal/service/sla_event_service.go`, `internal/handler/api/v1/sla_policy_handler.go` | SLA policy CRUD, applied-SLA conversation attach, and idempotent core breach lifecycle are done; next align applied-SLA reports, business-hours timers, and notification delivery. | Doing |
|
||||
| P4.2 | Audit logs | `internal/model/audit.go`, `internal/service/audit_service.go`, `internal/repository/audit_repo.go`, `internal/handler/api/v1/audit_handler.go` | Ensure every mutating enterprise/core action emits audit events and filters match Chatwoot. | Todo |
|
||||
| P4.3 | Custom roles/permissions | `internal/model/custom_role.go`, `internal/service/custom_role_service.go`, `internal/middleware/role_check.go`, `internal/handler/api/v1/custom_role_handler.go` | Align permission keys, inherited roles, authorization failures, and admin UX payloads. | Todo |
|
||||
| P4.4 | Agent capacity | `internal/model/agent_capacity_policy.go`, `internal/service/agent_capacity_policy_service.go`, `internal/handler/api/v1/agent_capacity_handler.go`, `internal/autoassignment/*` | First align AgentCapacityPolicy API, serializers, nested users, and `InboxCapacityLimit` data contracts; then enforce capacity in manual/auto assignment. | Review |
|
||||
@@ -686,7 +700,7 @@ Enterprise work package breakdown:
|
||||
|
||||
| Package | Subtasks | Must verify | Status |
|
||||
| --- | --- | --- | --- |
|
||||
| SLA | Policy CRUD parity, conversation SLA assignment, first-response/next-response/resolution timers, business-hours handling, breach events, notifications. | Policy payloads and applied-SLA attach are covered; timer state transitions, breach idempotency, and report payloads remain. | Doing |
|
||||
| SLA | Policy CRUD parity, conversation SLA assignment, first-response/next-response/resolution timers, business-hours handling, breach events, notifications. | Policy payloads, applied-SLA attach, seconds-based thresholds, core state transitions, and breach idempotency are covered; report payloads, business hours, and notifications remain. | Doing |
|
||||
| Assignment and capacity | Assignment policy CRUD, inbox policy binding, round-robin/availability/capacity selection, manual assignment limits, fallback behavior. | Manual and automatic assignment respect policy, availability, team/inbox membership, and limits. | Review |
|
||||
| CSAT account side | Survey send on resolve, response list, metrics, filters, downloads, review notes, resend/idempotency, public lock already implemented. | Account API payload fixtures, metrics math, 14-day lock, one response per CSAT message. | Todo |
|
||||
| Automation rules | Condition/action parity, event listener coverage, delayed actions, execution logs, stop-on-match behavior, webhook and transcript actions. | Rule trigger tests for conversation/contact/message events and durable retry for external actions. | Todo |
|
||||
@@ -700,7 +714,7 @@ Enterprise acceptance gates:
|
||||
|
||||
| Feature | Required gates before `Done` | Reference notes |
|
||||
| --- | --- | --- |
|
||||
| SLA | Field names and units match Chatwoot; `only_during_business_hours` exists; policy CRUD payloads match the enterprise Jbuilder views; applied SLA is created when `sla_policy_id` is attached; remaining state machine/breach events create notifications; delete/update statuses match Rails behavior. | `docs/verification/SLA_ASSIGNMENT_POLICY_V2_COMPATIBILITY_REPORT.md`, `docs/requirements/M11-enterprise-features.md` |
|
||||
| SLA | Field names and units match Chatwoot; `only_during_business_hours` exists; policy CRUD payloads match the enterprise Jbuilder views; applied SLA is created when `sla_policy_id` is attached; FRT/NRT/RT breach events are idempotent; remaining report/business-hours/notification behavior matches Rails. | `docs/verification/SLA_ASSIGNMENT_POLICY_V2_COMPATIBILITY_REPORT.md`, `docs/requirements/M11-enterprise-features.md` |
|
||||
| Audit | Mutating account resources emit audit records with actor, IP, request UUID, auditable type/id, associated account, and changes; admin list pagination matches Chatwoot. | `docs/requirements/M11-enterprise-features.md` |
|
||||
| CustomRole | Permission keys match Chatwoot; `AccountUser` permission resolution honors custom roles; deleting a role nullifies users; admin-only policy is enforced. | `docs/requirements/M1-accounts-and-users.md`, `docs/requirements/M11-enterprise-features.md` |
|
||||
| AgentCapacity and InboxLimit | Assignment and auto-assignment respect per-inbox conversation limits; account/inbox limits are enforced in create paths and surfaced to frontend. | `docs/requirements/M1-accounts-and-users.md`, `docs/requirements/M5-team-and-assignment.md` |
|
||||
@@ -907,3 +921,4 @@ Verification milestone gates:
|
||||
- 2026-06-05: B7 capacity enforcement checkpoint committed as `a98dc2c feat(capacity): enforce inbox assignment limits`; manual agent assignment, team assignment with explicit agent, team overflow fallback, and auto-assignment now apply AgentCapacityPolicy/InboxCapacityLimit per-inbox open-conversation limits. Resolved conversations do not count against capacity. Focused assignment/capacity tests, handler smoke for conversation/capacity routes, escalated full `go test ./...`, and `git diff --check` passed. Next B7 checkpoint is SLA policy CRUD payload review and applied-SLA persistence.
|
||||
- 2026-06-05: B7 SLA policy payload checkpoint committed as `95224fa feat(sla): align sla policy payloads`; SLA policy create/show/update now return `{ payload: sla_policy }`, index returns `{ payload: [...] }`, destroy returns empty `200 OK`, and the serializer is limited to Chatwoot's enterprise SLA policy fields. Focused SLA policy handler tests, SLA service tests, handler package tests, full `go test ./...`, and `git diff --check` passed. Next B7 checkpoint is applied-SLA persistence for new/open conversations.
|
||||
- 2026-06-05: B7 applied-SLA persistence checkpoint committed as `a11bb96 feat(sla): persist applied sla on conversations`; conversation create/update now accepts `sla_policy_id`, validates SLA policy account ownership plus Chatwoot replacement/removal rules, creates exactly one active `applied_slas` record, keeps status-only updates idempotent for existing SLA conversations, and includes Chatwoot-style `applied_sla` payload fields in conversation responses. Focused conversation/SLA service and handler tests, full `go test ./...`, and `git diff --check` passed. Next B7 checkpoint is SLA timer/breach lifecycle with idempotent FRT/NRT/RT events.
|
||||
- 2026-06-05: B7 SLA breach lifecycle checkpoint committed as `213bf2b feat(sla): make sla breach events idempotent`; SLA thresholds now use Chatwoot seconds units, exact-threshold checks count as breached, FRT/NRT/RT miss events are idempotent by applied SLA, event type, and meta, NRT events store last incoming `message_id`, and resolved applied SLAs transition to `hit` or `missed`. Focused applied-SLA lifecycle tests, handler SLA/conversation tests, full `go test ./...`, and `git diff --check` passed. Next B7 checkpoint is applied-SLA report/list payload parity.
|
||||
|
||||
Reference in New Issue
Block a user