Repository navigation
Description
What
The claim bot (workflow/claims.py) reads the decision state of an issue wrongly when a thread has more than one decision round. Two instances in obs-rust/obs-studio on 2026-10-30:
1. obs-rust/obs-studio#3031: an older Decided: taken as the answer to a newer Decision needed:, labels flapping.
| Time (UTC) | Event |
|---|---|
| 09:12 | maintainer comment Decided: option 1 ... (never edited) |
| 09:48 | claimant comment **Decision needed:** how to fix it under that test ...; bot adds decision-needed and claim-blocked |
| 10:12:24 | scheduled Claim bot run |
| 10:14:25, 10:14:27 | bot removes decision-needed and claim-blocked, and comments "the decision is in; your claim is no longer blocked", quoting the 09:12 Decided: |
| 10:14:32, 10:14:34 | bot adds decision-needed and claim-blocked again |
| 10:17:59 | after a plain comment by the claimant (no Blocked:, no Decision needed:), bot removes claim-blocked; decision-needed stays |
So the 09:58 question is still open (no Decided: after it), but the thread has a "decision is in" message, and the claim is no longer blocked.
2. obs-rust/obs-studio#2593, 03:24: the bot rejected a claim with "it waits on an open decision (decision-needed)", although the maintainer had answered with Decided: on 2026-10-27 and, per the maintainer's comment at 03:49, the label was not on the issue. This fits the same flapping: a sweep sets the label again from an older Decision needed:.
Probable cause
decided() acts on a Decided: comment without checking whether a Decision needed: came after it; a scheduled sweep that walks the comments can then clear the labels on the old Decided: and set them again on the newer question. The order of the two comment kinds is what decides whether a decision is open: a decision is open if the newest Decision needed: is newer than the newest maintainer Decided:/Decision:.
Second effect: blocked_since() treats any later comment of the claimant that is not Blocked:/Decision needed: as progress, so a clarification about the open question (10:17 above) unblocks the claim. Progress while a decision is open may be better read from PR activity only, or the open decision itself kept as the block.
Proposed fix
- Derive "decision open" from the order: newest
Decision needed:against newest maintainerDecided:/Decision:; set or cleardecision-neededandclaim-blockedfrom that, the same way on events and in the sweep. - Post "the decision is in" only for a
Decided:that is newer than the open question. - Keep
claim-blockedwhiledecision-neededis set (or do not count claimant comments as progress then). - A test with the #3031 sequence: Decided, then Decision needed, then a sweep must leave both labels set and post nothing.
Activity
zackees commentedon Oct 30, 2026
/ready
Triage: meets Ready. It has a reproduction (two timed instances, #3031 and #2593), a probable cause in
workflow/claims.py(decided()ignores comment order, andblocked_since()counts any claimant comment as progress), a proposed fix, and a failing-test sketch (the #3031 sequence: Decided, then Decision needed, then a sweep must leave both labels and post nothing). P1: it unblocks claims on open decisions and posts misleading "the decision is in" messages across every org repo. size:S.zackees commentedon Oct 30, 2026
Claiming: #22 — an older
Decided:must not answer a newerDecision needed:.tests/test_claims.pycases for the #3031 sequence —Decided:at 09:12,Decision needed:at 09:48 — asserting that replaying the older answer leavesdecision-neededandclaim-blockedset and posts nothing, plus the sweep cases (an open question re-adds a lost label; an answered one clears it; a bare label with no decision comments is left alone).workflow/claims.py):decided()acts only when no question is newer than the answer;missed()does not replay a superseded answer;decide_sweep()re-addsdecision-neededfor an open question and clears it only when an answer newer than the newest question is in the history.claim-blockedbut keepsdecision-needed) and say so in the PR, so the change does not silently revisit it.master, RED then GREEN,./lintclean,Fixes #22.zackees commentedon Oct 30, 2026
Fixed by #23 (merged
25bbcb9), and checked against this thread's real comments rather than only the fixtures.workflow/claims.pynow derives the decision state from the order of the two comment kinds (decision_state()→open/answered/unknown):decided()changes nothing when aDecision needed:is newer than the answer — it only reacts, so no label removal and no "the decision is in".missed()/catch_up()no longer replay a superseded answer, which is what produced steps 3 and 4 here.decide_sweep()repairsdecision-neededfrom the history: adds it for an open question, clears it once an answer newer than the newest question exists (withclaim-blockedwhen the question was the block). An escalated issue and a thread with no decision comments are left alone, so a hand-set label is never cleared on a guess.Checked with the live comment list of this issue,
2026-10-30:decision_state()Decided:answeredopenDecided:answeredAnd at the sweep's 10:14 replay,
missed()returns the 09:05 and 09:48 questions and the claim comment, no longer the 09:12 answer; callingdecide_comment()on that answer directly returns[("react", …)]alone.The #2057 rule you pinned — a claimant's plain progress comment clears
claim-blockedand keepsdecision-needed— is unchanged, and its test still holds it, so whether progress should count while a decision is open (the 10:17 effect) is still an open call for you.