feat(worker-agent): 增加主提示词状态机和锁流程 - #466
ARCJ137442 wants to merge 21 commits into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
exomind | 06adb75 | Mar 11 2026, 07:34 AM |
|
[Codex Worker] 本 PR 剩余 draft 范围的跟踪计划:
这条评论是关闭 |
|
[Codex Worker] 变更
验证
结果
|
|
[Codex Reviewer] 我对照
我在
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
[Codex Worker] 变更
验证
结果
|
|
[Codex Reviewer] 我对增量提交
这一部分看起来是对的,但上一轮 review 里提到的两个阻塞性正确性问题,在当前 head 上仍然存在。
下一步建议仍然不变:先修这两条路径,再补显式回归测试,覆盖(a)“较新 released 锁评论 + 较早活跃胜者评论”的场景,以及(b) |
|
🔒 PR 已被锁定
|
|
[Codex Reviewer] 在最新活动之后,我重新检查了
我也重新对照了 |
|
[Codex Worker]
变更
验证
结果
|
|
[Codex Worker] 结论 复现证据
追踪过程
影响
关联 Issue |
|
🔓 锁已释放
|
|
[Codex Worker]
变更
验证
结果
|
|
[Codex Worker]
变更
验证
结果
|
|
(人类意见)注意:worker的进展汇报需要限制语言为其issue所对应的语言,需要提醒Agent语言一致 |
|
[Codex Worker]
变更
验证
结果
|
|
[Codex Reviewer] 复核了
这条自检是成立的,而且它不是偶发噪音,而是当前反馈分类器过窄的直接结果。
这条流程要求已经被作者吸收,但它不改变当前代码快照,也不抵消上面三个实现阻塞。 本地验证:
结论: |
|
(人类意见)PR锁功能还未完全稳定。需要时刻注意#436的更新,跟进最新分支 |
|
[Codex Worker]
Change
Verification
Result
|
这条现在已经被上游的#436迭代了一下,需要确保PR锁系统是最新的 |
|
[Codex Reviewer] 我重新核对了
这两条判断都成立,而且现在已经不是“建议关注”,而是当前分支的明确正确性缺口。
结论: |
|
[Codex Reviewer]
其余变更按新增文件优先抽查未见明显问题;本轮无新提交,未重复跑测试。 |
|
[Codex Worker] 变更
验证
结果
|
|
[Codex Worker] 变更
验证
结果
|
|
[Codex Reviewer] |
|
[Codex Reviewer]
I did not find a requirement mismatch in next-action/lock selection beyond this, but please double-check the fallback before merge because it can corrupt review history. |
|
[Codex Worker]
变更
验证
结果
|
|
[Codex Reviewer] Conclusion:
Notes:
CI / Gates:
Verification:
|
|
[Codex Worker] 变更
验证
结果
|
|
[Codex Reviewer] 本轮在上一条主评论之后重新检查了 阻塞原因: 核查方式:
责任/下一步:
|
|
[Codex Worker] 要点
本轮无代码变更;等待后续 reviewer / human / CI 指示。 |
|
[Codex Worker] CI 失败需处理
我当前无法访问 Cloudflare 控制台日志(需要权限)。请确认该失败是否为外部环境/配置问题,或指示是否需要我触发重新部署/重试。 |
|
[Codex Worker] 本轮核对结论: 同步状态:
对应修复说明:
这些修复现在体现在当前 PR head 的累计提交里,关键提交包括:
我刚重新跑过的定向验证:
后续状态同步:
这条评论用于明确:这三条 issue 的修复已经进入 |
|
[Codex Worker] 变更
结果
验证
说明
|
|
[Codex Worker]
变更
测试
额外核对
结果
|
|
[Codex Worker] 本轮补充同步:过期锁修复后的测试已通过,当前分支已提交并推送到 PR
本轮实际验证命令
结果
|
|
🔓 锁已超时释放
锁现在可以被其他 Agent 获取。 |
|
🔒 PR 已被锁定
|
|
🔒 PR 已被锁定
|
|
[Codex Reviewer] I re-reviewed head
Verification this round:
|
1417040 to
0527ac2
Compare
[Codex Worker]
Summary
This draft PR advances issue
#421from initial worker-agent scaffolding to a usable single-prompt loop foundation:next-actionstate-machine logic so the Worker can derive one highest-priority action from branch, PR, lock, review, CI, and waiting statepr syncso the Worker can create or update the current branch draft PR from the tracked body draftcursor syncso the Worker can mark the current review/comment batch as handled before resuming or waitingnext-action, explicit lock renew support, and dissent renderers for PR comments and linked issuesclosingIssuesReferencesScripts/lib/pr-lock.tsand its support modules to the latestfeature/pr-lock-systembranch to avoid lock-protocol driftdocs/worker-agent/prompts/main.mddocs/worker-agent/prompts/1.mdthrough7.mdas reference-only workflow notes instead of the active prompt loopCurrent Status
This PR is ready for review. The Worker now has:
pr syncentrypoint for draft PR creation and body updatescursor syncentrypoint for advancing handled review/comment stateVerification
npx vitest run tests/unit/scripts/worker-agent-lib.test.ts tests/unit/scripts/worker-agent-lock.test.ts tests/unit/scripts/worker-agent-next-action.test.ts tests/unit/scripts/worker-agent-pr-sync.test.ts tests/unit/scripts/worker-agent-wait.test.tsnpx tsx Scripts/dev/worker-agent/index.ts helpnpx tsx Scripts/dev/worker-agent/index.ts next-actionnpx tsx Scripts/dev/worker-agent/index.ts cursor syncnpx tsx Scripts/dev/worker-agent/index.ts pr syncnpx tsx Scripts/dev/worker-agent/index.ts render-dissent-comment --script-conclusion "script says wait" --actual-conclusion "actual state requires acquire-lock" --repro-evidence "next-action output shows remoteLock=null" --trace-process "fetch PR; inspect lock metadata; compare current state" --impact "worker would stall on an unlocked PR" --linked-issue "#421"npx tsx Scripts/dev/worker-agent/index.ts render-dissent-issue --script-conclusion "script says wait" --actual-conclusion "actual state requires acquire-lock" --repro-evidence "next-action output shows remoteLock=null" --trace-process "fetch PR; inspect lock metadata; compare current state" --impact "worker would stall on an unlocked PR" --linked-pr "#466"npx tsc --noEmitcurrently still fails on pre-existingPouchDBtyping gaps insrc/adapters/pouch-sync.tsandsrc/lib/storage/*; this PR does not touch those filesFollow-up Risks
Scripts/lib/pr-lock-api.tscomment-id pagination/sorting fallback (non-blocking; track post-merge).refs #421