assert-synced
assert-synced exits non-zero unless a new analysis has been recorded since
retrieve ran.
ingrain assert-synced [--assessment <path>]What it is for
Section titled “What it is for”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.
What it checks
Section titled “What it checks”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.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | A new analysis was recorded. |
1 | Nothing was recorded, no baseline to compare with, no credential configured, or git cannot identify the checkout. |
2 | A bad flag. |
5 | The 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.
Configuration
Section titled “Configuration”The same [context] section record uses.