Commands
layoutd check
The CI gate. Exit 0 when safe, exit 1 on unacknowledged danger.
Purpose
layoutd check is the CI gate. It runs the same analysis as diff but turns the result into a pass/fail with an exit code, so an unsafe upgrade fails the pull request before it reaches production.
Invocation
layoutd check v1.json v2.json --account UserStateExit codes
0— safe. No dangerous changes, or every danger is acknowledged.1— unacknowledged danger. At least one DANGER verdict has not been explicitly acknowledged. The build fails.
FAIL output
On failure, check names every unacknowledged danger and points you at the next step:
layoutd check: FAIL — 2 unacknowledged dangerous change(s) in UserState [borsh] DANGER is_active — field inserted before existing fields — shifts all following offsets, old accounts misread DANGER balance — offset shifted by preceding insert — existing accounts require migration before useRun `layoutd gen` to see a scaffold with every DANGER annotated.Use --ack <file> to acknowledge deliberate dangerous changes.Acknowledging deliberate danger
Sometimes a dangerous change is intentional. The --ack <file> flag points at an acknowledgement file that names the exact change being accepted. Only the named danger passes — any other danger still fails the build.
layoutd check v1.json v2.json --account UserState --ack .layoutd-ack.tomlThis makes a deliberate danger a recorded, audited decision in your version history rather than a silent one. See The Risk Model for how acknowledgement works.
SARIF & PR annotations
check emits a SARIF 2.1.0 report. When run through the GitHub Action, GitHub renders each finding as an inline annotation on the pull request, so reviewers see the exact field and reason without leaving the PR.
Danger is never silent