Skip to navigation

Experimental. For evaluation. Interfaces, configuration, and behavior may change incompatibly.

Unavailable for public use because its required test runners have not yet been open sourced, though that may change in the future.

Prerequisites

  • Populated noderegistry and a configured topology provider.
  • Operator-supplied validator workflows, diagnostic assets and target-node access.

Setup

  • No complete public screening setup is supplied.
  • Existing installations: enable [modules.screentest] and register validators using the operator guide.

This module must be enabled in your Remediation Orchestrator config before it is available to scripts.

The screentest module provides multi-rack screen testing orchestration capabilities

Members

E2E_TOUCHLESS_PIPELINE_TAG

screentest.E2E_TOUCHLESS_PIPELINE_TAGstring

Tag that marks an e2e touchless pipeline run

EVENT_CANCELED

screentest.EVENT_CANCELEDstring

Canceled event type

EVENT_FAILED

screentest.EVENT_FAILEDstring

Failed event type

EVENT_PASSED

screentest.EVENT_PASSEDstring

Passed event type

EVENT_RUNNING

screentest.EVENT_RUNNINGstring

Running event type

EVENT_SKIPPED

screentest.EVENT_SKIPPEDstring

Skipped event type

EVENT_UNKNOWN

screentest.EVENT_UNKNOWNstring

Unknown event type

NODE_HEALTH_FAILED

screentest.NODE_HEALTH_FAILEDstring

Node failed health status

NODE_HEALTH_PASSED

screentest.NODE_HEALTH_PASSEDstring

Node passed health status

NODE_HEALTH_RESET

screentest.NODE_HEALTH_RESETstring

Node reset health status

NODE_LOCK_MODE_ALL_OR_NOTHING

screentest.NODE_LOCK_MODE_ALL_OR_NOTHINGstring

node_lock_mode: acquire locks on all candidate nodes, fail if any is already locked (default)

NODE_LOCK_MODE_BEST_EFFORT

screentest.NODE_LOCK_MODE_BEST_EFFORTstring

node_lock_mode: acquire locks on free nodes, drop already-locked nodes, proceed with the subset

NODE_LOCK_MODE_NONE

screentest.NODE_LOCK_MODE_NONEstring

node_lock_mode: skip locking entirely; all candidate nodes proceed (relies on Slurm for exclusivity)

append_e2e_eligible_nodes_filter

screentest.append_e2e_eligible_nodes_filter(node_id_filter, reason?, pipeline_entrypoint_name?)

Append to the E2E touchless pipeline eligible-node filter.

Parameters
node_id_filterstringNon-empty Slurm node-list filter to append, e.g. node[001-018].
reason?optionalstringOptional reason for the append.
pipeline_entrypoint_name?optionalstringPipeline entrypoint to target. Omit for prod E2E.
Returns
resultscreentest.AppendPipelineEligibleNodesFilterResultAppend result with previous/current filters, warnings, created_by, created_at, and reason.

apply_node_transition

screentest.apply_node_transition(transition_args, state_args)

Record a pipeline node transition and update its state projection in one transaction. The datacenter_node_id is resolved from Node Registry using the hostname on the transition_args before the activity is dispatched.

Parameters
transition_argsscreentest.NodeTransitionArgsTyped value from screentest.pipeline_node_transition_args(…).
state_argsscreentest.NodeStateArgsTyped value from screentest.pipeline_node_state_args(…).

batch_apply_node_transition

screentest.batch_apply_node_transition(transition_args, state_args, hostnames, domain_names?)

Record one pipeline node transition and state projection across a cohort of nodes in one activity, one transaction per node. The transition and state are given once and stamped on every hostname; hostnames are resolved to datacenter node IDs inside the activity. Errors when the batch is malformed (missing or duplicate hostname, domain_names length mismatch); nothing is written. Hostnames with no registry row are returned as skipped and hostnames whose write failed are returned as failed; every other node is still written.

Parameters
transition_argsscreentest.NodeTransitionArgsTyped value from screentest.pipeline_node_transition_args(…), applied to every node; its hostname/domain fields are ignored.
state_argsscreentest.NodeStateArgsTyped value from screentest.pipeline_node_state_args(…), applied to every node; its hostname/domain fields are ignored.
hostnameslist[string]Node hostnames to record the transition for; a node may appear only once.
domain_names?optionallist[string]Optional domain labels positionally matching hostnames; empty list stamps no domain.
Returns
skipped_hostnameslist[string]Hostnames with no datacenter_node_id in the registry. These were not written; every other node was.
failed_hostnameslist[string]Hostnames whose write failed. These were not written; every other node was.

create_e2e_domain_threshold_override

screentest.create_e2e_domain_threshold_override(domain_name, phases, min_nodes, override_reason?, pipeline_entrypoint_name?)

Create E2E touchless domain-threshold overrides.

Parameters
domain_namestringTopology group name to override, e.g. gpu-rack-b086 — the phase’s grouping unit (domain for every phase registered today).
phaseslist[string]List of phases this threshold override applies to, e.g. [“MNST”, “MRST”].
min_nodesintApproved minimum viable node count for the listed phases.
override_reason?optionalstringOptional audit note explaining why the reduced threshold is approved.
pipeline_entrypoint_name?optionalstringPipeline entrypoint to target. Omit for prod e2e.
Returns
resultscreentest.CreateDomainThresholdOverrideResultCreated override rows.

create_orchestration_event

screentest.create_orchestration_event(test_kind, tags?)

Creates a new screentest orchestration and returns its ID

Parameters
test_kindstringThe test kind (e.g., ‘single_node’, ‘multi_node’, ‘multi_domain’)
tags?optionaldict[string:string]Additional tags to record with the event
Returns
orchestration_idintThe generated orchestration ID

create_phase_event

screentest.create_phase_event(orchestration_id, phase_number, test_kind, tags?)

Creates a new phase within an orchestration and returns its phase number

Parameters
orchestration_idintThe orchestration ID
phase_numberintThe phase number (must be positive)
test_kindstringThe test kind (e.g., ‘single_node’, ‘multi_node’, ‘multi_domain’)
tags?optionaldict[string:string]Additional tags to record with the event
Returns
phase_numberintThe phase number that was recorded

fixed_phase_config

screentest.fixed_phase_config(name?, phase_type?, phase_settings?)

Create a FixedPhaseConfig for a fixed phase in screen testing

Parameters
name?optionalstringThe name of the phase
phase_type?optionalstringThe type of the phase
phase_settings?optionaldict[string:any]The settings of the phase
Returns
configscreentest.FixedPhaseConfigThe FixedPhaseConfig instance

get_active_e2e_domain_threshold_overrides

screentest.get_active_e2e_domain_threshold_overrides(pipeline_entrypoint_name?)

Read active E2E touchless domain-threshold overrides.

Parameters
pipeline_entrypoint_name?optionalstringPipeline entrypoint to target. Omit for prod E2E.
Returns
resultscreentest.GetActiveDomainThresholdOverridesResultCurrently active override rows.

get_classified_failures

screentest.get_classified_failures(summary_id)

Get every classified failure on the summary — regex_matched / agent_classified / agent_errored / agent_capped / unclassifiable. Excludes regex_unmatched (pending-with-row), agent_running (in-flight), and budget_exhausted (skipped, no category). Consumed by the run-level analysis flow for run-wide context.

Parameters
summary_idintThe screentest_run_summaries.id to read.
Returns
resultdict[string:any]Dict with ‘failures’ list. Each item: failure_id, hostname, test_name, error_message_excerpt, category (the label the run-level rules act on: the operator’s when someone has corrected this failure, the classifier’s otherwise, upper-cased so the two compare), classification_category (the classifier’s own category in canonical upper-case, or empty), operator_category (the operator’s own category when someone has already corrected this failure, else empty, upper-case), evidence_basis (how that category was reached: ‘error_pattern’, ‘test_name_only’, ‘agent’, or ‘operator’), classifier_source (string or empty), confidence (float or empty string when NULL), classification_state.

get_e2e_dynamic_threshold_tags

screentest.get_e2e_dynamic_threshold_tags()

Read the E2E touchless per-config dynamic-threshold hw/sw tags for this cluster (tenant-scoped). Empty hw/sw means unset.

Returns
resultscreentest.E2eDynamicThresholdTagsResultStored hw, sw, reason; empty hw/sw when unset.

get_e2e_eligible_nodes_filter

screentest.get_e2e_eligible_nodes_filter(pipeline_entrypoint_name?)

Read the active eligible-node filter for the E2E touchless pipeline.

Parameters
pipeline_entrypoint_name?optionalstringPipeline entrypoint to target. Omit for prod E2E.
Returns
resultscreentest.PipelineEligibleNodesFilterResultPersisted eligible-node filter with node_id_filter. Empty node_id_filter means no persisted row.

get_failure_details

screentest.get_failure_details(failure_id)

Get diagnostic details for a single screentest failure by id. Consumed by the per-failure classification flow for per-row context.

Parameters
failure_idintThe screentest_test_failures.id to look up.
Returns
detailsdict[string:any]Dict with error_message, test_name, test_step, hostname, summary_id, created_at. is_err()/unwrap() pattern.

get_failure_message

screentest.get_failure_message(run_id, datacenter_node_id?)

Get the best available failure message for a screen test run

Parameters
run_idstringThe orchestration run ID returned by start_screen_test
datacenter_node_id?optionalstringOptional datacenter node ID filter
Returns
resultscreentest.GetFailureMessageResultFailure details keyed by datacenter node ID plus run-level summary

get_node_failure_history

screentest.get_node_failure_history(hostname, lookback_days)

Get the node’s breakfix counts + recent screentest failures within a caller-supplied lookback window. Consumed by the per-failure classification flow for node-level priors.

Parameters
hostnamestringThe node hostname to look up. Caveat: hostnames can be reused across hardware.
lookback_daysintWindow size in days. Must be > 0. Activity rejects non-positive values.
Returns
historydict[string:any]Dict with breakfix_count, last_breakfix_at (empty string when no breakfix events), recent_failures (list).

get_node_failure_history_by_summary

screentest.get_node_failure_history_by_summary(summary_id)

Get the per-host breakfix + recent-failure history bundle fanned across every hostname participating in the summary’s run. Summary-scoped, with a 30-day lookback; callers needing another window use the per-hostname get_node_failure_history, which also returns every failure in the window rather than the newest few per host. Caveat: hostnames can be reused across hardware, so a bundle can mix two machines that held the same name.

Parameters
summary_idintThe screentest_run_summaries.id to read.
Returns
resultdict[string:any]Dict with ‘nodes’ list. Each item: hostname, breakfix_count, last_breakfix_at (empty string when no events), recent_failures (the newest few for that host, as {failure_id, test_name, error_message_excerpt, created_at, classification_state}), recent_failure_count (how many the window holds, which is larger than recent_failures where the host was clipped).

get_node_lock_status

screentest.get_node_lock_status(nodes)

Gets the lock status for a list of nodes

Parameters
nodeslist[string]The hostnames of the nodes to fetch lock status for
Returns
node_lock_statusesdict[string:screentest.ScreenTestNodeLockStatus]A map of node hostnames to screentest.ScreenTestNodeLockStatus objects

get_or_create_pipeline_run

screentest.get_or_create_pipeline_run(pipeline_script_name, pipeline_entrypoint_name)

Get or create a pipeline run entry in the database

Parameters
pipeline_script_namestringThe name of the script containing the pipeline workflow.
pipeline_entrypoint_namestringThe entrypoint name of the pipeline workflow.
Returns
pipeline_run_idintThe pipeline run ID.

get_screen_test_process_status

screentest.get_screen_test_process_status(hostnames, wait_for_noderegistry_update?)

Get the screen test process status for the given hostnames

Parameters
hostnameslist[string]The hostnames to get the process status for
wait_for_noderegistry_update?optionalboolIf true, wait for the node registry to be updated before looking up nodes.
Returns
statuseslist[screentest.GetScreenTestProcessStatusEntry]A list of screentest.GetScreenTestProcessStatusEntry objects

get_similar_past_failures

screentest.get_similar_past_failures(test_name)

Get operator-corrected classifications for the same test_name in the last 90 days, ordered by corrected_at DESC. Consumed by the per-failure classification flow for few-shot examples.

Parameters
test_namestringThe test_name to search for prior corrections.
Returns
resultdict[string:any]Dict with ‘failures’ list. Each item: failure_id, error_message_excerpt, operator_category, corrected_at.

get_status

screentest.get_status(script_name, workflow_name, nodes, tags?, lookback?, apply_resets?, pipeline_script_name?, pipeline_entrypoint_name?, verdict_event_types?, phase_name?)

Get the screen test status for the specified nodes

Parameters
script_namestringThe name of the script containing the workflows
workflow_namestringThe name of the validation workflow
nodeslist[string]The hostnames of the nodes to get the status for
tags?optionallist[string]An optional list of tags that must have been set on the underlying screen test run. If provided, only those screen test runs that have at least one tag will be returned.
lookback?optionalstringOptional time-based filter as a Go duration string (e.g. “72h”, “30m”): ignore screentest events older than now minus this duration. Empty string disables the filter and considers all matching events.
apply_resets?optionalboolIf true, per-node reset timestamps recorded via pipeline_reset_domain are applied: events before the most recent reset for a node are excluded. Requires pipeline_script_name and pipeline_entrypoint_name.
pipeline_script_name?optionalstringThe name of the script containing the pipeline workflow that resets are scoped to. Required when apply_resets=True.
pipeline_entrypoint_name?optionalstringThe entrypoint name of the pipeline workflow that resets are scoped to. Required when apply_resets=True.
verdict_event_types?optionallist[string]Optional list of event types (PASSED, FAILED, RUNNING, UNKNOWN, SKIPPED, CANCELED) considered a verdict. When set, populates verdict_event_type/verdict_occurred_at on the returned status with the latest event of one of these types, computed alongside the raw event_type/occurred_at fields in the same read. Ignored on the legacy replay branches.
phase_name?optionalstringOptional exact recorded phase name. Dispatch pipeline runs use the spec suite name. Empty string leaves phase selection unrestricted.
Returns
statusesdict[string:screentest.ScreenTestStatus]The latest screen test status for each node

get_status_by_run_id

screentest.get_status_by_run_id(run_id)

Get the screen test status for each node in a specific screen test orchestration run

Parameters
run_idstringThe orchestration run ID returned by start_screen_test
Returns
statusesdict[string:screentest.ScreenTestStatus]The map of status details by hostname for this run

get_topology_context

screentest.get_topology_context(summary_id)

Get the domain-level grouping of failed hostnames for the summary’s run. Topology is a soft hint — when the tenant has no rack_naming_pattern configured, returns empty domains rather than erroring. Consumed by the run-level analysis flow for cluster-failure-pattern PROMPT enrichment.

Parameters
summary_idintThe screentest_run_summaries.id to read.
Returns
resultdict[string:any]Dict with ‘domains’ list (each item: domain_id, failed_hostnames list ASC, total_hostnames count) sorted DESC by len(failed_hostnames), ties ASC by domain_id; plus ‘multi_domain’ bool (true when more than one domain has failures).

get_validator

screentest.get_validator(script_name, workflow_name)

Get a validator for a given script and workflow

Parameters
script_namestringThe name of the script containing the workflows
workflow_namestringThe name of the validation workflow
Returns
validatorscreentest.ValidatorThe validator instance

list_claimed_nodes

screentest.list_claimed_nodes(data_hall?, status?)

List the validated claimed nodes screening may use: Ready instances with the external-validation claim labels, hostname resolved from the node registry by serial, and the overlay IP the machine is reachable on while claimed. The screening pipeline uses this to map selected hostnames to overlay IPs (and serials) at connect time. Example: r = screentest.list_claimed_nodes(); ip_by_host = {n.hostname: n.overlay_ip for n in r.nodes}

Parameters
data_hall?optionalstringLimit the listing to one data hall; empty sweeps every configured hall.
status?optionalstringKeep only nodes whose instance status matches (Ready also requires a dialable overlay IP); empty keeps every status so a caller can classify nodes mid-repair or still converging.
Returns
resultscreentest.ListClaimedNodesResultListClaimedNodesResult with the validated claimed nodes.

mark_e2e_domain_threshold_overrides_used

screentest.mark_e2e_domain_threshold_overrides_used(override_ids, pipeline_entrypoint_name?)

Mark E2E touchless domain-threshold overrides as used.

Parameters
override_idslist[int]Override IDs whose domains fully passed the overridden phase.
pipeline_entrypoint_name?optionalstringPipeline entrypoint to target. Omit for prod E2E.
Returns
resultscreentest.MarkDomainThresholdOverridesUsedResultOverride rows marked used.

mark_node_processed

screentest.mark_node_processed(statuses, wait_for_noderegistry_update?)

Mark the given nodes as processed. If a node is already processed, no action will be taken. If there was a conflict detected on a node, no action will be taken.

Parameters
statuseslist[screentest.GetScreenTestProcessStatusEntry]List of status entries
wait_for_noderegistry_update?optionalboolIf true, wait for the node registry to be updated before marking nodes processed.

mark_node_state

screentest.mark_node_state(hostnames, state, reason?, wait_for_noderegistry_update?)

Records a node health state change in screentest_node_health_history.

Parameters
hostnameslist[string]List of hostnames of nodes to mark.
statestringThe health state: ‘passed’, ‘failed’, or ‘reset’. Use screentest.NODE_HEALTH_PASSED etc.
reason?optionalstringOptional reason for the state change
wait_for_noderegistry_update?optionalboolIf true, wait for the node registry to be updated before looking up nodes.
Returns
resultlist[dict[string:any]]List of dicts, each with datacenter_node_id and history_id

node_selection_config

screentest.node_selection_config(slurm_reservation?, node_states?, explicit_nodes?, hostname_regex?, regex_group_index?, target_groups?, categories?, data_hall?)

Create a NodeSelectionConfig for selecting nodes to test

Parameters
slurm_reservation?optionalstringSLURM reservation filter
node_states?optionallist[string]Filter by node states (e.g., idle, allocated)
explicit_nodes?optionallist[string]Explicit list of node names
hostname_regex?optionalstringRegex to match hostnames
regex_group_index?optionalintWhich capture group contains the grouping key (1-based)
target_groups?optionallist[string]Which groups to include (e.g., rack IDs)
categories?optionallist[string]NodeRegistry categories to select nodes from (OR logic). Requires category_selection_enabled in the screentest module config.
data_hall?optionalstringSelect every node currently claimed into this data hall’s break-fix VPC. Only Ready instances with the external-validation claim labels and a current node registry row are selected (hostnames come from the registry); others are skipped with a logged reason. Requires the nico module.
Returns
configscreentest.NodeSelectionConfigThe NodeSelectionConfig instance

override_run

screentest.override_run(run_id, reason, nodes?, result?)

Manually override a screen test run’s result so the touchless pipeline picks the nodes back up. Appends a marked PASSED/FAILED event per overridable node into the run’s own orchestration; only nodes whose latest result differs from result are flipped. A later real run or override supersedes it.

Parameters
run_idstringThe run_id of the run to override (from the runs list).
reasonstringWhy the override is applied; recorded as the event reason tag for audit.
nodes?optionalstringOptional SLURM node-list (e.g. “node[001-003]”) to override a subset; empty overrides every overridable node in the run.
result?optionalstringTarget result, PASSED or FAILED. Defaults to PASSED.
Returns
nodes_overriddenintNumber of node events written.

parse_results

screentest.parse_results(result_file)

Parse and store screentest results from a screen test results json file. Test type is automatically inferred from the data. The run_id is automatically extracted from the workflow context. Failures (parse errors, override conflicts, invalid input) will fail the workflow with a non-retryable error. Transient failures (database errors, file I/O) will be automatically retried by Temporal.

Parameters
result_filescriptrt.FileThe file reference from validation.aggregate_results_to_file().results_file
Returns
resultscreentest.ParseAndStoreResultsResultParse result with summary_id, is_overall_passed, failed_hostnames, failed_tests, and test counts

pipeline_node_state_args

screentest.pipeline_node_state_args(hostname, current_phase, current_phase_status, next_step, domain_name?, current_test_workflow_name?, current_screentest_orchestration_id?)

Construct a typed node_state args value for apply_node_transition

Parameters
hostnamestringNode hostname; resolved to datacenter_node_id via node registry in apply_node_transition.
current_phasestringOne of screentest.PHASE_*.
current_phase_statusstringOne of screentest.STATUS_*.
next_stepstringOne of screentest.PHASE_*.
domain_name?optionalstringOptional domain name.
current_test_workflow_name?optionalstringOptional current test workflow.
current_screentest_orchestration_id?optionalstringOptional current orchestration.
Returns
pipeline_node_state_argsscreentest.NodeStateArgsTyped pipeline_node_state_args value.

pipeline_node_transition_args

screentest.pipeline_node_transition_args(pipeline_run_id, hostname, transition_type, phase, domain_name?, from_reservation?, to_reservation?, test_workflow_name?, screentest_orchestration_id?, reason_code?, reason?)

Construct a typed transition args value for apply_node_transition

Parameters
pipeline_run_idintThe pipeline run ID.
hostnamestringNode hostname.
transition_typestringOne of screentest.TRANSITION_*.
phasestringOne of screentest.PHASE_*.
domain_name?optionalstringOptional domain name.
from_reservation?optionalstringOptional source reservation.
to_reservation?optionalstringOptional destination reservation.
test_workflow_name?optionalstringOptional test workflow name.
screentest_orchestration_id?optionalstringOptional orchestration ID.
reason_code?optionalstringOne of screentest.REASON_*.
reason?optionalstringOptional free-form reason.
Returns
pipeline_node_transition_argsscreentest.NodeTransitionArgsTyped pipeline_node_transition_args value.

pipeline_notification_args

screentest.pipeline_notification_args(phase, test_name, node_hostnames, status?, reason?, action?, footer_link_label?, footer_link_path?, notification_key?, domain_name?, rack_name?)

Construct pipeline notification arguments registered by Module.StarTypes for send_pipeline_notifications

Parameters
phasestringPipeline phase
test_namestringOperator-facing test identifier associated with the pipeline condition
node_hostnameslist[string]Affected node hostnames
status?optionalstringNotification status shown in the message header
reason?optionalstringReason shown in the notification
action?optionalstringAction shown in the notification
footer_link_label?optionalstringOptional Remediation Orchestrator footer link label
footer_link_path?optionalstringOptional Remediation Orchestrator footer link path
notification_key?optionalstringStable notification identity across pipeline runs. Explicit Domain or Rack scopes must use distinct keys. Empty disables database notification-state tracking
domain_name?optionalstringDomain associated with the notification
rack_name?optionalstringRack associated with the notification. Requires domain_name
Returns
pipeline_notification_argsscreentest.PipelineNotificationArgsPipeline notification arguments

pipeline_reset_domain

screentest.pipeline_reset_domain(pipeline_script_name, pipeline_entrypoint_name, hostname, rack_name?)

Records a reset timestamp for every node in the topology domain containing the given hostname, scoped to the (pipeline_script_name, pipeline_entrypoint_name) pipeline. Subsequent calls to get_status for the same pipeline with apply_resets=True will only consider screentest events that occurred after the most recent reset per node. The reset also closes the domain’s threshold override and the overrides of the racks its nodes sit in.

Parameters
pipeline_script_namestringThe name of the script containing the pipeline workflow that is recording the reset.
pipeline_entrypoint_namestringThe entrypoint name of the pipeline workflow that is recording the reset. Stored as-is; no screen-test prefix is applied.
hostnamestringAny hostname in the target domain. The topology provider expands this to the domain’s membership, or the rack’s when rack_name is set.
rack_name?optionalstringOptional rack within the domain. When set, the reset narrows to that rack’s nodes alone and the markers name the rack; the overrides closed are still the domain’s and those of the racks the reset nodes sit in. A rack with no nodes in the domain is refused.
Returns
resultscreentest.PipelineResetResultReset result with domain_name, reset_hostnames, skipped, and reset_at.

pipeline_reset_domain_test

screentest.pipeline_reset_domain_test(pipeline_script_name, pipeline_entrypoint_name, test_script_name, test_workflow_name, phase, hostname, node_subset?, rack_name?, suite_name?)

Resets a single screen test workflow for the domain containing hostname (optionally restricted to node_subset), scoped to the (pipeline_script_name, pipeline_entrypoint_name) pipeline. The reset is status-agnostic: any recorded test is resettable regardless of where the target nodes’ projections sit, and the one refusal is a target with no recorded history for the test. Subsequent get_status calls for the same pipeline+test with apply_resets=True only consider events after this reset per node. When node_subset is omitted the reset auto-expands to the whole domain.

Parameters
pipeline_script_namestringThe name of the script containing the pipeline workflow recording the reset.
pipeline_entrypoint_namestringThe entrypoint name of the pipeline workflow recording the reset. Stored as-is.
test_script_namestringThe script name of the screen test to reset (e.g. the value passed to get_status).
test_workflow_namestringThe workflow name of the screen test to reset (e.g. the value passed to get_status). Accepted with or without the screen_test_ prefix.
phasestringThe pipeline phase the test belongs to (e.g. MRST). Recorded on the reset marker and used to flip FAILED/CANCELED projections at this phase back to IN_PROGRESS.
hostnamestringAny hostname in the target domain. The topology provider expands this to the domain’s membership, or the rack’s when rack_name is set.
node_subset?optionallist[string]Optional list of hostnames to restrict the reset to, within the domain, or the rack when rack_name is set. When set, every listed hostname must resolve in the node registry or the reset fails.
rack_name?optionalstringOptional rack within the domain. When set, the reset covers that rack’s nodes alone (node_subset then narrows within the rack) and the markers name the rack; a rack with no nodes in the domain is refused.
suite_name?optionalstringOptional pipeline suite whose dispatch invocations ran the test. When set, the reset applies only to history recorded under that suite name, and get_status sees it only when called with phase_name set to that suite; a target with no history under that suite is refused. When empty, the reset applies to the test in every phase.
Returns
resultscreentest.PipelineResetResultReset result with domain_name, reset_hostnames, skipped, and reset_at.

record_group_event

screentest.record_group_event(orchestration_id, phase_number, phase_name, group_id, test_kind, event_type, hostname?, tags?)

Records a screentest group-level event

Parameters
orchestration_idintThe orchestration ID
phase_numberintThe phase number
phase_namestringThe phase name
group_idstringThe group ID
test_kindstringThe test kind (e.g., ‘single_node’, ‘multi_node’, ‘multi_domain’)
event_typestringThe event type (RUNNING, PASSED, FAILED, UNKNOWN, SKIPPED)
hostname?optionalstringThe hostname (optional for group-level events)
tags?optionaldict[string:string]Additional tags to record with the event

record_orchestration_event

screentest.record_orchestration_event(orchestration_id, test_kind, event_type, tags?)

Records a screentest orchestration-level event

Parameters
orchestration_idintThe orchestration ID
test_kindstringThe test kind (e.g., ‘single_node’, ‘multi_node’, ‘multi_domain’)
event_typestringThe event type (RUNNING, PASSED, FAILED, UNKNOWN, SKIPPED)
tags?optionaldict[string:string]Additional tags to record with the event

record_phase_event

screentest.record_phase_event(orchestration_id, phase_number, phase_name, test_kind, event_type, tags?)

Records a screentest phase-level event

Parameters
orchestration_idintThe orchestration ID
phase_numberintThe phase number
phase_namestringThe phase name
test_kindstringThe test kind (e.g., ‘single_node’, ‘multi_node’, ‘multi_domain’)
event_typestringThe event type (RUNNING, PASSED, FAILED, UNKNOWN, SKIPPED)
tags?optionaldict[string:string]Additional tags to record with the event

record_sniff_coverage

screentest.record_sniff_coverage(test_name, occurred_at, rows, launches?)

Record one sniff dispatcher tick’s observations for one test. Upserts the per-(node, test) coverage snapshot and appends the events the tick implies (a disposition change on an existing row, and each launch outcome) in one transaction. Rows whose content is unchanged are not written, so repeating a tick is a no-op.

Parameters
test_namestringThe SNIFF_TESTS entry name, the label the freshness gauge uses
occurred_atstringRFC3339 time the dispatcher made these decisions (its workflow time)
rowslist[dict[string:any]]One dict per node the tick saw: hostname, disposition, bucket, and optionally datacenter_node_id, eligibility_reason, latest_verdict (PASSED or FAILED) with latest_verdict_at (RFC3339)
launches?optionallist[dict[string:any]]One dict per start_screen_test call this tick: hostname plus workflow_id and run_id, or hostname plus error; optional dry_run
Returns
events_writtenintEvents appended to the decision log
rows_writtenintSnapshot rows inserted or changed

record_sniff_tick_summary

screentest.record_sniff_tick_summary(occurred_at, details)

Record the one tick-scoped TICK_SUMMARY event for a sniff dispatcher tick. Fleet-wide counts (nodes per disposition, in flight, cap, due, launched, held back) belong here rather than on per-node events.

Parameters
occurred_atstringRFC3339 time of the tick (the dispatcher’s workflow time)
detailsdict[string:any]Tick counts and flags, stored as the event details
Returns
event_idintId of the TICK_SUMMARY event

reparse_results

screentest.reparse_results(run_id)

Reparses the screentest results file if screentest.parse_result() was called in the original run. This function will update the database with the reparsed results on success. If any parsing errors occur during reparsing, existing results will not be modified.

Parameters
run_idstringThe run ID of the screen test that was originally parsed.
Returns
resultscreentest.ParseAndStoreResultsResultParse result with summary_id, is_overall_passed, failed_hostnames, failed_tests, and test counts

send_pipeline_notification

screentest.send_pipeline_notification(channel, script_name, entrypoint_name, pipeline_run_id, phase, test_name, node_hostnames, status?, reason?, action?, footer_link_label?, footer_link_path?, notification_key?, domain_name?, rack_name?)

Best-effort send of a formatted screentest pipeline notification to Slack

Parameters
channelstringSlack channel alias configured in Remediation Orchestrator
script_namestringPipeline script name
entrypoint_namestringPipeline entrypoint name
pipeline_run_idintPipeline run ID
phasestringPipeline phase
test_namestringOperator-facing test identifier associated with the pipeline condition
node_hostnameslist[string]Affected node hostnames
status?optionalstringNotification status shown in the message header
reason?optionalstringReason shown in the notification
action?optionalstringAction shown in the notification
footer_link_label?optionalstringOptional Remediation Orchestrator footer link label
footer_link_path?optionalstringOptional Remediation Orchestrator footer link path
notification_key?optionalstringStable notification identity across pipeline runs. Explicit Domain or Rack scopes must use distinct keys. Empty disables database notification-state tracking
domain_name?optionalstringDomain associated with the notification
rack_name?optionalstringRack associated with the notification. Requires domain_name

send_pipeline_notifications

screentest.send_pipeline_notifications(channel, script_name, entrypoint_name, pipeline_run_id, notifications)

Best-effort send of formatted screentest pipeline notifications to Slack in one activity

Parameters
channelstringSlack channel alias configured in Remediation Orchestrator
script_namestringPipeline script name
entrypoint_namestringPipeline entrypoint name
pipeline_run_idintPipeline run ID
notificationslist[screentest.PipelineNotificationArgs]Values from screentest.pipeline_notification_args

set_e2e_dynamic_threshold_tags

screentest.set_e2e_dynamic_threshold_tags(hw, sw, reason?)

Set the E2E touchless per-config dynamic-threshold hw/sw tags for this cluster (tenant-scoped, live; no redeploy). An empty value injects no tag for that dimension.

Parameters
hwstringBare hardware config value, e.g. “gb200”; "" injects no hw tag.
swstringBare software config value, e.g. “fw-580.126.20”; "" injects no sw tag.
reason?optionalstringOptional reason for the set.
Returns
resultscreentest.E2eDynamicThresholdTagsResultStored hw, sw, reason.

set_e2e_eligible_nodes_filter

screentest.set_e2e_eligible_nodes_filter(node_id_filter, reason?, pipeline_entrypoint_name?)

Set the E2E touchless pipeline eligible-node filter.

Parameters
node_id_filterstringSlurm node-list filter to store exactly. Empty clears to no eligible nodes; ”*” screens all observed nodes.
reason?optionalstringOptional reason for the set.
pipeline_entrypoint_name?optionalstringPipeline entrypoint to target. Omit for prod E2E.
Returns
resultscreentest.SetPipelineEligibleNodesFilterResultSet result with previous/current filters, warnings, created_by, created_at, and reason.

sieve_config

screentest.sieve_config(sieve_enabled?, minimum_group_size?, max_node_attempts?)

Create a SieveConfig for sieve-based node filtering

Parameters
sieve_enabled?optionalboolWhether sieve filtering is enabled
minimum_group_size?optionalintMinimum nodes per test group
max_node_attempts?optionalintMaximum times a node can fail before being permanently excluded
Returns
configscreentest.SieveConfigThe SieveConfig instance

start_screen_test

screentest.start_screen_test(script_name, workflow_name, node_selection, max_parallel_tests?, fixed_phase_configs?, sieve_config?, launch_args?, tags?, custom_workflow_id_prefix?, node_lock_mode?, run_async?)

Start a screen test workflow with the given options

Parameters
script_namestringName of the script containing the workflows
workflow_namestringName of the validation workflow
node_selectionscreentest.NodeSelectionConfigNode selection configuration - one of slurm_reservation, explicit_nodes, or categories must be set
max_parallel_tests?optionalintMaximum concurrent validations
fixed_phase_configs?optionallist[any]Fixed phase configurations
sieve_config?optionalscreentest.SieveConfigSieve configuration
launch_args?optionaldict[string:any]Launch arguments to pass to the entrypoint workflow
tags?optionallist[string]Tags to add to the screen test run
custom_workflow_id_prefix?optionalstringCustom workflow ID prefix
node_lock_mode?optionalstringHow the orchestrator acquires per-node locks: one of screentest.NODE_LOCK_MODE_ALL_OR_NOTHING (default), NODE_LOCK_MODE_BEST_EFFORT, NODE_LOCK_MODE_NONE
run_async?optionalboolWhether to launch the screen test run asynchronously
Returns
workflow_idstringThe workflow ID
run_idstringThe run ID

validator

screentest.validator(validation_workflow, on_node_pass?, on_node_fail?, preset_config_json?, launch_args_config?, can_launch?, node_lock_mode?, contract?)

Register a screen test validator workflow (single node, multi node, multi rack)

Parameters
validation_workflowworkflows.WorkflowThe workflow to validate node groups. The workflow must take a required screentest.NodeGroup argument, an optional dict[string:any] argument for the launch_args, and return a dict with the following keys: result, failure_reason, failed_test, repro_cmd, log_path, known_bad_nodes
on_node_pass?optionalworkflows.WorkflowOptional workflow to handle passed nodes
on_node_fail?optionalworkflows.WorkflowOptional workflow to handle failed nodes
preset_config_json?optionalstringOptional preset config JSON
launch_args_config?optionallist[dict[string:any]]Optional launch args config for the validator workflow. This should be a list of dicts, each with the following keys: name(required), type(required, string/number/boolean), default(required), description(optional), group(optional, the UI form section), choices(optional, list of legal string values -> a select), multi(optional bool, with choices: multi-select whose value stays a comma-separated string), order(optional, integer render-order hint, lower first), multiline(optional bool, string args without choices: always render a textarea), placeholder(optional string, HTML placeholder hint on text/number/textarea inputs; not for boolean args). Refer to the screentest.LaunchArgDefinition type for more information. Example: [{\“name\”: \“test_arg\”, \“type\”: \“string\”, \“description\”: \“A test argument\”, \“default\”: \“default value\”, \“group\”: \“Tuning\”}]
can_launch?optionalfunctionOptional function to check if the screen test can be launched. The function will be invoked with a list of hostnames and must return a list of hostnames, which the test can be launched on. If no function is provided, it will be assumed that the screen test can be launched.
node_lock_mode?optionalstringHow the orchestrator acquires per-node locks for runs of this validator: one of screentest.NODE_LOCK_MODE_ALL_OR_NOTHING (default), NODE_LOCK_MODE_BEST_EFFORT, NODE_LOCK_MODE_NONE
contract?optionalstringOptional validator protocol. Use “dispatch” for dispatch requests and result-record File references. Example: screentest.validator(validation_workflow, contract=“dispatch”). Empty string declares no contract.