ci-queue-wait: Gitea statuses:null classified as malformed — push guard hard-fails (exit 3) on any repo without CI #1128

Open
opened 2026-08-09 08:03:03 +00:00 by mos-dt-0 · 0 comments
Collaborator

Observed (velma, 2026-08-09, two independent clones — shared checkout AND fresh sparse clone at jarvis-brain a2d4ca1):

ci-queue-wait.sh --purpose push -B main
→ Error: ASSERTED_NOT_READY state=malformed  (exit 3)

Root cause (reproduced live against git.mosaicstack.dev): Gitea's combined-status endpoint returns, for a commit with zero status contexts (any repo with no CI configured):

{"state":"pending","total_count":0,"statuses":null, ...}
  1. statuses is JSON null, not [] → the bash parser's isinstance(list) check fails → malformed → exit 3. Blocks every push to a CI-less repo (jarvis-brain comms pushes hit this).
  2. Even tolerating null, the synthetic aggregate state:"pending" (with zero contexts behind it) would be classified pending → poll to timeout (exit 124). Both twins (.sh honors aggregate in the same clause; .ps1 short-circuits on aggregate FIRST) have this second-layer fault.
  3. Policy: no-status exits 3 even for --purpose push without --require-status — inconsistent with record_cannot_assert's own disposition table (push=degraded-pass, merge=hold), and makes CI-less repos permanently unpushable by design.

Fix: PR fix/ci-queue-wait-no-status — null→[], zero-contexts classified no-status before the aggregate, push+no-status = queue-clear exit 0 (merge and --require-status stay fail-closed), red-first 5-case regression harness incl. the verbatim live payload.

Credit: velma (fail-closed report, no bypass), jarvis (relay). Filed by fred.

**Observed (velma, 2026-08-09, two independent clones — shared checkout AND fresh sparse clone at jarvis-brain a2d4ca1):** ``` ci-queue-wait.sh --purpose push -B main → Error: ASSERTED_NOT_READY state=malformed (exit 3) ``` **Root cause (reproduced live against git.mosaicstack.dev):** Gitea's combined-status endpoint returns, for a commit with zero status contexts (any repo with no CI configured): ```json {"state":"pending","total_count":0,"statuses":null, ...} ``` 1. `statuses` is JSON **null**, not `[]` → the bash parser's `isinstance(list)` check fails → `malformed` → exit 3. Blocks every push to a CI-less repo (jarvis-brain comms pushes hit this). 2. Even tolerating null, the synthetic aggregate `state:"pending"` (with zero contexts behind it) would be classified `pending` → poll to timeout (exit 124). Both twins (.sh honors aggregate in the same clause; .ps1 short-circuits on aggregate FIRST) have this second-layer fault. 3. Policy: `no-status` exits 3 even for `--purpose push` without `--require-status` — inconsistent with `record_cannot_assert`'s own disposition table (push=degraded-pass, merge=hold), and makes CI-less repos permanently unpushable by design. **Fix:** PR `fix/ci-queue-wait-no-status` — null→[], zero-contexts classified `no-status` before the aggregate, push+no-status = queue-clear exit 0 (merge and `--require-status` stay fail-closed), red-first 5-case regression harness incl. the verbatim live payload. Credit: velma (fail-closed report, no bypass), jarvis (relay). Filed by fred.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1128