Repository navigation
fix(o98): 收尾不再虚报成功;--print 未完成时非 0 退出并写明「未完成:」 - #94
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
QiaolongLi1201
added a commit
that referenced
this pull request
Oct 11, 2026
Roadmap v1.1: fork's 11 draft PRs all concluded; upstream campaign PRs #76-#92 merged (O13/O43/O57-58/O66-67/O70/O83/O85-88/O90/O97); npm first release @rdk-moss/agent@0.26.1 live (rolling policy supersedes P4 gate, remaining obligations folded into P2/P3); in-flight O94 (#93), O98 (#94), SDK draft #68. AGENTS.md package name fixed to @rdk-moss/agent.
- new src/cli/run-completion.ts: track checks actually run + file writes, detect unverified success claims, assess completion, format 未完成 line - oneshot text mode: incomplete runs exit non-zero (ExitCode.INCOMPLETE=9 or existing error code) and end stdout with 未完成:…;卡在:… - test/run-completion-o98.spec.mjs
- add src/cli/run-outcome.ts: resolveRunOutcome + formatOutcomeLine status completed | incomplete | unverified (false check claims) - oneshot -p path uses run-outcome for exitCode + last line - tracker stays in run-completion; O99 imports from run-outcome - tests cover unverified vs incomplete line prefixes
5 of 7 tasks
Rebase already on 58c9e3d. Close QA/UX gaps on #94: - formatOutcomeLine always emits a conclusion (完成 / 未完成 / 未验证 / 验证失败 / 被拦); drop 未核实 wording - status: completed | incomplete | verify_failed | blocked | unverified (soft unverified = exit 0; VERIFY_CMD / Stop = non-zero) - VERIFY_CMD always recorded on tracker; continue once then re-verify; timeout/spawn not swallowed - headless Stop hook blocked → non-zero + 被拦 line - TUI shows outcome under the done stamp - tests cover A–E plus completed / blocked / TUI line
QiaolongLi1201
force-pushed
the
fix/o98-no-false-success
branch
from
October 11, 2026 17:26
afa8531 to
665c9ee
Compare
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O98:收尾时虚报成功
背景:O14 自举 O90 run2 收尾说「All checks are green」,但没跑 format:check,
npm run check实际失败;kimi-k3 r2 一个文件没改就 exit 0。改动
src/cli/run-completion.ts:从 agent 事件流记录本次 run 实际跑过的检查(format / lint / typecheck / test / check)及是否通过、是否写过文件;检测收尾里没有依据的「通过」声明;给出完成判定。src/cli/oneshot.ts(text 模式,即moss -p默认):判定为未完成时,退出码非 0,stdout 最后一行为未完成:<原因>;卡在:<步骤>(英文界面为Incomplete: …; stuck at: …)。src/cli/exit-codes.ts:新增ExitCode.INCOMPLETE = 9。已有错误(max turns / budget 等)沿用原退出码,只补「未完成」行。判定规则(最小可靠方案:检测 + 标注 + 非 0):
npm run check等价于 format+lint+typecheck;只跑 lint+typecheck 不能声称 all green。O99 对接接口(
src/cli/run-completion.ts)O99 的进度收尾直接用
verdict.status/verdict.exitCode/formatIncompleteLine,tracker.lastStep/lastFailedStep可用作「卡在哪一步」。进度本身不能当成功信号。测试
test/run-completion-o98.spec.mjs:单元(声明 vs 真实运行、失败的 check 不算、否定句不算、零改动编辑任务)+ 集成(runOneShottext 模式复现 O14 run2 与 kimi r2:退出码非 0、最后一行未完成:;诚实回答仍为 0)。oneshot.ts临时还原到 main 后该测试变红(false "all green" must not exit 0 (got undefined)),恢复后变绿。npm run check通过;Node 22.16 下全量node scripts/run-package-tests.mjs:350 个文件全过。不合并,请 QA 复审、UX 验收。