testutil

package
v0.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Overview

Package testutil provides shared helpers for API-layer tests.

Index

Constants

View Source
const (
	TaskLoopParityRunID         = "looprun-transport-parity"
	TaskLoopParityName          = "transport-parity"
	TaskLoopParityCoordinatorID = "task-loop-transport-coordinator"
	TaskLoopParityCellID        = "task-loop-transport-cell"
	TaskLoopParityGeneration    = 2
	TaskLoopParityNodeID        = "review"
	TaskLoopParityItemIndex     = 0
)

Variables

View Source
var ErrStubWorkspaceServiceNotImplemented = errors.New("stub workspace service method not implemented")

Functions

func AssertLoopRunTaskCatalog

func AssertLoopRunTaskCatalog(t testing.TB, response contract.TasksResponse)

AssertLoopRunTaskCatalog checks the shared task-list result used by every public transport.

func AssertLoopTaskProvenance

func AssertLoopTaskProvenance(
	t testing.TB,
	item contract.TaskCatalogItemPayload,
	wantRole contract.LoopProvenanceRole,
)

AssertLoopTaskProvenance checks the complete shared provenance projection for the canonical fixture.

func AssertWorktreeRouteParity

func AssertWorktreeRouteParity(t testing.TB, got []string)

AssertWorktreeRouteParity fails when a transport drifts from the complete IT-033 route contract.

func ConfigForTest

func ConfigForTest(homePaths compozyconfig.HomePaths) compozyconfig.Config

ConfigForTest returns the default isolated API test configuration.

func DecodeJSONResponse

func DecodeJSONResponse(t *testing.T, recorder *httptest.ResponseRecorder, dest any)

func DecodeSSEData

func DecodeSSEData(t *testing.T, record SSERecord, dest any)

func DiscardLogger

func DiscardLogger() *slog.Logger

func DocumentedProfileRoutesForTransport

func DocumentedProfileRoutesForTransport(transport apispec.Transport) []string

DocumentedProfileRoutesForTransport returns the normalized profile routes in the public spec.

func DocumentedRoutesForTransport

func DocumentedRoutesForTransport(transport apispec.Transport, matches func(string) bool) []string

DocumentedRoutesForTransport returns normalized routes selected from the public spec.

func ExpectedWorktreeRouteKeys

func ExpectedWorktreeRouteKeys() []string

ExpectedWorktreeRouteKeys is the shared IT-033 parity contract for every transport.

func IsProfileRoute

func IsProfileRoute(path string) bool

IsProfileRoute matches only the profile collection and its descendants.

func MustJSONBody

func MustJSONBody(t *testing.T, value any) []byte

func NewHomeConfig

func NewHomeConfig(t *testing.T) (compozyconfig.HomePaths, compozyconfig.Config)

NewHomeConfig creates an isolated API test home and its configuration.

func NewSession

func NewSession(id string) *session.Session

func NewSessionInfo

func NewSessionInfo(id string) *session.Info

func NewTestHomePaths

func NewTestHomePaths(t *testing.T) compozyconfig.HomePaths

func PerformRequest

func PerformRequest(t *testing.T, engine http.Handler, method, path string, body []byte) *httptest.ResponseRecorder

func PerformRequestWithHeaders

func PerformRequestWithHeaders(
	t *testing.T,
	engine http.Handler,
	method, path string,
	body []byte,
	headers map[string]string,
) *httptest.ResponseRecorder

func ProfileRoutesFromEngine

func ProfileRoutesFromEngine(routes gin.RoutesInfo) []string

ProfileRoutesFromEngine returns normalized, stable profile routes registered by a transport.

func RoutesFromEngine

func RoutesFromEngine(routes gin.RoutesInfo, matches func(string) bool) []string

RoutesFromEngine returns normalized, stable routes selected by a path predicate.

func WorktreeRouteKeysFromGin

func WorktreeRouteKeysFromGin(routes gin.RoutesInfo) []string

WorktreeRouteKeysFromGin returns the normalized worktree route keys registered on a Gin engine.

func WriteAgentDef

func WriteAgentDef(t *testing.T, homePaths compozyconfig.HomePaths, name string)

Types

type SSERecord

type SSERecord struct {
	ID    string
	Event string
	Data  []byte
}

func ParseSSE

func ParseSSE(t *testing.T, body string) []SSERecord

type SingleProfileWindowManagers

type SingleProfileWindowManagers struct {
	Manager *windowmanager.Manager
}

SingleProfileWindowManagers shares one manager across profile selections in transport tests while preserving the provider's profile-aware interface.

func (SingleProfileWindowManagers) ClaimClient

func (SingleProfileWindowManagers) WindowManagerFor

type StubAutomationManager

type StubAutomationManager struct {
	LatestRunsByOwnerFn func(context.Context, automationpkg.RunOwnerKind, []string) (map[string]automationpkg.Run, error)
	ListSuggestionsFn   func(
		context.Context,
		store.ReadScope,
		string,
		automationpkg.SuggestionStatus,
	) ([]automationpkg.Suggestion, error)
	AcceptSuggestionFn func(
		context.Context,
		string,
		string,
		string,
	) (automationpkg.SuggestionAcceptance, error)
	DismissSuggestionFn func(
		context.Context,
		string,
		string,
		string,
	) (automationpkg.Suggestion, error)
	ListJobsFn      func(context.Context, automationpkg.JobListQuery) (automationpkg.JobListPage, error)
	JobsFn          func(context.Context) ([]automationpkg.Job, error)
	GetJobFn        func(context.Context, string) (automationpkg.Job, error)
	CreateJobFn     func(context.Context, automationpkg.Job) (automationpkg.Job, error)
	UpdateJobFn     func(context.Context, automationpkg.Job) (automationpkg.Job, error)
	DeleteJobFn     func(context.Context, string) error
	StartJobFn      func(context.Context, string, time.Duration) (automationpkg.Run, error)
	TriggerJobFn    func(context.Context, string) (automationpkg.Run, error)
	ListTriggersFn  func(context.Context, automationpkg.TriggerListQuery) (automationpkg.TriggerListPage, error)
	TriggersFn      func(context.Context) ([]automationpkg.Trigger, error)
	GetTriggerFn    func(context.Context, string) (automationpkg.Trigger, error)
	CreateTriggerFn func(
		context.Context,
		automationpkg.Trigger,
		automationpkg.WebhookSecretWrite,
	) (automationpkg.Trigger, error)
	UpdateTriggerFn func(
		context.Context,
		automationpkg.Trigger,
		*automationpkg.WebhookSecretWrite,
	) (automationpkg.Trigger, error)
	DeleteTriggerFn     func(context.Context, string) error
	ListRunsFn          func(context.Context, automationpkg.RunQuery) ([]automationpkg.Run, error)
	RunsFn              func(context.Context, automationpkg.RunQuery) ([]automationpkg.Run, error)
	GetRunFn            func(context.Context, string) (automationpkg.Run, error)
	CancelRunFn         func(context.Context, string) (automationpkg.Run, error)
	StatusFn            func(context.Context) (automationpkg.ManagerStatus, error)
	SetJobEnabledFn     func(context.Context, string, bool) (automationpkg.Job, error)
	SetTriggerEnabledFn func(context.Context, string, bool) (automationpkg.Trigger, error)
	HandleWebhookFn     func(context.Context, automationpkg.WebhookRequest) (automationpkg.TriggerResult, error)
}

func (StubAutomationManager) AcceptSuggestion

func (s StubAutomationManager) AcceptSuggestion(
	ctx context.Context,
	profileID string,
	workspaceRef string,
	suggestionID string,
) (automationpkg.SuggestionAcceptance, error)

func (StubAutomationManager) CancelRun

func (StubAutomationManager) CreateJob

func (StubAutomationManager) CreateTrigger

func (StubAutomationManager) DeleteJob

func (s StubAutomationManager) DeleteJob(ctx context.Context, id string) error

func (StubAutomationManager) DeleteTrigger

func (s StubAutomationManager) DeleteTrigger(ctx context.Context, id string) error

func (StubAutomationManager) DismissSuggestion

func (s StubAutomationManager) DismissSuggestion(
	ctx context.Context,
	profileID string,
	workspaceRef string,
	suggestionID string,
) (automationpkg.Suggestion, error)

func (StubAutomationManager) GetJob

func (StubAutomationManager) GetRun

func (StubAutomationManager) GetTrigger

func (StubAutomationManager) HandleWebhook

func (StubAutomationManager) Jobs

func (StubAutomationManager) LatestRunsByOwner

func (s StubAutomationManager) LatestRunsByOwner(
	ctx context.Context,
	owner automationpkg.RunOwnerKind,
	ids []string,
) (map[string]automationpkg.Run, error)

func (StubAutomationManager) ListJobs

func (StubAutomationManager) ListRuns

func (StubAutomationManager) ListSuggestions

func (s StubAutomationManager) ListSuggestions(
	ctx context.Context,
	readScope store.ReadScope,
	workspaceRef string,
	status automationpkg.SuggestionStatus,
) ([]automationpkg.Suggestion, error)

func (StubAutomationManager) ListTriggers

func (StubAutomationManager) Runs

func (StubAutomationManager) SetJobEnabled

func (s StubAutomationManager) SetJobEnabled(ctx context.Context, id string, enabled bool) (automationpkg.Job, error)

func (StubAutomationManager) SetTriggerEnabled

func (s StubAutomationManager) SetTriggerEnabled(
	ctx context.Context,
	id string,
	enabled bool,
) (automationpkg.Trigger, error)

func (StubAutomationManager) StartJob

func (s StubAutomationManager) StartJob(
	ctx context.Context, id string, timeout time.Duration,
) (automationpkg.Run, error)

func (StubAutomationManager) Status

func (StubAutomationManager) Triggers

func (StubAutomationManager) UpdateJob

func (StubAutomationManager) UpdateTrigger

type StubExtensionService

type StubExtensionService struct {
	ListFn   func(context.Context) ([]contract.ExtensionPayload, error)
	SearchFn func(
		context.Context,
		contract.ExtensionSearchRequest,
	) (contract.ExtensionSearchResponse, error)
	MarketplaceTrustFn func(
		context.Context,
		extensionpkg.MarketplaceTrustEvidence,
	) (contract.ExtensionTrustReportPayload, error)
	InstallFn func(
		context.Context,
		contract.InstallExtensionRequest,
		taskpkg.ActorContext,
	) (contract.ExtensionPayload, error)
	PreviewInstallFn func(
		context.Context,
		contract.InstallExtensionRequest,
		taskpkg.ActorContext,
	) (contract.ExtensionInstallPreviewPayload, error)
	ListEnablementFn func(context.Context, string) ([]contract.ExtensionEnablementPayload, error)
	SetEnablementFn  func(
		context.Context,
		string,
		contract.SetExtensionEnablementRequest,
		taskpkg.ActorContext,
	) (contract.ExtensionEnablementPayload, error)
	UpdateFn func(
		context.Context,
		string,
		contract.UpdateExtensionRequest,
		taskpkg.ActorContext,
	) (contract.ManagedExtensionUpdatePayload, error)
	UpdateBatchFn func(
		context.Context,
		contract.UpdateExtensionsRequest,
		taskpkg.ActorContext,
	) ([]contract.ManagedExtensionUpdatePayload, error)
	RemoveFn func(
		context.Context,
		string,
		taskpkg.ActorContext,
	) (contract.ManagedExtensionRemovePayload, error)
	EnableFn func(
		context.Context,
		string,
		contract.EnableExtensionRequest,
		taskpkg.ActorContext,
	) (contract.ExtensionEnableResult, error)
	DisableFn     func(context.Context, string, taskpkg.ActorContext) (contract.ExtensionPayload, error)
	StatusFn      func(context.Context, string) (contract.ExtensionPayload, error)
	ProvenanceFn  func(context.Context, string) (contract.ExtensionProvenancePayload, error)
	InventoryFn   func(context.Context, string) (contract.ExtensionInventoryPayload, error)
	PreviewFn     func(context.Context, string) (contract.ExtensionEnablePreviewPayload, error)
	ListSecretsFn func(context.Context, string, taskpkg.ActorContext) (contract.ExtensionSecretsPayload, error)
	SetSecretsFn  func(
		context.Context,
		string,
		contract.SetExtensionSecretsRequest,
		taskpkg.ActorContext,
	) (contract.ExtensionSecretsPayload, error)
	DeleteSecretFn func(context.Context, string, string, taskpkg.ActorContext) error
	DevFn          func(
		context.Context,
		contract.DevLinkExtensionRequest,
		taskpkg.ActorContext,
	) (contract.ExtensionPayload, error)
	ReloadDevFn func(
		context.Context,
		string,
		contract.ReloadExtensionRequest,
		taskpkg.ActorContext,
	) (contract.ExtensionPayload, error)
	ExtensionLogsFn func(
		context.Context,
		string,
		int64,
		string,
		taskpkg.ActorContext,
	) (contract.ExtensionLogsResponse, error)
}

StubExtensionService is the shared transport fake for extension route suites.

func (StubExtensionService) DeleteExtensionSecret

func (s StubExtensionService) DeleteExtensionSecret(
	ctx context.Context,
	name string,
	envName string,
	actor taskpkg.ActorContext,
) error

func (StubExtensionService) Disable

func (StubExtensionService) ExtensionLogs

func (s StubExtensionService) ExtensionLogs(
	ctx context.Context,
	name string,
	after int64,
	streamEpoch string,
	actor taskpkg.ActorContext,
) (contract.ExtensionLogsResponse, error)

func (StubExtensionService) InventoryScoped

func (StubExtensionService) List

func (StubExtensionService) ListEnablement

func (StubExtensionService) ListExtensionSecrets

func (s StubExtensionService) ListExtensionSecrets(
	ctx context.Context,
	name string,
	actor taskpkg.ActorContext,
) (contract.ExtensionSecretsPayload, error)

func (StubExtensionService) MarketplaceTrust

func (StubExtensionService) Preview

func (StubExtensionService) Provenance

func (StubExtensionService) ReloadDev

func (StubExtensionService) Remove

func (StubExtensionService) SetExtensionSecrets

func (StubExtensionService) Status

type StubObserver

type StubObserver struct {
	QueryPermissionDailyRollupsFn func(context.Context, store.PermissionRollupQuery) ([]store.PermissionDailyRollup, error)
	QueryPermissionEntriesFn      func(context.Context, store.PermissionEntriesQuery) ([]store.PermissionLogEntry, error)
	QueryEventsFn                 func(context.Context, store.EventSummaryQuery) ([]store.EventSummary, error)
	EventSequenceHeadFn           func(context.Context) (int64, error)
	OnAgentEventFn                func(context.Context, string, acp.AgentEvent)
	QueryHookCatalogFn            func(context.Context, hookspkg.CatalogFilter) ([]hookspkg.CatalogEntry, error)
	QueryHookRunsFn               func(context.Context, store.HookRunQuery) ([]hookspkg.HookRunRecord, error)
	QueryHookEventsFn             func(context.Context, hookspkg.EventFilter) ([]hookspkg.EventDescriptor, error)

	HealthFn             func(context.Context) (observe.Health, error)
	QueryTokenStatsFn    func(context.Context, store.TokenStatsQuery) ([]store.TokenStats, error)
	QueryTaskDashboardFn func(context.Context, observe.TaskDashboardQuery) (observe.TaskDashboardView, error)
	QueryTaskInboxFn     func(
		context.Context,
		observe.TaskInboxQuery,
		taskpkg.ActorIdentity,
	) (observe.TaskInboxView, error)
	QueryObserveOverviewFn func(context.Context, observe.OverviewQuery) (observe.OverviewView, error)
}

func (StubObserver) EventSequenceHead

func (s StubObserver) EventSequenceHead(ctx context.Context) (int64, error)

func (StubObserver) Health

func (s StubObserver) Health(ctx context.Context) (observe.Health, error)

func (StubObserver) OnAgentEvent

func (s StubObserver) OnAgentEvent(ctx context.Context, sessionID string, event any)

func (StubObserver) QueryEvents

func (s StubObserver) QueryEvents(ctx context.Context, query store.EventSummaryQuery) ([]store.EventSummary, error)

func (StubObserver) QueryHookCatalog

func (s StubObserver) QueryHookCatalog(
	ctx context.Context,
	filter hookspkg.CatalogFilter,
) ([]hookspkg.CatalogEntry, error)

func (StubObserver) QueryHookEvents

func (s StubObserver) QueryHookEvents(
	ctx context.Context,
	filter hookspkg.EventFilter,
) ([]hookspkg.EventDescriptor, error)

func (StubObserver) QueryHookRuns

func (s StubObserver) QueryHookRuns(ctx context.Context, query store.HookRunQuery) ([]hookspkg.HookRunRecord, error)

func (StubObserver) QueryObserveOverview

func (s StubObserver) QueryObserveOverview(
	ctx context.Context,
	query observe.OverviewQuery,
) (observe.OverviewView, error)

func (StubObserver) QueryPermissionDailyRollups

func (s StubObserver) QueryPermissionDailyRollups(
	ctx context.Context,
	q store.PermissionRollupQuery,
) ([]store.PermissionDailyRollup, error)

func (StubObserver) QueryPermissionEntries

func (s StubObserver) QueryPermissionEntries(
	ctx context.Context,
	q store.PermissionEntriesQuery,
) ([]store.PermissionLogEntry, error)

func (StubObserver) QueryTaskDashboard

func (s StubObserver) QueryTaskDashboard(
	ctx context.Context,
	query observe.TaskDashboardQuery,
) (observe.TaskDashboardView, error)

func (StubObserver) QueryTaskInbox

func (StubObserver) QueryTokenStats

func (s StubObserver) QueryTokenStats(
	ctx context.Context,
	query store.TokenStatsQuery,
) ([]store.TokenStats, error)

type StubResourceService

func (StubResourceService) Delete

func (s StubResourceService) Delete(
	ctx context.Context,
	kind resources.ResourceKind,
	id string,
	expectedVersion int64,
) error

func (StubResourceService) Get

func (StubResourceService) List

func (StubResourceService) Put

type StubSessionAttention

type StubSessionAttention struct {
	DescendantPendingFn func(context.Context, string, []string) ([]store.PendingInteraction, error)
	PresenceFn          func(context.Context, string, string, bool) (string, error)
	PendingFn           func(context.Context, string, []string) ([]store.PendingInteraction, error)
	SummaryFn           func(context.Context, store.ReadScope) (store.SessionAttentionSummary, error)
	WaitFn              func(context.Context, session.WaitRequest) (session.WaitOutcome, error)
}

StubSessionAttention configures the attention-specific behavior of StubSessionManager.

type StubSessionManager

type StubSessionManager struct {
	RequestCompactionFn func(
		context.Context, string,
	) (session.CompactionRequestResult, <-chan acp.AgentEvent, error)
	ContextEventsFn              func(context.Context, string) (session.ContextEvents, error)
	UsageEventsFn                func(context.Context, string) ([]session.UsageEventEnvelope, error)
	DeliveriesFn                 func(context.Context, string) ([]session.DeliveryEventEnvelope, error)
	CompactionsFn                func(context.Context, string) ([]session.CompactionEnvelope, error)
	LatestSettledTurnFn          func(context.Context, string) (session.SettledTurn, error)
	Attention                    StubSessionAttention
	CreateFn                     func(context.Context, *session.CreateOpts) (*session.Session, error)
	CreateAcceptedFn             func(context.Context, *session.CreateAcceptedOpts) (*session.Info, error)
	CreateWorktreeForkAcceptedFn func(context.Context, string, *session.CreateAcceptedOpts) (*session.Info, error)
	ListFn                       func() []*session.Info
	ListAllFn                    func(context.Context) ([]*session.Info, error)
	ListForWorkspaceFn           func(context.Context, string) ([]*session.Info, error)
	ListPageFn                   func(context.Context, session.ListQuery) (session.ListPage, error)
	CatalogFacetsFn              func(context.Context, session.ListQuery) (store.SessionCatalogFacetResult, error)
	SubscribeCatalogFn           func(context.Context, session.CatalogScope) (<-chan session.CatalogEvent, func(), error)
	MetricsByAgentFn             func(
		context.Context, store.ReadScope, string,
	) (map[string]session.AgentSessionMetrics, error)
	ListSessionsFn          func(context.Context, store.SessionListQuery) ([]store.SessionInfo, error)
	StatusFn                func(context.Context, string) (*session.Info, error)
	SessionOwnerFn          func(context.Context, string) (store.SessionOwner, error)
	ActivePromptRunFn       func(context.Context, string) (session.PromptRunIdentity, error)
	EventsFn                func(context.Context, string, store.EventQuery) ([]store.SessionEvent, error)
	EventMetadataFn         func(context.Context, string, store.EventQuery) ([]store.EventMetadata, error)
	LatestEventFn           func(context.Context, string, string) (*store.SessionEvent, error)
	HistoryFn               func(context.Context, string, store.EventQuery) ([]store.TurnHistory, error)
	TranscriptPageFn        func(context.Context, string, transcript.PageQuery) (transcript.Page, error)
	TranscriptChangesFn     func(context.Context, string, transcript.ChangeQuery) (transcript.ChangePage, error)
	RepairFn                func(context.Context, session.RepairOpts) (*session.RepairResult, error)
	DeleteFn                func(context.Context, string) error
	StopFn                  func(context.Context, string) error
	ArchiveFn               func(context.Context, string, string) (*session.Info, error)
	ArchiveWithStopFn       func(context.Context, string, string) (*session.Info, error)
	UnarchiveFn             func(context.Context, string, string) (*session.Info, error)
	RenameFn                func(context.Context, string, string, string) (*session.Info, error)
	AdoptSessionFn          func(context.Context, string, string, string) (*session.Info, error)
	MoveToProfileFn         func(context.Context, session.MoveToProfileOpts) (session.MoveToProfileResult, error)
	DetachSessionFn         func(context.Context, string, string) (*session.Info, error)
	StopWithCauseFn         func(context.Context, string, session.StopCause, string) error
	ResumeFn                func(context.Context, string) (*session.Session, error)
	AttachSessionFn         func(context.Context, store.SessionAttachRequest) (store.SessionAttach, error)
	SetRuntimeSelectionFn   func(context.Context, string, session.RuntimeSelection, int64) (*session.Info, error)
	ClearRuntimeSelectionFn func(context.Context, string, int64) (*session.Info, error)
	ClearFn                 func(context.Context, string) (*session.Session, error)
	ContinueFn              func(context.Context, session.ContinueSessionOpts) (session.DeriveResult, error)
	ForkFn                  func(context.Context, session.ForkSessionOpts) (session.DeriveResult, error)
	DerivePreviewFn         func(context.Context, string, string, string) (session.DerivePreview, error)
	RewindFn                func(
		context.Context,
		string,
		session.ConversationRewindOptions,
	) (session.ConversationRewindResult, error)
	PromptFn          func(context.Context, string, string) (<-chan acp.AgentEvent, error)
	PromptWithOptsFn  func(context.Context, string, session.PromptOpts) (<-chan acp.AgentEvent, error)
	PromptSyntheticFn func(
		context.Context,
		string,
		session.SyntheticPromptOpts,
	) (<-chan acp.AgentEvent, error)
	SendPromptFn          func(context.Context, string, session.SendPromptOpts) (session.SendPromptResult, error)
	SteerFn               func(context.Context, string, session.SteerPromptOpts) (session.SendPromptResult, error)
	ListPendingInputsFn   func(context.Context, string) ([]session.PendingInput, error)
	ClearPendingInputsFn  func(context.Context, string, session.PromptCaller) (session.ClearPendingInputsResult, error)
	ReplacePendingInputFn func(
		context.Context, string, string, session.ReplacePendingInputOpts,
	) (session.PendingInput, error)
	PromotePendingInputFn func(
		context.Context, string, string, session.PromotePendingInputOpts,
	) (session.SendPromptResult, error)
	CancelQueuedFn func(context.Context, string, string) (session.SendPromptResult, error)
	CancelPromptFn func(context.Context, string) (session.PromptCancelResult, error)
	ApproveFn      func(context.Context, string, acp.ApproveRequest) (session.ApprovalResult, error)
	InputQueueFn   func(context.Context, string) (session.InputQueueSummary, error)
	WorkingDirFn   func(context.Context, string) (string, error)
}

func (*StubSessionManager) ActivePromptRun

func (s *StubSessionManager) ActivePromptRun(
	ctx context.Context,
	id string,
) (session.PromptRunIdentity, error)

func (*StubSessionManager) AdoptSession

func (s *StubSessionManager) AdoptSession(
	ctx context.Context,
	workspaceID string,
	sessionID string,
	parentSessionID string,
) (*session.Info, error)

AdoptSession delegates to AdoptSessionFn or reports a missing session.

func (*StubSessionManager) AggregateSessionsByAgent

func (s *StubSessionManager) AggregateSessionsByAgent(
	ctx context.Context,
	readScope store.ReadScope,
	workspaceID string,
) (map[string]session.AgentSessionMetrics, error)

func (*StubSessionManager) ApprovePermission

func (s *StubSessionManager) ApprovePermission(
	ctx context.Context,
	id string,
	req acp.ApproveRequest,
) (session.ApprovalResult, error)

func (*StubSessionManager) Archive

func (s *StubSessionManager) Archive(
	ctx context.Context,
	workspaceID string,
	sessionID string,
) (*session.Info, error)

func (*StubSessionManager) ArchiveWithStop

func (s *StubSessionManager) ArchiveWithStop(
	ctx context.Context,
	workspaceID string,
	sessionID string,
) (*session.Info, error)

func (*StubSessionManager) AttachSession

func (*StubSessionManager) AttentionSummary

func (s *StubSessionManager) AttentionSummary(
	ctx context.Context,
	readScope store.ReadScope,
) (store.SessionAttentionSummary, error)

AttentionSummary returns the configured exact test aggregate.

func (*StubSessionManager) CancelPrompt

func (*StubSessionManager) CancelQueuedPrompt

func (s *StubSessionManager) CancelQueuedPrompt(
	ctx context.Context,
	id string,
	queueEntryID string,
) (session.SendPromptResult, error)

func (*StubSessionManager) CatalogFacets

func (*StubSessionManager) ClearConversation

func (s *StubSessionManager) ClearConversation(
	ctx context.Context,
	id string,
) (*session.Session, error)

func (*StubSessionManager) ClearPendingInputs

func (s *StubSessionManager) ClearPendingInputs(
	ctx context.Context,
	id string,
	caller session.PromptCaller,
) (session.ClearPendingInputsResult, error)

func (*StubSessionManager) ClearRuntimeSelection

func (s *StubSessionManager) ClearRuntimeSelection(
	ctx context.Context,
	id string,
	expectedRevision int64,
) (*session.Info, error)

func (*StubSessionManager) Compactions

func (*StubSessionManager) ContextEvents

func (s *StubSessionManager) ContextEvents(ctx context.Context, id string) (session.ContextEvents, error)

func (*StubSessionManager) ContinueSession

ContinueSession delegates to ContinueFn.

func (*StubSessionManager) Create

func (s *StubSessionManager) Create(ctx context.Context, optsInput *session.CreateOpts) (*session.Session, error)

func (*StubSessionManager) CreateAccepted

func (s *StubSessionManager) CreateAccepted(
	ctx context.Context,
	optsInput *session.CreateAcceptedOpts,
) (*session.Info, error)

func (*StubSessionManager) CreateWorktreeForkAccepted

func (s *StubSessionManager) CreateWorktreeForkAccepted(
	ctx context.Context,
	originSessionID string,
	optsInput *session.CreateAcceptedOpts,
) (*session.Info, error)

func (*StubSessionManager) Delete

func (s *StubSessionManager) Delete(ctx context.Context, id string) error

func (*StubSessionManager) Deliveries

func (*StubSessionManager) DerivePreview

func (s *StubSessionManager) DerivePreview(
	ctx context.Context,
	workspaceID string,
	sourceSessionID string,
	messageID string,
) (session.DerivePreview, error)

DerivePreview delegates to DerivePreviewFn.

func (*StubSessionManager) DescendantPendingInteractions

func (s *StubSessionManager) DescendantPendingInteractions(
	ctx context.Context,
	id string,
	statuses []string,
) ([]store.PendingInteraction, error)

func (*StubSessionManager) DetachSession

func (s *StubSessionManager) DetachSession(
	ctx context.Context,
	workspaceID string,
	sessionID string,
) (*session.Info, error)

DetachSession delegates to DetachSessionFn or reports a missing session.

func (*StubSessionManager) EventMetadata

func (s *StubSessionManager) EventMetadata(
	ctx context.Context,
	id string,
	query store.EventQuery,
) ([]store.EventMetadata, error)

func (*StubSessionManager) Events

func (s *StubSessionManager) Events(
	ctx context.Context,
	id string,
	query store.EventQuery,
) ([]store.SessionEvent, error)

func (*StubSessionManager) ForkSession

ForkSession delegates to ForkFn.

func (*StubSessionManager) History

func (s *StubSessionManager) History(
	ctx context.Context,
	id string,
	query store.EventQuery,
) ([]store.TurnHistory, error)

func (*StubSessionManager) InputQueueSummary

func (s *StubSessionManager) InputQueueSummary(ctx context.Context, id string) (session.InputQueueSummary, error)

func (*StubSessionManager) LatestSessionEventByType

func (s *StubSessionManager) LatestSessionEventByType(
	ctx context.Context,
	id string,
	eventType string,
) (*store.SessionEvent, error)

func (*StubSessionManager) LatestSettledTurn

func (s *StubSessionManager) LatestSettledTurn(ctx context.Context, id string) (session.SettledTurn, error)

func (*StubSessionManager) List

func (s *StubSessionManager) List() []*session.Info

func (*StubSessionManager) ListAll

func (s *StubSessionManager) ListAll(ctx context.Context) ([]*session.Info, error)

func (*StubSessionManager) ListForWorkspace

func (s *StubSessionManager) ListForWorkspace(ctx context.Context, workspaceID string) ([]*session.Info, error)

func (*StubSessionManager) ListPage

func (*StubSessionManager) ListPendingInputs

func (s *StubSessionManager) ListPendingInputs(
	ctx context.Context,
	id string,
) ([]session.PendingInput, error)

func (*StubSessionManager) ListSessions

func (s *StubSessionManager) ListSessions(
	ctx context.Context,
	query store.SessionListQuery,
) ([]store.SessionInfo, error)

func (*StubSessionManager) MoveToProfile

MoveToProfile delegates to MoveToProfileFn or reports a missing session.

func (*StubSessionManager) PendingInteractions

func (s *StubSessionManager) PendingInteractions(
	ctx context.Context,
	sessionID string,
	statuses []string,
) ([]store.PendingInteraction, error)

PendingInteractions lists a test session's durable interaction projection.

func (*StubSessionManager) PromotePendingInputToSteer

func (s *StubSessionManager) PromotePendingInputToSteer(
	ctx context.Context,
	id string,
	entryID string,
	opts session.PromotePendingInputOpts,
) (session.SendPromptResult, error)

func (*StubSessionManager) Prompt

func (s *StubSessionManager) Prompt(ctx context.Context, id string, msg string) (<-chan acp.AgentEvent, error)

func (*StubSessionManager) PromptSynthetic

func (s *StubSessionManager) PromptSynthetic(
	ctx context.Context,
	id string,
	opts session.SyntheticPromptOpts,
) (<-chan acp.AgentEvent, error)

func (*StubSessionManager) PromptWithOpts

func (s *StubSessionManager) PromptWithOpts(
	ctx context.Context,
	id string,
	opts session.PromptOpts,
) (<-chan acp.AgentEvent, error)

func (*StubSessionManager) Rename

func (s *StubSessionManager) Rename(
	ctx context.Context,
	workspaceID string,
	sessionID string,
	name string,
) (*session.Info, error)

func (*StubSessionManager) RepairSession

func (s *StubSessionManager) RepairSession(
	ctx context.Context,
	opts session.RepairOpts,
) (*session.RepairResult, error)

func (*StubSessionManager) ReplacePendingInput

func (s *StubSessionManager) ReplacePendingInput(
	ctx context.Context,
	id string,
	entryID string,
	opts session.ReplacePendingInputOpts,
) (session.PendingInput, error)

func (*StubSessionManager) RequestCompaction

func (s *StubSessionManager) RequestCompaction(
	ctx context.Context,
	id string,
) (session.CompactionRequestResult, <-chan acp.AgentEvent, error)

func (*StubSessionManager) Resume

func (s *StubSessionManager) Resume(ctx context.Context, id string) (*session.Session, error)

func (*StubSessionManager) RewindConversation

func (*StubSessionManager) SendPrompt

func (*StubSessionManager) SessionOwner

func (s *StubSessionManager) SessionOwner(ctx context.Context, id string) (store.SessionOwner, error)

SessionOwner delegates to SessionOwnerFn, else derives the owner from Status.

func (*StubSessionManager) SessionPresence

func (s *StubSessionManager) SessionPresence(
	ctx context.Context,
	sessionID string,
	leaseID string,
	visible bool,
) (string, error)

SessionPresence acquires, renews, or releases a test presence lease.

func (*StubSessionManager) SetRuntimeSelection

func (s *StubSessionManager) SetRuntimeSelection(
	ctx context.Context,
	id string,
	selection session.RuntimeSelection,
	expectedRevision int64,
) (*session.Info, error)

func (*StubSessionManager) Status

func (s *StubSessionManager) Status(ctx context.Context, id string) (*session.Info, error)

func (*StubSessionManager) SteerPrompt

func (*StubSessionManager) Stop

func (s *StubSessionManager) Stop(ctx context.Context, id string) error

func (*StubSessionManager) StopWithCause

func (s *StubSessionManager) StopWithCause(
	ctx context.Context,
	id string,
	cause session.StopCause,
	detail string,
) error

func (*StubSessionManager) SubscribeSessionCatalogEvents

func (s *StubSessionManager) SubscribeSessionCatalogEvents(
	ctx context.Context,
	scope session.CatalogScope,
) (<-chan session.CatalogEvent, func(), error)

func (*StubSessionManager) TranscriptChanges

func (s *StubSessionManager) TranscriptChanges(
	ctx context.Context,
	id string,
	query transcript.ChangeQuery,
) (transcript.ChangePage, error)

func (*StubSessionManager) TranscriptPage

func (s *StubSessionManager) TranscriptPage(
	ctx context.Context,
	id string,
	query transcript.PageQuery,
) (transcript.Page, error)

func (*StubSessionManager) Unarchive

func (s *StubSessionManager) Unarchive(
	ctx context.Context,
	workspaceID string,
	sessionID string,
) (*session.Info, error)

func (*StubSessionManager) UsageEvents

func (*StubSessionManager) WaitForBadge

func (s *StubSessionManager) WaitForBadge(
	ctx context.Context,
	request session.WaitRequest,
) (session.WaitOutcome, error)

WaitForBadge returns the configured bounded test wait outcome.

func (*StubSessionManager) WorkingDir

func (s *StubSessionManager) WorkingDir(ctx context.Context, id string) (string, error)

type StubSkillsRegistry

type StubSkillsRegistry struct {
	GetFn          func(name string) (*skills.Skill, bool)
	ListFn         func() []*skills.Skill
	ForWorkspaceFn func(ctx context.Context, resolved *workspacepkg.ResolvedWorkspace) ([]*skills.Skill, error)
	ForAgentFn     func(
		ctx context.Context,
		resolved *workspacepkg.ResolvedWorkspace,
		agentName string,
	) ([]*skills.Skill, error)
	ForAgentDefFn func(
		ctx context.Context,
		resolved *workspacepkg.ResolvedWorkspace,
		agent compozyconfig.AgentDef,
	) ([]*skills.Skill, error)
	LoadContentFn        func(ctx context.Context, skill *skills.Skill) (string, error)
	LoadResourceFn       func(ctx context.Context, skill *skills.Skill, relativePath string) (string, error)
	SetEnabledFn         func(name string, resolved *workspacepkg.ResolvedWorkspace, enabled bool) error
	SetEnabledForAgentFn func(name string, resolved *workspacepkg.ResolvedWorkspace, agentName string, enabled bool) error
	RefreshGlobalFn      func(ctx context.Context) error
}

func (StubSkillsRegistry) ForAgent

func (s StubSkillsRegistry) ForAgent(
	ctx context.Context,
	resolved *workspacepkg.ResolvedWorkspace,
	agentName string,
) ([]*skills.Skill, error)

func (StubSkillsRegistry) ForAgentDef

func (StubSkillsRegistry) ForWorkspace

func (s StubSkillsRegistry) ForWorkspace(
	ctx context.Context,
	resolved *workspacepkg.ResolvedWorkspace,
) ([]*skills.Skill, error)

func (StubSkillsRegistry) Get

func (s StubSkillsRegistry) Get(name string) (*skills.Skill, bool)

func (StubSkillsRegistry) List

func (s StubSkillsRegistry) List() []*skills.Skill

func (StubSkillsRegistry) LoadContent

func (s StubSkillsRegistry) LoadContent(ctx context.Context, skill *skills.Skill) (string, error)

func (StubSkillsRegistry) LoadResource

func (s StubSkillsRegistry) LoadResource(
	ctx context.Context,
	skill *skills.Skill,
	relativePath string,
) (string, error)

func (StubSkillsRegistry) RefreshGlobal

func (s StubSkillsRegistry) RefreshGlobal(ctx context.Context) error

func (StubSkillsRegistry) SetEnabled

func (s StubSkillsRegistry) SetEnabled(name string, resolved *workspacepkg.ResolvedWorkspace, enabled bool) error

func (StubSkillsRegistry) SetEnabledForAgent

func (s StubSkillsRegistry) SetEnabledForAgent(
	name string,
	resolved *workspacepkg.ResolvedWorkspace,
	agentName string,
	enabled bool,
) error

type StubTaskDesignationStore

type StubTaskDesignationStore struct {
	PutTaskDesignationRollupFn   func(context.Context, store.TaskDesignationRollup) error
	ListTaskDesignationRollupsFn func(
		context.Context,
		store.TaskDesignationRollupQuery,
	) ([]store.TaskDesignationRollup, error)
}

StubTaskDesignationStore captures the task-owned fan-out persistence boundary.

func (StubTaskDesignationStore) ListTaskDesignationRollups

func (StubTaskDesignationStore) PutTaskDesignationRollup

func (s StubTaskDesignationStore) PutTaskDesignationRollup(
	ctx context.Context,
	rollup store.TaskDesignationRollup,
) error

type StubTaskManager

type StubTaskManager struct {
	CreateTaskFn      func(context.Context, taskpkg.CreateTask, taskpkg.ActorContext) (*taskpkg.Task, error)
	CreateChildTaskFn func(
		context.Context,
		string,
		taskpkg.CreateTask,
		taskpkg.ActorContext,
	) (*taskpkg.Task, error)
	DeleteTaskFn  func(context.Context, string, taskpkg.ActorContext) error
	UpdateTaskFn  func(context.Context, string, taskpkg.Patch, taskpkg.ActorContext) (*taskpkg.Task, error)
	PublishTaskFn func(
		context.Context,
		string,
		taskpkg.ExecutionRequest,
		taskpkg.ActorContext,
	) (*taskpkg.Execution, error)
	StartTaskFn func(
		context.Context,
		string,
		taskpkg.ExecutionRequest,
		taskpkg.ActorContext,
	) (*taskpkg.Execution, error)
	ApproveTaskFn func(
		context.Context,
		string,
		taskpkg.ExecutionRequest,
		taskpkg.ActorContext,
	) (*taskpkg.Execution, error)
	RejectTaskFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.Task, error)
	CancelTaskFn func(
		context.Context,
		string,
		taskpkg.CancelTask,
		taskpkg.ActorContext,
	) (*taskpkg.Task, error)
	BlockTaskFn      func(context.Context, taskpkg.BlockRequest, taskpkg.ActorContext) (taskpkg.TaskBlock, error)
	ClearTaskBlockFn func(
		context.Context,
		string,
		string,
		string,
		taskpkg.ActorContext,
	) (taskpkg.TaskBlock, error)
	RecoverTaskFn         func(context.Context, string, string, taskpkg.ActorContext) (*taskpkg.Task, error)
	ExpireTaskBlocksFn    func(context.Context, time.Time, taskpkg.ActorContext) (taskpkg.ExpireTaskBlocksResult, error)
	ListTaskBlocksFn      func(context.Context, string, bool, taskpkg.ActorContext) ([]taskpkg.TaskBlock, error)
	MarkTaskReadFn        func(context.Context, string, taskpkg.ActorContext) (taskpkg.TriageState, error)
	ArchiveTaskFn         func(context.Context, string, taskpkg.ActorContext) (taskpkg.TriageState, error)
	DismissTaskFn         func(context.Context, string, taskpkg.ActorContext) (taskpkg.TriageState, error)
	GetExecutionProfileFn func(
		context.Context,
		string,
		taskpkg.ActorContext,
	) (taskpkg.ExecutionProfile, error)
	SetExecutionProfileFn func(
		context.Context,
		string,
		*taskpkg.ExecutionProfile,
		taskpkg.ActorContext,
	) (taskpkg.ExecutionProfile, error)
	SetWorktreePolicyFn func(
		context.Context,
		string,
		taskpkg.WorktreePolicy,
		taskpkg.ActorContext,
	) (taskpkg.ExecutionProfile, error)
	DeleteExecutionProfileFn func(context.Context, string, taskpkg.ActorContext) error
	RequestRunReviewFn       func(
		context.Context,
		taskpkg.RunReviewRequest,
		taskpkg.ActorContext,
	) (taskpkg.RunReview, bool, error)
	GetRunReviewFn    func(context.Context, string, taskpkg.ActorContext) (taskpkg.RunReview, error)
	RecordRunReviewFn func(
		context.Context,
		taskpkg.RecordRunReviewRequest,
		taskpkg.ActorContext,
	) (taskpkg.RunReviewResult, error)
	BindRunReviewSessionFn func(
		context.Context,
		taskpkg.BindRunReviewSessionRequest,
		taskpkg.ActorContext,
	) (taskpkg.RunReviewBinding, error)
	ListRunReviewsFn   func(context.Context, taskpkg.RunReviewQuery, taskpkg.ActorContext) ([]taskpkg.RunReview, error)
	AddDependencyFn    func(context.Context, taskpkg.AddDependency, taskpkg.ActorContext) error
	RemoveDependencyFn func(context.Context, string, string, taskpkg.ActorContext) error
	EnqueueRunFn       func(context.Context, taskpkg.EnqueueRun, taskpkg.ActorContext) (*taskpkg.Run, error)
	ClaimNextRunFn     func(
		context.Context,
		taskpkg.ClaimCriteria,
		taskpkg.ActorContext,
	) (*taskpkg.ClaimResult, error)
	StartRunFn             func(context.Context, string, taskpkg.StartRun, taskpkg.ActorContext) (*taskpkg.Run, error)
	AttachRunSessionFn     func(context.Context, string, string, taskpkg.ActorContext) (*taskpkg.Run, error)
	HeartbeatRunLeaseFn    func(context.Context, taskpkg.LeaseHeartbeat, taskpkg.ActorContext) (*taskpkg.Run, error)
	ReleaseRunLeaseFn      func(context.Context, taskpkg.LeaseRelease, taskpkg.ActorContext) (*taskpkg.Run, error)
	ForceReleaseRunFn      forceReleaseRunFunc
	ForceFailRunFn         forceFailRunFunc
	RetryRunFn             retryRunFunc
	RecoverRunFn           recoverRunFunc
	BulkForceReleaseRunsFn bulkForceRunFunc
	BulkForceFailRunsFn    bulkForceRunFunc
	PauseTaskFn            pauseTaskFunc
	ResumeTaskFn           resumeTaskFunc
	SchedulerStatusFn      func(context.Context, taskpkg.ActorContext) (taskpkg.SchedulerStatus, error)
	PauseSchedulerFn       func(
		context.Context,
		taskpkg.SchedulerPauseRequest,
		taskpkg.ActorContext,
	) (taskpkg.SchedulerStatus, error)
	ResumeSchedulerFn func(
		context.Context,
		taskpkg.SchedulerResumeRequest,
		taskpkg.ActorContext,
	) (taskpkg.SchedulerStatus, error)
	DrainSchedulerFn func(
		context.Context,
		taskpkg.SchedulerDrainRequest,
		taskpkg.ActorContext,
	) (taskpkg.SchedulerDrainResult, error)
	SchedulerBacklogFn func(
		context.Context,
		taskpkg.SchedulerBacklogQuery,
		taskpkg.ActorContext,
	) (taskpkg.SchedulerBacklog, error)
	CompleteRunLeaseFn func(context.Context, taskpkg.LeaseCompletion, taskpkg.ActorContext) (*taskpkg.Run, error)
	FailRunLeaseFn     func(context.Context, taskpkg.LeaseFailure, taskpkg.ActorContext) (*taskpkg.Run, error)

	LookupActiveRunForSessionFn func(
		context.Context,
		string,
		string,
	) (taskpkg.AutonomyLeaseHandle, error)
	CompleteRunFn             func(context.Context, string, taskpkg.RunResult, taskpkg.ActorContext) (*taskpkg.Run, error)
	FailRunFn                 func(context.Context, string, taskpkg.RunFailure, taskpkg.ActorContext) (*taskpkg.Run, error)
	CancelRunFn               func(context.Context, string, taskpkg.CancelRun, taskpkg.ActorContext) (*taskpkg.Run, error)
	RecoverExpiredRunLeasesFn func(
		context.Context,
		taskpkg.ExpiredLeaseRecovery,
		taskpkg.ActorContext,
	) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
	GetTaskFn           func(context.Context, string, taskpkg.ActorContext) (*taskpkg.View, error)
	InspectTaskFn       func(context.Context, string, taskpkg.ActorContext) (*taskpkg.InspectView, error)
	InspectRunFn        func(context.Context, string, taskpkg.ActorContext) (*taskpkg.InspectView, error)
	ReadTaskRunResultFn func(
		context.Context,
		string,
		int64,
		int64,
		taskpkg.ActorContext,
	) (taskpkg.RunResultPage, error)
	ListTaskRunsFn    func(context.Context, string, taskpkg.RunQuery, taskpkg.ActorContext) ([]taskpkg.Run, error)
	ListTasksFn       func(context.Context, taskpkg.Query, taskpkg.ActorContext) ([]taskpkg.Summary, error)
	ListTaskCatalogFn func(
		context.Context,
		taskpkg.CatalogQuery,
		taskpkg.ActorContext,
	) (taskpkg.CatalogPage, error)
	TimelineFn func(
		context.Context,
		string,
		taskpkg.TimelineQuery,
		taskpkg.ActorContext,
	) ([]taskpkg.TimelineItem, error)
	StreamFn func(
		context.Context,
		string,
		taskpkg.StreamQuery,
		taskpkg.ActorContext,
	) (<-chan taskpkg.StreamEvent, error)
	TreeFn      func(context.Context, string, taskpkg.ActorContext) (*taskpkg.TreeView, error)
	RunDetailFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.RunDetailView, error)
}

func (*StubTaskManager) AddDependency

func (s *StubTaskManager) AddDependency(
	ctx context.Context,
	spec taskpkg.AddDependency,
	actor taskpkg.ActorContext,
) error

func (*StubTaskManager) ApproveTask

func (*StubTaskManager) ArchiveTask

func (s *StubTaskManager) ArchiveTask(
	ctx context.Context,
	id string,
	actor taskpkg.ActorContext,
) (taskpkg.TriageState, error)

func (*StubTaskManager) AttachRunSession

func (s *StubTaskManager) AttachRunSession(
	ctx context.Context,
	runID string,
	sessionID string,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) BindRunReviewSession

func (*StubTaskManager) BlockTask

func (*StubTaskManager) BulkForceFailRuns

func (*StubTaskManager) BulkForceReleaseRuns

func (*StubTaskManager) CancelRun

func (s *StubTaskManager) CancelRun(
	ctx context.Context,
	runID string,
	req taskpkg.CancelRun,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) CancelTask

func (s *StubTaskManager) CancelTask(
	ctx context.Context,
	id string,
	req taskpkg.CancelTask,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

func (*StubTaskManager) ClaimNextRun

func (s *StubTaskManager) ClaimNextRun(
	ctx context.Context,
	criteria taskpkg.ClaimCriteria,
	actor taskpkg.ActorContext,
) (*taskpkg.ClaimResult, error)

func (*StubTaskManager) ClearTaskBlock

func (s *StubTaskManager) ClearTaskBlock(
	ctx context.Context,
	taskID string,
	blockID string,
	note string,
	actor taskpkg.ActorContext,
) (taskpkg.TaskBlock, error)

func (*StubTaskManager) CompleteRun

func (s *StubTaskManager) CompleteRun(
	ctx context.Context,
	runID string,
	result taskpkg.RunResult,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) CompleteRunLease

func (s *StubTaskManager) CompleteRunLease(
	ctx context.Context,
	completion taskpkg.LeaseCompletion,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) CreateChildTask

func (s *StubTaskManager) CreateChildTask(
	ctx context.Context,
	parentTaskID string,
	spec taskpkg.CreateTask,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

func (*StubTaskManager) CreateTask

func (s *StubTaskManager) CreateTask(
	ctx context.Context,
	spec taskpkg.CreateTask,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

func (*StubTaskManager) DeleteExecutionProfile

func (s *StubTaskManager) DeleteExecutionProfile(
	ctx context.Context,
	taskID string,
	actor taskpkg.ActorContext,
) error

func (*StubTaskManager) DeleteTask

func (s *StubTaskManager) DeleteTask(
	ctx context.Context,
	id string,
	actor taskpkg.ActorContext,
) error

func (*StubTaskManager) DismissTask

func (s *StubTaskManager) DismissTask(
	ctx context.Context,
	id string,
	actor taskpkg.ActorContext,
) (taskpkg.TriageState, error)

func (*StubTaskManager) DrainScheduler

func (*StubTaskManager) EnqueueRun

func (s *StubTaskManager) EnqueueRun(
	ctx context.Context,
	spec taskpkg.EnqueueRun,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) ExpireTaskBlocks

func (s *StubTaskManager) ExpireTaskBlocks(
	ctx context.Context,
	now time.Time,
	actor taskpkg.ActorContext,
) (taskpkg.ExpireTaskBlocksResult, error)

func (*StubTaskManager) FailRun

func (s *StubTaskManager) FailRun(
	ctx context.Context,
	runID string,
	failure taskpkg.RunFailure,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) FailRunLease

func (s *StubTaskManager) FailRunLease(
	ctx context.Context,
	failure taskpkg.LeaseFailure,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) ForceFailRun

func (s *StubTaskManager) ForceFailRun(
	ctx context.Context,
	runID string,
	failure taskpkg.ForceFailRun,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) ForceReleaseRun

func (s *StubTaskManager) ForceReleaseRun(
	ctx context.Context,
	runID string,
	release taskpkg.ForceReleaseRun,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) GetExecutionProfile

func (s *StubTaskManager) GetExecutionProfile(
	ctx context.Context,
	taskID string,
	actor taskpkg.ActorContext,
) (taskpkg.ExecutionProfile, error)

func (*StubTaskManager) GetRunReview

func (s *StubTaskManager) GetRunReview(
	ctx context.Context,
	reviewID string,
	actor taskpkg.ActorContext,
) (taskpkg.RunReview, error)

func (*StubTaskManager) GetTask

func (s *StubTaskManager) GetTask(
	ctx context.Context,
	id string,
	actor taskpkg.ActorContext,
) (*taskpkg.View, error)

func (*StubTaskManager) HeartbeatRunLease

func (s *StubTaskManager) HeartbeatRunLease(
	ctx context.Context,
	heartbeat taskpkg.LeaseHeartbeat,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) InspectRun

func (s *StubTaskManager) InspectRun(
	ctx context.Context,
	runID string,
	actor taskpkg.ActorContext,
) (*taskpkg.InspectView, error)

func (*StubTaskManager) InspectTask

func (s *StubTaskManager) InspectTask(
	ctx context.Context,
	taskID string,
	actor taskpkg.ActorContext,
) (*taskpkg.InspectView, error)

func (*StubTaskManager) ListRunReviews

func (s *StubTaskManager) ListRunReviews(
	ctx context.Context,
	query taskpkg.RunReviewQuery,
	actor taskpkg.ActorContext,
) ([]taskpkg.RunReview, error)

func (*StubTaskManager) ListTaskBlocks

func (s *StubTaskManager) ListTaskBlocks(
	ctx context.Context,
	taskID string,
	includeCleared bool,
	actor taskpkg.ActorContext,
) ([]taskpkg.TaskBlock, error)

func (*StubTaskManager) ListTaskCatalog

func (s *StubTaskManager) ListTaskCatalog(
	ctx context.Context,
	query taskpkg.CatalogQuery,
	actor taskpkg.ActorContext,
) (taskpkg.CatalogPage, error)

ListTaskCatalog exposes the bounded catalog seam through the most specific configured callback.

func (*StubTaskManager) ListTaskRuns

func (s *StubTaskManager) ListTaskRuns(
	ctx context.Context,
	taskID string,
	query taskpkg.RunQuery,
	actor taskpkg.ActorContext,
) ([]taskpkg.Run, error)

func (*StubTaskManager) ListTasks

func (s *StubTaskManager) ListTasks(
	ctx context.Context,
	query taskpkg.Query,
	actor taskpkg.ActorContext,
) ([]taskpkg.Summary, error)

ListTasks exposes the unpaged task-list seam used by internal lifecycle tests.

func (*StubTaskManager) LookupActiveRunForSession

func (s *StubTaskManager) LookupActiveRunForSession(
	ctx context.Context,
	sessionID string,
	runID string,
) (taskpkg.AutonomyLeaseHandle, error)

func (*StubTaskManager) LookupRunReviewForSession

func (s *StubTaskManager) LookupRunReviewForSession(
	_ context.Context,
	_ string,
	_ taskpkg.ActorContext,
) (taskpkg.RunReviewBinding, error)

func (*StubTaskManager) MarkTaskRead

func (s *StubTaskManager) MarkTaskRead(
	ctx context.Context,
	id string,
	actor taskpkg.ActorContext,
) (taskpkg.TriageState, error)

func (*StubTaskManager) PauseScheduler

func (*StubTaskManager) PauseTask

func (s *StubTaskManager) PauseTask(
	ctx context.Context,
	taskID string,
	req taskpkg.PauseTaskRequest,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

func (*StubTaskManager) PublishTask

func (*StubTaskManager) ReadTaskRunResult

func (s *StubTaskManager) ReadTaskRunResult(
	ctx context.Context,
	runID string,
	offset int64,
	limit int64,
	actor taskpkg.ActorContext,
) (taskpkg.RunResultPage, error)

func (*StubTaskManager) RecordRunReview

func (*StubTaskManager) RecoverExpiredRunLeases

func (*StubTaskManager) RecoverRun

func (*StubTaskManager) RecoverTask

func (s *StubTaskManager) RecoverTask(
	ctx context.Context,
	id string,
	note string,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

func (*StubTaskManager) RejectTask

func (s *StubTaskManager) RejectTask(
	ctx context.Context,
	id string,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

func (*StubTaskManager) ReleaseRunLease

func (s *StubTaskManager) ReleaseRunLease(
	ctx context.Context,
	release taskpkg.LeaseRelease,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) RemoveDependency

func (s *StubTaskManager) RemoveDependency(
	ctx context.Context,
	taskID string,
	dependsOnID string,
	actor taskpkg.ActorContext,
) error

func (*StubTaskManager) RequestRunReview

func (*StubTaskManager) ResumeScheduler

func (*StubTaskManager) ResumeTask

func (s *StubTaskManager) ResumeTask(
	ctx context.Context,
	taskID string,
	req taskpkg.ResumeTaskRequest,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

func (*StubTaskManager) RetryRun

func (*StubTaskManager) RunDetail

func (s *StubTaskManager) RunDetail(
	ctx context.Context,
	runID string,
	actor taskpkg.ActorContext,
) (*taskpkg.RunDetailView, error)

func (*StubTaskManager) SchedulerBacklog

func (*StubTaskManager) SchedulerStatus

func (s *StubTaskManager) SchedulerStatus(
	ctx context.Context,
	actor taskpkg.ActorContext,
) (taskpkg.SchedulerStatus, error)

func (*StubTaskManager) SetExecutionProfile

func (s *StubTaskManager) SetExecutionProfile(
	ctx context.Context,
	taskID string,
	profile *taskpkg.ExecutionProfile,
	actor taskpkg.ActorContext,
) (taskpkg.ExecutionProfile, error)

func (*StubTaskManager) SetWorktreePolicy

func (s *StubTaskManager) SetWorktreePolicy(
	ctx context.Context,
	taskID string,
	policy taskpkg.WorktreePolicy,
	actor taskpkg.ActorContext,
) (taskpkg.ExecutionProfile, error)

func (*StubTaskManager) StartRun

func (s *StubTaskManager) StartRun(
	ctx context.Context,
	runID string,
	req taskpkg.StartRun,
	actor taskpkg.ActorContext,
) (*taskpkg.Run, error)

func (*StubTaskManager) StartTask

func (*StubTaskManager) Stream

func (s *StubTaskManager) Stream(
	ctx context.Context,
	taskID string,
	query taskpkg.StreamQuery,
	actor taskpkg.ActorContext,
) (<-chan taskpkg.StreamEvent, error)

func (*StubTaskManager) Timeline

func (s *StubTaskManager) Timeline(
	ctx context.Context,
	taskID string,
	query taskpkg.TimelineQuery,
	actor taskpkg.ActorContext,
) ([]taskpkg.TimelineItem, error)

func (*StubTaskManager) Tree

func (s *StubTaskManager) Tree(
	ctx context.Context,
	taskID string,
	actor taskpkg.ActorContext,
) (*taskpkg.TreeView, error)

func (*StubTaskManager) UpdateTask

func (s *StubTaskManager) UpdateTask(
	ctx context.Context,
	id string,
	patch taskpkg.Patch,
	actor taskpkg.ActorContext,
) (*taskpkg.Task, error)

type StubWorkspaceAccessPolicy

type StubWorkspaceAccessPolicy struct {
	AuthorizeFn func(context.Context, workspaceaccess.Request) (workspaceaccess.Decision, error)
}

StubWorkspaceAccessPolicy exposes a focused policy seam for transport tests.

func (StubWorkspaceAccessPolicy) Authorize

Authorize delegates to AuthorizeFn and denies when no behavior is configured.

type StubWorkspaceService

func (StubWorkspaceService) Get

func (StubWorkspaceService) List

func (StubWorkspaceService) Register

func (StubWorkspaceService) Resolve

func (StubWorkspaceService) ResolveForProfile

func (s StubWorkspaceService) ResolveForProfile(
	ctx context.Context,
	ref string,
	profileName string,
) (workspacepkg.ResolvedWorkspace, error)

func (StubWorkspaceService) ResolveOrRegister

func (s StubWorkspaceService) ResolveOrRegister(
	ctx context.Context,
	path string,
) (workspacepkg.ResolvedWorkspace, error)

func (StubWorkspaceService) ResolveUser

func (s StubWorkspaceService) ResolveUser(
	ctx context.Context, profileID string,
) (workspacepkg.ResolvedWorkspace, error)

func (StubWorkspaceService) SetArchived

func (s StubWorkspaceService) SetArchived(
	ctx context.Context,
	ref string,
	archived bool,
) (workspacepkg.Workspace, error)

func (StubWorkspaceService) Unregister

func (s StubWorkspaceService) Unregister(ctx context.Context, id string) error

func (StubWorkspaceService) Update

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL