Commit 0a24638
committed
fix(observability): cockpit was silent — schema rejected real events
User report: "uptime ticks but nothing happens, doesn't even listen
to the MCP server." Two compounding bugs:
1. **Permissive schema for unknown types.** docs/event-schema.json's
genericVariant pinned `type` to a 28-element enum drawn from the
Rust event.rs allowlist. The actual orchestrator + plugins emit
names that AREN'T in that list — `lifecycle.anchor`,
`mcp.tool.call.requested`, `crow.trust.scored`, `pech.ledger.appended`,
`hydra.veto.fired`, etc. Schema validator dropped every line
silently. Fix: type is `{ type: "string" }` with no enum constraint;
well-typed variants in oneOf still strict.
2. **Rust parse_line falls back on unknown discriminator.** event.rs
was a strict serde-tagged enum — any `type` value not in the
variant list returned a parse error. Added Event::Unknown(GenericPayload)
marked #[serde(skip)] so serde never tries to dispatch it directly,
and parse_line tries the strict variant first, falls through to
GenericPayload-wrapped Unknown on failure. The cockpit now surfaces
every event in the events table, regardless of whether we have a
typed variant for it.
Verified: 7728 bytes of real events flow through stdout from a 30s
live.ts run, where before it was 0 bytes.1 parent a400e2e commit 0a24638
3 files changed
Lines changed: 38 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 32 | + | |
67 | 33 | | |
68 | 34 | | |
69 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
270 | 279 | | |
271 | 280 | | |
272 | 281 | | |
| |||
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
| 293 | + | |
| 294 | + | |
284 | 295 | | |
285 | 296 | | |
286 | 297 | | |
| |||
354 | 365 | | |
355 | 366 | | |
356 | 367 | | |
| 368 | + | |
357 | 369 | | |
358 | 370 | | |
359 | 371 | | |
| |||
400 | 412 | | |
401 | 413 | | |
402 | 414 | | |
| 415 | + | |
| 416 | + | |
403 | 417 | | |
404 | 418 | | |
405 | 419 | | |
| |||
446 | 460 | | |
447 | 461 | | |
448 | 462 | | |
| 463 | + | |
| 464 | + | |
449 | 465 | | |
450 | 466 | | |
451 | 467 | | |
| |||
492 | 508 | | |
493 | 509 | | |
494 | 510 | | |
| 511 | + | |
| 512 | + | |
495 | 513 | | |
496 | 514 | | |
497 | 515 | | |
| |||
537 | 555 | | |
538 | 556 | | |
539 | 557 | | |
| 558 | + | |
| 559 | + | |
540 | 560 | | |
541 | 561 | | |
542 | 562 | | |
543 | 563 | | |
544 | 564 | | |
545 | 565 | | |
546 | 566 | | |
547 | | - | |
548 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
549 | 581 | | |
550 | 582 | | |
551 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
| 932 | + | |
| 933 | + | |
932 | 934 | | |
933 | 935 | | |
934 | 936 | | |
| |||
0 commit comments