Commit 678e0d2
committed
Surface dispatch-overdue wake-latency age on dw system:operator-metrics
The operator-metrics rollout-safety contract now freezes
operator_metrics.tasks.oldest_dispatch_overdue_since (ISO-8601 or null) and
operator_metrics.tasks.max_dispatch_overdue_age_ms (integer milliseconds) as
the wake-latency age surface — the effective COALESCE(last_dispatched_at,
created_at) across dispatch-overdue tasks, which answers "how long has the
oldest ready-but-unclaimed task been waiting for a working dispatch wake?"
from the metric alone.
Render the pair on the Tasks section of `dw system:operator-metrics` as
"Oldest dispatch-overdue age: N ms" and "Oldest dispatch-overdue since: ISO",
sibling to the existing Oldest lease-expired and Oldest ready-due rows.
Pin both keys under `tasks` in schemas/output/operator-metrics.schema.json
for --json consumers so the contract is enforced regardless of the textual
renderer. Extends SystemCommandTest with schema and human-rendering
assertions pinned unconditionally, mirroring the existing stuck-lease and
ready-due age pins.1 parent d0bd05f commit 678e0d2
3 files changed
Lines changed: 29 additions & 0 deletions
File tree
- schemas/output
- src/Commands/SystemCommand
- tests/Commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
| |||
634 | 636 | | |
635 | 637 | | |
636 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
637 | 653 | | |
638 | 654 | | |
639 | 655 | | |
| |||
677 | 693 | | |
678 | 694 | | |
679 | 695 | | |
| 696 | + | |
| 697 | + | |
680 | 698 | | |
681 | 699 | | |
682 | 700 | | |
| |||
0 commit comments