Add Helpdesk outbox worker validation

This commit is contained in:
Jason Thistlethwaite
2026-04-25 00:31:09 +00:00
parent dde4dca8a2
commit c9f4c69525
8 changed files with 388 additions and 27 deletions
+60
View File
@@ -0,0 +1,60 @@
# Helpdesk Outbox Worker Validation
Use `validate_helpdesk_outbox_worker.py` to verify that controlled Helpdesk
activity creates the expected `event_outbox_events` rows and that
`redmine_outbox_worker.py` can enrich those rows without processing them.
## Run
```sh
./validate_helpdesk_outbox_worker.py
```
The script first runs the full Helpdesk/redMCP smoke path:
- sends an inbound email to Mailpit for `fud-helpdesk`
- triggers Helpdesk mail import on the LAN Redmine host
- verifies `issueWithHelpdesk()` metadata
- verifies normal `updateIssue()` does not send customer mail
- verifies explicit Helpdesk reply delivery through Mailpit
- closes the controlled Helpdesk issue unless `--keep-open` is passed
It then queries `event_outbox_events` for the created issue and dry-runs
`redmine_outbox_worker.enrich_event()` against those exact rows.
## Expected Checks
The validator fails if any of these are missing:
- `helpdesk_ticket.created`
- `helpdesk_ticket.updated`
- `journal_message.created`
- `journal.created`
- `issue.updated`
- derived worker document types: `event`, `ticket`, and `message`
It also confirms the new rows have not been locked or marked processed, and
that worker documents do not expose raw `bcc_address` data.
## Configuration
Defaults match the LAN test setup:
- Redmine: `http://192.168.50.170`
- SSH: `reddev@192.168.50.170`, key `/tmp/reddev`
- remote Redmine path: `/usr/share/redmine`
- Mailpit: `192.168.1.105`, SMTP `1025`, HTTP `8025`
- API key source: `REDMINE_API_KEY`, `REDMNINE_API_KEY`, or `redMCP/.env`
Useful options:
```sh
./validate_helpdesk_outbox_worker.py --skip-preflight
./validate_helpdesk_outbox_worker.py --keep-open
```
## Expected Output
The final summary should include the created issue id, Helpdesk ticket ids,
journal message ids, event row ids/types, and derived document type counts.
The worker mode should report dry-run enrichment only.