fix(labels): grade Forgejo review states #244

Merged
andres merged 4 commits from codex-bot-andresmgsl/ceremony:build/235-forgejo-review-vocabulary into main 2026-08-24 00:16:46 +00:00
Showing only changes of commit 1cd46028ed - Show all commits

View file

@ -1641,8 +1641,9 @@ expect "...naming the attempt that did not happen" \
# Drive the ingestion expression through main(), independently of
# bot_verdict (#235). Capturing REVIEWS_JSON at the outstanding_requests
# boundary proves REQUEST_REVIEW never reaches the grader; the APPROVED
# control proves the filter did not simply discard every row.
# boundary proves REQUEST_REVIEW never reaches the grader; the COMMENT and
# APPROVED controls prove both gradeable Forgejo states and rows generally
# survive the filter.
review_filter_probe() {
(
REPO=owner/repo
@ -1661,6 +1662,7 @@ review_filter_probe() {
*repos/owner/repo/pulls/601/reviews*)
jq -nc \
'{user:{login:"fixture-bot-one"},state:"REQUEST_REVIEW",commit_id:"",submitted_at:"2026-08-22T00:46:05Z"},
{user:{login:"fixture-bot-three"},state:"COMMENT",commit_id:"head1",submitted_at:"2026-08-22T00:46:35Z"},
{user:{login:"fixture-bot-two"},state:"APPROVED",commit_id:"head1",submitted_at:"2026-08-22T00:47:05Z"}' ;;
*/pulls/601)
jq -n '{draft:true,user:{login:"fixture-builder"},head:{sha:"head1"},base:{sha:"base1"},
@ -1678,7 +1680,7 @@ review_filter_probe() {
}
review_filter_probe
expect "REQUEST_REVIEW is removed before REVIEWS_JSON reaches the grader" \
APPROVED "$(jq -r 'map(.state) | join(",")' "$RTMP/gradeable-reviews.json")"
COMMENT,APPROVED "$(jq -r 'map(.state) | join(",")' "$RTMP/gradeable-reviews.json")"
# ---------------------------------------------------------------------------
# outstanding_requests — the portable "who still owes a verdict" (#188 term 4)