Skip to main content

Pack · source-control

scm.check

packs/source-control/blocks/check.yaml

packsource-control
1entity
4commands
4events
1view
10refusals
3KPIs

An automated verdict on one revision of a repository: a build, a test suite, a linter, a whole pipeline. A check run is queued for a revision, starts (optionally as an instance of a workload, agentic.runtime), and completes once with an outcome; a queued or running check may be cancelled. A check run never changes after it completes; a new verdict is a new run.

Depends on​

Used by​

No block depends on this one.

Entities​

CheckRun​

One run of one named check on one revision.

Identified by check_run_id (CheckRunId).

fieldtypemeaning
repository_idRepositoryId
revisionRevisionThe revision the check judges.
nameNameThe check's name, the same for every run of it.
queued_attimestamp
instance_idoptional InstanceIdThe running copy of the workload that carries out the check, when it runs as one.
outcomeoptional CheckOutcome
reportoptional ContentThe digest of the check's report.
completed_atoptional timestamp

Relations:

  • repository references Repository of scm.repository (one, by repository_id)
  • instance references Instance of runtime (one, by instance_id)

Lifecycle of CheckRun

CancelledCompletedQueuedRunningstartcompletecancelcancelCancelledCompletedQueuedRunningstartcompletecancelcancel
Ends in Cancelled, Completed.

Commands​

CancelCheck​

Cancel a check.

Called by: Check runner.

fieldtype
check_run_idCheckRunId
attimestamp
outcomewhenresult
no-such-run refusedno such CheckRunCheckRunNotFound: No check run of this identity exists.
cancelledotherwisemoves the CheckRun Queued, Running → Cancelled; emits CheckCancelled
wrong-state refusedthe CheckRun is in a state that does not allow itCheckRunStateConflict: The check run is not in a state this command acts from.

CompleteCheck​

Complete a running check with its outcome.

Called by: Check runner.

fieldtype
check_run_idCheckRunId
outcomeCheckOutcome
reportContent
attimestamp
outcomewhenresult
no-such-run refusedno such CheckRunCheckRunNotFound: No check run of this identity exists.
completedotherwisemoves the CheckRun Running → Completed; emits CheckCompleted
wrong-state refusedthe CheckRun is in a state that does not allow itCheckRunStateConflict: The check run is not in a state this command acts from.

QueueCheck​

Queue a check on a revision.

Called by: Check runner.

fieldtype
check_run_idCheckRunId
repository_idRepositoryId
revisionRevision
nameName
attimestamp
outcomewhenresult
already-queued refusedthe CheckRun exists alreadyCheckRunExists: A check run of this identity exists.
unknown-repository refusedno Repository for repository_idUnknownRepository: No repository of this identity exists.
archived refusedthe Repository of repository_id has state == ArchivedRepositoryNotActive: The repository is archived; no new check runs on it.
queuedotherwisecreates a CheckRun in Queued; emits CheckQueued

StartCheck​

Start a queued check.

Called by: Check runner.

fieldtype
check_run_idCheckRunId
instance_idoptional InstanceId
attimestamp
outcomewhenresult
no-such-run refusedno such CheckRunCheckRunNotFound: No check run of this identity exists.
unknown-instance refusedno Instance for instance_idUnknownInstance: No workload instance of this identity exists.
startedotherwisemoves the CheckRun Queued → Running; emits CheckStarted
wrong-state refusedthe CheckRun is in a state that does not allow itCheckRunStateConflict: The check run is not in a state this command acts from.

Events​

eventfieldsemitted by
CheckCancelledcheck_run_id CheckRunId, at timestampCancelCheck
CheckCompletedcheck_run_id CheckRunId, repository_id RepositoryId, revision Revision, name Name, outcome CheckOutcome, at timestampCompleteCheck
CheckQueuedcheck_run_id CheckRunId, repository_id RepositoryId, revision Revision, name Name, at timestampQueueCheck
CheckStartedcheck_run_id CheckRunId, instance_id optional InstanceId, at timestampStartCheck

Views​

viewrowsfields
CheckRuns
Check runs
each CheckRuncheck_run_id CheckRunId, repository_id RepositoryId, revision Revision, name Name, queued_at timestamp, instance_id optional InstanceId, outcome optional CheckOutcome, report optional Content, completed_at optional timestamp, state State

Types​

typeisvalues or fields
CheckOutcome
Passed means the revision met the check. Failed means it did not. Errored means the check itself could not judge (its runner broke), which says nothing about the revision.
one ofPassed, Failed, Errored
CheckRunIdan identifier or valueuuid

KPIs​

3 KPIs from the pack's catalogue, packs/source-control/kpis.yaml. A gate must be zero for a variant of an architecture to count.

Quality​

KPIunitbettergatestatus
check_errored_share
Share of completed check runs that ended Errored rather than Passed or Failed.
How: CheckCompleted events with outcome Errored divided by all CheckCompleted events. An errored check says nothing about the revision.
sharelower–planned
source: design
check_queue_seconds
Seconds a check run waits between being queued and starting.
How: Median of CheckStarted time minus CheckQueued time per check run.
secondslower–planned
source: design
check_flaky_share
Share of checks that both passed and failed on the same revision.
How: Pairs of check name and revision with at least one CheckCompleted Passed and one CheckCompleted Failed, divided by all pairs with a completed run.
sharelower–planned
source: design

Settings​

The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.

A part scm.check:

settingtypeunitdefaultcontractwhat
countinteger of at least 11How many copies of the part run.
perpartOne copy of the part for each copy of the named part.
notesnotesFree notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it.