Expand description
One outcome per ambient call, logged and counted.
The module used to be silent: its failure paths logged at debug, so a rejected,
empty or failed title left no trace, and diagnosing the (none yet) swarm row
took a database copy (docs/specs/SPEC_AMBIENT_SWARM_SUMMARY_HARDENING_2026_10_02.md
section 2.1 defect 6, section 5.8). Every call now ends in exactly one
Outcome, written as one structured info line and counted per purpose, and
the counts are readable over the ambient.outcomes RPC (the Instance panel).
The rejected text is logged, truncated, because rejected values are the corpus
the title predicate is tuned with.
Structsยง
- Timing
- How long a call waited and ran, for the outcome line. Both in milliseconds.
Enumsยง
- Outcome
- How an ambient call ended.
- Reject
Reason
Constantsยง
- LOGGED_
TEXT_ ๐MAX_ CHARS - Longest text logged with a rejected or kept outcome.
Functionsยง
- classify_
error - Classify a failed CLI call.
cancelledis whether the gateway cancelled it because a newer request superseded it. - counts ๐
- record
- Record one outcome without timings: count it, and log it at info with the
purpose and entity. See
record_timed. - record_
timed - Record one outcome: count it, and log it at info with the purpose, the entity
and, when the call ran, how long it queued and ran.
textis logged (truncated) for a rejected reply, which is the corpus the validators are tuned with, and for an accepted one, which is what the user is shown: without it, a bad answer that passed could not be found afterwards. - snapshot
- Every count since this srv started, by purpose then outcome label.
- truncated ๐
Type Aliasesยง
- Counts ๐