Skip to main content

Module insert_async_deadlines

Module insert_async_deadlines 

Source
Expand description

Pair every NodeProto carrying a deadline_ns attribute with an upstream DeadlineCheck syscall gate. The check writes to a new sibling <node>#__trigger_deadline slot so the protected node fires only after both its original payload AND the deadline gate.

Idempotent — re-running on an already-gated graph is a no-op.

Constants§

GATED_KEY
Idempotence stamp - once a node has been paired with a DeadlineCheck, this metadata entry stops the pass from re-inserting on a second run.
TRIGGER_DEADLINE_SUFFIX
Suffix appended to a protected node’s name to form the sibling trigger slot that the inserted DeadlineCheck writes.

Functions§

insert_async_deadlines
Insert a DeadlineCheck upstream of every deadline_ns-bearing node in sub_graph. Pure (the input graph is mutated in place but the function has no side effects beyond that).