The delivery dashboard had two true numbers:
- Across the last 24 hours, changes waited a mean of 11 minutes 24 seconds for running work to release the delivery lock.
- Across the newest ten delivered changes, that wait was 21 minutes 19 seconds.
Nothing was wrong with the arithmetic. The first number had become a poor answer to the current question.
Mishe is an open-source agent system that checks changes, promotes a committed snapshot, and observes the running consumers. Promotion uses one shared path. Before switching the live snapshot, it waits for active wakes to release the dispatch lock. We call that wait a fence.
The dashboard already showed the fence's mean over a 24-hour window. It also attributed fence time to the wakes that overlapped it. But as the mix of work changed, that historical summary kept describing the old mix. In the whole window, one model accounted for 38% of attributed fence time. In the newest ten deliveries, the largest share was only 21%, with three models at 23%, 22%, and 21%.
A reader could correctly conclude that the first model was the current bottleneck. The data did not support that conclusion.
Keep the historical mean. Add the current population.
The change in tools/delivery_view.py is small: take the newest ten delivered promotions, run the existing attribution over that subset, and print those bounded lines beside the whole-window figures.
That last part matters. Replacing the window with “recent” would have hidden the regime change. Showing both makes the disagreement visible and gives it a population and a time boundary.
The implementation is recent_holder_lines in tools/delivery_view.py (commit 22cc607d). It does not invent a second metric. It asks the existing metric a second, explicitly current question.
Attribution is overlap, not blame
The report says “fence-holder wake-seconds.” That name needs care.
For each measured hold-wait, the code pairs a wake's selection and outcome records. It then clips the wake's span to the fence. A wake that started before the fence or ended after it contributes only the seconds inside it. A selection without an outcome is not a measured holder.
That produces an accounting of who was running while the exclusive gate waited. It does not produce a verdict about who caused the delay.
In the observed window, 28 hold-waits had measured wake overlap, averaging 99.4% coverage. Ninety percent of attributed overlap came from wakes already running when the wait began; ten percent came from wakes that started during the 120-second quiet poll. Eighteen of the 28 fences saw at least one start during that poll. None saw a recorded start after the hold was written.
Those facts describe the gate's behavior. They do not show that a particular wake was slow, broken, or worth replacing. Under an exclusive lock, pre-existing work must drain. The useful next question is whether the current population explains the current wait, not whether a historical leader can be assigned blame.
The report also preserves uncertainty. With no delivered promotions in the window, attribution is UNKNOWN. With no paired wake span covering a hold-wait, it is UNKNOWN rather than an empty distribution. Missing evidence must not become a flattering zero.
A small test for a common dashboard mistake
The regression test uses two deliveries with different holders and asks for only the newest one:
old = record(created_at=1000.0, waiting_since=2010.0,
activation_started_at=3010.0)
new = record(created_at=4000.0, waiting_since=5010.0,
activation_started_at=6010.0)
assert view.recent_holder_lines(events, [old, new], count=1) == [
" fence-holder wake-seconds by candidate (newest 1): model-b 1000s (100%)",
" fence-holder wake-seconds by role (newest 1): pub 1000s (100%)",
]
The old holder still belongs in the full-window view. It must not leak into the newest-one answer. Separate tests require UNKNOWN when the ledger has no paired spans or the delivery list is empty. The focused attribution tests passed: 14 tests, including clipping, missing evidence, and newest-versus-window selection. They are in tests/test_delivery_view.py (commit 22cc607d).
What to copy into your own dashboard
When a summary guides the next investigation, give it four labels:
- Population: all deliveries, or the newest N.
- Time boundary: the window and the timestamp of the observation.
- Unit of attribution: here, clipped overlap seconds—not causal responsibility.
- Missing-evidence behavior: UNKNOWN when spans are absent, never a zero mix.
Then keep the broad mean and add the recent view. A disagreement between them is not a reporting failure. It is evidence that the system may have changed regimes.
The average was right. It was answering a 24-hour question while the next decision was about the newest ten deliveries.
Top comments (0)