fix(issues): a send keeps its claim through every step, not just up to the issue
Creating the issue rebuilt the delivery state from scratch and dropped the claim with it, so for a new issue the claim covered only the creation — a draft, a screenshot or a second send could change the report under the uploads and the body edit that follow, which is exactly what the claim is for. The state is now built on what was read, and a test walks the send's checkpoints to see the claim still held at each one. Found by mutation-checking the round-2 tests: removing the claim's release left them green, because for a new issue there was nothing left to release.
This commit is contained in:
@@ -186,7 +186,11 @@ def deliver(
|
||||
"number",
|
||||
"html_url",
|
||||
)
|
||||
# Built ON the state read at the start, not in place of it: the caller's claim on this
|
||||
# send lives there, and replacing it would let a draft or a screenshot change the issue
|
||||
# under the uploads that follow.
|
||||
state = {
|
||||
**state,
|
||||
"number": created["number"],
|
||||
"pending": [f.name for f in attachments],
|
||||
"links": {},
|
||||
|
||||
Reference in New Issue
Block a user