Repository navigation
queen: actor_view.t27 reads the feed as actor_events.t27 writes it (kinds, reason classes, message numbers) #8668
Copy link
Copy link
Closed
Labels
Description
Follow-up to #8615 (merged as #8629). The feed's specs landed after it: specs/queen/actor_events.t27 and events.t27 section 6 (see #8642, #8652). The runtime is gHashTag/trios#1750 behind TRIOS_QUEEN_ACTOR_EVENTS, and the final shape is in the last comment on gHashTag/trios#1744.
What actor_view.t27 restates or reads differently today
- Event kinds. It defines its own VE_* codes. events.t27 now owns them as EV_ACTOR_* (spawn 0 .. deliver 4, plus delivers 5, a pair's count), on the stream ACTOR_STREAM.
- Reason classes. It defines its own RC_* and reason_class. actor_events.t27 owns both.
- NO_TASK. It defines NO_TASK (a u64 key), while actor_events.t27 defines NO_TASK (a u8 kind). If both were imported, the same name would shadow the card's own (see use (Zig backend): an importer's constant silently replaces a same-named constant the imported function reads #8342).
- Window aggregates. It reads them as a separate table numbered by bus seq. In the feed they are EV_ACTOR_DELIVERS rows on the stream, and first_seq, last_seq and msg_seq number messages (one counter per runtime), not bus rows.
- Deliver fields. A deliver carries depth (the mailbox right after it) and dropped. Exits and DOWNs name the task of the turn they cut.
- Supervisor intensity. Supervisors report max_restarts and period_seconds on spawn and restart. The view derived them from QK_ kinds.
Done when
- actor_view.t27 uses EV_ACTOR_, ACTOR_KINDS, RC_, REASON_CLASSES, reason_class and is_dropped instead of restating them.
- Its trace is in the feed's shape, and one test draws actor_events.t27's own REPLAY_* trace.
- The reference and t27b both pass with runtime asserts, and the seal is updated.
User Scenarios
- Given actor_view.t27 defines its own VE_* event kinds and RC_* reason classes, when the spec is updated to import EV_ACTOR_* and RC_* from actor_events.t27, then the view uses the feed's canonical codes without restating them.
- Given actor_view.t27 reads window aggregates from a separate bus-seq table, when it is aligned to the feed shape, then it reads EV_ACTOR_DELIVERS rows on ACTOR_STREAM with first_seq, last_seq, and msg_seq numbering messages per runtime.
- Given actor_view.t27 derives supervisor intensity from QK_ kinds, when it uses the feed's spawn/restart events, then it reads max_restarts and period_seconds directly from those events.
Requirements
- FR-001: actor_view.t27 MUST import and use EV_ACTOR_* kinds and ACTOR_KINDS from actor_events.t27 instead of defining VE_* codes.
- FR-002: actor_view.t27 MUST import and use RC_* reason classes, REASON_CLASSES, and reason_class from actor_events.t27 instead of defining its own.
- FR-003: actor_view.t27 MUST resolve NO_TASK name conflict by using actor_events.t27's u8 kind and not defining a u64 key with the same name.
- FR-004: actor_view.t27 MUST read window aggregates as EV_ACTOR_DELIVERS rows on ACTOR_STREAM with first_seq, last_seq, and msg_seq fields.
- FR-005: actor_view.t27 MUST use deliver fields depth and dropped, and for exits/DOWNs use the task of the turn they cut.
- FR-006: actor_view.t27 MUST read max_restarts and period_seconds from spawn and restart events instead of deriving from QK_ kinds.
- FR-007: actor_view.t27 MUST include a trace using actor_events.t27's REPLAY_* trace shape.
Success Criteria
t27c specs/queen/actor_view.t27compiles and exits 0t27c specs/queen/actor_events.t27compiles and exits 0- The reference implementation passes runtime asserts with
t27b specs/queen/actor_view.t27exit 0 - The seal is updated for actor_view.t27
Boundary
- specs/queen/actor_view.t27
- specs/queen/actor_events.t27
Reactions are currently unavailable
Activity
feat(queen): actor_view.t27 reads the feed as actor_events.t27 writes…