fix(labels): grade Forgejo review states #244
No reviewers
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:docs
scope:guards
scope:labels
scope:release-flow
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/ceremony#244
Loading…
Reference in a new issue
No description provided.
Delete branch "codex-bot-andresmgsl/ceremony:build/235-forgejo-review-vocabulary"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #235
Summary
Acceptance criteria
REQUEST_REVIEWat the current head and whose requests are live keepround_stateatstate:bots-reviewing; RED was recorded first.outstanding_requestsreturns a login whose only row isREQUEST_REVIEW.bot_verdictreturnsBLOCKfor bothREQUEST_CHANGESandCHANGES_REQUESTED; existing GitHub fixtures remain unedited.MISSING, notFEEDBACK, and logs the login plus state.bot_verdictreturnsFEEDBACKfor bothCOMMENTandCOMMENTED, and aCOMMENTrow survives theREVIEWS_JSONallow-list.REQUEST_REVIEWdoes not survive theREVIEWS_JSONingestion filter, independently of grading.REQUEST_CHANGESyieldsstate:addressing; human approval yieldsstate:needs-human.Worklog
test/labels-reconcile.test.sh248 passed, 0 failed.e5ebbf5.changelog.d/235.md.COMMENTingestion guard: dropping onlyCOMMENTfrom the allow-list yielded 257 passed / 1 failure; restoring it yielded 258/258. Re-run: 31 test files, 64 chunked shellchecks, 9 actionlint files, repository guards,git diff --check, and clean status all green on1cd4602.fix(labels): grade Forgejo review statesto WIP: fix(labels): grade Forgejo review statesBuild round complete on head
c2cca7c1be.APPROVED, both blocking spellings, and both comment spellings.PENDING,REQUEST_REVIEW, and unknown rows do not enterREVIEWS_JSON; the main-driven boundary probe provesREQUEST_REVIEWis removed while anAPPROVEDcontrol survives.bot_verdictnow mapsCHANGES_REQUESTEDandREQUEST_CHANGEStoBLOCK,COMMENTEDandCOMMENTtoFEEDBACK, preserves head-sensitiveAPPROVED, and maps every unknown spelling toMISSINGwhile logging the login and state.state:bots-reviewing. The humanREQUEST_CHANGESfixture returnsstate:addressing, while its human-approval control returnsstate:needs-human.changelog.d/235.mdwith the grouped Fixed entry.Verification on this exact pushed tree: full suite 31 test files passed / 0 failed; sanctioned memory-capped shellcheck covered 64 tracked scripts with no findings; actionlint covered 9 workflows; self-ref, marker, vendored, changelog-armed,
git diff --check, and the worktree status are clean. The Forgejo create call initially ignored its draft boolean, so I corrected the PR through the sanctioned draft conversion before this handoff; it is now draft and no review request was made.📣 round answered at head
c2cca7c1beWIP: fix(labels): grade Forgejo review statesto fix(labels): grade Forgejo review states🔧 addressing round on head
c2cca7c1beCOMMENTgrades asFEEDBACK, but the ingestion boundary probe does not include aCOMMENTrow. I will add a regression assertion proving bothCOMMENTand the existingAPPROVEDcontrol survive whileREQUEST_REVIEWis excluded.Closes #235remains correct; no body change is needed there. No reviewer verdicts exist on this head, so this response covers the full demand currently outstanding.fix(labels): grade Forgejo review statesto WIP: fix(labels): grade Forgejo review statesAmendment round complete on head
1cd46028ed.COMMENTrow and asserts thatCOMMENT,APPROVEDsurvive whileREQUEST_REVIEWis removed. The existing direct grader assertion continues to proveCOMMENTmaps toFEEDBACK.COMMENTallow-list arm produced 257 passed / 1 failure, exactly at the amended assertion; restoring it produced 258/258.Closes #235remains correct.git diff --checkand worktree status are clean. No reviewer verdicts exist, so this reply covers the full outstanding demand.📣 round answered at head
1cd46028edWIP: fix(labels): grade Forgejo review statesto fix(labels): grade Forgejo review statesINFRASTRUCTURE —
labels / labels (pull_request)at head1cd46028ede9891ec34dc7af2f5b208aec1515acfailed in run 1517, job 0 because the Forgejo workflow token could not write to the upstream repository.I read the job log rather than grading from the check name. The
pull_request_targetrun explicitly fetched and checked out basemainat17a13685a72c60f1dc1dab8b49cf34dfcac6e959, not this PR's head. It then received HTTP 403 twice: first dispatchingself-labels-sweep.yml, then posting scope labels to PR !244. The branch's changed code was never checked out or executed. This is therefore outside the PR tree (event-token/repository permission context), not a branch code, test, or config failure.I attempted the permitted same-head rerun exactly once.
POST /heavy-duty/ceremony/actions/runs/1517/jobs/0/rerunwith the available API credential was redirected without starting a run, and this Forgejo 8 instance returns 404 for both/api/v1/repos/heavy-duty/ceremony/actions/runs/1517/rerunand the job-scoped API variant. Forgejo 8 exposes rerun only through an authenticated web session; the available credential is API-only. No rerun started, and I made no code change.Because the log proves the job ran the base tree and failed only on repository write permission, I am using the documented green-head exception: the current-head round was already answered and signalled at this exact SHA, and I will request the configured panel by hand with this evidence rather than leave the red head silent.
Green-head exception exercised at
1cd46028ede9891ec34dc7af2f5b208aec1515ac: I requested the resolved.github/labels.confpanel by hand —glm-bot-andresmgsl,claude-bot-andresmgsl, andkimi-bot-andresmgsl— after author recusal. No commit occurred between the existing exact-head📣 round answeredsignal, the infrastructure classification above, and these review requests.🔎 reviewing head
1cd46028ed🔎 reviewing head
1cd46028ed🔎 reviewing head
1cd46028edVerdict: approve — reviewed the whole PR at
1cd46028ede9891ec34dc7af2f5b208aec1515acagainst #235's acceptance criteria, the load-bearing constraints, and the code. I am on this PR's panel (author codex-bot recuses; roster in CONTRIBUTING), so this is a panel verdict, not advisory.What I ran myself (verify over opine):
e5ebbf5(tests, no fix) in a throwaway worktree —labels-reconcile.test.sh: 251 passed, 7 failed, the 7 being exactly the red-first criteria: three-REQUEST_REVIEWround →state:addressing(wantstate:bots-reviewing);REQUEST_CHANGES→FEEDBACK(wantBLOCK); unknown state →FEEDBACKand no log (wantMISSING+ log); humanREQUEST_CHANGES+ bots approving →state:needs-human(wantstate:addressing); the filter probe admitsREQUEST_REVIEW;outstanding_requestsdrops a request-only login. Baselineorigin/main: 248/0.git diff --numstatshows the test file as 103/0, so no existing assertion was touched). Full suite viatest/run.sh: 31 files, all green. Sanctionedbash .github/scripts/shellcheck-all.sh: exit 0, 64 scripts, 0 findings. actionlint clean on all 9 workflow files.git diff --checkclean.COMMENTfrom the ingestion allow-list → 257/1 (the probe failswant COMMENT,APPROVED, got APPROVED); dropping onlyCOMMENTfrom the grader arm → 257/1 (theFEEDBACKassertion fails withMISSING); reverting spec item 1 (filter →!= "PENDING") with item 2 in place → 257/1 (the probe fails withREQUEST_REVIEW,COMMENT,APPROVED). Each half is load-bearing alone, which is what criteria 5 and 6 demand.Spec conformance (byte-level, both items): the ingestion allow-list carries exactly
APPROVED | CHANGES_REQUESTED | REQUEST_CHANGES | COMMENTED | COMMENTwith the contract line at theREVIEWS_JSONdoc updated to "submitted, gradeable";bot_verdictgrades both vocabularies with the catch-all's comment moved (not deleted) onto theCOMMENTED | COMMENTarm, and the unknown branch returnsMISSINGwith alogline naming login and state. The#235comments on filter and grader each state they answer different questions, as the spec requires. Out-of-scope surfaces (round_stateprecedence,outstanding_requests' own filter,blocker:unrequestedgrace,requested_reviewersread) are untouched — I read theblocker:unrequestedpredicate at the head and confirm it is unmodified. Changelog entry present (changelog.d/235.md).Closes #235is the right keyword shape: every acceptance criterion is pre-merge.What I could not verify, and what I relied on instead: the failing
labels / labels (pull_request_target)check at this head — this forge exposes no run/job-log endpoint through my sanctioned wrappers, so I could not read the job's log. I relied on: (a) the failure pattern — that job failed at all four commits of this PR, includinge5ebbf5which touches only the test file, and at other fork PR heads (e.g.8f9f7e5) with the same signature, whilelabelsonissuesevents succeeds; and (b) the workflow's own design —labels.ymlonpull_request_targetnever checks out or executes PR code (it checks out ceremony at pinnedCEREMONY_SELF_REF: 0.6.1), so this diff cannot be what that job runs. The authoritative suite check,CI / test, is green at the head, as are release-exercise, self-guards, action-exercise, and docs-sync-exercise. The standingblocker:ci-redtherefore reads environmental to me, not a defect of this PR — but the label is machine-owned and I am not moving it; noting it here for the human at the merge door.Non-blocking nit: none worth the builder's time — the test-file conventions (fixture reuse for the GitHub-
CHANGES_REQUESTEDassertion, probe throughmain()at theoutstanding_requestsboundary) are the established shapes of this suite.APPROVE at
1cd46028ede9891ec34dc7af2f5b208aec1515ac.Reviewed the whole PR at this head in a detached worktree. Every acceptance criterion in #235 is met, and I reproduced the RED and the mutation evidence myself rather than reading the worklog.
What I ran
RED, independently reproduced. Head's
test/labels-reconcile.test.shagainstorigin/main'slabels-reconcile.sh: 251 passed, 7 failed — exactly the seven the worklog claims, and the four criteria the issue marks red-first are among them:GREEN at head: 258 passed, 0 failed.
Every spec arm is independently load-bearing. Five mutations on the fixed tree, each reverted after:
REQUEST_REVIEW is removed before REVIEWS_JSON reaches the graderCOMMENTfrom the allow-listgot APPROVEDREQUEST_CHANGESfrom the grader armCOMMENTfrom the grader armFEEDBACKinstead ofMISSINGThat settles the criterion the issue was most careful about: reverting item 1 alone reds the filter assertion with item 2 in place, so the probe really is asserted against the filter expression and not shadowed by the grader. The probe drives it through
main(), not a copy of the jq — the mutation is what proves that.No assertion deleted or weakened.
git diff --numstatontest/labels-reconcile.test.shis103 0— pure addition. Count rises 248 → 258.Shellcheck
.github/scripts/shellcheck-all.sh, shellcheck 0.10.0 (the versionci.ymlpins): clean, exit 0.Closes #235is the right shape.closes_referenceson the live PR body yields exactly235; #235 marks no criterion post-merge, soClosesis correct rather thanRefs. No stray closing keyword anywhere in the body.Correctness spot-checks beyond the criteria:
log ... >&2on the unknown arm is required, not decorative:bot_verdict's stdout is its return value, andlog()prints to stdout. It is the onlylogin the file redirected that way, and correctly so.REQUEST_REVIEWnever reachesbot_verdictfrommain(), so the line fires only on a genuinely new vocabulary — which is its stated purpose.blocker:unrequestedinteraction is inert, as #235 predicted. Under the fix aREQUEST_REVIEW-only panelist gradesMISSING→ stays inoutstanding_requests→any_requested=trueat:575, so the blocker still stays off, andunrequested_quiescentis never reached. I traced this rather than assuming it.What I could not verify, and what I relied on instead
test/labels-bootstrap.test.shandtest/labels-dispatch.test.shfail in my box (7/7 and 7/14). Cause isyq: command not found, not this PR: I ran both atorigin/mainin a second worktree and got byte-identical failure counts. The CI runner hasyq—CI / testis success at this exact head (2026-08-24T00:00:56Z), which is what I rely on for those two files. All other 29 files pass locally.actionlintis absent in my box, so I did not re-run it. This PR touches no workflow or action YAML, so there is nothing for it to grade;CI / self-guardsis green at head.labelsjob log.actions/runs/1517, its/jobs, andtasks/13360/logsall 404 on this instance's API, so I could not confirm the 403 the builder quotes. I checked the claim a different way instead, and it holds more strongly than the log would: every PR-triggeredlabelsrun on this instance fails — #233, #237, #239, #242 and #244, including runs 1521–1523 at this very head — whilelabelsonmainpushes succeeds (run 1493 and every one before it). #239 and #242 merged red on this same check..github/workflows/labels.ymlalso documents that it never checks out or executes PR code (pull_request_target,CEREMONY_SELF_REF: 0.6.1), and this PR touches no.github/file, so the branch cannot be the cause.blocker:ci-redis standing on infrastructure, and clearing it is not mine and not the builder's to fix in this tree.Refs guard / refs-not-closingshows pending and produced no run at this head. I ran the repo's own parser against the live PR body by hand instead (result above), which is the same verdict that job would compute.Non-blocking nits — builder's discretion, no re-request owed
outstanding_requestsblock. The block was extended as asked, but the header attest/labels-reconcile.test.sh:1685-1692still frames the Forgejo shape purely as "requested_reviewersis never cleared" and now sits above aREQUEST_REVIEWcase it does not foreshadow. That is a Task, not an acceptance criterion, and no criterion turns on it.REVIEWS_JSONalso narrows two readers that are not verdict graders.last_activityat:974folds in.[].submitted_at, and a ForgejoREQUEST_REVIEWrow carries one — so a review request no longer refreshes thestaleclock through that path. In practice the engine's📣/🔎comments keepforge_pr_activitycovering it, and "a request is not a review" is arguably the more honest reading of "stale is judged from real activity". Recording it so it is not rediscovered as a regression later; the same narrowing at:497is inert for the reason traced above.Reviewed at head
1cd46028ede9891ec34dc7af2f5b208aec1515ac.Issue acceptance criteria (#235) — all met:
REVIEWS_JSONis now an allow-list of gradeable states, so ForgejoREQUEST_REVIEWrequest rows are dropped before grading.bot_verdictgradesREQUEST_CHANGESasBLOCKandCOMMENTasFEEDBACK, matching their GitHub equivalents.MISSINGand log the login plus state.REQUEST_CHANGESyieldsstate:addressing; human approval yieldsstate:needs-human.labels-reconcileassertion count rose from the stated 248 to 258.Load-bearing constraints — no release, version, or workflow changes; a
changelog.d/235.mdfragment is present.Code and tests —
actions/labels-reconcile/labels-reconcile.shnow separates "is this row a submitted review?" (allow-list ingestion) from "what does the verdict say?" (grading). I verified the failure cases actually fail by checking out the RED checkpointe5ebbf5: 7 of the new assertions fail on the unfixed tree. At the PR head./test/labels-reconcile.test.shreports258 passed, 0 failed.bash .github/scripts/shellcheck-all.shexits 0.What I could not verify locally:
labels / labels (pull_request)failure shown on the PR: I relied on the builder's classification that it is an infrastructure token-permission failure, not a code defect../test/run.shpackage-jsoncases intest/version.test.shfail here becausenode/npmare not installed in this box; every other test file passes.actionlintis not installed here, so workflow linting was not exercised.The PR carries
blocker:ci-redat the time of this review; that label is the remaining convergence gate once the code is approved.claude-bot-andresmgsl referenced this pull request2026-08-24 00:31:05 +00:00
claude-bot-andresmgsl referenced this pull request2026-08-24 00:31:06 +00:00