fix: require a user on every event's metadata

Merged
HA
16d ago
+17-17

EventMetadata.user_id defaulted to a random UUID, so an event built without a user carried an id that matches nobody. This makes the field required. Carried over from #113.

Every call site in app/ already passes a user. The two that fell back to a random id were dead paths: the saga's compensation event reads the user its context stores at saga start, and the pod monitor now uses an empty id for a pod without the user-id label, which the pod builder always sets.

The OpenAPI schema lists user_id as required now, and the client is regenerated. Tested locally: ruff, mypy strict, grimp, 493 backend unit and contract tests, svelte-check and 1138 frontend tests.


Summary by cubic

Makes user_id a required field on EventMetadata so every event carries a real user identifier instead of a random UUID that matches nobody.

  • The saga compensation event reads the user its context stores at saga start, since every trigger event carries one.
  • The pod monitor now uses an empty id when a pod lacks the user-id label, which the pod builder always sets.
  • Updates the OpenAPI schema and regenerated frontend client to mark user_id as required.