Repository navigation
Prevent SOP runs from hanging after artifact write failures - #1301
Conversation
crispinhu27
left a comment
There was a problem hiding this comment.
Approve at 91332e3d52fa8c7c0079d1244e4e609891501123 (base main@be35aff8). No confirmed defects found.
Scope: full diff against main: models.go MEDIUMTEXT, migration 042, artifact commit error handling in node_execute.go / node_outcome.go, the new artifact-migration one-shot in compose.yaml, scripts/dev.sh, the install test scripts and docs/deployment.md.
Verification run in an isolated environment (synthetic data):
go test ./internal/engine -run 'TestNodeArtifactCommit|TestMySQLNodeArtifactCommit'on SQLite and MySQL 8.4.7, also with-count=3: pass. On a legacyTEXTcolumn, 65,535 bytes is accepted and 65,536 bytes gets Error 1406, and the node now fails on its first attempt. After042, 65,536 bytes and 1 MiB are stored and the downstream approval starts. 1 MiB + 1 byte is rejected.- The same tests on base
be35aff8fail as the PR describes: the node staysrunning, no artifact is stored, andartifact.publishedis still emitted. So the fix is real. go test ./internal/repo: pass. The full./internal/enginesuite passes except 2 tests that also fail on base because of the host (no Chromium, exit 127).python3 scripts/test-install.py: OK (64 tests, 2 skipped for Bash 3.2).- Migration
042, run with the exact compose command as a non-root user withGRANT ALL ON loopforge.*: it widens the column and keeps charset, collation, NOT NULL, data and indexes. It is a no-op success on a fresh DB and idempotent on rerun. Without ALTER privilege it exits 1, which blocks platform startup as intended. docker compose --profile platform config -qis valid, alone and withcompose.dev.yaml. Real container startup is covered by CIfirst-runon this head:artifact-migrationexits 0,up -d --waitsucceeds, platform is Healthy, and 25 e2e tests pass.- All 16 check runs on this head are green.
Non-blocking notes:
- A transient commit error (for example a deadlock) now fails the node permanently even with
MaxAttempts > 1. Recovery is an operator retry, which is better than the hang on main. freezeAvailableArtifacts(internal/engine/artifacts.go) still ignores write errors. That path is not touched here and could be a follow-up.042is not listed in the "Required upgrade migrations" table indocs/deployment.md.- Migration numbering
042collides with other open PRs, so renumber at merge time if needed.
The PR is still a draft. This review covers the head above only.
crispinhu27
left a comment
There was a problem hiding this comment.
复审 377db662(base main be35aff8)。上次 APPROVE 6038871054(针对 91332e3d)已因新推送被 dismiss,这次重点看增量 91332e3d..377db662(43 个文件):产物分块存储 run_artifact_blobs、Runner 0.13.0 文件传输接口(output-file / input-file)、RunProgress 替换 RunState、可选产物与仓库变更清单失败后继续、提交失败后只保留必需产物重试。
新增已确认问题(1 条,见行内评论)
- [P2] 下游 Agent 提示词里的
{{artifact.<节点>.<产物>}}被替换成空字符串。在91332e3d和 mainbe35aff8上替换正常,在377db662上稳定复现为空。
已执行的验证(隔离工作区,最小环境变量,不含任何凭据;Go 1.26.11)
go build ./...和go vet(domain/repo/runner/httpapi/engine/runtime)通过。internal/domain、internal/repo全部通过(包含新增的run_artifact_blobs_test)。internal/runner、internal/httpapi、internal/runtime在 377db66 和 91332e3 上的失败用例完全一致。这些失败来自本机环境:容器不支持 user namespace,bwrap 无法启动;另有 Chromium 相关用例。用一个只转发命令的测试用 bwrap 替身后,TestSOPRunnerArtifactHandoffReachesApprovalAndCompletes、TestRunnerReportedOutputs*等 Runner 交接用例在 head 上通过。- engine 中产物、交接、提交、SOP 相关的用例子集(
-run 'Artifact|Handoff|Output|Transfer|Legacy|Commit|Blob|Prompt|SOP')用 bwrap 替身运行时,head 上只有上面这条复现用例失败,91332e3d 上全部通过。 - CI 16 项全部成功。
未验证:真实 MySQL 8.x 上 20 MiB 分块写入、真实 Runner 进程跨机传输、旧版 Runner 混跑。以上没有在本机实际部署验证,所以不作为结论。
非阻塞观察(未作为缺陷):archiveFile 在节点终态提交之前就单独写入 blob,如果终态提交失败,会留下没有引用的 blob 行;loadArtifactContents 里只要有一个 blob 读取失败,整个 RunState 就会返回 not found。
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>
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>
Keep both Runner protocol additions: project credentials (0.12.1) and artifact transfer (0.13.0). The runner reports 0.13.0, which also satisfies the project credential requirement. Script and agent tasks carry project credential IDs and use the artifact payload check. Co-Authored-By: Claude Code <noreply@anthropic.com>
crispinhu27
left a comment
There was a problem hiding this comment.
复审 c146f081(base main be35aff8)。上次 REQUEST_CHANGES 6039862840 针对的是 377db662。
历史问题
- [P2] 下游提示词里的
{{artifact.<节点>.<产物>}}被替换成空字符串:FIXED。在 SQLite 和 MySQL 8.4.7 上分别实测,377db662上能复现,head 上不再出现,详情见原线程。
增量 377db662..c146f081
prompt.go:占位符实际出现、并且产物正文为空时,才按需读取正文(包括分块存储)。所有渲染路径都经过这里。run_recovery.go:恢复扫描改用RunProgress。核对过后续函数都不读产物正文,真正接管时acquireLease会重新读RunState。sop_node.go:子 SOP 轮询只读元数据,结束后再读一次RunState,交给importChildArtifacts。额外跑了子 SOP 交接 3 MiB 分块产物的临时测试:下游 sha256 校验一致,节点 succeeded。
验证(隔离环境,最小环境变量,不含凭据,Go 1.26.11。本机没有 bwrap,用一个只转发命令的测试替身)
go build ./...和go vet(engine/repo/runner/domain/httpapi/runtime)通过。- 下表是 head 与
377db662对比,失败集合两边逐一相同,都是本机缺 Chromium、Docker 或 CLI 导致的:
| 包 | head | 377db662 |
|---|---|---|
| domain | ok | ok |
| repo | ok | ok |
| engine | 743 通过 / 1 失败 | 740 通过 / 1 失败 |
| runtime | 919 通过 / 9 失败 | 919 通过 / 9 失败 |
| httpapi | 1889 通过 / 2 失败 | 1889 通过 / 2 失败 |
| runner | 5 个失败 | 5 个失败 |
TestChatClarificationEdgePaths在两边都不稳定(各跑 10 次,都有 3 到 4 次失败),本 PR 的增量没有改 httpapi,与本 PR 无关。- MySQL 8.4.7:
TestMySQLNodeArtifactCommit通过;约 19 MiB 产物的分块写入和读取,以及提示词替换,都通过。 - 增量相关用例(Prompt、子 SOP、恢复、QueuedSOP)加
-race -count=3通过。 - CI 16 项全部成功。
未验证:真实 Runner 跨机文件传输、和旧版 Runner(<0.13.0)混跑,都没有实际部署验证,只有进程内的 Runner 交接测试覆盖。
非阻塞观察:prompt.go 读取产物失败时,占位符会静默替换成空串,不报错,可以考虑至少记一条日志。
PR 仍是 draft。本次审查只覆盖上述 head,不代表代码没有缺陷。
crispinhu27
left a comment
There was a problem hiding this comment.
复审 1324e744。上一条 APPROVE 6042827371(针对 c146f081)因为这次推送被 dismiss 了。1324e744 是把 main 177d8815 合进来的提交,上次以来没有其他功能改动。
合并提交审查
- 合并时有 3 处冲突,都是手工解决的:
domain/runner.go、engine/runner_dispatch.go、runner/daemon.go。 - 手工解决后的结果与自动合并结果逐一比对过:
domain/runner.go:同时保留了RunnerVersionProjectCredentials(0.12.1)和SupportsProjectCredentials,也保留了本 PR 的RunnerVersionArtifactTransfer(0.13.0)。runner/daemon.go:runnerVersion取 0.13.0。0.13.0 高于 0.12.1,所以项目凭据的版本检查照样能通过。engine/runner_dispatch.go:脚本派发保留了 main 新增的task.ProjectCredentialIDs,并改用本 PR 的validateRunnerArtifactPayload。
- main 里给
task.ProjectCredentialIDs赋值的 3 处(agent、script、conversation 派发)在合并后都还在。
验证(隔离环境,最小环境变量,不含凭据,Go 1.26.11。本机没有 bwrap,用一个只转发命令的测试替身)
go build ./...和go vet(engine/repo/runner/domain/httpapi/runtime)通过。- domain、repo、runner、engine、httpapi、runtime 全量测试,与 main
177d8815对比,失败集合完全一致(各 17 项,都是本机缺 Chromium、Docker 或 CLI 导致的),没有新增失败:
| 包 | 1324e744 |
main 177d8815 |
|---|---|---|
| engine | 744 通过 / 1 失败 | 739 通过 / 1 失败 |
| httpapi | 1900 / 2 | 1899 / 2 |
| runner | 263 / 5 | 262 / 5 |
| runtime | 925 / 9 | 925 / 9 |
| repo | 615 / 0 | 614 / 0 |
| domain | 318 / 0 | 318 / 0 |
TestChatClarificationEdgePaths两边都跳过了,原因是它在合并前的两个基线上就不稳定(见上一条 review)。- 之前那条 [P2] 的复现测试在
1324e744上重跑仍然通过:SQLite 1 MiB+ 分块产物,以及 MySQL 8.4.7 约 19 MiB 的产物,下游提示词都替换出了完整正文。TestMySQLNodeArtifactCommit和TestDownstreamPromptRendersArtifactBody也通过。 - CI:16 项的 conclusion 都是 success。其中
curl-install查询时 status 还显示 in_progress,但 conclusion 已经是 success。
状态提醒:main 现在已经前进到 c3dd1b4d,本 PR 显示和 main 有冲突(dirty),需要再合一次 main,合完后按复审处理。
未验证:真实 Runner 跨机文件传输,以及和旧版 Runner(<0.13.0)混跑,都没有实际部署验证。
PR 仍是 draft。本次审查只覆盖上述 head,不代表代码没有缺陷。
# Conflicts: # docs/deployment.md
crispinhu27
left a comment
There was a problem hiding this comment.
复审 head 0b6a4430(合并 main c3dd1b4d)。上次 APPROVE 时的 head 是 1324e744,base 是 177d8815。
合并核对:把 git diff 177d8815 1324e744 和 git diff c3dd1b4d 0b6a4430 的 +/- 行逐行比对,结果完全一致(都是 46 个文件,+2016/-282),PR 的净改动没有变化。唯一手工解决的冲突在 docs/deployment.md,PR 的 20 MiB 交付物 / Runner 0.13.0 段落和 main 的 Shared projects 段落都保留了。#1304 的 041 升级流程和本 PR 的 artifact-migration(042,放在 platform 之前执行)顺序兼容。#1285 在 runner_dispatch.go 里的执行机共享改动和本 PR 的产物输入改动互不影响。
历史问题:下游提示词里 {{artifact.<节点>.<产物>}} 被替换成空串的 [P2],在当前 head 上复测仍为 FIXED(TestDownstreamPromptRendersArtifactBody 的 inline 和分块两个子用例都通过)。
验证:
go build ./...和go vet ./...通过。go test ./...:27 个包通过。engine/httpapi/runner/runtime 中失败的用例和 mainc3dd1b4d上的失败集合一致,都是本机缺 Docker、浏览器或 bwrap 导致的。- 产物提交失败、可选产物失败后仍可审批、分块上传中断重启、Runner 产物交接一直走到审批完成等用例都通过。
- MariaDB 上跑了
TestMySQLNodeArtifactCommit:65535/65536 字节边界、042 重复执行、20 MiB 和 20 MiB+1 都符合预期。 - webtest 285/285,
scripts/test-install.py通过,CI 16 项全绿。
没做的验证:本机没有 Docker,没有实跑 Compose 升级(041→042 串联),也没有在 MySQL 8 上验证,这两项以 CI first-run 和静态核对为准。
注意:main 已前进到 f3d4f41a(#1284),本 PR 现在和 main 有冲突(internal/domain/runner.go、internal/engine/node_execute.go、internal/repo/runs.go、internal/runner/daemon.go)。这个 APPROVE 只针对 0b6a4430,作者合完 main 后按复审处理。
Co-Authored-By: Claude Code <noreply@anthropic.com>
Robert0622
left a comment
There was a problem hiding this comment.
CR + 部署实测:功能实测通过;CI 未过,暂不能合入(head 437eb251)
这个 head 是 0b6a443 合并 main 7bebfa5 的结果。我核对了冲突处的解法:
node_execute.go:runnerID/runner在前面已经取过,stagingCheckout = !UsesConversationWorkspace() && !runner.SupportsIntegrate()和 main(#1284)的语义一致。RunState改成RunProgress后,DeleteRun同时清理新加的两张 blob 表,并保留 main 新加的「工作区有关联 SOP 运行时不能删除」检查。domain/runner.go里两个版本门槛(0.13.0 产物传输、0.12.3 会话工作区)都保留了。
合并后的结果没有发现问题。
❗ 阻塞:CI browser / platform-required 失败
- 失败任务:https://github.com/Tencent/LoopForge/actions/runs/45469840030/job/138714492631
- 报错:
e2e route coverage: 348/410 = 84.9%,FAIL: route coverage 84.9% is below 85%。main 7bebfa5 上是 346/406 = 85.2%。 - 原因:本 PR 新加了 4 条路由,其中
GET /api/runners/tasks/:id/input-file和PUT /api/runners/tasks/:id/output-file在 e2e 里没有被访问到(在 uncovered 列表里),/runners/tasks/:id/...那两条已覆盖。需要补 e2e 去访问这两条路由(或者用别的办法把覆盖率拉回 85%)。已告知负责修这个 PR 的会话。
部署实测(本机原生部署 MySQL 8.4.7,旧库由 main 建表)
| 场景 | main | 本 PR |
|---|---|---|
旧 TEXT 列 + 64 KiB 产物(旧执行流程) |
报 MySQL 1406,节点一直卡在 running(150 秒以上) | 节点 failed,原因写明「保存节点终态和产物失败:…Error 1406…」。main 上卡住的那个运行,换成本 PR 的平台启动后也正确收尾为 failed |
| 042 迁移连跑两次 | — | 两次都成功;列变为 mediumtext utf8mb4 utf8mb4_0900_ai_ci NULL,字符集、排序规则、可空属性都保留 |
| 迁移后重试上面那个失败节点 | — | 第 2 次尝试成功,下游 sha256 校验一致,进入人工审批 |
| 新执行机器 0.13.0:必需 5 MiB + 可选 21 MiB | — | 5 MiB 分 2 块存进 run_artifact_blob_chunks;下游从 .agentflow/inputs/produce/plan.md 读到的 sha256 和生成的一致;可选文件提示「跳过可选产物 opt(opt.bin):超过产物大小上限 20 MiB」;审批后运行 succeeded |
| 新执行机器:必需文件正好 20 MiB | — | 通过,sha256 一致 |
| 新执行机器:必需文件 20 MiB+1 | — | 第 1 次尝试就 failed:「artifact contract: plan (plan.md): 超过产物大小上限 20 MiB」,下游审批没有启动 |
| 旧执行机器 0.12.4:64 KiB + 1 KiB 两个内联文件 | — | 通过,sha256 一致,审批后 succeeded |
| 旧执行机器:必需文件 1 MiB+1 | — | failed:「超过旧版执行机器的 1 MiB 单文件回传限制,请将执行机器升级到 0.13.0」 |
产物由真实 Claude Code(deepseek-flash)在执行机器上生成,下游校验用的是 shell 脚本节点。
测试
- 本机通过:
go test ./internal/repo、./internal/engine -run 'Artifact|Handoff|Approval|RunState|Terminal|Legacy'、./internal/httpapi -run 'Artifact|Runner';go vet ./...干净。 ./internal/runner只有TestRunnerStartsPanelBrowserInRunSandbox失败,main 上同样失败,原因是本机没有 Chromium,不是本 PR 引入的。
把 CI 的路由覆盖率修好后可以合入。
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>
Robert0622
left a comment
There was a problem hiding this comment.
CR + 部署实测:LGTM,可以合入(head 8bca19b5)
接着上一条对 437eb25 的评审,这一轮复审新提交 8bca19b(领任务时不再对整行 payload 排序;e2e 补了两条路由)。
代码
ClaimRunnerTask加锁查询只取id, attempt两列来排序,ORDER BY created_at LIMIT 1的排序行里不再带 payload。更新成功后再用takeRunnerTask按主键取整行,加锁和条件更新的语义没有变。RunnerTasks先按created_at DESC取前 200 个 id,再按id IN取整行,最后按 id 原顺序重新排好,返回顺序和以前一致。- runner_tasks 上的其他查询要么只选 id(
HasQueuedRunnerTask),要么不排序,没有同样的风险。 90-route-sweep补了GET /api/runners/tasks/:id/input-file和PUT /api/runners/tasks/:id/output-file,覆盖两种情况:没有会话时返回 401,有会话但任务不存在时返回 4xx。
部署实测(MySQL 8.4.7,sort_buffer_size 为默认的 256 KiB)
- 在 437eb25 上复现:用旧执行机器 0.12.4 跑「必需 1 MiB + 可选 64 KiB」。上游节点成功,下游节点的输入会内联进任务 payload,领任务一直报
Error 1038 (HY001): Out of sort memory,运行卡住不动。这个场景我上一轮没测到。 - 平台换成 8bca19b、执行机器不动:卡住的运行被自动领走,下游读到 1,048,576 字节,sha256 和生成的一致,批准后运行 succeeded,平台日志里不再出现 1038。
- 回归:新执行机器 0.13.0 跑「必需 5 MiB + 可选 21 MiB」,sha256 一致,可选文件按超限被跳过,进入审批。
GET /api/runners/tasks返回 200。 - 测试:新加的
TestMySQLRunnerTaskClaimWithLargePayload在本 head 上通过;把这个测试放到 437eb25 上跑会失败(task list omitted large tasks),说明它能测出这个问题。./internal/repo全部通过,其他 MySQL 领任务测试也都通过。 - CI:当前 head 全部 16 项检查通过,包括 browser(路由覆盖率)、core 和 platform-required。
437eb25 那条评审里提到的阻塞问题(路由覆盖率不到 85%)已在这个 head 上解决。
Robert0622
left a comment
There was a problem hiding this comment.
CR + 部署实测:实测通过,CI 全绿,可以合入(head 8bca19b5)
和上一轮 437eb25 相比,这个 head 新增了一个提交 8bca19b,修了两件事:
1. 修复:执行机器领取任务时报 MySQL 1038(部署实测中发现)
- 现象:旧执行机器 0.12.4 以内联方式回传 1 MiB 文本产物时,下游任务把 1 MiB 内容内联进了 payload。
ClaimRunnerTask是带着整行 payload 做ORDER BY created_at的,这会撞上 MySQL 8.4 默认的sort_buffer_size(256 KiB),报Error 1038: Out of sort memory,执行机器一直领不到任务,运行卡住。领取路径在 main 上就有这个问题,这个 PR 支持大产物后才更容易触发。 - 修法:
ClaimRunnerTask先只SELECT id, attempt排序取最早一条,再按 id 读整行。RunnerTasks()列表也改为先按created_at DESC取 200 个 id,再用id IN ?读出整行,在 Go 里排好顺序。 - 回归测试:
TestMySQLRunnerTaskClaimWithLargePayload。两个排队任务各带 2 MiB prompt,要求列表能列出来,并且领到最早的那个,租约和 payload 都完整。修复前失败,修复后通过。 - 实测:卡住的那次运行,在换上新二进制后被自动领取并跑完;旧执行机器回传 1 MiB 文本产物成功,下游 sha256 一致。
2. 修复 CI:路由覆盖率 84.9% < 85%
e2e/api/90-route-sweep.test.mjs增加了对GET /api/runners/tasks/:id/input-file和PUT /api/runners/tasks/:id/output-file的访问:未登录时期望 401,已登录时访问不存在的任务期望 400/403/404/409。- CI 结果:
e2e route coverage: 350/410 = 85.4%,16 项检查全部通过。
部署实测汇总(本机原生部署,MySQL 8.4.7;agent 节点用 CodeBuddy deepseek-v4.1-flash)
| 场景 | 结果 |
|---|---|
| 平台原生执行:64 KiB plan + 1 MiB 二进制 + 21 MiB 可选文件 | 可选文件被跳过并给出原因,下游 sha256 一致,agent 读到输入,审批后 succeeded |
| 平台原生执行:正好 20 MiB / 20 MiB+1 | 20 MiB 成功;20 MiB+1 以「超过产物大小上限 20 MiB」失败,下游不启动 |
| 执行机器 0.13.0:20 MiB + agent | 通过 input-file/output-file 接口传输,succeeded |
| 旧执行机器 0.12.4:1 MiB+1 | 失败,并提示升级执行机器 |
| 旧执行机器 0.12.4:1 MiB 文本 | 修复前因 1038 卡住,修复后成功 |
| main:同样的大产物 | 复现原问题:1406 报错后节点一直停在 running |
| 未迁移的 TEXT 列 + 本 PR 二进制 | 节点以清楚的 1406 原因失败;042 连跑两次都成功,列变成 MEDIUMTEXT,重试节点后成功 |
| e2e API 全套(本地,不配模型) | 182 项:164 通过、0 失败、16 跳过,和 main 一致 |
已知问题(不阻塞)
crispinhu27
left a comment
There was a problem hiding this comment.
复审 head 8bca19b51a752a5eb2941487828687b522892a49(base main 7bebfa50)。上一份 APPROVE 6044721573 审的是 0b6a4430,之后作者推送新提交,那份 APPROVE 被 dismiss。本次审查范围是增量 0b6a4430..8bca19b5:
437eb251:合并 main7bebfa508bca19b5:领取任务时不再按整行排序;e2e 补了两条路由
历史问题
- [P2](下游提示词里
{{artifact.<节点>.<产物>}}被替换成空串):在当前 head 上复测仍为 FIXED。TestDownstreamPromptRendersArtifactBody的 inline 和 chunked 两个子用例都通过。
合并核对(437eb251)
- 把
git diff c3dd1b4d 0b6a4430和git diff 7bebfa50 437eb251的 +/- 行逐行比对,只有两处上下文不同,都是 main 那边带来的:node_execute.go:stagingCheckout复用前面已经取过的runnerID/runner,和 main(#1284)语义一致。runner/daemon.go:被替换的旧值从RunnerVersionProjectCredentials变成了 main 的RunnerVersionGitPlainHTTP(0.12.4)。PR 用的RunnerVersionArtifactTransfer(0.13.0)比它高,版本门槛不受影响。
- PR 的净改动没有其他变化。
8bca19b5
ClaimRunnerTask的加锁查询只选id, attempt,加锁强度、条件更新、attempt+1都没变,更新后再用takeRunnerTask按主键读整行。RunnerTasks先取 200 个 id,再按id IN读整行,并按原来的created_at DESC顺序重排。runner_tasks上没有其他对整行排序的查询。
验证(隔离环境,单独用户,最小环境变量,不含任何凭据;Go 1.26.11,MySQL 8.4.7 默认 sort_buffer_size=262144)
go build ./...和go vet(repo、engine、runner、httpapi、domain)通过。TestMySQLRunnerTaskClaimWithLargePayload对照:- head 上通过。
- 把这个测试放到
437eb251和 main7bebfa50上,两边都失败,RunnerTasks()返回空列表。 - 结论:1038 这个问题 main 上原来就有,这个提交修复了它。
- 临时并发测试(没有推送):12 个 goroutine 同时领取 6 个 1 MiB payload 的任务。
- head:没有 1038,没有重复领取,
attempt=1,payload 完整,列表顺序为 DESC。 437eb251:每次领取都报Error 1038 (HY001): Out of sort memory。- 同一测试换成小 payload,在 main 和 head 上的表现一致:单次并发会有领取方暂时拿不到任务,这是
FOR UPDATE原有的行为,不是本 PR 引入的。
- head:没有 1038,没有重复领取,
- MySQL 下
internal/repo全量测试(head 和 main 各用一个新库):只有TestMySQLGitSSHCredentialLifecycle、TestMySQLReadsObserveExternalChangesWithoutReload失败,main 上也同样失败,没有新增失败。SQLite 下internal/repo全部通过,领取相关用例-count=5也通过。 internal/engine的TestNodeArtifactCommitFailure,以及在 MySQL 8.4.7 上跑的TestMySQLNodeArtifactCommit,都通过。internal/httpapi -run Runner通过。internal/runner全量测试:head 和 main 的失败集合完全一致,只有TestRunnerConversationWorkspaceCLIAuthentication和TestRunnerStartsPanelBrowserInRunSandbox两个,都是本机环境原因(没有 Chromium 和 CLI 登录环境)。- CI 在
8bca19b5上 16/16 通过,browser的 e2e 路由覆盖率为 350/410 = 85.4%,达到 85% 门槛。
未验证
- 容器不支持 bwrap,engine 和 runner 测试用的是只转发命令的替身。
- 没有在真实 0.12.4 Runner 上跑端到端的大文件内联领取。
- 没有在生产规模的
runner_tasks上看查询计划和性能。
本次复审没有发现需要阻塞合并的问题,不代表代码一定没有缺陷。
Resolve conflicts with Tencent#1327 and Tencent#1323: runState reads the header and nodes through main's RunWithNodes, and the Runner reports 0.13.0 (artifact transfer), which also covers 0.12.5 privileged sandboxes. Co-Authored-By: Claude Code <noreply@anthropic.com>
Resolve internal/runner/daemon.go: report Runner 0.13.0 (artifact transfer), which is newer than main's 0.12.6 Docker sandbox limits gate. Co-Authored-By: Claude Code <noreply@anthropic.com>
crispinhu27
left a comment
There was a problem hiding this comment.
复审结论:APPROVE(head 9b9b1976)
范围:上次 APPROVE(8bca19b5)之后只多了合并提交 9b9b1976,把 main cb78a499 合了进来。这次审查了合并结果,以及 main 在 7bebfa50..cb78a499 之间引入的改动和本 PR 逻辑之间的相互影响。
合并核对:PR 的净改动在合并前后一致,都是 49 个文件。合并前按 7bebfa50..8bca19b5 统计为 +2098/−287,合并后按 cb78a499..9b9b1976 统计为 +2097/−287。差异只有两处冲突解决,都合理:
internal/repo/runs.go的runState改用 main 新增的RunWithNodes,查不到或出错时仍返回 false,语义等价;internal/runner/daemon.go中runnerVersion的旧值换成了 main 的版本号,最终值仍是RunnerVersionArtifactTransfer(0.13.0)。
迁移 042 号重复是 main 上原有的情况,compose 和 dev.sh 按文件名执行,不会因此出错。
隔离验证:使用隔离用户和合成数据,环境为 Go 1.26.11、MySQL 8.4.7,与 main cb78a499 对照。
go build ./...、go vet ./...通过。- 六个包(domain/repo/runtime/runner/engine/httpapi)的失败集合与 main 一致,共有的 24 项是环境原因(Chromium、网络、沙箱配置)。另有
TestEnsureHostBrowserWithFakeChromium在两边各偶发失败一次,单独重跑 25 次全部通过。 TestMySQLRunnerTaskClaimWithLargePayload在 head 上通过;拷到 main 上跑会失败(task list omitted large tasks)。TestDownstreamPromptRendersArtifactBody(历史 P2)通过,inline 和 chunked 两种方式都覆盖了。TestMySQLNodeArtifactCommit、产物提交失败相关测试、TestStageArchivedArtifact*、TestArtifactBlobInterruptedUpload*均通过。TestSOPRunnerArtifactHandoff*用转发型 bwrap 替身时通过,不代表验证了 bwrap 隔离本身。scripts/test-install.py结果与 main 一致。- 组合场景(临时测试,未提交):先让产物写入失败,再触发闲置回收,然后去掉故障并重试。SQLite 和 MySQL 各测 100 B 与 2 MiB 两种大小,4/4 通过,产物正文一致。
- 真实平台升级:同一个 MySQL 库先起 main 平台、再起 head 平台,
/api/health都正常。042 连跑两次都成功,content列变为 mediumtext。 - CI 16/16 通过。
未覆盖:真实 bwrap/Docker 沙箱内的执行、compose 的 artifact-migration 容器、Runner 模式下的组合场景、-race。
需要作者处理:PR 目前和最新 main 11e75217(#1329)冲突,GitHub 显示不可合并。冲突只在 internal/runner/daemon.go 的 runnerVersion 一行:main 是 RunnerVersionDockerSandboxLimits(0.12.6),本 PR 是 RunnerVersionArtifactTransfer(0.13.0),应保留 0.13.0。我们按这个方式在本地模拟合并,go build ./... 通过,runner/engine/httpapi/domain 的 vet 和筛选测试也通过。作者合入 main、产生新 head 后,需要按复审再核对一次。
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>
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>
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>
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>
Fixes for the
|
crispinhu27
left a comment
There was a problem hiding this comment.
复审 head 07590d0c(base main 11e75217)。上次 REQUEST CHANGES 6056422211 的 [P1] 已 FIXED,验证结果见原线程:f5085f6e 把下载控件改回 <button>,用产物 URL 下载原始字节,browser 在 07590d0c 上通过。
增量审查:07590d0c 把二进制判定改为按内容(含 NUL,或开头 64 KiB 里替换字符超过 10%),超过 5 MiB 只提供下载;chatbot ArtifactPreview 同步;字段与 domain.Artifact 的 JSON 一致。00e49e77 的 artifactFileName 仍走 %q 转义,没有头注入。
非阻塞观察:取消了按 mediaType 的提前短路,声明为二进制但小于 5 MiB 的产物仍会先整份 fetch 再判定,最坏约 5 MiB 文本解码,比 ec7cdb3e 略退,但远好于原先 20 MiB 整页渲染,可不阻塞。
验证:chatbot npm test 496/496、vite build 通过(在 07590d0c 上重跑);go test ./internal/httpapi -run 'Artifact|Deliverable' 通过;CI 16 项全绿。
未覆盖:没有在真实浏览器里手工测 20 MiB 二进制产物的交互,这部分依赖 webtest 与 CI 覆盖。
本次审查只覆盖上述 head,不代表代码没有缺陷。
CR + 部署实测
|
| 交付物 | 声明类型 | 页面表现 | 下载 |
|---|---|---|---|
zh.md 中文 + emoji,11 KB |
text/markdown | 渲染预览,有「复制内容」,没有乱码 ✅ | 文件名 zh.md,字节一致 ✅ |
plain.txt UTF-8 中文,13 KB |
未声明(存成 text/markdown) | 正常预览,没有误判成二进制 ✅ | 一致 ✅ |
report.json 51 B |
application/json | 源码预览 ✅ | 一致 ✅ |
undeclared.bin 2 MiB 随机字节 |
未声明 | 只给下载,「此文件不在页面内预览」(上一轮的 P3 已修)✅ | undeclared.bin,一致 ✅ |
noznul.bin 292 KB 不含 NUL 的随机字节 |
未声明 | 靠 U+FFFD 比例判成二进制,只给下载 ✅ | 一致 ✅ |
data.bin 1 MiB |
application/octet-stream | 只给下载 ✅ | 一致 ✅ |
chart.png 6 KB |
image/png | 只给下载 ✅ | 一致 ✅ |
big.md 6.1 MB |
text/markdown | 没请求正文,直接给下载 ✅ | 一致 ✅ |
gbk.txt GBK 编码中文,8 KB |
未声明 | 只给下载(见下面第 2 条) | 一致 ✅ |
9 个下载控件都是 BUTTON type=button,页面没有 JS 报错。
不阻塞的建议(P3)
- 声明了二进制类型的小文件现在也会先整份拉下来再判断。
00e49e77里application/octet-stream、image/png这类按 mediaType 直接给下载,不请求正文;现在 ≤5 MiB 的都会fetch+res.text()一次。实测data.bin(1 MiB)和chart.png打开预览时都多了一次产物请求,最坏情况每次打开要读 5 MiB。chatbot 端的ArtifactPreview仍然保留readable判断(按 mimeType,不拉二进制),两端不一致。建议 web 端也保留按类型的快速判断:明确不是文本的类型(image/*、application/octet-stream、zip、pdf 等)直接给下载,只对未声明或文本类型按内容嗅探。 - GBK 等非 UTF-8 的文本(未声明类型)会被判成二进制,只给下载,提示是「文件较大或为二进制内容」,而这个文件只有 8 KB。
00e49e77上这类文件会直接显示乱码,现在只给下载其实更好,只是提示文字有点误导,可以改成「无法按文本显示,请下载后查看」之类。
结论:LGTM,可以合。token 是作者本人的账号,只评论,不点 Approve。
|
关于 #issuecomment-7162195208 的两条 P3:本 PR 先不改,合入后另提 PR 处理。
|
本轮增量(07590d0c..967edee)只审新增提交 CR 结论思路对:每次重试都经过 P3:
部署实测
复现脚本: loopforge-pr-review:967edee1 |
crispinhu27
left a comment
There was a problem hiding this comment.
复审 a85d6d3c(上一次 APPROVE 是在 07590d0c,之后被新推送撤销):REQUEST_CHANGES,1 条 P2,见行内评论。
审查范围
967edee1:nodeFailedAt在 MySQL 死锁(1213)时重试写入 failed 状态,并补了测试。7e94be25:合入 main058a530b,internal/engine/run_recovery.go和internal/repo/runs.go的冲突处理已核对:保留了 main 的promoteQueuedRuns(),persistRun末尾调用writeRunArtifacts。a85d6d3c:只改了scripts/test-install.py的测试夹具。node_outcome.go在967edee1和a85d6d3c之间没有变化。
已验证、没有问题的部分
- 死锁重试本身有效。
- 在真实 MySQL 8.4.7 上,用两个事务按相反顺序加锁,造出真实的
Error 1213:967edee1上节点正确变为failed,node.failed事件只有 1 条,连续 3 次通过;07590d0c上节点卡在running。 - 每次重试都会重新读取 run,lease、generation 和 attempt 的检查都会重新做。
errors.As能拿到*mysql.MySQLError。连续注入两次 1213 后,事件和run_events都只有 1 条,没有重复副作用。
- 在真实 MySQL 8.4.7 上,用两个事务按相反顺序加锁,造出真实的
- 新测试
TestNodeArtifactCommitFailureRetriesTerminalDeadlock在a85d6d3c通过;放到07590d0c上会失败,说明它确实测到了这次修复。 go build ./...和go vet ./internal/engine/...通过。internal/engine、internal/repo、internal/httpapi全量测试的失败集合与07590d0c一致,只有缺 Chromium 和 git 全局身份导致的 5 个环境失败。
验证说明:容器里没有可用的 bwrap,engine 测试是用一个只用于审查的假 bwrap(不做隔离、直接执行命令)跑的,两个版本条件相同。
非阻塞观察(不要求在本 PR 处理)
- 如果 3 次都撞上 1213,节点仍会停在
running。 waitApproval的写入仍然忽略错误。updateRunAtErr在PutRun失败时不会把已取出的 pending telemetry 放回队列。死锁重试后node.commit.failed这条 telemetry 会丢失(5/5 复现);07590d0c也同样会丢,不是本次引入的。
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>
|
修复 + 部署实测: 处理 crispinhu27 的 [P2]:非 1213 的写入错误跳过了自动打回,run 一直卡在
部署实测(本机平台 + MariaDB 11.8 新库,合成数据,没有对 Tencent/LoopForge 做部署测试)。工作流是
仍然存在(之前就有,不阻塞):节点没有 CI:除 |
CR + 部署实测
|
| 注入的写入错误 | a85d6d3c |
07590d0c(合入前) |
4cadb274 |
|---|---|---|---|
| 1205 ×1 | ❌ 15s 内没结束,run/verify 一直 running |
✅ succeeded,rework=1 | ✅ succeeded,rework=1 |
| 普通 error ×1 | ❌ 同上 | ✅ | ✅ |
| 1213 ×3(超过 a85 的重试预算) | ❌ 同上 | ✅ | ✅ |
| 1213 ×7 / ×20(超过 6 次预算) | — | — | ✅ 重试 6 次后仍然打回,succeeded |
| 1205 ×20 | — | — | ✅ 重试 2 次后打回,succeeded |
ErrRunLeaseLost |
— | — | ✅ 不打回(rework=0),等租约恢复流程接管 |
| 1213 ×1 | ✅ | ✅ | ✅ |
单测(4cadb274)
TestNodeFailureWriteErrorKeepsAutoReject3 个子用例、TestNodeArtifactCommit*3 条(包括新增的 1205 用例)全部通过。上表的临时复现测试 8 个子用例也全部通过。go vet ./internal/engine ./internal/repo通过。chatbot 533/533 通过(a85d6d3c之后没有改过 chatbot)。go test ./internal/engine ./internal/repo ./internal/httpapi:repo全部通过。engine和httpapi共有 5 条失败,都是本机环境问题:3 条是 Chromium 沙箱不可用,2 条是本机注入的 git 作者身份覆盖了测试里设置的身份。这 5 条和975355fe上失败的完全一样,crispinhu27 在07590d0c上也报过同样的环境失败。发评论时 CI 只剩core还在跑,其余检查都已通过。
部署实测(本机 MariaDB 11.8 全新库,用 4cadb274 构建平台,native 沙箱,用真实的 MariaDB 触发器注入错误:在 run_nodes 上建 BEFORE INSERT 触发器,node_id='verify' AND status='failed' 时 SIGNAL ... MYSQL_ERRNO=<n>,注入次数存在 MyISAM 计数表里,这样计数不会跟着事务回滚。没有对 Tencent/LoopForge 做部署实测)
工作流是 repair(shell) → verify(shell,第一次 exit 3,第二次通过,rejectTo: repair,maxReworks: 2):
| 场景 | 结果 |
|---|---|
| 1205 ×1 | run succeeded,2s;repair rework=1,verify attempt=2 ✅ |
| 1105(普通错误)×1 | succeeded,rework=1 ✅ |
| 1213 ×1 | succeeded,rework=1 ✅ |
| 1213 ×10 | succeeded,rework=1,用掉 6 次注入(剩 4 次)✅ |
没有 rejectTo 的节点 + 1205 ×1 |
重试后正常落到 failed ✅ |
没有 rejectTo 的节点 + 1105 ×1 |
节点和 run 一直停在 running(见下面的非阻塞项) |
真实模型:上面的工作流后面接一个 Agent 节点 report(Cursor CLI grok-4.7 effort high,必须产出 report.md),注入 1205 ×1 |
46s 后 succeeded;打回后 repair 跑了 2 次,模型写出的 report.md 内容是 # Report / repair.log has 2 lines,和实际一致。run_artifacts 写进了 report(32 B),通过产物接口下载到的内容一样 ✅ |
非阻塞(以前就有,不是本 PR 引入的):节点没有配置 rejectTo,写 failed 又遇到不能重试的错误(比如 1105)时,节点会一直停在 running,只能等租约过期后由恢复流程处理。合入前的 07590d0c 也是这样。真想消除这种情况,可以以后单独处理。
结论:LGTM。推送后 crispinhu27 的 REQUEST_CHANGES 需要他复核后解除,并由非作者重新批准。token 是作者本人的账号,所以只评论,不点 Approve。
复现测试、部署脚本和日志在评审会话的归档目录里,没有往仓库推任何东西。
crispinhu27
left a comment
There was a problem hiding this comment.
复审 head 4cadb274(base main 058a530b,a85d6d3c 上的 REQUEST_CHANGES 6058871172 之后的增量是 975355fe、4cadb274)。结论:APPROVE。
历史问题
- [P2] 非死锁写入错误时跳过自动打回、run 卡在 running:FIXED,已在 head 上实测,证据见原线程。
增量审查(node_outcome.go、run_state.go、repo/dbtime.go 和测试)
- 重试有上限:
RetryDeadlock每轮最多 6 次带退避,1205 只多加一轮。 - 每次重试都会重新读取 run,并重新检查 lease、generation 和 attempt。
- lease 丢失或被别的实例持有时仍然直接返回,不会打回。
- 打回前会检查节点的状态、attempt 和返工次数,不会重复打回,也不会打回过期的节点。
- 1205 / 1213 回滚后,会把待写的 telemetry 放回队列,不会重复记录。
RetryDeadlock和原来的retryBotDeadlock行为一致。
验证(隔离环境,合成数据,执行 PR 代码时没有 GitHub 凭据)
go build ./...通过;go vet对 engine / repo / httpapi / runner / runtime 通过。- 在 head 和 base 上用相同条件跑测试,对比失败的用例:
internal/engine:两边都是同样 3 个,原因是缺 Chromium 和 git 全局身份。internal/repo:两边都没有失败。internal/httpapi:两边都是同样 2 个浏览器用例。- 接 MySQL 8.4.7 跑:
internal/repo两边都是同样 6 个,TestMySQLNodeArtifactCommit在 head 上通过。 - 说明:main
058a530b的 engine 测试本身编译不过(sop_executors_test.go用的是旧签名),对照时在本地临时补了参数。
- CI:16/16 通过。
- 容器里没有 bwrap,engine 测试是用只用于审查的假 bwrap(不做隔离)跑的,head 和 base 条件相同。
非阻塞观察(07590d0c / base 上同样存在,不是本 PR 引入的,不要求在本 PR 处理)
- 锁等待超过重试和
Reject自身写入的总时长时,节点仍会停在running。真实 MySQL 上锁住 6 秒时,head 和07590d0c都会这样。 - 没有
RejectTo的节点、重试分支和等待审批分支,遇到持续的非 1205/1213 写入错误时,仍会停在running。
叠合并实测:#1332 合入后,本 PR 会和它冲突(解法已验证)本轮所有 Robert0622 的 PR 都没有新提交,各自对 main
建议合并顺序:#1345 → #1332 → #1223 → #1301(合 main 解冲突)→ #1286。#1301 本身还挂着 REQUEST_CHANGES、需要重新批准,让它来解冲突,就不会让 #1332 已经拿到的批准失效。 冲突解法(两边都保留)
验证(叠合并栈 = main + #1345 + #1332 + #1223 + #1301,本机 MariaDB 11.8,native 沙箱,没有对 Tencent/LoopForge 做部署实测)
这次没有往本分支推提交:现在推只能把 #1332 整个带进来。等 #1332 合入后, |
Resolve conflicts with #1301 (artifact streaming): - internal/httpapi/runs.go: stream the artifact body from OpenArtifactContent with charset only for text/*, keep this branch's CSP sandbox header and RFC 2231 Content-Disposition via runArtifactFilename (artifact name + source extension). Main's artifactFileName test now exercises runArtifactFilename; every main case keeps the same expected file name. - chatbot/src/RichContent.jsx: keep this branch's loaded-state preview and add main's 5 MiB oversized guard and binary detection. Co-Authored-By: Claude Code <noreply@anthropic.com>
* feat: rename SOP to LOOP across LoopForge * Apply LOOP terminology to copy merged from main and fix CHANGELOG anchor Rename the user-visible SOP copy that main added for the enterprise IM channels, observability dashboard and docs, following the same rules as the rest of this branch (routes, JSON fields and identifiers unchanged). Keep accepting the old wording where it can still arrive: notification cards skip both LOOP and SOP header lines, chat drafts recognise both (LOOP:…) and (SOP:…) notes, and the clarification command accepts "保存并启动 LOOP" as well as "保存并启动 SOP". Point the CHANGELOG link at #updating-existing-public-loops. Co-Authored-By: Claude Code <noreply@anthropic.com> * Renumber the LOOP terminology migration to 043 and re-apply the rename to main's new copy main added 042_project_credentials.sql and 042_skill_bodies_to_files.sql, so the terminology migration becomes 043_loop_terminology.sql; the installer, its test and the deployment guide follow. Rename the user-visible SOP copy from #1264, #1294, #1295, #1296 and #1298 (project roles, join requests, project credentials, workspace preview messages) with the same rules as the rest of the branch. Co-Authored-By: Claude Code <noreply@anthropic.com> * Restore the legacy (SOP:…) draft note check clobbered by the rename sweep Co-Authored-By: Claude Code <noreply@anthropic.com> * fix(chatbot): recognize proposal receipts saved before the LOOP rename Conversations saved before the rename still hold the SOP wording of the declined and timed-out proposal receipts. The chat matched only the new LOOP text, so these internal resume turns showed up as user messages. Accept both wordings. Rooms also parse LOOP「…」 authors with the correct length and keep recognizing legacy SOP「…」 authors. Co-Authored-By: Claude Code <noreply@anthropic.com> * Apply LOOP terminology to the chat attribution copy merged from main #1300 added a clarification test that expects the bot reply "已启动 SOP" and a comment that says "a SOP started". This branch already renders "已启动 LOOP", so the test failed after merging main. Co-Authored-By: Claude Code <noreply@anthropic.com> * Resume paused children marked before the LOOP rename The child-resume marker merged from #1327 now reads "等待继续子 LOOP". A parent paused on a build that stored "等待继续子 SOP" still resumes its child after admission. Co-Authored-By: Claude Code <noreply@anthropic.com> * test: cover run evaluation before approval * test: exercise five previously uncovered platform routes * fix: translate LOOP evaluation and runner allocation messages * fix(engine): name LOOP in the remaining auto-assign errors The default-executor fallback label and the no-compatible-sandbox error still said SOP after the main merge. Co-Authored-By: Claude Code <noreply@anthropic.com> * fix: name LOOP in errors merged from main Four user-visible errors that arrived with main (#1342 work branch naming, #1343/#1348 runner auto-assign, #1301 child artifacts) still said SOP. Co-Authored-By: Claude Code <noreply@anthropic.com> * fix(migrations): preserve customized LOOP template copy * test(install): copy migration 043 into the live install fixture install-schema-extensions.sh now replays migrations/043_loop_terminology.sql, but test-install-live.sh only copied 001/033/038/042 into its trimmed fixture, so every live install identity stopped at the first install with 'cat: migrations/043_loop_terminology.sql: No such file or directory'. Copy 043 as well, and add a test-install.py check that every migration the installer replays is in the live fixture's copy list, so CI catches the next one. Co-Authored-By: Claude Code <noreply@anthropic.com> * Name LOOP in comments and test copy merged from main The merge of main kept the product copy for requirements without a LOOP, but comments, test fixtures and failure messages around #1411's sopMode still said SOP. Use the LOOP terminology there too; protocol values such as sopMode none/sop and Go identifiers keep their names. Co-Authored-By: Claude Code <noreply@anthropic.com> --------- 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>




Summary
MEDIUMTEXTso old deployments can accept the inline format. Migration042preserves existing data, character set, collation, and nullability.artifact.publishedonly after the outcome is committed for the current run and node.Compose applies
migrations/042_run_artifacts_content_mediumtext.sqlbefore the platform starts, including normal./start.sh pullupgrades. The native development script runs the same migration. Custom deployments with an external MySQL server can include the SQL in their pre-start schema upgrade step.Validation
MySQL 8.4.13 with the original engine reproduced the stall in all 3 runs. A 65,536-byte artifact triggered MySQL error 1406, the node remained
running, and its trace announced publication.The fixed engine passed 5 repeated MySQL regressions. Legacy
TEXTrejects that same write and the node ends asfailedwith the cause. After applying the migration twice, 65,536-byte and 1 MiB artifacts round-trip and the downstream approval starts.The SQLite write-rejection test passed in all 5 runs. The node fails on its first attempt and retains the write error.
The public content check and Git whitespace check passed.
The repository package suite and the focused engine tests for artifact handoff, approvals, and run-state writes passed.
The full engine suite timed out in
TestRunnerIntegrateAndConversationPushCanceled. The same test timed out against the original engine and schema on this host.The Compose upgrade preserved the legacy row and column metadata and passed on a repeated upgrade. A denied
ALTERblocked the platform, and retrying the upgrade after restoring permission succeeded.The real SOP engine on the automatically upgraded MySQL database archived 65,536 bytes and 1 MiB. A 1 MiB plus one byte plan reported the artifact size limit and left downstream approval pending.
The installer test suite completed 64 tests with two environment-specific skips.
SOP handoff and Runner validation
Related to #1092 and #1193. Builds on the approach in #1184 with the current migration sequence, attempt-scoped error handling, and an end-to-end MySQL regression of SOP node completion.