Internal

internal/app/taskstate

Package taskstate contains the small workspace projections shared by taskless lifecycle entry points.

import "github.com/nilstate/scafld/v2/internal/app/taskstate"

Package taskstate contains the small workspace projections shared by taskless lifecycle entry points.

Functions

func Current(ctx context.Context, specs SpecLister) ([]spec.Record, error)

Source: internal/app/taskstate/taskstate.go:27

Current returns non-terminal task specs in stable task-id order.

func ReadyForFinalize(ctx context.Context, specs SpecLister, sessions SessionLoader) ([]spec.Record, error)

Source: internal/app/taskstate/taskstate.go:46

ReadyForFinalize returns current review tasks with a valid accepted review. A task is not selected merely because it is in the review phase: pending or failed review work must remain visible to an explicitly addressed command.

Types

type SessionLoader

Source: internal/app/taskstate/taskstate.go:22

SessionLoader is the read-only evidence lookup used to identify tasks whose accepted review is actually ready for deterministic finalization.

type SessionLoader interface {
	Load(context.Context, string) (session.Session, error)
}
Methods
  • Load func(context.Context, string) (session.Session, error)

type SpecLister

Source: internal/app/taskstate/taskstate.go:16

SpecLister is the read-only workspace listing needed to resolve taskless lifecycle calls without guessing which task an agent owns.

type SpecLister interface {
	List(context.Context) ([]spec.Record, error)
}
Methods
  • List func(context.Context) ([]spec.Record, error)