Skip to main content

default_finish_gate

Function default_finish_gate 

Source
pub fn default_finish_gate() -> FinishGate
Expand description

Build the default verify-before-finish gate: scans the SAME loop’s own transcript for both the trigger and the verification.

Why: This is the shape a delegated engineer’s sub-agent loop needs — its own bash calls land directly in its own Transcript, so no external state is required. What: Returns a FinishGate closure that is inert unless [seed_text] of the transcript names_test_command; when it does, trips (returning [GATE_REASON_ENGINEER]) unless [transcript_ran_test_command] finds a match. Test: tests::default_gate_trips_when_named_and_unrun, tests::default_gate_inert_when_not_named, tests::default_gate_satisfied_when_run, agent_loop::tests::finish_gate_trips_and_recovers.