Skip to main content

tool_gate

Function tool_gate 

Source
pub fn tool_gate(
    run: &WorkflowRun,
    tool: &str,
    passthrough: &[&str],
) -> ToolGate
Expand description

Decide tool under run. passthrough is the server’s list of tools a real run never blocks.

  • The stand-in for a withheld workflow is CLOSED: only the control tool (and the wrapper that reaches it) passes. The pass-through list does not apply, and the stand-in never expires — an expiry would clear it into “no workflow”, which gates nothing, and delete the stored workflow it stands for. The refusal names no workflow, state or file.
  • A real run: finished or stale → ToolGate::Expired; otherwise the control tool and the pass-through tools pass, and any other tool must be in the allowed list of the current state, when that state has one.