# internal/app/fail

Package fail records failed lifecycle state and its reason.

## Run

```go
func Run(ctx context.Context, specs SpecStore, sessions SessionStore, clock Clock, taskID string, reason string) (spec.Model, error)
```

Run marks a task failed and records failure evidence.

## Clock

```go
type Clock interface{ Now() time.Time }
```

Clock supplies failure timestamps.

- `Now: func() time.Time`: 

## SessionStore

```go
type SessionStore interface {
	Append(context.Context, string, session.Entry, string) (session.Session, error)
}
```

SessionStore is the session evidence port used by failure.

- `Append: func(context.Context, string, session.Entry, string) (session.Session, error)`: 

## SpecStore

```go
type SpecStore interface {
	Load(context.Context, string) (spec.Model, string, error)
}
```

SpecStore is the spec persistence port used by failure.

- `Load: func(context.Context, string) (spec.Model, string, error)`:
