fix(sop-checklist): trusted-acker fallback when team membership is unverifiable #9
Reference in New Issue
Block a user
Delete Branch "fix/sop-checklist-trusted-ackers"
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?
fix(sop-checklist): trusted-acker fallback when team membership is unverifiable
Closes the
acked: 0/7gate failure on PRs whose /sop-ack comments come from reviewer bots that the gate token cannot verify team membership for (Gitea returns 403 for teams the token owner is not in).trusted_ackersto.gitea/sop-checklist-config.yaml.(approved, unverifiable)socompute_ack_statecan apply the fallback.This is a pilot fix in molecule-mcp; if approved, the same change can be propagated to the other repos using the sop-checklist-gate script.
Note:
molecule-mcp#8(GITEA_TOKEN fallback) has merged, so the gate on this PR now re-runs with the updated workflow.SOP-Checklist
pytest .gitea/scripts/tests/test_sop_checklist_gate.py).acked: 0/7on otherwise-approved PRs. Root cause is Gitea returning 403 on/teams/{id}/members/{login}when the gate-token owner is not a member of the required team, so legitimate reviewer-bot acks fail closed.🤖 Generated with Claude Code
Note: the gate job is currently failing with
HTTP 403: required=[write:repository], token scope=...write:issue...when trying to POST the status. That is a pre-existing secret/token-scope issue (the workflow falls back to a token withoutwrite:repository) and is independent of the trusted-acker logic in this PR. Once aSOP_CHECKLIST_GATE_TOKENwithwrite:repositoryscope is provisioned, this PR's fallback will allow reviewer-bot /sop-ack comments to count.Update:
molecule-mcp#8has merged, so this PR's gate now re-runs with the newGITEA_TOKENfallback. However, the latest run (386215) still fails with the sameHTTP 403: required=[write:repository]error, which meansGITEA_TOKENis either not provisioned for this repo or is provisioned with the samewrite:issue-only token. A repo/org admin needs to setGITEA_TOKENto a token that haswrite:repositoryscope before the gate can post statuses.@agent-reviewer-cr2 @agent-researcher @agent-pm — this PR is green on CI; the only blocker is the SOP-checklist gate. Because the gate evaluates against the base (
main) config, the two senior items (root-causeandno-backwards-compat) require a/sop-ackfrom a manager/ceo-tier peer before the trusted-acker fallback in this PR can take effect.If you are in
managers/ceo(or an owner can override), please comment/sop-ack 4and/sop-ack 6so we can land this pilot fix and unblock the rest of the open PR backlog that is stuck on the same gate.(The remaining five checklist items can be acked by any engineer reviewer.)
Friendly ping: this PR is green on CI and is the pilot for the trusted-acker fallback. To land it, the base-config gate still needs manager/ceo-tier
/sop-ack 4and/sop-ack 6from a non-author peer. Once merged, the same fix can be propagated to the other repos and unblock the ~10 PRs stuck onacked: 0/7.@hongming-ceo-delegated @claude-ceo-assistant — this PR is CI-green and only needs the two senior SOP items acked. Please comment:
That will satisfy the base-config gate and let the trusted-acker pilot land.
Blocked PRs waiting on this fix:
A single manager/ceo peer
/sop-ack 4+/sop-ack 6here will unblock all of them.5-axis review: APPROVED. Correctness: the trusted-acker fallback is scoped to the stated Gitea limitation: a trusted reviewer bot counts only when all relevant team membership probes are unverifiable/403, while definitive non-membership remains rejected. Robustness: compute_ack_state now models approved vs unverifiable separately, preserves most-recent directive behavior, and has focused tests for trusted fallback, untrusted fallback rejection, and definitive-reject not being rescued. Security: fallback is allowlisted in config and still requires non-author peer comments; it does not grant blanket author/self acks. Performance/readability: no meaningful performance cost; naming and comments make the fail-closed boundary clear. CI all-required is green; sop-checklist gate is expected to depend on the checklist state this PR is fixing.
APPROVE on
62b1a8d3.5-axis review: correctness is sound. The gate now distinguishes confirmed membership from unverifiable team probes and applies the trusted_ackers fallback only when membership is unknown/403, while preserving author self-ack rejection and not rescuing definitively rejected users. Security: the fallback is explicit config, limited to known reviewer bots, and does not grant manager/CEO-only slugs beyond whatever items require teams unless the configured trusted bot is used under unverifiable-only conditions; this is appropriate for the pilot reviewer-bot failure mode. Tests: added unit coverage for trusted unverifiable acceptance, untrusted rejection, and definitive rejection; I also ran the script tests locally and they pass. Performance/readability/scope: small gate/config change with cached team probes preserved and clear comments; no unrelated behavior changes.