Skip to main content

is_failed

Function is_failed 

Source
pub fn is_failed(spec_id: &str) -> Result<bool>
Expand description

Check if a spec has failed.

A spec is considered failed if:

  • Status is in_progress
  • Agent has exited (no lock file present)
  • Some acceptance criteria are still incomplete
  • No success signals present (commits matching chant(spec_id): pattern)

Edge cases:

  • Agent still running: Returns false
  • Spec already finalized/failed: Returns false (status not in_progress)
  • Has commits matching chant(spec_id) pattern: Returns false (agent completed work)

ยงErrors

Returns an error if:

  • Spec file is unreadable
  • Git commands fail