Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
"""ContactChanged event contract: frozen, defaults, action vocabulary parity."""
from __future__ import annotations
import dataclasses
import pytest
from dodaios.contacts.notify import CONTACT_CHANGE_ACTIONS
from dodaios.core.events import ContactChanged, Event
def test_contact_changed_is_frozen_event_with_trace():
evt = ContactChanged(action="created", slug="chris", name="Chris")
assert isinstance(evt, Event)
assert evt.trace_id is not None
assert evt.timestamp_ns > 0
with pytest.raises(dataclasses.FrozenInstanceError):
evt.slug = "other" # type: ignore[misc]
def test_contact_changed_action_vocabulary_documented():
# The docstring names the owning vocabulary so the two sites cannot drift
# silently — and the canonical actions construct cleanly.
for action in CONTACT_CHANGE_ACTIONS:
assert ContactChanged(action=action, slug="s", name="N").action == action