Documentation
¶
Index ¶
- func New(client forge.Client, token string) ci.Driver
- type Driver
- func (d *Driver) AssertNoHarnessAgentArtifact(ctx context.Context, owner, repo, agent string, after time.Time) error
- func (d *Driver) AssertNoWorkflow(ctx context.Context, owner, repo, workflowFile string, after time.Time) error
- func (d *Driver) CountHarnessDispatches(ctx context.Context, owner, repo, agent string, after time.Time) (int, error)
- func (d *Driver) DownloadArtifacts(ctx context.Context, owner, repo string, runID int, destDir string) error
- func (d *Driver) DownloadNamedArtifactAfter(ctx context.Context, owner, repo, artifactName string, after time.Time, ...) error
- func (d *Driver) DownloadNamedArtifactFromRun(ctx context.Context, owner, repo string, runID int, artifactName string, ...) error
- func (d *Driver) FindCompletedWorkflowRun(ctx context.Context, owner, repo, workflowFile string, after time.Time) (*forge.WorkflowRun, error)
- func (d *Driver) GetRunLogs(ctx context.Context, owner, repo string, runID int) (string, error)
- func (d *Driver) WaitForFailedHarnessAgent(ctx context.Context, owner, repo, agent string, after time.Time) (*forge.WorkflowRun, error)
- func (d *Driver) WaitForHarnessAgent(ctx context.Context, owner, repo, agent string, after time.Time) (*forge.WorkflowRun, error)
- func (d *Driver) WaitForWorkflow(ctx context.Context, owner, repo, workflowFile string, after time.Time, ...) (*forge.WorkflowRun, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
Driver implements ci.Driver against GitHub Actions.
func (*Driver) AssertNoHarnessAgentArtifact ¶
func (d *Driver) AssertNoHarnessAgentArtifact(ctx context.Context, owner, repo, agent string, after time.Time) error
AssertNoHarnessAgentArtifact asserts that the named agent's harness job did not run after the trigger time. It checks workflow run jobs rather than artifacts so that sibling runs for other agents are not mistaken for evidence.
func (*Driver) AssertNoWorkflow ¶
func (*Driver) CountHarnessDispatches ¶ added in v0.32.0
func (d *Driver) CountHarnessDispatches(ctx context.Context, owner, repo, agent string, after time.Time) (int, error)
CountHarnessDispatches returns the number of harness workflow runs that scheduled the "Harness run (<agent>)" job after the trigger time.
func (*Driver) DownloadArtifacts ¶
func (*Driver) DownloadNamedArtifactAfter ¶
func (*Driver) DownloadNamedArtifactFromRun ¶
func (*Driver) FindCompletedWorkflowRun ¶
func (*Driver) GetRunLogs ¶
func (*Driver) WaitForFailedHarnessAgent ¶ added in v0.35.1
func (d *Driver) WaitForFailedHarnessAgent(ctx context.Context, owner, repo, agent string, after time.Time) (*forge.WorkflowRun, error)
WaitForFailedHarnessAgent waits for the named agent's harness run to complete with a terminal failure conclusion. It errors out early when the run completes successfully instead — callers use this to assert a refuse-to-push (or similar fail-closed) path.
Detection is artifact-first: the fullsend action uploads the fullsend-<agent> artifact with `if: always()`, so it exists for failed runs too, and it is the only signal that works for both standard stage jobs (named e.g. "Code"/"Fix") and custom-harness matrix jobs (named "Harness run (<agent>)"). The job-name scan is a fallback for custom-harness runs that failed before uploading the artifact.
func (*Driver) WaitForHarnessAgent ¶
func (d *Driver) WaitForHarnessAgent(ctx context.Context, owner, repo, agent string, after time.Time) (*forge.WorkflowRun, error)
WaitForHarnessAgent waits for a successful harness-run workflow job for the named agent. It fails fast only when a workflow run that contains the agent's "Harness run (<agent>)" job reaches a terminal failure conclusion. Sibling workflow runs that do not schedule the agent's job are ignored.