test(analysis): assert Cancelled event is published; correct cron-test rationale (0.87.21)

0.87.13 followup. The Cancelled publish had no asserting test —
mechanical revert of the publish block shipped green. New sqlx test
subscribes before spawn, drives SlowDispatcher into flight, cancels,
asserts both Started and Cancelled frames with breadcrumb fields.
Mutation-confirmed.

Also corrects: cron-test rationale comment (inverted unlock-axis),
Cancelled docstring (self-contradicting clear-triggers sentence).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-06-23 20:46:08 +02:00
parent e3e86843d6
commit a62a5f155b
6 changed files with 107 additions and 12 deletions

View File

@@ -56,10 +56,11 @@ pub enum AnalysisEvent {
},
/// The worker cancelled an in-flight dispatch (daemon shutdown or
/// settings reload toggling analysis off). The lease was released,
/// not failed — but the dashboard banner already saw `Started` and
/// only clears on `Completed`/`Failed`/`Cancelled`. Without this
/// variant the banner stuck on the cancelled page forever (until a
/// later page kicked off and overwrote it).
/// not failed. The dashboard's "now analyzing" banner clears on
/// `Completed`/`Failed`/`Cancelled`; before this variant existed it
/// listened only to the first two, so a cancel-mid-dispatch left
/// the banner stuck on the cancelled page until a later one
/// kicked off and overwrote it.
Cancelled {
page_id: Uuid,
manga_id: Uuid,