Files
buryan-infra/docs/architecture/EVENT-OWNERSHIP.md
T
architect d6ee44f0e7
lint / hygiene (pull_request) Failing after 1m27s
standard / check (pull_request) Successful in 9s
lint / hygiene (push) Failing after 20s
standard / check (push) Successful in 10s
[STAGE2] Gate G2 proof: 100 duplicates→1 effect, loss recovered
2026-11-27 11:13:22 +03:00

1.7 KiB

Event Ownership Matrix — Stage 2

Правило: у каждого типа события есть один owner, один producer и явные consumers. Событие без owner не публикуется в production.

event_type owner producer consumers retention PII
media.request.created Roman / Media Seerr adapter notification bot, Audit 90d no
media.request.approved Roman / Media Seerr adapter notification bot 90d no
media.playback.started Roman / Media Jellyfin adapter Audit, analytics 30d user id
media.work.added Roman / Media Jellyfin adapter Buryans One, search 365d no
media.work.updated Roman / Media Jellyfin adapter Buryans One 365d no
audit.finding.opened Roman / Audit Audit 360 Nexus 365d no
audit.finding.closed Roman / Audit Audit 360 Nexus 365d no
identity.user.created Roman / SSO Authentik adapter Audit, Buryans One 365d email
identity.user.disabled Roman / SSO Authentik adapter Audit, access 365d email
home.state.changed Roman / Home Home Assistant adapter Buryans One 30d no
agent.task.requested Roman / Agents bot adapter runner 30d no
system.service.down Roman / SRE monitor adapter notification bot 90d no
system.service.up Roman / SRE monitor adapter notification bot 90d no

Adapter contract

Adapter:

  1. validates the CloudEvents envelope;
  2. supplies a stable idempotency_key;
  3. writes to events.outbox in the same transaction as its local change;
  4. never publishes directly to NATS;
  5. declares one event type from this matrix.

Relay owns JetStream publish. Consumer owns inbox/effect idempotency.