Skip to content

assert-synced

assert-synced exits non-zero unless a new analysis has been recorded since retrieve ran.

Terminal window
ingrain assert-synced [--assessment <path>]

Both record calls are best-effort, which is right on your own machine: a push that fails leaves the assessment on disk, and you run it again.

An unattended run has no disk to fall back to. The workspace is destroyed when the job ends, so an assessment that never synced is gone — and you find out one push later, when the next run re-analyses from scratch and posts findings that contradict the ones already on the pull request. This turns that into a failed job.

retrieve records the platform’s current run at the start of the job; this compares that against the current one. It fails when they are the same, when nothing is recorded, and when there is no baseline to compare against — so a job where retrieve never ran fails here too.

It checks that a sync landed. Whether the analysis was correct or complete is outside its scope.

CodeMeaning
0A new analysis was recorded.
1Nothing was recorded, no baseline to compare with, no credential configured, or git cannot identify the checkout.
2A bad flag.
5The platform did not answer — the connection failed, or it returned a 5xx.

5 is separate so a job can tell an outage from a sync that did not land. If your workflow continues on an unreachable platform, branch on 5 alone — a 1 means the platform answered and the analysis still is not there.

The same [context] section record uses.