Filtered CI jobs record a skipped status !271

merged merged by cmc on 2026-09-05 20:32 UTC · krz/gitbay:ci-skipped-status into main

Discussion

cmc

The check gate refuses a merge when a head carries no statuses at all. Path filters (#169) could produce exactly that: a repository whose filters exclude every job queued nothing, reported nothing, and became unmergeable — with docs-only changes the obvious case, which is what path filters exist for.

A path-filtered job now records ci/<job> with state skipped and a description naming the reason. CombinedStatus already treats anything that is not error, failure or pending as success, so the gate passes without changing the reduction rule. skipped rather than success, because ci/test = success on a commit whose tests never ran is a lie the dashboard would repeat forever.

Only the path-filtered skip records anything. A tag job, a scheduled job, and a job already built for the commit on another branch all record nothing — the last of those already has a real status from the build that ran.

commit_statuses.state carries a CHECK constraint from migration 0008, so this needed 0041 to widen it. SQLite cannot alter a CHECK in place, hence a table rebuild. Worth stating why that mattered: queueJobs discards SetCommitStatus's error, so without the migration the write would have failed the constraint silently and the fix would have looked correct while recording nothing.

Closes #172