Skip to content

7. One command for all of it ​

fobis gate runs the checks of this track (and the review of track 4) in order, each as a fobis ... --json command, and reduces each to pass or fail with its first failing fact. A stage that does not apply (no change to review, no case declared) is skipped with its reason. [gate] adjusts it:

ini
[gate]
skip           = bench
matrix_modes   = fast
matrix_shadows = none checks

skip = bench keeps timings out of the gate, since a CI runner is not a quiet machine. The matrix stage runs the fast mode with and without the checks shadow.

console
$ fobis gate
gate: build: fobis build --json
gate: review: fobis review --format json --exit-zero
gate: test: fobis test --json
gate: verify: fobis verify --json
gate: diff-run: fobis diff-run HEAD --json
gate: assess: fobis assess area --json
gate: matrix: fobis matrix --json --modes fast --shadows none,checks --verify
gate: FAIL, 12.3 s
  build     pass [1.3 s]
  review    pass [0.2 s]
  test      pass [0.8 s]
  verify    FAIL [0.7 s]: fine: no reference (fobis verify fine --update, once right)
  diff-run  pass [1.9 s]
  bench     skip: by [gate] skip
  assess    pass [3.4 s]
  matrix    pass [4.0 s]
[exit status 1]

The new case fine of chapter 6 has no reference yet. Once its result is right:

console
$ fobis verify fine --update
Verifying case fine...
fine: UPDATED (reference written to verification/references/fine.json (from uncommitted code))

1 of 1 case(s) verified.
console
$ fobis gate
gate: build: fobis build --json
gate: review: fobis review --format json --exit-zero
gate: test: fobis test --json
gate: verify: fobis verify --json
gate: diff-run: fobis diff-run HEAD --json
gate: assess: fobis assess area --json
gate: matrix: fobis matrix --json --modes fast --shadows none,checks --verify
gate: PASS, 11.2 s
  build     pass [0.2 s]
  review    pass [0.1 s]
  test      pass [0.8 s]
  verify    pass [0.9 s]
  diff-run  pass [2.0 s]
  bench     skip: by [gate] skip
  assess    pass [3.0 s]
  matrix    pass [4.2 s]

fobis gate exits with 0 when every blocking stage passes: one line in a CI workflow, or the check an agent runs before it says it is done. --base main gates a topic branch against its merge base (the review covers the whole branch), --fail-fast stops at the first failure, advisory = ... reports stages without blocking.

What you learned

fobis gate, [gate] (skip, advisory, matrix_modes), --base. Reference: the gate.

Next: 8. Where the time goes.