Repository navigation
claim bot: an old Decided: no longer answers a newer Decision needed: (#22) - #23
Merged
Merged
Conversation
…ed: (#22) RED for #22. The #3031 sequence — a maintainer `Decided:` at 09:12, a claimant `Decision needed:` at 09:48 — shows the bot replaying the older answer at 10:14: it removes `decision-needed`/`claim-blocked`, posts "the decision is in", then sets both labels again from the newer question. Four cases pin the order rule: replaying an answer older than the newest question only reacts; an answer after the question still clears it; catch-up does not replay a superseded answer; and the sweep re-adds a lost `decision-needed` for an open question and clears an answered one, while leaving a label with no decision comments alone.
GREEN for #22. `decided()` acted on any maintainer `Decided:`/`Decision:` without looking at the thread, and `catch_up()` replays commands whose event was lost in comment order — so the 09:12 answer to #3031 was replayed at 10:14 over the 09:48 question: labels cleared, "the decision is in" posted, then both labels set again from the newer question. - `decision_comments()` / `question_newer_than()` / `decision_state()` derive the decision state from the order of the two comment kinds. - `decided()` reacts and changes nothing when a `Decision needed:` is newer than the answer. - `missed()` does not replay a superseded answer. - `decide_sweep()` repairs the label: it adds `decision-needed` for an open question, and clears it (and the claim's block when the question was the block) once an answer newer than the newest question is in the history. It leaves an escalated issue and a thread with no decision comments alone, so a hand-set label is not silently cleared. The claimant-progress rule from #2057 (a plain progress comment clears `claim-blocked` and keeps `decision-needed`) is unchanged, and its test still pins it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22
What was wrong
decided()acted on any maintainerDecided:/Decision:line without looking at the thread, andcatch_up()replays commands whose comment event was lost in comment order. On obs-rust/obs-studio#3031 that produced, at 10:14Z:Decided: option 1 …(its event never ran)**Decision needed:** …→ bot addsdecision-needed+claim-blockedA decision is open while the newest
Decision needed:is newer than the newest maintainerDecided:/Decision:; the bot decided on comment kind alone.The change (
workflow/claims.py)decision_comments(),question_newer_than(),decision_state()(open/answered/unknown) derive the state from the order of the two comment kinds.decided()returns only("react", id)when aDecision needed:is newer than the answer: no label change and no "the decision is in".missed()no longer replays a superseded answer, which is what produced steps 3 and 4.decide_sweep()now repairs the label from the history: it addsdecision-neededfor an open question, and clears it once an answer newer than the newest question is present — together withclaim-blockedwhen the question was the block (the same outcome the event path gives). An escalated issue (human-review-needed) and a thread with no decision comments are left alone, so a hand-set label is never cleared on a guess.Kept as it was
The #2057 rule stays: a claimant's plain progress comment clears
claim-blockedand keepsdecision-needed. Its test (test_claimant_progress_unblocks_but_keeps_the_decision) still pins it, so this PR does not silently revisit that decision. Whether progress should count while a decision is open is a separate call for the maintainer.RED → GREEN
bb987ec— 4 new cases intests/test_claims.py::DecisionOrderTestfail onmaster: the #3031 replay sequence, catch-up not replaying a superseded answer, the sweep re-adding a lost label for an open question, and the sweep clearing an answered one. Two cases pin existing behaviour (an answer after the question still clears it; a label with no decision comments is left alone) and pass on both sides.11f2504—uv run -m unittest discover -s tests -t .: 212 tests, OK (105 intests/test_claims.py);uvx ruff format --check workflow testsanduvx ruff check workflow testsclean.No behaviour change outside the decision path;
claim_bot.pyis untouched.