engate-types 0.1.1

Typed phase markers, snapshot trait, and error types for engate (producer↔consumer attach primitive)
Documentation
  • Coverage
  • 91.3%
    21 out of 23 items documented0 out of 11 items with examples
  • Size
  • Source code size: 17.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 664.09 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • pleme-io/engate
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • drzln

engate-types — typed phase markers + traits for the engate attach primitive. The actual attach machinery lives in engate-attach; this crate is the small dependency-free contract so consumers can depend on shapes without pulling in statig / typed-builder.

Why

The bug class engate kills: a producer (PTY, WS, MQ, network) emits data BEFORE a consumer subscribes; subscribe returns only NEW data; the consumer's local model stays empty even though the producer's state is full. Today's hand-wired attach paths in the pleme-io fleet (mado↔tear, kenshi↔testpod, hiroba clients, ayatsuri↔mado, namimado↔CDP) all suffer this class.

The fix: model attach as a 4-state typestate (Spawned → Subscribed → Synced → Live) where the consumer can only render from a Live value, Live can only be reached via Synced.start_live(), Synced can only be reached via Subscribed.replay(history), and history is a #[must_use] linear-ish handle that cannot be dropped without being consumed. Reaching the render path WITHOUT history is unrepresentable in the type system.

See pleme-io/CLAUDE.md task tracker (#123-#129) for the full M0-M6 roadmap.