Commit bdbd08d
committed
fix(callcenter): stamp audit events with chain's configured super_domain
Per chatgpt-codex-connector review on PR #364: emit_audit was calling
super_domain_for_family(owl.family()) to look up the super-domain via
FAMILY_TO_SUPER_DOMAIN — a private all-Unknown static with no mutation
API in the current repo. Every event was therefore stamped Unknown
even when the caller wired .with_audit_chain(SuperDomain::Healthcare, …),
silently breaking compliance partitioning on the audit stream.
AuditChain already carries the configured super_domain (the same field
fed into the merkle salt), so the chain itself is the single source of
truth. Stamp the event from chain.super_domain instead of the static
lookup, holding the chain lock across the read+advance so the event
and the chain commit agree by construction.
The FAMILY_TO_SUPER_DOMAIN reverse-lookup table stays in place — it
lands hydrated in sprint 5 (D-SDR-3b family-hydration worker) once a
loader from the registry exists. Until then, the chain's configured
domain is the authoritative stamp.
Test updated to assert SuperDomain::WorkOrderBilling (the chain's
configured value) instead of the placeholder Unknown.
96/96 callcenter lib tests pass.
Refs: PR #364 review threads (P2 priority).1 parent b12e357 commit bdbd08d
1 file changed
Lines changed: 20 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
387 | 398 | | |
388 | 399 | | |
389 | 400 | | |
390 | | - | |
| 401 | + | |
391 | 402 | | |
392 | 403 | | |
393 | 404 | | |
394 | 405 | | |
395 | 406 | | |
396 | 407 | | |
397 | 408 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
| 409 | + | |
| 410 | + | |
405 | 411 | | |
406 | 412 | | |
407 | 413 | | |
| |||
661 | 667 | | |
662 | 668 | | |
663 | 669 | | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
668 | 674 | | |
669 | 675 | | |
670 | 676 | | |
| |||
0 commit comments