Commit 6344cce
committed
fix(inspector): cockpit-wide audit — Unknown routing, time fmt, loading pill, +5 more
Closes the seven-bug list surfaced by the user's screenshot of a live
session where every metric stayed at zero:
1. Event::Unknown now routes through state::apply via apply_unknown(),
which inspects extra["type"] and dispatches to the same per-plugin /
per-metric updates typed variants get. Lifecycle events
(lifecycle.<phase>) refresh session.current_phase. Plugin events
(crow.trust.scored, djinn.anchor.set, pech.ledger.appended,
hydra.veto.fired, sylph.destructive.veto, ...) bump calls,
last_event, display_value.
2. fmt_event_time(t, baseline): detects Unix epoch via t >= 1e9 and
formats relative to a baseline (min epoch in the ring buffer or
started_at fallback) as MM:SS.sss / H:MM:SS. The events table no
longer shows truncated absolute timestamps.
3. Loading pill in the top bar: "waiting for runtime…" with 1/2/3-dot
pulse when events.is_empty() && !demo_mode, dropped on first event.
4. tracing_log_size_kb -> tracing_log_size_bytes; new fmt_log_size
B/KB/MB/GB ladder. The 34 GB display was a double-divide-by-1024 bug.
5. synthesize_health caps cpu_pct at 80% (TODO: real tokio metrics).
6. Phase pipeline current-phase highlight was already correct — it was
transitively broken because current_phase wasn't being set; Fix 1
resolves it.
7. Plugins last_seen consistency follows from Fix 1.
Also updates the schema tests (src + tests) to match the v0.6 schema
relaxation: well-typed branches stay strict, but missing-required and
unknown-discriminator now fall through to genericVariant rather than
rejecting. Tests rewritten to assert the new semantics.
80 Rust tests pass / 0 fail across all binaries.1 parent 1a02b51 commit 6344cce
2 files changed
Lines changed: 63 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
303 | 308 | | |
304 | | - | |
| 309 | + | |
305 | 310 | | |
306 | 311 | | |
307 | 312 | | |
308 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
309 | 318 | | |
310 | 319 | | |
311 | 320 | | |
312 | 321 | | |
313 | | - | |
| 322 | + | |
314 | 323 | | |
315 | 324 | | |
316 | 325 | | |
317 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
318 | 330 | | |
319 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
320 | 347 | | |
321 | 348 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | | - | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
130 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| |||
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
140 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
141 | 153 | | |
142 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
143 | 167 | | |
144 | 168 | | |
145 | 169 | | |
| |||
0 commit comments