Versions in this module Expand all Collapse all v1 v1.3.8 Oct 19, 2026 Changes in this version + const ActionsIssuer + const CheckoutEvidenceMaximumRequests + const ExperimentAttemptMaximumRequests + const ExperimentWorkflowSourceBytes + const GitHubActionsAppID + const KennelWorkflowBytes + const KennelWorkflowFiles + const RepositoryDiscoveryLimit + var ErrActionsKeysUnavailable = errors.New("GitHub's Actions signing keys could not be fetched") + var ErrActionsToken = errors.New("the upload's GitHub Actions OIDC token is not valid for this controller") + var ErrCheckoutAmbiguous = workflow.ErrCheckoutAmbiguous + var ErrCheckoutNotFound = workflow.ErrCheckoutNotFound + var ErrContextMismatch = errors.New("github: published context does not match the trusted branch") + var ErrExperimentAttemptChanged = errors.New("github: comparison attempt changed during collection; refresh its evidence") + var ErrRepairUnsupported = errors.New("unsupported PR repair target") + var ErrRunnerBusy = errors.New("github: runner is still running a job") + var ErrServerError = errors.New("github: server error") + var ErrSetupConflict = errors.New("github: repository setup changed; review it again") + var KennelEndpoints = []string + func ActionsIssuerFor(host string) string + func NewServerError(err error) error + func RunnerNameOn(pool *store.Pool, host *store.Host) string + func UnverifiedActionsIssuer(raw string) (string, error) + func ValidCheckoutEvidence(e *CheckoutEvidence, repo string, s CheckoutSelection) bool + func ValidCheckoutSelection(s CheckoutSelection) bool + func ValidExperimentAttemptContext(event, workflowPath string) bool + func ValidExperimentWorkflowSource(e *ExperimentAttemptEvidence) bool + type ActionsClaims struct + EventName string + Expiry time.Time + ID string + JobWorkflowRef string + Ref string + Repository string + RepositoryID string + RepositoryOwnerID string + RunAttempt string + RunID string + SHA string + type ActionsKeysError struct + Err error + Host string + func (e *ActionsKeysError) Error() string + func (e *ActionsKeysError) Is(target error) bool + type ActionsTokenVerifier struct + func NewActionsTokenVerifier(issuer string) *ActionsTokenVerifier + func (v *ActionsTokenVerifier) Verify(ctx context.Context, raw, audience string) (*ActionsClaims, error) + type AgentGuidanceClient interface + OpenContextSetup func(context.Context, ContextSetupRequest) (*PullRequest, error) + ReadAgentGuidance func(context.Context, string, string) (*ContextSetupSource, error) + type CheckoutEvidence struct + Basis string + BlobSHA string + JobNameSHA256 string + Repository string + Selection CheckoutSelection + Source optimisation.Source + StepNameSHA256 string + StepNumber int64 + Timing optimisation.Timing + Version string + type CheckoutEvidenceReader interface + ReadCheckoutEvidence func(context.Context, string, CheckoutSelection) (*CheckoutEvidence, error) + type CheckoutSelection struct + Attempt int + GitHubJobID int64 + JobIndex int + Locate bool + RunID int64 + StepIndex int type Client + GetWorkflowRun func(ctx context.Context, repo string, runID int64) (*WorkflowRunState, error) + RerunFailedWorkflowJobs func(ctx context.Context, repo string, runID int64) error + RerunWorkflowJob func(ctx context.Context, repo string, jobID int64) error + type ContextIngestionClient interface + ContextSetupMerged func(context.Context, string, int, string) (bool, error) + ReadContextPublication func(context.Context, string, string) (*ContextPublication, error) + VerifyContextSnapshot func(ctx context.Context, repo, branch, commit string, snapshot *aicontext.Snapshot) error + type ContextPublication struct + OutputCommit string + Snapshot *aicontext.Snapshot + Source *ContextSetupSource + type ContextRun struct + CreatedAt time.Time + Facts aicontext.RunFacts + ID int64 + JobIDs []int64 + URL string + UpdatedAt time.Time + type ContextRunReader interface + ContextArtifactUsage func(ctx context.Context, repo string) (*aicontext.ArtifactUsage, error) + ContextJobErrors func(ctx context.Context, repo string, jobID int64) ([]string, error) + LatestContextRun func(ctx context.Context, repo, commit string) (*ContextRun, error) + type ContextSetupClient interface + OpenContextSetup func(context.Context, ContextSetupRequest) (*PullRequest, error) + ReadContextSetup func(context.Context, string, string) (*ContextSetupSource, error) + type ContextSetupRequest struct + Action string + Base string + BaseCommit string + Files []aicontext.SetupChange + Head string + PlanHash string + Repo string + type ContextSetupSource struct + Commit string + Files []aicontext.SetupFile + Inventory []string + Repository Repository + type ContextSetupStatusClient interface + ContextSetupStatus func(context.Context, string, int, string) (string, error) + type ContextWorkflowDispatcher interface + DispatchContextWorkflow func(ctx context.Context, repo, branch string) error + type ExperimentAttemptEvidence struct + Attempt int + Conclusion string + Event string + HeadSHA string + Jobs []ExperimentAttemptJob + JobsCoverage string + Repository string + RunID int64 + RunStartedAt *time.Time + Status string + UpdatedAt *time.Time + WorkflowID int64 + WorkflowPath string + WorkflowSource *ExperimentWorkflowSource + type ExperimentAttemptJob struct + CompletedAt *time.Time + Conclusion string + ID int64 + StartedAt *time.Time + Status string + type ExperimentAttemptReader interface + ReadExperimentAttempt func(context.Context, string, int64, int) (*ExperimentAttemptEvidence, error) + type ExperimentWorkflowSource struct + Basis string + BlobSHA string + Bytes int + CommitSHA string + ContentSHA256 string + Dependencies *workflow.DependencyInventory + Path string + Version string + type FakeActionsIssuer struct + URL string + func NewFakeActionsIssuer(t fakeT) *FakeActionsIssuer + func (f *FakeActionsIssuer) Sign(t fakeT, claims map[string]any) string + type FakeActionsSettings struct + DefaultTokenWrite bool + ForkApproval string + PrivateForkRuns bool + PrivateForkSecrets bool + PrivateForkWriteToken bool + type FakeArtifact struct + Bytes int64 + Expired bool + Name string + type FakeContextJob struct + Conclusion string + Log string + Name string + Steps []FakeContextStep + type FakeContextRun struct + Commit string + Conclusion string + Finished time.Time + Jobs []FakeContextJob + Status string + type FakeContextStep struct + Conclusion string + Name string type FakeGitHub + func (f *FakeGitHub) AddArtifacts(repo string, artifacts ...FakeArtifact) + func (f *FakeGitHub) AddBranchRule(repo, branch string, checks ...FakeRequiredCheck) + func (f *FakeGitHub) AddContextRun(repo string, run FakeContextRun) int64 + func (f *FakeGitHub) ContextDispatches(repo string) int + func (f *FakeGitHub) ContextLogAuthorizations() []string + func (f *FakeGitHub) ContextRunJobID(runID int64, i int) int64 + func (f *FakeGitHub) JobReruns() int + func (f *FakeGitHub) LoseNextContextPullResponse(repo string) + func (f *FakeGitHub) MergeContextPull(repo string, number int) bool + func (f *FakeGitHub) NotModified() int + func (f *FakeGitHub) RepositoryID(fullName string) int64 + func (f *FakeGitHub) Reruns() int + func (f *FakeGitHub) SetActionsSettings(repo string, s FakeActionsSettings) + func (f *FakeGitHub) SetBranchProtection(repo, branch string, checks ...FakeRequiredCheck) + func (f *FakeGitHub) SetContextBranch(repo, branch string, contents map[string]string) + func (f *FakeGitHub) SetDelay(method, pattern string, d time.Duration) + func (f *FakeGitHub) SetFileMode(repo, path, mode string) + func (f *FakeGitHub) SetLegacyBranchProtection(repo, branch string, contexts ...string) + func (f *FakeGitHub) SetRepairActor(login string, id int64, canWrite bool) + func (f *FakeGitHub) SetRunTrigger(repo string, runID int64, event string, headRepositoryID int64) + func (f *FakeGitHub) SetRunnerBusy(name string, busy bool) + func (f *FakeGitHub) SetVisibility(fullName, visibility string) + func (f *FakeGitHub) SetWorkflowRunState(runID int64, status, conclusion string) + type FakeRequiredCheck struct + AppID int64 + Context string + type KennelGuidanceInventory struct + Files []WorkflowFileRef + Partial bool + Paths []string + Skipped []WorkflowFileRef + TreePartial bool + type KennelGuidanceReader interface + KennelGuidanceInventory func(context.Context, string, string) (*KennelGuidanceInventory, error) + KennelWorkflowBlob func(context.Context, string, WorkflowFileRef) ([]byte, error) + type KennelPrivateFork struct + Runs bool + Secrets bool + WriteToken bool + type KennelProtection struct + Partial bool + Required []string + Unpinned int + type KennelRun struct + Event string + HeadRepositoryID int64 + ID int64 + RepositoryID int64 + func (r KennelRun) FromFork() bool + type KennelSettings struct + DefaultTokenWrite bool + ForkApproval string + Partial bool + PrivateFork *KennelPrivateFork + type KennelSettingsReader interface + KennelProtection func(ctx context.Context, repo, branch string) (*KennelProtection, error) + KennelSettings func(ctx context.Context, repo string, public bool) (*KennelSettings, error) + type KennelSetup struct + HasDependencies bool + Partial bool + Present map[string]bool + type KennelSetupReader interface + KennelSetup func(context.Context, string, string) (*KennelSetup, error) + type KennelWorkflowInventory struct + Files []WorkflowFileRef + Partial bool + Skipped []WorkflowFileRef + type KennelWorkflowReader interface + KennelWorkflowBlob func(context.Context, string, WorkflowFileRef) ([]byte, error) + KennelWorkflowInventory func(context.Context, string, string) (*KennelWorkflowInventory, error) type ManifestOptions + KennelFiles bool + KennelSettings bool + Migration bool + type PRDelayCheck struct + AppID int64 + CompletedAt *time.Time + Conclusion string + HeadSHA string + ID int64 + Name string + StartedAt *time.Time + Status string + SuiteID int64 + WorkflowJobID int64 + WorkflowRunID int64 + type PRDelayEvidence struct + Checks []PRDelayCheck + ChecksCoverage string + CurrentHeadSHA string + CurrentTargetBranch string + HeadSHA string + Number int + Open bool + Protection *KennelProtection + ProtectionCoverage string + StillOpen bool + TargetBranch string + type PRDelayReader interface + ReadPRDelay func(context.Context, string, int) (*PRDelayEvidence, error) type QueuedJob + RunNumber int64 + type RepairActor struct + CanWrite bool + ID int64 + Login string + type RepairClient interface + CommitRepair func(context.Context, string, RepairPull, prrepair.Plan) (string, error) + RepairActor func(context.Context, string, string) (RepairActor, error) + RepairChecks func(context.Context, string, string) (string, error) + RepairComment func(context.Context, string, int, int64, string) (int64, error) + RepairFailures func(context.Context, string, RepairPull, int64) ([]string, error) + RepairPull func(context.Context, string, int) (RepairPull, error) + RepairPullForRun func(context.Context, string, int64) (RepairPull, error) + RepairReact func(context.Context, string, int64, string) error + RepairSource func(context.Context, string, RepairPull, bool) (*RepairSource, error) + type RepairPull struct + Author string + AuthorID int64 + Base string + Body string + Branch string + DefaultBranch string + Fork bool + HeadSHA string + Number int + Open bool + Title string + URL string + type RepairSource struct + Snapshot prrepair.Snapshot + func (s *RepairSource) ReadFile(ctx context.Context, name string) (prrepair.File, error) + type RepairTargetChanged struct + Code string + Message string + func (e *RepairTargetChanged) Error() string + func (e *RepairTargetChanged) Unwrap() error + type RepoReader interface + KennelRepositories func(ctx context.Context, limit int) ([]Repository, error) + KennelRun func(ctx context.Context, repo string, runID int64) (*KennelRun, error) type Repository + ID int64 + Visibility string + type WorkflowFileRef struct + Path string + SHA string + Size int + type WorkflowRunState struct + Conclusion string + Event string + RunNumber int64 + Status string + func (s WorkflowRunState) Cancelled() bool v1.0.0 Sep 13, 2026 Changes in this version + const DeliveryIDHeader + const EventTypeHeader + const MigrationPermissionHint + const SignatureHeader + var ErrForbidden = errors.New("github: forbidden") + var ErrInvalid = errors.New("github: refused as invalid") + var ErrInvalidSignature = errors.New("github: webhook signature invalid") + var ErrNoReadme = errors.New("github: the repository has no README") + var ErrNoSecret = errors.New("github: no webhook secret configured") + var ErrNoWorkflows = errors.New("github: the repository has no .github/workflows directory") + var ErrNotFound = errors.New("github: not found") + var ErrNotWorkflowJob = errors.New("github: not a workflow_job payload") + var ErrRateLimited = errors.New("github: rate limited") + var MigrationPermissions = map[string]string + func BranchName(now time.Time) string + func InstallURL(htmlURL string) string + func IsEnterprise(apiBaseURL string) bool + func IsPing(event string) bool + func Manifest(o ManifestOptions) ([]byte, error) + func ManifestURL(apiBaseURL, org string) string + func NormalizeAPIBaseURL(raw string) (string, error) + func ParseEventType(header string) string + func RetryAfterRateLimit(err error, now time.Time) (time.Time, bool) + func RunnerName(pool *store.Pool) string + func SettingsURL(apiBaseURL, slug, org string) string + func SplitTarget(target string) (owner, repo string, kind store.TargetType) + func ValidateSignature(payload []byte, header, secret string) error + func WebURLForAPI(apiBaseURL string) string + type AppFactory struct + func NewAppFactory(httpClient *http.Client) *AppFactory + func (f *AppFactory) For(ctx context.Context, inst *store.Installation, privateKeyPEM []byte) (Client, error) + type AppInfo struct + Events []string + ID int64 + Name string + Owner string + Permissions map[string]string + RepositorySelection string + Slug string + func (a *AppInfo) CanReadContents() bool + func (a *AppInfo) MissingForMigration() []string + func (a *AppInfo) MissingRequirements(kind store.TargetType) []string + func (a *AppInfo) SubscribedToJobs() bool + type Client interface + CancelWorkflowRun func(ctx context.Context, repo string, runID int64, force bool) error + CreateJITConfig func(ctx context.Context, req JITRequest) (*JITConfig, error) + CreateRegistrationToken func(ctx context.Context) (*RegistrationToken, error) + CreateRemoveToken func(ctx context.Context) (*RegistrationToken, error) + CreateRunnerGroup func(ctx context.Context, req RunnerGroupCreate) (*RunnerGroup, error) + DeleteRunner func(ctx context.Context, id int64) error + GetWorkflowJob func(ctx context.Context, repo string, id int64) (*WorkflowJobEvent, error) + ListQueuedJobs func(ctx context.Context) ([]QueuedJob, error) + ListRepositories func(ctx context.Context, limit int) ([]Repository, error) + ListRunnerGroups func(ctx context.Context) ([]RunnerGroup, error) + ListRunners func(ctx context.Context) ([]Runner, error) + ListWorkflows func(ctx context.Context, repo string) ([]WorkflowFile, error) + OpenPullRequest func(ctx context.Context, req PullRequestRequest) (*PullRequest, error) + Probe func(ctx context.Context) (*AppInfo, error) + RateLimit func(ctx context.Context) (*RateLimit, error) + ReadReadme func(ctx context.Context, repo string) (*Readme, error) + Target func() (name string, kind store.TargetType) + WebURL func() string + type Factory interface + For func(ctx context.Context, inst *store.Installation, privateKeyPEM []byte) (Client, error) + type FakeGitHub struct + func NewFake() *FakeGitHub + func (f *FakeGitHub) AddFile(repo, path, content string) + func (f *FakeGitHub) AddQueuedJob(repo, workflow, jobName string, labels []string) QueuedJob + func (f *FakeGitHub) AddRepo(fullName string) + func (f *FakeGitHub) AddRunner(name string, labels []string) Runner + func (f *FakeGitHub) AddRunnerGroup(name string) RunnerGroup + func (f *FakeGitHub) AddWorkflow(repo, path, content string) + func (f *FakeGitHub) AppID() int64 + func (f *FakeGitHub) Branches(repo string) []string + func (f *FakeGitHub) ClearErrors() + func (f *FakeGitHub) Client(target string, kind store.TargetType) Client + func (f *FakeGitHub) Close() + func (f *FakeGitHub) CompleteJob(jobID int64, conclusion string) + func (f *FakeGitHub) FileContent(repo, path string) (string, bool) + func (f *FakeGitHub) InstallationID() int64 + func (f *FakeGitHub) PullRequestBody(repo string, number int) string + func (f *FakeGitHub) Requests() []string + func (f *FakeGitHub) Runners() []Runner + func (f *FakeGitHub) Server() *httptest.Server + func (f *FakeGitHub) SetArchived(repo string, archived bool) + func (f *FakeGitHub) SetDefaultBranch(repo, branch string) + func (f *FakeGitHub) SetError(pattern string, status int, message string) + func (f *FakeGitHub) SetEvents(events ...string) + func (f *FakeGitHub) SetMethodError(method, pattern string, status int, message string) + func (f *FakeGitHub) SetPermissions(p map[string]string) + func (f *FakeGitHub) SetRateLimit(limit, remaining int, reset time.Time) + func (f *FakeGitHub) SetRepositorySelection(selection string) + func (f *FakeGitHub) SetRunnerGroupPublicAccess(name string, allowed bool) + func (f *FakeGitHub) StartJob(jobID int64, runnerName string) + func (f *FakeGitHub) URL() string + type FileChange struct + Content string + Path string + SHA string + type JITConfig struct + Encoded string + Name string + RunnerID int64 + type JITRequest struct + Labels []string + Name string + RunnerGroupID int64 + WorkFolder string + type ManifestCredentials struct + AppID int64 + ClientID string + ClientSecret string + HTMLURL string + Name string + PEM string + Slug string + WebhookSecret string + func ExchangeManifestCode(ctx context.Context, apiBaseURL, code string) (*ManifestCredentials, error) + type ManifestOptions struct + AllowWorkflowCancellation bool + Name string + Organization string + Public bool + RedirectURL string + SetupURL string + URL string + WebhookURL string + type PullRequest struct + Branch string + HTMLURL string + Number int + type PullRequestRequest struct + Base string + Body string + CommitMessage string + Files []FileChange + Head string + Repo string + Title string + type QueuedJob struct + CompletedAt *time.Time + Conclusion string + HTMLURL string + ID int64 + JobName string + Labels []string + QueuedAt time.Time + Repo string + RunID int64 + RunnerName string + StartedAt *time.Time + Status string + WorkflowName string + type RateLimit struct + Limit int + Remaining int + ResetAt time.Time + type RateLimitedError struct + Detail string + ResetAt time.Time + RetryAfter time.Duration + func (e *RateLimitedError) Error() string + func (e *RateLimitedError) RetryAt(now time.Time) (time.Time, bool) + func (e *RateLimitedError) Unwrap() error + type Readme struct + Content string + Path string + SHA string + type RegistrationToken struct + ExpiresAt time.Time + Token string + type Repository struct + Archived bool + DefaultBranch string + FullName string + HTMLURL string + Private bool + type Runner struct + Busy bool + Ephemeral bool + ID int64 + Labels []string + Name string + OS string + Status string + type RunnerGroup struct + AllowsPublicRepositories bool + Default bool + ID int64 + Name string + PublicRepositoryAccessKnown bool + RestrictedToWorkflows bool + Visibility string + type RunnerGroupCreate struct + AllowsPublicRepositories bool + Name string + Visibility string + type WorkflowFile struct + Content string + Path string + SHA string + type WorkflowJobEvent struct + Action string + CompletedAt time.Time + Conclusion string + HTMLURL string + HeadBranch string + HeadSHA string + InstallationID int64 + JobID int64 + JobName string + Labels []string + QueuedAt time.Time + Repo string + RunAttempt int + RunID int64 + RunnerID int64 + RunnerName string + StartedAt time.Time + Status string + Steps []store.JobStep + WorkflowName string + func ParseWorkflowJob(payload []byte) (*WorkflowJobEvent, error) + func (e *WorkflowJobEvent) State() store.JobState + func (e *WorkflowJobEvent) ToJob() *store.Job v1.0.0-RC3 Sep 11, 2026 v1.0.0-RC2 Sep 10, 2026 v1.0.0-RC1 Sep 10, 2026