Repository navigation
Rename SOP to LOOP across LoopForge - #1286
Conversation
crispinhu27
left a comment
There was a problem hiding this comment.
Code Review — PR #1286 "Rename SOP to LOOP across LoopForge"
Scope: 476-file mechanical rename of "SOP" → "LOOP" in UI copy, documentation, comments, test assertions, migration SQL, installer scripts, and agent prompts. API routes, JSON field names, Go struct/const identifiers, and serialized execution types are unchanged.
Verification performed:
- Migration SQL (
042_loop_terminology.sql): idempotency guards (BINARYequality check on name and payload) are present; transaction is wrapped; installer script correctly appends the new migration file;test-install.pytest asserts ordering viasql.indexand covers the new migration. - Go diffs: all SOP→LOOP changes in
.gofiles are confined to comment text and user-facing notification string literals. No exported type names, struct field names, JSON tags, or const values were renamed. - Web/chatbot test assertions updated consistently to match new string literals.
- CI: browser, e2e (all platforms), first-run, validate, curl-install, secrets, tcmcp, scan all green.
corewas still running at review time.
One confirmed issue (see inline comment): The Markdown fragment in CHANGELOG.md still points to #updating-existing-public-sops after the matching heading in docs/deployment.md was renamed to ## Updating existing public LOOPs (new anchor: #updating-existing-public-loops). This broken cross-reference was introduced by this PR.
|
结论:需要修改 GitHub 拒绝了 Pull Request Review 接口(HTTP 403:Tencent 组织启用了 OAuth App access restrictions)。当前账号无法提交正式 Request changes。 CHANGELOG.md 第 40 行的链接仍是 完整 diff 超过 300 个文件,没有逐文件看完。已看的迁移 |
Resolve conflicts by keeping main's changes and applying the LOOP terminology to the conflicting hunks. Co-Authored-By: Claude Code <noreply@anthropic.com>
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>
Keep main's project role, skill body and workspace changes and apply the LOOP terminology to the conflicting copy. Co-Authored-By: Claude Code <noreply@anthropic.com>
…e 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>
…weep Co-Authored-By: Claude Code <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md # design.md # docs/conversation-workspaces.md # e2e/api/35-runner-mode.test.mjs # internal/httpapi/project_write_access.go # internal/httpapi/runners.go # web/app/runners.js # webtest/tests/mcp-sops-runners.test.mjs
|
main 又前进到
验证
|
crispinhu27
left a comment
There was a problem hiding this comment.
复审 head d03ac060(base main c3dd1b4d),上次 REQUEST_CHANGES 是在 9beb5638 上提的。
历史问题:CHANGELOG 指向 #updating-existing-public-sops 的 [P2] 已复测为 FIXED。CHANGELOG.md 现在指向 docs/deployment.md#updating-existing-public-loops,对应的标题存在;全仓已经没有地方引用旧锚点。用脚本检查了全仓 Markdown 内部锚点,head 和 main 的失效集合相同,本 PR 没有新增失效。
作者自述的其他修复都已核实:迁移改号为 043,不和 main 的两个 042 冲突,installer 按 seed→033→038→043 的顺序追加,test-install.py 通过。在 MariaDB 上 043 跑了两次,两次后的 dump 一致,用户数据没动。cards.go、push_card.go、bot_clarify.go 同时接受 LOOP 和 SOP,测试都有。前端 flows.js 和 workbench.js 也兼容旧值。
新问题(阻塞):chatbot 识别历史提议回执时没有兼容旧文案,详见行内评论 [P2]。
非阻塞:web/rooms.js:372 把 roomIsSOPAuthor 改成了 /^LOOP「.*」$/,但第 376 行的 roomAuthorName 仍然是 slice(4,-1)。这个长度是按 SOP「 写的,LOOP「 多一个字符,结果 LOOP「后端交付」 会解析成 「后端交付,旧的 SOP「…」 作者也不再能被识别。rooms.js 目前没有页面加载,所以不算阻塞,建议顺手改掉。
验证:go build ./...、go vet ./...、scripts/test-install.py、scripts/check-public.py 都通过。webtest 285/285,chatbot vitest 493/493。Go 全量测试里 engine/httpapi/runner/runtime 的失败都是本机没有 user namespace(bwrap)造成的;和 main 对比,失败集合一致,只多了 2 个,单独重跑确认一个是偶发、一个在 main 上同样失败。依赖沙箱的那部分以 CI 的 core 为准。另外在本地 MariaDB 上真实起了 head 和 main 两个平台,用 Chromium 做了对照。
另外:main 已前进到 f3d4f41a(#1284),本 PR 现在和 main 有冲突,涉及 CHANGELOG、docs/conversation-workspaces.md、domain/observability.go、domain/project.go、engine/prompt.go,需要再合一次 main。
|
结论:需要修改 GitHub 拒绝了 Pull Request Review 接口(HTTP 403:Tencent 组织启用了 OAuth App 访问限制)。当前账号无法提交正式 Approve / Request changes。以下改为普通评论。 与 main 冲突(mergeable_state=dirty)。本次改了 522 个文件,把产品文案从 SOP 换成 LOOP;检查项均已成功,提交状态虽为 pending,但没有具体失败项,不单独作为修改理由。请变基到当前 main,并保持说明里的兼容约定:路由、工具名、JSON 字段和 workflow id 不变,迁移只更新内置默认文案。变基时请核对与仍打开的 #1287( |
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>
Robert0622
left a comment
There was a problem hiding this comment.
CR + 部署实测:LGTM,可以合入(head 25261b9e)
这一轮看了新提交 25261b9(改名前保存的回执和 SOP「…」作者名的兼容),以及 8afd098 合并 main 7bebfa5 的结果,并对整个改名做了一遍兼容性检查。
代码
chatbot/src/api.js:「不走 SOP / SOP 建议超时」两种旧回执和新 LOOP 文案都能识别,而且仍然要求上一条助手回复里有 declined/expired 的 proposal 草稿。普通用户文本即使长得像回执(例如少了句号)也不会被隐藏,测试覆盖了这一点。web/rooms.js:/^(?:LOOP|SOP)「(.*)」$/用捕获组取名字,修掉了原来slice(4,-1)按 LOOP 长度截取、截错SOP「…」名字的问题。- 后端:
assistantProposalDeclinedText/ExpiredText只用来生成新回执,判断历史用的是 decision 字段;sopRequested仍把sop当成关键词,用户说「走 SOP」照样能识别;draftChoiceSuffix、通知解析等都同时接受LOOP:和SOP:。路由、工具名、JSON 字段、type: "sop"都没改。
部署实测(本机原生部署 MySQL 8.4.7)
- 升级路径:先用 main 建库,装上 main 的种子数据和 033、038 迁移,并把
generic-product-delivery改名成「我的定制 SOP」,再连跑两次043_loop_terminology.sql。结果:三个内置模板变成「通用后端/前端/缺陷修复交付 LOOP」,payload 里的Workflow.name一起改了,MR 指引里的「和 SOP 阶段文档」变成「和 LOOP 阶段文档」,JSON 仍然有效;定制过名字的模板保持「我的定制 SOP」,没有动;welcome 项目描述也更新了。第二次运行没有任何变化。 - 用本 PR 的平台在升级后的库上启动,用 Chromium 依次打开 14 个视图(LOOP 列表、需求、运行、审批、角色、项目、指引、协作、执行机器、沙箱、设置、平台、观测、Bot),中文和英文各一遍,扫描页面文本:没有残留的
SOP字样,LOOP 正常显示。 - 旧接口
/api/workflows、/api/runs、/api/issues都返回 200。welcome 的「平台验收 · 脚本与审批」LOOP(换成原生沙箱后)跑完 prepare,进入审批,批准后 succeeded,产物 welcome/decision/completed 都在。 - 测试:chatbot 495/495、webtest 287/287 通过;
go test ./web ./internal/domain ./internal/botinteraction通过;go vet ./...干净。./internal/httpapi全量跑下来只有TestBrowserStreamPushesFramesAndRunsCommands和TestMainBotBrowserStartsAndDrivesRunBrowser两个失败,main 上是同样两个,原因是本机没有可用的 Chromium,不是本 PR 引入的。 - CI:当前 head 全部检查通过。
小问题(不阻塞)
- PR 描述的 Compatibility 一节还写着
042_loop_terminology.sql,实际文件已经改名为043_loop_terminology.sql(docs、install-schema-extensions.sh和test-install.py都已改成 043),建议把描述也改过来,免得运维照着描述去找文件。
crispinhu27
left a comment
There was a problem hiding this comment.
复审 head 25261b9e(base main 7bebfa50)。上次 REQUEST_CHANGES 6044722369 针对的是 d03ac060。
合并核对:用 git merge-tree 复现了 8afd0981 的 8 个冲突文件(CHANGELOG、docs/conversation-workspaces.md、domain/observability.go、domain/project.go、engine/prompt.go、web/app/issues.js、project-wizard.js、projects.js)。把两边都做 SOP→LOOP 归一化后,c3dd1b4d..7bebfa50 与 d03ac060..8afd0981 的 +/- 行一致,main 的改动没有丢;只有 PR 改、main 没碰的文件合并后无差异。#1284 带进来的用户可见文案都已改成 LOOP,残留的 SOP 只在 Go 标识符、测试 workflow id 和 Type: "sop" 里,符合说明中的兼容约定(路由、工具名、JSON 字段、workflow id 未改)。
历史问题
- [P2] 升级前保存的「不走 SOP」和「SOP 建议超时」回执不再被识别:FIXED,单元级和真实运行(MariaDB + Chromium)复测,详见原线程。
- [P2] CHANGELOG 锚点:仍为 FIXED。全仓 Markdown 内部锚点检查,head 与 main 的失效集合相同(只有 vendored 的 vscode-web README 里原有的一条),新加的
#upgrading-existing-project-conversations能解析。 - 上次的非阻塞项
web/rooms.js作者名解析:已改好,新测试在d03ac060上失败、在 head 上通过。
验证(隔离环境、最小环境变量、合成数据,与 main 7bebfa50 对照)
go build ./...、go vet ./...通过;scripts/test-install.py(69 OK,跳过 2)、scripts/check-public.py通过。- chatbot vitest 495/495,webtest 287/287。
- Go 全量测试两边都有本机缺 Docker / 原生沙箱导致的失败;httpapi、runner、runtime 单独重跑失败集合一致。整包跑时 head 多出的几个失败逐个核实为负载下的偶发(单独跑 head、main 各 5 次都通过)或在 main 上同样失败。
- CI 当前 head 全部通过。
本次没有发现新的阻塞问题。没覆盖的部分:本机没有 Docker,没有实跑 Compose 升级串联 043 迁移,以 CI first-run 和 test-install.py 为准。这个 APPROVE 只针对 25261b9e。
Bring in #1316, #1319 and #1318. Conflicts in orchestration and workspace docs, run admission, the MCP run tool, the LOOP designer prompt, catalog and sharing comments, the Web flow, issue and run views, index.html and the sandbox selection Web test are resolved by taking main's behaviour and applying this branch's LOOP terminology. Rename the user-visible SOP copy that #1319 added outside the conflicts (OpenAPI, run admission errors, the runtime sandbox picker and its assistant prompt) with the same rules. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
main 前进到
验证
|
crispinhu27
left a comment
There was a problem hiding this comment.
复审 head f6e62693(base main 848793b3)。上次 APPROVE 6046872163 针对 25261b9e,后来被新推送 dismiss。这次的增量只有一个合并提交,把 main 的 #1316、#1319、#1318 合了进来。
合并核对
- 用
git merge-tree复现了25261b9e+848793b3的 13 个冲突文件。每处冲突都按 main 的逻辑解决,用户可见的文案改成 LOOP。逐个看过run_start.go、assistant_mcp.go(runs_start的项目校验沿用 main 新加的scheduledAssetsFrom条件)、catalog_sharing.go、sops.js(autoSelectSandbox分支保留)。 - 两边都做 SOP/LOOP 归一化后,
7bebfa50..848793b3和25261b9e..f6e62693的 +/- 行逐行一致,差异为 0。main 的改动没有丢,合并时也没有夹带别的改动。 - 合并没有动
migrations/,043_loop_terminology.sql不变。和当前 main1cbaa4a6做merge-tree,没有冲突。
验证(隔离用户、最小环境变量、合成数据,以 main 848793b3 为对照)
go build ./...、go vet ./...、scripts/test-install.py(70 项,跳过 2 项)、scripts/check-public.py两边都通过。- chatbot vitest:head 495/495,main 494/494。webtest:head 290/290,main 289/289。
- Go 全量测试:两边的失败差异都在
internal/engine,报错都是本机缺少bwrap。把这 22 个用例在 head 和 main 上单独重跑,失败集合完全一致,不是本 PR 引入的。依赖沙箱的部分以 CIcore为准,core在当前 head 上已通过(CI 16/16)。 - 真实运行:在 MariaDB 上起了 head 平台,执行了 seed 和 043,用 Chromium 登录后走了 14 个视图,没有 pageerror,正文中没有残留的
SOP。通过 API 给 welcome LOOP 打开autoSelectSandbox后,页面上sopAutoSandboxLabel()显示「由 Agent 选择」,资源需求行显示「由 Agent 选择沙箱 | 启动时按项目和任务选择运行沙箱。」,sopSandboxPendingText显示「正在选择沙箱…」。#1319 合进来的功能在改名后能正常工作。
这次没有发现新的阻塞问题。没覆盖到的部分:本机没有 Docker,没有实跑 Compose 升级;engine 的沙箱用例以 CI 为准。这个 APPROVE 只针对 f6e62693。
Co-Authored-By: Claude Code <noreply@anthropic.com>
#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>
|
Re-review of Conflict resolution (
|
Resolve conflicts with #1327 (idle LOOP workspace reclaim) and #1323 (privileged Docker sandboxes) by keeping main's logic, then apply LOOP terminology to the copy they added: runner run-limit tip, queued-run callout, run-list concurrency note, child resume errors and activity, deployment docs, comments and test messages. The stored legacy activity "切回 SOP,等待继续" is still matched unchanged. Co-Authored-By: Claude Code <noreply@anthropic.com>
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>
|
Re-review of Fix for my previous comment ✅
Blocking: conflicts with
|
|
main 前进到 改动
验证(本机,Go 1.26.11;没有对本仓库做实测)
|
crispinhu27
left a comment
There was a problem hiding this comment.
Re-review of dfac0810 (base main cb78a499). My earlier approvals on f6e62693 were dismissed by the pushes. The two new commits are a merge of main and a compatibility fix; I verified both and found nothing blocking.
b06d138 merge of main cb78a499 (#1327, #1323): faithful.
- Every symbol main added is present with main's file counts:
sharesWorkspace8/8,sopWorkspaceTreeIdle2/2,ShouldDeferRestoreUntilAdmitted2/2,resumeChildrenAfterAdmission1/1,RunWouldQueueOnAdmission3/3,appendAdmissionRunEvent2/2,IdleReclaimableSOPRuns3/3,ReleaseCleanedRunAdmission5/5,ReleaseIdleBorrowedSOPAdmission2/2. - The four hunks that were at risk last round now carry main's idle-reclaim copy with LOOP wording:
web/app/runners.js,web/app/runs.js,web/index.html,webtest/tests/mcp-sops-runners.test.mjs. - The 489 files main never touched are byte-identical to
6a35c49b. Every main file matches afterLOOP→SOPnormalisation except one comment inconversation_workspace.goand the new marker block. Nothing from #1327/#1323 was dropped, and nothing unrelated came in. run_environment.go:194keepssharesWorkspace(current), andrun_admission.gokeeps main'sparent.WorkspaceCleaned != nil || parent.AdmissionState == "released"clause.
dfac0810 "Resume paused children marked before the LOOP rename": fixes a real stall, not a cosmetic rename.
internal/engine/sop_node.go:108now usesisResumePausedChildActivity(), which accepts both等待继续子 SOPand等待继续子 LOOP; the==there is the only reader of that marker.- Reproduced in an integration test: parent queued behind an idle reclaim with a paused child whose activity still holds the legacy
等待继续子 SOP. With the helper the run completes; reverting line 108 to the strict comparison leaves the parent parked inrunningindefinitely. The negative control fails with the old code, so the fix is load-bearing. - Adversarial cases all rejected correctly: empty, whitespace only,
等待继续子,等待继续子 lop, trailing or leading spaces,Sops. A second resume is not re-entered because the activity is rewritten to正在执行子 LOOP …, andsop_node.go:60only picks the child whenprev.WorkflowIDmatches, so a stale marker cannot hijack a re-pointed node.
Verification (Go 1.26.11, webtest, chatbot vitest; head dfac0810 vs main cb78a499, separate worktrees, synthetic data only):
go build ./...,go vet ./...,scripts/check-public.py: pass on both.- webtest: 293/293 on head, 292/292 on main (the extra one is a subtest in a renamed file). chatbot vitest: 59 files, 495 tests pass.
go test ./...: 133 failing cases in 5 packages on both, 26okpackages on both. Comparing the failing-case sets, nothing fails only on head or only on main; the causes are this environment (nobwrap, no Chromium, host git identity in a commit-shape assertion).- Merge:
git merge-treeagainstcb78a499and against currentmain11e7521is clean. The conflict reported last round is gone.
Non-blocking: internal/engine/run_ops.go:738,801 still match the unrenamed 切回 SOP,等待继续, and web/app/approvals.js:231 matches it too. That is consistent on both sides and correct as is, but anyone renaming that literal later has to change all three.
Not covered: no Docker here, so the Compose/first-run path relies on CI. core and platform-required are green on this head. This approval is for dfac0810 only.
修复 P3:
|
| 场景 | 结果 |
|---|---|
| 负责人没有 Cursor 凭据时派发需求 | 返回 400:仓库 "bn-…" 的工作分支生成失败:请配置 LOOP 负责人的模型凭据或执行机器登录 ✅ |
| 配好 Cursor key 后再派发(真实 grok-4.7 high) | 32 秒内生成分支 feature/login-remember-me,节点在这个分支上执行,run 成功 ✅ |
50b5c89f 上 16 项全部通过。合并顺序提醒:本 PR 单独和 main 不冲突,但和 #1332、#1223 叠在一起有 6 个文件冲突(App.jsx、ArtifactPanel.jsx、SopRunPanel.jsx、conversation_workspace.go、sop_idle_reclaim_test.go、runs.js)。建议放在最后合,合之前再合一次 main。
crispinhu27
left a comment
There was a problem hiding this comment.
复审 50b5c89f(base main 832e2bef):APPROVE
上一次在 74dfee49 上的 APPROVE 因后续推送被撤销。本次审查范围是 74dfee49..50b5c89f:三个合并提交(1fec8644 合 main 78cdab43、7c6a20a8 合 merge-audit/release-current-main、1be1d8a2 合 main 832e2bef)和 50b5c89f(把从 main 合进来的 4 条报错文案改成 LOOP)。
审查
git show --remerge-diff看了三个合并提交的冲突解法:run_start.go注释、assistant_sop_sandbox.go选沙箱提示词采用了 main 的新内容并保留 LOOP 术语;web/i18n-en.js合并后 LOOP 写法的 key 都在。50b5c89f改的 4 条文案(runner_auto_assign.go:175、sop_node.go:266、sop_work_branch.go:146、assistant_sop_sandbox.go:95):代码、测试、web、chatbot、e2e 里都没有按旧文案匹配的地方,改字面量不影响调用方。- 和当前 main
f7b066d8(新合入 #1345、#1351)合并无冲突,这两个 PR 没有带进新的 SOP 文案。
验证(隔离工作区,未接触任何凭据)
- 运行时探针:在 head 上实际调用
generateSOPWorkBranch(未配置分支命名器)和读取errSOPHelperCredentials,返回AI 分支命名不可用,请检查 LOOP 执行器、请配置 LOOP 负责人的模型凭据或执行机器登录;同一探针在1be1d8a2上返回 SOP 写法,断言失败。 go build ./...、go vet ./...通过;go test ./...head 与1be1d8a2失败的测试名单完全一致(138 个,都是容器里缺 bwrap / Docker / Chromium 这类环境原因),本次没有新增失败。- chatbot:62 个文件 534 个测试通过,前端构建成功;webtest:309 个测试全部通过。
- CI 16/16 通过。
历史问题复测(6058911645 提出,22:30 轮在 74dfee49 上已确认修复)
- [P2] 英文界面 LOOP 运行评测标题、回写失败提示显示中文:FIXED。
web/i18n-en.js合并后仍有LOOP 运行评测、打开 LOOP、回写失败提示三条 key,旧 SOP 写法 0 条;webtestEnglish mode translates the LOOP evaluation and writeback action在 head 上通过。 - [P3] LOOP/SOP 混用:FIXED。
runner_auto_assign.go的报错里已没有 SOP;web/index.html去掉 script/style 后可见文字里 SOP 为 0。
不阻塞的备注:从 main 合进来的文档里还有 4 处用 SOP 指流程,不在本 PR diff 里,可以顺手改:design.md:343、design.md:344(#1348)、docs/api/collaboration.md:72(#1342)、docs/deployment.md:245(#1301)。
本轮没有重新在浏览器里部署实测界面(本次增量只改了 4 条后端报错文案,界面相关的验证靠 webtest 和 CI 的 e2e-browser)。以上是对当前 head 的审查结论,不代表代码没有任何缺陷。
|
CR + 部署实测: 范围
核查:
部署实测(本机 MariaDB 11.8 全新库,用本 PR head 构建的平台;没有对 Tencent/LoopForge 做任何部署操作):
说明:这台机器没有 docker,内核也不允许 user namespace,所以沙箱内跑真实节点这一步做不了,run 会停在 结论:改动只有文案,无逻辑变化,P3 已闭环。token 是作者本人的账号,所以只评论、不点 Approve。 |
|
与最新 main 本 PR 的 base 是
真实模型实测(#1351 的审批保活和本 PR 改名后的
结论:与当前 main 合并没有冲突,也没有语义问题,不用改。按之前约定,本 PR 最后合;如果先合 #1332 或 #1223,合之前要再合一次 main 解冲突。 |
crispinhu27
left a comment
There was a problem hiding this comment.
复审:a744e027,REQUEST_CHANGES(1 个 P3,修一行即可)
审查范围:50b5c89f..a744e027(migrations/043_loop_terminology.sql)。同时与当前 main 2e5176f1 试合并,没有冲突。
043 的增量改动验证通过(隔离的非特权用户、合成数据,MySQL 8.4.13 和 MariaDB 10.11.20):
- 全新库:按
install-schema-extensions.sh的顺序执行 001、seed、033、038、043,在 MySQL 上全部成功。MariaDB 10.11 能正确解析和执行JSON_TABLE列定义里的CHARACTER SET utf8mb4、FOR ORDINALITY,以及多表 UPDATE 里引用被更新表的写法,043 连续执行两次都成功(MariaDB 上 033 的CAST AS JSON报错是 main 上原有的情况,与本 PR 无关)。 - 6 个哈希都从仓库历史实际算过,分别对应 033 原版和 HEAD 版、033+038 之后的版本,以及历次 seed 出厂的 3 个 MR prompt,没有遗漏的出厂版本。
- 升级场景:分别构造了 033 原文、038 原文、管理员改过的 MR prompt、只改了其他字段(deliver prompt 里也带有「和 SOP 阶段文档」)四种情况。出厂原文都被改名,管理员改过的 MR prompt 和其他字段保持不变,把 MR agent 移到下标 0 也能正确定位;第二次执行影响 0 行。同样的数据用
50b5c89f的旧版 043 跑,会把管理员改过的内容一起改掉,这正是本次提交要修的问题,确认已修好。 - 合并树上
go build ./...和go vet ./...都通过;go test ./internal/repo/(MySQL DSN)的失败集合与 main 相同(6 项,都是环境原因),没有新增失败;scripts/test-install.py70 个用例全部通过;CI 16/16 通过。
需要修改:见行内评论。本 PR 的 install-schema-extensions.sh 新依赖 043,但 test-install-live.sh 的 fixture 没有拷贝这个文件,文档里的实机安装验收在第一次安装时就会失败(用桩模拟的 fixture 已复现,main 上正常)。这个问题从 9beb5638 起就存在,不是本次提交引入的,之前几轮复审都漏看了,抱歉。
未完成的验证:没有 Docker,没有完整跑完 test-install-live.sh 端到端。
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>
|
CR + 部署实测: 范围 部署实测(本机 MySQL 8.4.7):先用 main 起平台建库,再按
之后用 PR head 的平台起在这份升级后的库上,模板列表显示「通用后端交付 LOOP」等 4 个新名字;分别 clone 后端、前端模板到项目里:后端 clone 出来的 MR 角色是 LOOP 文案,前端 clone 出来的 MR 角色保留了管理员的定制文字。 需要修改(P3,和 crispinhu27 行内评论同一个问题):按
在 其他:CI 16/16 通过,与 main |
|
修复 crispinhu27 的 P3(live 安装验收 fixture 没拷 043),新 head 改动只有测试脚本,产品代码没动:
实测(本机没有 Docker, 数据库先用 main
升级后用本 PR 的平台起在这个库上, 测试
合并提醒:#1411( 脚本和结果: |
|
复测
|
crispinhu27
left a comment
There was a problem hiding this comment.
复审 #1286 head 318d927b(base 832e2bef,当前 main 2e5176f1)。
本次增量 a744e027..318d927b 只改了 scripts/test-install-live.sh(fixture 拷贝列表补上 043)和 scripts/test-install.py(新增回归测试)。产品代码和迁移文件与上一轮审过的 a744e027 相同;那一轮已在 MySQL 8.4.13 和 MariaDB 10.11.20 上用合成数据验证过 043 迁移。
历史问题:
- [P3] live 安装验收 fixture 漏拷
043_loop_terminology.sql(discussion_r4700154000):FIXED。在318d927b上用脚本自己的拷贝命令建 fixture,以非特权用户运行install-schema-extensions.sh,exit 0;在a744e027上做对照,exit 1(cat: migrations/043_loop_terminology.sql: No such file or directory)。新增测试在 head 上通过,放到旧脚本上运行会失败。
验证:python3 scripts/test-install.py 71 个测试通过、2 个跳过;CI 16/16 通过。
未覆盖:没有用 Docker 镜像真正跑一遍 test-install-live.sh(容器里没有 Docker),这部分以 fixture 复现和 CI 的结果为准。
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: Claude Code <noreply@anthropic.com>
|
合入最新 main 并把 #1411 的「不使用 SOP」统一改成 LOOP,新 head 按约定 #1286 放在 #1411 之后最后合,合之前再合一次 main。这次推送是 fast-forward,没有强推,远端原有提交都保留了:
#1411 文案的处理方式(和 #1286 其余改名同一规则)
验证
CI: |
独立 CR + 部署实测
|
| 场景 | 结果 |
|---|---|
中英文各打开需求、LOOP、运行、审批、项目、协作、设置 7 个页面,扫描页面文字里的 SOP |
都是 0 处 |
| 新建需求向导,交付方式选「不使用 LOOP」/ No LOOP → 创建 | LOOP 选择框隐藏;提示「已创建需求(不使用 LOOP)」/「Requirement created (no LOOP)」;接口返回 sopMode=none、workflowId 为空、automationState=ignored |
| 打开这条需求的详情抽屉 | 「关联 LOOP:不使用 LOOP」/「LINKED LOOP: No LOOP」;触发方式「对话处理」/「Handled in chat」(#1413 的 issueTriggerLabel 生效) |
AI 助手 CodeBuddy deepseek-v4.1-flash:「新建一条不使用 LOOP 的需求」 |
completed,27 秒;模型通过 MCP 建单,库里这条需求是 sopMode=none、automationState=ignored,回复里也写的是 LOOP |
AI 助手 Cursor grok-4.7 high:问「不使用 LOOP」会怎样处理 |
completed,48 秒,回答正确,说明不绑 LOOP、定时 LOOP 不会领取 |
| 页面 JS 报错 / 5xx | 无 |
中文向导,选「不使用 LOOP」:

中文详情抽屉:

英文向导 / 详情抽屉:


(英文抽屉里「平台新建」「统计关联 TAPD」「继续开发分支」还没翻译,main 上也是这样,和本 PR 无关。)
测试
go vet ./...通过。go test ./internal/httpapi、./internal/runtime ./internal/repo ./internal/engine ./internal/mcpserver ./internal/domain:本 PR 和 main68ed15f3在同一台机器上跑,本 PR 没有比 main 多出来的失败。失败的都是本机缺 Docker、bwrap、Chromium 沙箱这类环境问题,两边一样。- webtest 315/315 通过,chatbot vitest 535/535 通过。
crispinhu27
left a comment
There was a problem hiding this comment.
复审 4d8ce406(上一版 318d927b 的 APPROVE 因新推送被撤销):LGTM
本次增量:e523d8cf 合入 main 080e91b0(#1345/#1351/#1410/#1412/#1231/#1411/#1429/#1413)、bd3fb432 把合进来的注释和测试文案改成 LOOP、4d8ce406 合入 main 68ed15f3(#1432)。
历史问题
- [P3] live 安装验收 fixture 没拷 043(REQUEST_CHANGES 6064098095):FIXED。
318d927b之后scripts/、migrations/没有改动;按test-install-live.sh的 cp 列表搭 fixture(docker 部分打桩),fixture 里有043_loop_terminology.sql,install-schema-extensions.shexit 0;python3 scripts/test-install.py71 过 2 跳过。
审查
git show --remerge-diff e523d8cf:3 个文本冲突(chatbot/src/operations.js、internal/httpapi/bot_drafts.go、bot_drafts_test.go)都保留了 #1411 的新逻辑(sopMode=none、botDraftWithoutSOP),只改了文案;另有 6 个文件在合并中顺带改名。把 main 改过的 68 个文件两边统一 SOP→LOOP 后逐个比对,剩余差异都是本 PR 合并前已有的改动,没有丢掉任何一方的逻辑。- main 新带进来、在 head 上仍写 SOP 的只有标识符(
sopMode、WithoutSOP等)、JSON 字段和测试数据,在 PR 声明保留的兼容范围内。 bd3fb432只改注释、测试夹具名和断言消息;4d8ce406是无冲突合并(remerge-diff 为空)。- migration:043 编号唯一;MariaDB 11.8 上全新库和「用户改过模板名」的升级库各跑两遍 043,内置模板改成 LOOP、用户自定义名不动、两遍结果逐字节相同。
验证(隔离环境、合成数据、运行 PR 代码的进程不带任何凭据)
4d8ce406:go build ./...、go vet ./...通过;webtest 315/315;go test ./... -count=1失败集合是e523d8cf/main68ed15f3失败集合的子集,没有新增失败(剩余都是本机缺 bwrap / Docker / 浏览器沙箱的环境问题,main 上一样)。e523d8cf上另跑了 chatbot vitest 535/535(main 534/534)。- 真实服务:
4d8ce406构建的agentflow+ MariaDB,注册合成管理员、建项目和一条sopMode:none需求,无头 Chromium 中英文各打开 15 个页面(issues、sops、runs、approvals、projects、agents、runners、settings、platform 等):可见文字里 SOP 0 处、无 JS 报错、无 4xx/5xx;#1411 的需求详情中文显示「不使用 LOOP」「这条需求不使用 LOOP,在对话里澄清需求、直接改代码…」,英文显示「No LOOP」「Handled in chat」。main 对照组仍显示「不使用 SOP」。 - CI 16/16 成功,合并无冲突。
非阻塞(不是本次合并引入,可顺手改):design.md:343-344、docs/api/collaboration.md:69/72、docs/deployment.md:245、docs/api/openapi.yaml:5088("newly created SOP work branches")仍是 SOP。
未覆盖:没有 Docker,未端到端跑 test-install-live.sh;本轮未在 MySQL 8 上跑迁移(043 自 318d927b 起未改,之前已在 MySQL 8.4 验证)。
Resolve conflicts with the SOP→LOOP rename (#1286) by keeping this branch's restructured run panel, artifact rows and run detail header, and rename the user-visible SOP copy this branch adds to LOOP. Co-Authored-By: Claude Code <noreply@anthropic.com>
After dispatching from the issue editor the button text was reset to '启动 SOP', reverting the Tencent#1286 rename while index.html labels it '启动 LOOP'. Restore the LOOP wording and assert it in issues_list_test. Co-Authored-By: Claude Code <noreply@anthropic.com>
What changed
Use LOOP as the product name for reusable Agent delivery workflows. Update the Chinese and English app copy for the catalog, visual designer, chat references, project setup, requirements, approvals, runs, scheduling, notifications, and reporting.
Update Agent prompts, API and MCP descriptions, the four built-in templates, and the demo project copy. Refresh both READMEs, eight product screenshots, diagrams, and the deployment, API, and Local guides.
Compatibility
Existing routes, tool names, JSON fields, workflow IDs, and persisted execution types still work. The installer applies
043_loop_terminology.sqlto update shipped defaults while preserving customized names and descriptions, project copies, and run history. Operators can run the same SQL directly for existing external MySQL deployments.Validation
go vet, public content and secret scans, and LoopForge Local validation and smoke tests passed.