Merge branch 'work/mqti13'

# Conflicts:
#	internal/contracts/state/v1/state.pb.go
This commit is contained in:
sam committed 2026-10-11 04:03:52 +11:00
commit cac0f43b58
17 files changed
+1957 -1413

No files matched your search

@@ -81,6 +81,7 @@ type HarnessSecretStore interface {
// status guard. It is separate from the already broad lifecycle contract so
// consumers that only run tasks do not acquire an operator-only capability.
type TaskArchiver interface {
OutcomePoster
ArchiveTask(ctx context.Context, taskID int64, fromStatus string, audit events.Event) (eventID int64, err error)
ClearTerminalTasks(ctx context.Context) (int64, error)
}
@@ -120,6 +121,16 @@ type RemediationStarter interface {
SetReviewCursors(ctx context.Context, taskID, reviewCursor, commentCursor int64) error
}
// OutcomePoster tracks which finished chat tasks have reported back to their
// conversation.
type OutcomePoster interface {
// UnpostedOutcomes returns finished chat tasks whose outcome has not been
// posted to the conversation that created them.
UnpostedOutcomes(ctx context.Context) ([]*task.Task, error)
// MarkOutcomePosted records that a task's outcome was posted.
MarkOutcomePosted(ctx context.Context, taskID int64) error
}
// TaskQueries groups read-only task accessors.
type TaskQueries interface {
TaskByIssue(ctx context.Context, owner, repo string, number int) (*task.Task, error)
+3
View File
@@ -88,6 +88,9 @@ type Task struct {
// deployments). Used to scope /approve and /cancel authorization so
// one identity cannot control another's chat-spawned tasks.
Identity string `json:"identity"`
// Origin names the conversation that created the task, so its outcome and
// /stop find it; empty for a task no conversation started.
Origin string `json:"origin"`
// Org is the org the task belongs to. The State Store derives it from
// the task's identity when the row is written;
// a task