run

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package run holds the input and output types of the engine's run methods (run.create, run.result, run.state, run.outcome, run.ask, run.call, run.finding and run.show), for harnesses and other programs outside Physa's module that report on a run through client.

It imports nothing. The engine types its run methods with these same types, so a change to one is a change to the other.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AskIn

type AskIn struct {
	Repo     string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Run      int64  `json:"run" desc:"The run's id."`
	Question string `json:"question" desc:"What the harness asks."`
}

AskIn is run.ask's input.

type AskOut added in v0.0.53

type AskOut struct {
	ID       int64  `json:"id" desc:"The report's id."`
	Question string `json:"question" desc:"What the harness asked."`
	At       string `json:"at" desc:"When it was reported, RFC 3339 in UTC."`
}

AskOut is one ask reported on the run.

type CallIn

type CallIn struct {
	Repo   string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Run    int64  `json:"run" desc:"The run's id."`
	Choice string `json:"choice" desc:"The call the harness made."`
	Reason string `json:"reason" desc:"Why it made it."`
}

CallIn is run.call's input.

type CallOut added in v0.0.53

type CallOut struct {
	ID     int64  `json:"id" desc:"The report's id."`
	Choice string `json:"choice" desc:"The call the harness made."`
	Reason string `json:"reason" desc:"Why it made it."`
	At     string `json:"at" desc:"When it was reported, RFC 3339 in UTC."`
}

CallOut is one call reported on the run.

type CreateIn

type CreateIn struct {
	Repo    string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Pursuit string `json:"pursuit" desc:"The pursuit's slug."`
	Change  string `json:"change" desc:"The planned change the run works on."`
	Level   int    `json:"level" desc:"The run's level, 0 to 3."`
}

CreateIn is run.create's input.

type FindingIn

type FindingIn struct {
	Repo  string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Run   int64  `json:"run" desc:"The run's id."`
	Check string `json:"check" desc:"The check that found it."`
	Level string `json:"level" desc:"The finding's level."`
	Text  string `json:"text" desc:"What was found."`
}

FindingIn is run.finding's input.

type FindingOut added in v0.0.53

type FindingOut struct {
	ID     int64  `json:"id" desc:"The report's id."`
	Check  string `json:"check" desc:"The check that found it."`
	Level  string `json:"level" desc:"The finding's level."`
	Text   string `json:"text" desc:"What was found."`
	SaidBy string `json:"said_by" desc:"harness: the harness's word, never Physa's."`
	At     string `json:"at" desc:"When it was reported, RFC 3339 in UTC."`
}

FindingOut is one finding reported on the run.

type ItemOut added in v0.0.53

type ItemOut struct {
	Item      int    `json:"item" desc:"The item's place in the change's list, from 1."`
	Text      string `json:"text" desc:"The item's text. The items are those of the plan revision the run recorded."`
	Outcome   string `` /* 256-byte string literal not displayed */
	Commit    string `json:"commit,omitempty" desc:"The sha the outcome is for; left out when the outcome is missing."`
	VouchedBy string `json:"vouched_by,omitempty" desc:"Who vouches for the outcome; left out when the outcome is missing."`
}

ItemOut is one acceptance item of the run's change.

type LacksOut added in v0.0.53

type LacksOut struct {
	Result bool  `json:"result" desc:"True when the run has no result: its branch, commit and pull request."`
	Items  []int `json:"items" desc:"The acceptance items whose outcome is missing."`
}

LacksOut is what a run's record still lacks.

type Out

type Out struct {
	ID           int64  `json:"id" desc:"The run's id."`
	Pursuit      string `json:"pursuit" desc:"The pursuit's slug."`
	Change       string `json:"change" desc:"The planned change."`
	PlanRevision int    `json:"plan_revision" desc:"The plan's revision it was created from."`
	Level        int    `json:"level" desc:"The run's level, 0 to 3."`
	State        string `` /* 129-byte string literal not displayed */
	Branch       string `json:"branch,omitempty" desc:"The branch of its work."`
	Commit       string `json:"commit,omitempty" desc:"The sha of its latest result."`
	PR           string `json:"pr,omitempty" desc:"The url of its pull request."`
	EndReason    string `json:"end_reason,omitempty" desc:"Why it ended in error, when given."`
	StderrTail   string `json:"stderr_tail,omitempty" desc:"The end of the harness's stderr."`
	Started      string `json:"started" desc:"When it started, RFC 3339 in UTC."`
	Ended        string `json:"ended,omitempty" desc:"When it ended, RFC 3339 in UTC; set by a result or an error, and left out until then."`
}

Out is a run.

type OutcomeIn

type OutcomeIn struct {
	Repo      string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Run       int64  `json:"run" desc:"The run's id."`
	Item      int    `json:"item" desc:"The acceptance item's place in the change's list, from 1."`
	Verdict   string `json:"verdict" desc:"passed, failed or judged."`
	Commit    string `json:"commit" desc:"The full sha the verdict is for."`
	VouchedBy string `json:"vouched_by" desc:"Who vouches for the verdict; required."`
}

OutcomeIn is run.outcome's input.

type OutcomeOut added in v0.0.53

type OutcomeOut struct {
	ID        int64  `json:"id" desc:"The report's id."`
	Item      int    `json:"item" desc:"The acceptance item's place in the change's list, from 1."`
	Verdict   string `json:"verdict" desc:"passed, failed or judged."`
	Commit    string `json:"commit" desc:"The full sha the verdict is for."`
	VouchedBy string `json:"vouched_by" desc:"Who vouches for the verdict."`
	Stale     bool   `json:"stale" desc:"True when its commit is not the run's latest result's."`
	At        string `json:"at" desc:"When it was reported, RFC 3339 in UTC."`
}

OutcomeOut is one outcome reported on the run.

type ReportOut

type ReportOut struct {
	ID     int64  `json:"id" desc:"The report's id."`
	Stale  bool   `json:"stale" desc:"True for an outcome whose commit is not the run's latest result's."`
	SaidBy string `json:"said_by,omitempty" desc:"harness, on a finding: the harness's word, never Physa's."`
}

ReportOut is one thing a harness reported on a run.

type ResultIn

type ResultIn struct {
	Repo   string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Run    int64  `json:"run" desc:"The run's id."`
	Branch string `json:"branch" desc:"The branch the run's work is on."`
	Commit string `json:"commit" desc:"The full sha of the run's latest commit."`
	PR     string `json:"pr" desc:"The url of the run's pull request."`
}

ResultIn is run.result's input.

type ShowIn added in v0.0.53

type ShowIn struct {
	Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Run  int64  `json:"run" desc:"The run's id."`
}

ShowIn is run.show's input.

type ShowOut added in v0.0.53

type ShowOut struct {
	Run        Out          `json:"run" desc:"The run."`
	Acceptance []ItemOut    `json:"acceptance" desc:"The change's acceptance items, in the plan's order, each with its outcome or missing."`
	Outcomes   []OutcomeOut `json:"outcomes" desc:"Every outcome reported, oldest first."`
	Asks       []AskOut     `json:"asks" desc:"Every ask reported, oldest first."`
	Calls      []CallOut    `json:"calls" desc:"Every call reported, oldest first."`
	Findings   []FindingOut `json:"findings" desc:"Every finding reported, oldest first."`
	Lacks      LacksOut     `json:"lacks" desc:"What the run's record still lacks."`
}

ShowOut is a run with its acceptance items, its reports and what its record lacks.

type StateIn

type StateIn struct {
	Repo       string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
	Run        int64  `json:"run" desc:"The run's id."`
	State      string `json:"state" desc:"working, blocked, done or error; only error ends the run."`
	Reason     string `json:"reason,omitempty" desc:"Why it ended in error; only with the state error."`
	StderrTail string `json:"stderr_tail,omitempty" desc:"The end of the harness's stderr, kept to its last 4096 bytes."`
}

StateIn is run.state's input.

Jump to

Keyboard shortcuts

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