Self-review defect, caught by probing the live instance rather than re-reading the code.
A row inside `.statuses[]` serialises its state under the key `status`. `state` exists only
as the AGGREGATE at the top level of the combined body. Measured on Gitea 1.27.1
(2026-08-29) against a real `review-verdict/h10` row on PR #882's head. Reading `.state`
per row therefore yields "" for every well-formed response, which compares unequal to the
state just posted — so the previous commit would have refused EVERY verdict with
"something overwrote it". Since no PR can merge to `main` without a `review-verdict/h10`
success, that is a repo-wide deadlock, shipped green.
WHY THE TESTS DID NOT CATCH IT, which is the more useful half. The `curl` shim replays the
status POST payload as the read-back body. A POST body legitimately uses `state` — that is
the field the write API takes — so the fixture agreed with the parser BY CONSTRUCTION and
the pair was self-consistent and both wrong. A fixture derived from the code under test
cannot disagree with it. The shim now renames the field on replay, and a separate test
feeds a VERBATIM live-Gitea body so the real shape is pinned independently of the shim.
Measured, both directions: with the fixture fixed and `.state` restored, 25 tests redden;
before the fixture fix, zero did.
The gate reads the same endpoint and the same key (`review-verdict.yml` line 520,
`ex_state=$(... jq -r '.status // ""')`), so the writer and the gate are now wrong or right
together rather than independently. `.state` is kept as a fallback so a server spelling it
the other way degrades to working rather than to a deadlock; it is not a second source of
truth, since the value still has to equal the state this run posted.
A row carrying NEITHER key now gets its own message. It is a response-SHAPE problem, not a
race, and "something overwrote it" would state a cause that did not happen — the #859
defect class.
fixes#845
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019zUmJZHhVP7kXg5DV237TW