Skip to main content

Module identity_spawn

Module identity_spawn 

Source
Expand description

Which spawned agent processes carry an identity token — identity M4a (docs/specs/SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md §6.5.6).

Two measurements, because request-side counters cannot gate anything: an unattributed request from the UI and one from a tokenless agent look the same (§6.5.1).

  • spawn.no_token.<path> counts process spawns, per controller, of an agent that has a row (a UID) but got no AGENTMUX_AGENT_TOKEN — the gap M4b closes, gated on these reaching zero. “Has a row” is decided by the store, not by the environment: the gap paths (agent.send, App Server) are exactly the ones whose environment carries no AGENTMUX_AGENT_UID although their block has a row (adversarial review of #3571). spawn.no_row.<path> counts spawns with no row at all (quick-launch panes, template-based continuations before M4b binds them), kept apart so the gate can be met. Recorded where a process is actually started, never where an environment is merely built: a turn delivered to a running process rebuilds the environment without spawning anything (review on #3571).
  • live.tokenless_or_unknown counts live registered agents (with a row, so they should carry a token) whose process is not known to carry one — including a process spawned before this srv started, which never passes a spawn site again. M4d and M5 wait for this to drain to zero, not for a counter that merely stops moving.

Functions§

attach_row_store
live_gauges
The two live gauges over registrations: (tokenless_or_unknown, unidentified). An agent with a row whose process is not known to carry a token counts toward the first; an agent with no row (a quick-launch pane — outside the identity system, §6.5.6) toward the second. A registration without a UID is not taken as row-less on its word: a block driven only through agent.send registers without one although it has a row, so has_row asks the store. is_live filters out registrations whose block no longer runs anything here, so a stale registration cannot hold the gauge up.
row_store
The object store attach_row_store attached; None before boot does.
store_block_has_row
[block_has_row] against a given store. A store fault answers “has a row” (counted): a gate must never read clear because a read failed.