Add Helpdesk outbox worker validation
This commit is contained in:
@@ -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.
|
||||
@@ -48,3 +48,7 @@ Smoke test passed.
|
||||
|
||||
Closed smoke-test tickets are intentionally retained in `fud-helpdesk` as audit
|
||||
evidence. Their subjects start with `[redMCP-smoke ...]`.
|
||||
|
||||
For outbox and worker coverage, run `./validate_helpdesk_outbox_worker.py`.
|
||||
That script reuses this same live smoke path, then checks the matching
|
||||
`event_outbox_events` rows and dry-runs worker enrichment.
|
||||
|
||||
@@ -27,11 +27,38 @@ environment. Before risky edits, archive the current plugin directories in
|
||||
manual browser testing.
|
||||
- Helpdesk mail import, Helpdesk metadata lookup, default non-email updates,
|
||||
and explicit outbound Helpdesk replies are live-smoke-tested through redMCP.
|
||||
- Helpdesk outbox/worker validation is still pending.
|
||||
- Helpdesk outbox/worker validation now has a repeatable live script.
|
||||
- Next meaningful milestone:
|
||||
- Validate `redmine_outbox_worker.py` end to end against controlled Helpdesk
|
||||
activity, document the derived JSONL shape, then choose the external index
|
||||
target.
|
||||
- Run `validate_helpdesk_outbox_worker.py` after outbox or worker changes,
|
||||
then choose the external index target and durable processing policy.
|
||||
|
||||
## 2026-04-25 - Helpdesk Outbox Worker Validation
|
||||
|
||||
- Touched areas:
|
||||
- Helpdesk test tooling
|
||||
- External outbox worker validation docs
|
||||
- Purpose:
|
||||
- Make Helpdesk outbox coverage repeatable after database refreshes and
|
||||
worker changes.
|
||||
- Validate worker enrichment against a real Mailpit-imported Helpdesk ticket
|
||||
without claiming rows or marking them processed.
|
||||
- Behavior checked:
|
||||
- Controlled Helpdesk import produces `helpdesk_ticket.created`,
|
||||
`helpdesk_ticket.updated`, `journal_message.created`, `journal.created`,
|
||||
and `issue.updated` rows.
|
||||
- Worker dry-run enrichment emits `event`, `ticket`, and `message` documents.
|
||||
- Derived message documents expose `has_bcc_address` but do not expose raw
|
||||
`bcc_address`.
|
||||
- LAN test result:
|
||||
- `./validate_helpdesk_outbox_worker.py` passed against `fud-helpdesk` and
|
||||
`fud-nohelpdesk`.
|
||||
- Latest documented passing run created and closed controlled Helpdesk issue
|
||||
`#39873`.
|
||||
- Observed outbox rows: 1 `helpdesk_ticket.created`, 3
|
||||
`helpdesk_ticket.updated`, 1 `journal_message.created`, 3
|
||||
`journal.created`, and 2 `issue.updated`.
|
||||
- Worker dry-run enrichment produced 10 `event`, 6 `ticket`, and 2
|
||||
`message` documents without claiming or marking rows processed.
|
||||
|
||||
## 2026-04-24 - Helpdesk/redMCP Smoke Validation
|
||||
|
||||
|
||||
@@ -136,7 +136,20 @@ non-Helpdesk CRUD, confirms default updates do not send Helpdesk email, verifies
|
||||
explicit outbound Mailpit delivery, and closes the created test ticket. Details
|
||||
are in `docs/helpdesk_smoke_test.md`.
|
||||
|
||||
## 8. Re-Run The Read-Only Validator
|
||||
## 8. Validate Helpdesk Outbox Worker Enrichment
|
||||
|
||||
When Helpdesk/outbox behavior matters, run the repeatable live validator:
|
||||
|
||||
```sh
|
||||
./validate_helpdesk_outbox_worker.py
|
||||
```
|
||||
|
||||
This creates one controlled Helpdesk ticket through Mailpit, verifies redMCP
|
||||
Helpdesk behavior, checks the matching `event_outbox_events` rows, and dry-runs
|
||||
worker enrichment without claiming or marking rows processed. Details are in
|
||||
`docs/helpdesk_outbox_worker_validation.md`.
|
||||
|
||||
## 9. Re-Run The Read-Only Validator
|
||||
|
||||
Finish by running:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user