Data model

WorkPackageTransition (port input, frozen dataclass)

FieldTypeMeaning
write_locationPaththe resolved Mission directory the unit lands in (ADR 2026-10-22-1 D-3)
rowstuple[TransitionRow, ...]one durability unit: the transition, then its annotation(s); never empty
write_contract`object \None`

Invariant: the unit lands whole or not at all; rows keep their order.

TransitionRow (Protocol)

event_id: str, to_dict() -> dict[str, Any]. StatusEvent and InnerStateChanged satisfy it.

Ledger append unit (kernel)

One or more str lines, each without \n. They are joined with \n plus a final \n and encoded as UTF-8: one os.write, then fsync.

Refusals (all subclass OSError):

  • EventLogTornTailError (EVENT_LOG_TORN_TAIL)
  • EventLogLockTimeoutError (EVENT_LOG_LOCK_TIMEOUT)
  • EventLogLockUnavailableError (EVENT_LOG_LOCK_UNAVAILABLE)
  • EventLogSymlinkError (EVENT_LOG_SYMLINK)
  • EventLogShortWriteError (EVENT_LOG_SHORT_WRITE)

A precondition error is the caller's own exception type, raised before any byte is written.