Skip to main content

Module jekt_held

Module jekt_held 

Source
Expand description

Replay of jekts held for an absent agent — SPEC_DURABLE_JEKT_DELIVERY_2026_09_24.md §2.3. The hold itself is in reactive::deliver; this delivers what was held once the agent is back.

Enums§

GateCheck 🔒
What the replay should do about a target’s sign-in, given when its gate was last checked (None: never refused).
ReplayOutcome 🔒
How one replay attempt ended.

Constants§

GATE_RECHECK_EVERY 🔒
How often a target the spawn gate refused is re-checked for sign-in.
MAX_ATTEMPTS 🔒
Failed deliveries to a present target before a held message is dropped.
REPLAY_PER_PASS 🔒
Deliveries per pass, so a backlog cannot monopolise the handler (and the first-contact spawn it may trigger) in one go.
SWEEP_EVERY 🔒

Functions§

gate_check_due 🔒
install 🔒
Replay held jekts: once now, then whenever an agent registers and every 30 s. Installed after AppState exists.
is_spawn_gate_refusal 🔒
Whether a delivery error is the identity/credential spawn gate refusing to start the target (run_agent_turn’s “identity spawn gate: …”). That is recoverable — the receiver signs in — so the message is held, not dropped (SPEC_JEKT_DELIVERY_STATES_AND_MAILBOX_2026_10_01.md Phase 0 item 4, G4).
mark_needs_login 🔒
Mark uid as refused by the spawn gate, checked just now.
needs_login 🔒
Targets the spawn gate refused, with when the gate was last checked.
replay_one 🔒
replay_pass 🔒
One pass: drop expired rows, then deliver to every target that is now registered, oldest first, at most REPLAY_PER_PASS. A target that is still absent costs a map lookup — no rate-limit token, no audit entry.
request_from_held 🔒
The request a held row is delivered as: addressed by the target’s UID, with the verdicts it was accepted with — never re-verified (a signature is valid for five minutes) and never raised — and its original send time.
still_needs_login 🔒
Whether uid is still waiting for sign-in. Runs the spawn gate quietly (no pane frame, no failure event) when a recheck is due.