Repository navigation
Commit 6f3f0b8
Prevent SOP runs from hanging after artifact write failures (#1301)
* fix(engine): settle rejected SOP artifact writes
* fix(deploy): apply artifact storage migration before startup
* fix(sop): stream artifact handoffs and settle transfer failures
* fix(engine): load referenced artifact bodies for prompt placeholders
Agent invocations now read run progress without artifact bodies, so
{{artifact.<node>.<name>}} was replaced with an empty string. Load the
stored body of each referenced artifact before substitution.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(engine): poll run progress without reading artifact bodies
The claim loop and child SOP wait loop re-read run state every few
seconds or 200 ms. RunState now hydrates chunked files of up to 20 MiB,
so these loops read every archived body on each tick. Poll with
RunProgress and read the child's bodies once when it finishes.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(runners): claim tasks without sorting their payloads
A legacy runner receives its input files inline, so a queued task payload
can carry more than a megabyte. Sorting whole runner_tasks rows then
exceeds MySQL's default 256 KiB sort buffer (error 1038), every claim for
that provider fails and the SOP stays queued. Claims and the task list
now sort only narrow columns and load payloads by ID.
The route sweep also covers the /api aliases of the Runner file transfer
endpoints, which keeps e2e route coverage above the 85% gate.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(web): keep large and binary deliverables out of the in-page preview
Deliverables can now be 20 MiB, but the preview dialogs read the whole
body into the page and render it as text. A 20 MiB binary froze the run
page for about 34 seconds, and the download button re-encoded the
decoded text, so binary files were corrupted.
Show a download hint instead of a preview for binary types and files
above 5 MiB, and download the original bytes through the artifact URL.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(runs): keep the original extension when a deliverable is downloaded
The artifact response named every non-Markdown and non-JSON deliverable
.txt, so a binary file published by a SOP was saved as a text file. Name
it after the source path and fall back to the artifact name.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(web): keep the artifact download control a button
The preview dialog's download control became a link, which broke its
button role and the focus order the approvals queue test relies on. Keep
the button and download the original bytes from the artifact URL.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(web): detect binary deliverables by content before previewing
A deliverable declared without a media type is stored as text/markdown,
so a small zip or other binary file was still rendered as garbage. Check
the body instead of the declared type: NUL bytes or a mostly undecodable
start show the download hint, while text types such as NDJSON keep
previewing.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(engine): retry failed node state after a MySQL deadlock
* fix(web): avoid fetching known binary artifacts for preview
* test: keep artifact installer fixture compatible with LOOP migration
* fix(engine): keep auto-reject when a failed node's terminal write errors
Only a lost or held run lease skips the auto-reject now. Other write
errors (lock wait timeout, transient store failures, an exhausted
deadlock budget) still call Reject, which reloads the run and resets the
node with its upstream, so the run no longer hangs in running with
nobody executing the node. Deadlock retries reuse the repo's
six-attempt RetryDeadlock budget.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix: retry failed SOP state writes without losing rework diagnostics
---------
Co-authored-by: roberttwang <roberttwang@tencent.com>
Co-authored-by: roberttwang <u_dc6754cd1ee5@users.noreply.local>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Codex <codex@users.noreply.github.com>1 parent 78cdab4 commit 6f3f0b8
55 files changed
Lines changed: 2446 additions & 293 deletions
File tree
- chatbot
- src
- tests
- docs
- e2e/api
- internal
- domain
- engine
- httpapi
- repo
- runner
- runtime
- migrations
- scripts
- webtest/tests
- web/app
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
541 | 550 | | |
542 | 551 | | |
543 | 552 | | |
544 | 553 | | |
545 | 554 | | |
546 | 555 | | |
547 | 556 | | |
| 557 | + | |
| 558 | + | |
548 | 559 | | |
549 | 560 | | |
550 | 561 | | |
| |||
577 | 588 | | |
578 | 589 | | |
579 | 590 | | |
580 | | - | |
| 591 | + | |
581 | 592 | | |
582 | 593 | | |
583 | 594 | | |
| |||
592 | 603 | | |
593 | 604 | | |
594 | 605 | | |
595 | | - | |
| 606 | + | |
596 | 607 | | |
597 | 608 | | |
598 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
599 | 612 | | |
600 | 613 | | |
601 | 614 | | |
| |||
695 | 708 | | |
696 | 709 | | |
697 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
698 | 715 | | |
699 | 716 | | |
700 | 717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
219 | 264 | | |
220 | 265 | | |
221 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
20 | 39 | | |
21 | 40 | | |
22 | 41 | | |
| |||
76 | 95 | | |
77 | 96 | | |
78 | 97 | | |
| 98 | + | |
| 99 | + | |
79 | 100 | | |
80 | 101 | | |
81 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| |||
275 | 281 | | |
276 | 282 | | |
277 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
278 | 295 | | |
279 | 296 | | |
280 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
245 | 254 | | |
246 | 255 | | |
247 | 256 | | |
| |||
684 | 693 | | |
685 | 694 | | |
686 | 695 | | |
| 696 | + | |
687 | 697 | | |
688 | 698 | | |
689 | 699 | | |
| |||
788 | 798 | | |
789 | 799 | | |
790 | 800 | | |
791 | | - | |
792 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
793 | 806 | | |
794 | 807 | | |
795 | 808 | | |
796 | 809 | | |
797 | 810 | | |
798 | 811 | | |
799 | 812 | | |
800 | | - | |
801 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
802 | 817 | | |
803 | 818 | | |
804 | 819 | | |
| |||
0 commit comments