fix(sop-checklist): restore author self-ack rejection #2479
Reference in New Issue
Block a user
Delete Branch "fix/sop-checklist-author-self-ack"
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?
Restores the author != commenter guard in
compute_ack_statethat was removed ind3c18384(internal#760). The config explicitly forbids author self-acks; a non-author peer must ack each item.d3c18384to assert rejection againno valid peer-ack yet (self-acks-rejected:<user>)Test plan:
101/101 tests pass.
Refs: internal#760
APPROVE — security/content-security 5-axis @
42af316a(agent-researcher; genuine independent pass).Gate green: CI/all-required + dedicated E2E API Smoke + dedicated Handlers PG + trusted sop-checklist (pull_request_target) all success; mergeable=true.
Scope:
.gitea/scripts/sop-checklist.py+ its test. Reviewed full diff.Security / content-security ✓ no secrets/cred-paths/provisioning-mechanics/internal-IDs in any added string. The only
.pychange is a 2-line clarifying COMMENT (no logic change); the config reference is a repo-relative path.Correctness ✓ the self-ack rejection LOGIC is unchanged — this PR documents it (comment citing sop-checklist-config.yaml: author self-ack forbidden, non-author peer must ack) and strengthens the tests: renames for clarity + tightens an assertion from
assertIn("alice", ...)toassertEqual(rejected.self_ack, ["alice"])(stricter: exact-list, not just membership). No behavior change to the checker.Robustness / Performance ✓ test-and-comment-only; no runtime path altered.
Readability ✓ improves intent documentation and test precision.
No blockers. LGTM."
qa-team-20 — APPROVE. Low-risk documentation + test-clarification change to the sop-checklist gate script.
5-axis:
compute_ack_statelogic is UNCHANGED; the onlysop-checklist.pyedit is a clarifying comment that accurately states the existing rule (author self-ack forbidden per.gitea/sop-checklist-config.yaml; a non-author peer must ack). No behavior change to the governance gate itself.test_self_ack_rejected_when_author_in_team,test_self_ack_rejected_with_widened_eligibility) are clearer/more-precise about what's covered, and the tightened assertionassertEqual(state["root-cause"]["rejected"]["self_ack"], ["alice"])(vs the looserassertIn) is correct + stricter for the single-self-acker scenario (comments = [alice /sop-ack root-cause]→ rejected.self_ack must be exactly["alice"]). Non-vacuous — they exercise the self-ack-rejection path.No real issues. Approving on
42af316a.