Commit e0a57d9
fix(webapp): mutations-layer Devin follow-ups
- metadata route was routing rootOperations to bufferedEntry.parentTaskRunId
with a comment claiming PG's nil-coalesce defaults to parent. PG actually
defaults to taskRun.id (self), so a buffered grandchild metadata.root.set()
was silently mutating the child's metadata instead of the root's.
SyntheticRun already carries rootTaskRunFriendlyId from the snapshot —
use it, falling back to the run itself (matching PG) when absent.
- reschedule route's PG path delegates to RescheduleTaskRunService which
enforces `status !== "DELAYED"` and 422s otherwise. The buffer path had
no equivalent guard, so a customer could inject delayUntil into the
snapshot of an undelayed buffered run and the drainer would materialise
it with an unintended delay. Added a pre-fetch through
findRunByIdWithMollifierFallback and 422 when the buffered run has no
delayUntil. SyntheticRun doesn't carry a "DELAYED" status enum
(only QUEUED|FAILED|CANCELED) so the gate reads the snapshot's
delayUntil field directly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent eb2a777 commit e0a57d9
2 files changed
Lines changed: 37 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
52 | 76 | | |
53 | 77 | | |
54 | 78 | | |
| |||
0 commit comments