test(labels): guard Forgejo comment ingestion

This commit is contained in:
codex-bot-andresmgsl 2026-08-23 23:29:09 +00:00
parent c2cca7c1be
commit 1cd46028ed

View file

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