Skip to main content

Module status_formatter

Module status_formatter 

Source
Expand description

Status formatter module for execution records

Provides formatting functions for execution status output in various formats:

  • Links Notation (links-notation): Structured link doublet format with nested options
  • JSON: Standard JSON output
  • Text: Human-readable text format

Structs§

StatusQueryResult
Query result from status lookup

Functions§

attach_current_time
Compute a currentTime value for a record if its status is executing. Returns None for completed records. Wrapping this in a helper makes it easy to attach the same timestamp to all output formats and to test the behavior deterministically.
enrich_detached_status
Enrich execution record with live session status for detached executions. If a record shows “executing” but the detached session has actually ended, returns an updated copy with status “executed”. If it shows “executed” but the session is still running, returns a copy with status “executing”.
format_record
Format execution record based on format type
format_record_as_links_notation
Format execution record as Links Notation (indented style) Uses nested Links notation for object values (like options) instead of JSON
format_record_as_links_notation_with_current_time
Same as format_record_as_links_notation but injects a currentTime field (right after startTime) when a value is supplied.
format_record_as_text
Format execution record as human-readable text
format_record_as_text_with_current_time
Same as format_record_as_text but adds a Current Time: line right after Start Time: when a value is supplied.
format_record_list
Format execution records based on format type.
format_record_list_as_links_notation
Format execution records as a Links Notation list.
format_record_list_as_text
Format execution records as human-readable text.
format_record_with_current_time
Same as format_record but the output includes currentTime when a value is supplied. Use this from query_status so all three formats stay in sync.
is_detached_session_alive
Check if a detached isolation session is still running Returns Some(true) if running, Some(false) if not, None if unable to determine
list_executions
Handle execution list query and return the result
query_status
Handle status query and return the result