Files
chatwoot/config/sidekiq.yml
Sony Mathew f052f667c4 feat(reports): define monitor data contracts (#15966)
## Description

Create the disabled-by-default data foundation for conversation
monitors. One reversible migration creates the five final tables for
monitors, conversation decisions, unified historical/resume scans,
durable work, and daily usage. The optional `user_id` identifies the
user who created the monitor; account ownership remains separate. All
schema changes live in this PR, with no follow-up migrations in the
later stack.

**Review question:** Does the schema preserve account boundaries and
durable lifecycle state?

## Closes

Part of
[CW-8270](https://linear.app/chatwoot/issue/CW-8270/add-conversation-monitors-to-reports-with-jev).
The full stack delivers the feature.

## Stack

**1 of 10**. Base: `develop`. Next:
[15967](https://github.com/chatwoot/chatwoot/pull/15967).

| Order | Draft PR | Review scope |
| --- | --- | --- |
| 1 | [#15966](https://github.com/chatwoot/chatwoot/pull/15966) | define
monitor data contracts |
| 2 | [#15967](https://github.com/chatwoot/chatwoot/pull/15967) |
enforce monitor call credits |
| 3 | [#15968](https://github.com/chatwoot/chatwoot/pull/15968) |
evaluate monitor conditions through OpenRouter |
| 4 | [#15969](https://github.com/chatwoot/chatwoot/pull/15969) |
process durable monitor evaluations |
| 5 | [#15970](https://github.com/chatwoot/chatwoot/pull/15970) | track
monitor source activity |
| 6 | [#15971](https://github.com/chatwoot/chatwoot/pull/15971) |
support monitor lifecycle transitions |
| 7 | [#15972](https://github.com/chatwoot/chatwoot/pull/15972) | expose
conversation monitor APIs |
| 8 | [#15973](https://github.com/chatwoot/chatwoot/pull/15973) |
display live monitor reports |
| 9 | [#15974](https://github.com/chatwoot/chatwoot/pull/15974) | create
and preview conversation monitors |
| 10 | [#15975](https://github.com/chatwoot/chatwoot/pull/15975) |
manage conversation monitors |

[Original reference PR
#15962](https://github.com/chatwoot/chatwoot/pull/15962), frozen at
`562de2bccef4ff9b13179a35e08cb09971971c4c`.

Review and merge in this order. Only the first PR targets develop.
Before merging a child, replay its own changes onto updated develop and
retarget it; do not merge it into the predecessor branch. Account for
squash-merge ancestry and refresh descendants in order. Keep collection
disabled until the complete stack is merged and verified.

## Type of change

- [x] New feature (non-breaking change which adds functionality)
- [x] This change requires a documentation update

## How to test

Apply the single migration on an isolated installation and confirm the
five monitor tables are created. Roll it back and reapply it. Confirm
the monitor flag remains disabled and no new dashboard entry or message
processing is exposed. Existing local prototype databases should be
reconciled separately; this migration describes the unreleased
production schema.

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [x] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

Regression tests are carried with the implementation slice they
exercise. This is an extraction of the validated reference feature;
predecessor drafts remain unmerged. Shared OpenRouter configuration must
be reconciled with [classifier PR
#15906](https://github.com/chatwoot/chatwoot/pull/15906) before both
features land.

---------

Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2026-09-24 17:27:47 -07:00

42 lines
1.2 KiB
YAML

# Sample configuration file for Sidekiq.
# Options here can still be overridden by cmd line args.
# Place this file at config/sidekiq.yml and Sidekiq will
# pick it up automatically.
---
:verbose: false
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 10) %>
:timeout: 25
:max_retries: 3
# Sidekiq will run this file through ERB when reading it so you can
# even put in dynamic logic, like a host-specific queue.
# http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/
# https://github.com/sidekiq/sidekiq/wiki/Advanced-Options
# Since queues are declared without waits, the jobs in lower ranking queues will only be processed
# if there are no jobs in higher ranking queues.
:queues:
- critical
- high
- medium
- default
- monitors_live
- mailers
- action_mailbox_routing
- low
- scheduled_jobs
- deferred
- purgable
- housekeeping
- async_database_migration
- bulk_reindex_low
- monitors_backfill
- active_storage_analysis
- active_storage_purge
- action_mailbox_incineration
# you can override concurrency based on environment
production:
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 10) %>
staging:
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 10) %>