Skip to content

fix(app): explain execution proof requirements for task completion - #6267

Merged
huangruiteng merged 1 commit into
mainfrom
codex/agent-completion-ownership-20261012
Oct 11, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/agent-completion-ownership-20261012

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

When Task completion is refused for missing execution lease proof, the Task list and details currently show an opaque canonical error. Both entrypoints now explain who must complete the task and that it remains incomplete, while preserving the terminal owner's error code and payload. The shared preview route handles only the two existing proof-required diagnostics; other actions and errors keep their behavior.

The Task inspector also stays within a narrow viewport so the recovery text and return control remain readable. This is an unavailable-state improvement in the existing ownership-policy adoption journey. App completion under hard_lease still needs its own qualified proof transport; this PR does not borrow or acquire a lease, change policy, or qualify that larger journey. CLI and Lark behavior are unchanged.

Validation:

  • npm run smoke:todo-ownership --prefix apps/presentation/dashboard: English/Chinese proof refusals, unrelated-action/error isolation, existing ownership/history assertions passed.
  • Chat typecheck, packaged build and bundle verification passed. A freshly built wheel was installed outside the checkout and served the packaged frontend against four isolated real File/SQLite × soft_claim/hard_lease profiles. Eight Task list/detail paths passed: four hard refusals retained identical canonical Todo rows and provider revisions; four soft completions produced completion receipts and preserved full text, notes and claims.
  • English/Chinese feedback was inspected at 1200px and 390px. Keyboard completion refusal retained Task context; the 390px inspector and alert both measured 389px with no horizontal overflow.
  • uv run --extra test loopx canary premerge --from-git-diff: 19 checks and three direct diff checks passed on the final six-file candidate. Full semantic vocabulary smoke and public-boundary scan passed. The changed-diff advisory supports loopx/ sources; the new UI helper was reviewed directly against the existing typed diagnostic owner.

Future-facing pass: centralize presentation at the existing preview owner rather than adding duplicate Task-list/detail policy decisions. No native desktop window, live model dispatch, PostgreSQL refactor, or broader ownership-policy qualification is claimed. Runtime/UI changes remain for maintainer merge.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Exact head: b4c869af649f93dad9ec9819422247ecaad767ab

动机

App 用户在任务列表或详情中尝试完成由 Agent 执行的任务。原页面只显示租约错误,用户无法判断是否已完成以及谁能继续;现在同一次操作说明必须由负责 Agent 从原执行提交证明,再刷新结果。打包页面的两个入口都能显示中英文不可用说明,并且拒绝后完整任务记录保持不变。本次不新增代办完成权限,不更改存储或所有权默认值。hard_lease 下 App 的完成证明传输仍未实现或验收,原执行及 Host 的实际采用、默认切换与 legacy 退役仍由既有任务继续。

执行租约证明是负责执行者提供的当前钥匙及版本凭据,存储里“存在一个租约”本身不能代替它。继续显示笼统重试错误会让用户重复点击同一个无法成功的操作。本次将这条失败路径解释完整,并保留原有合法完成路径;不扩大 App 权限。

改动思路

终态准入继续由既有 TypeScript owner 决定,页面只翻译两种已注册拒绝;共享预览入口避免列表和详情形成两套恢复规则。本 PR 交付完整的不可用反馈与真实状态回读,不把反馈通过计为 hard_lease 手动完成通过。任务记录、所有权策略与租约证明仍进入原有后端终态规则;Python 只承担既有适配,页面不读取或推导租约资格。两个入口继续使用相同预览与确认流程。正常 soft_claim 完成仍须预览、确认、实际提交和回读;缺少证明时只呈现不可用信息,没有新跳转、重填、自动重试或自动 acquire。

与分别在列表和抽屉里写文案相比,这个被调用的小 helper 更容易与 owner 诊断保持一致。相邻重构已应用于同一原因:抽屉在窄屏上的最小内容宽度原本会挤掉新说明,采用 Todo 范围内的可收缩网格和标题容器修复。没有引入通用错误框架、重复 Python 判断或新的能力开关。

具体改动

四个生产文件负责共享错误映射、中英文反馈、预览接入和 Todo 抽屉宽度;既有 ownership smoke 增加对应反例;handoff-mode 参考补充中英文不可用边界。完整 diff 为六个文件 +66/-2,无生成资源或原始验证日志。

关键代码讲解

  1. apps/presentation/dashboard/src/features/personal-workspace/todo-completion-feedback.ts:6 的 todoCompletionPreviewFeedback 先验证 todo.update 与 complete,再验证 ChatApiError 和两个确切诊断码,才返回翻译。普通 Error 的相同文字、provider 不可用、foreign CAS、编辑和 gate 操作都不会误入。它没有读取或取得执行证明。
  2. apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-page.tsx:1267 的 createPreview 是两个 Task 入口的共同 owner。catch 中仅替换消息并保留原 payload;拒绝时不会建立确认预览或进入 apply。原有 workspace gate 与其他错误处理继续保留。
  3. apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-page.tsx:1448 的 requestQuickTodoCompletion 仍提交原 Task 身份、claim 与去重键,并在 finally 释放界面忙碌状态。没有添加租约 key、自动取得权限或绕过确认;详情使用同一个预览回调。CSS 仅在 Todo 抽屉内限制 intrinsic width,实际窄屏读回验证说明和返回控件可见。

独立规格是 docs/development/frontend-delivery.md,spec_revision 43173c0b8c8761abee4cdddc665f0f0f20f194f7。按原文步骤逐项映射:

  • Compare the journey:implemented。同一真实列表操作,旧版只有原始租约错误,新版说明负责执行者、证明与未完成状态;没有额外操作。
  • Choose the owner and composition:implemented。复用既有 TS 终态 owner、HTTP 适配与共享预览;CLI/messaging 的合同未更改。
  • Implement and challenge:implemented。两个证明缺失状态与无关诊断/操作反例覆盖,不用存储存在推断调用方权限。
  • Walk the actual product:implemented。新 wheel 在 checkout 外安装,真实 File/SQLite 后端与打包浏览器完成八条路径,覆盖 1200/390px、中英文和键盘。原生桌面窗口与真实模型未测试。
  • Review the task before the diff narrative:implemented。整个采用任务仍有证明传输及实际执行缺口,本次只判为有用增量。
  • Deliver and read back:implemented。本 head 为提出中的 PR;验证的是隔离安装 wheel 的浏览器界面和 canonical 状态,未声称全局安装 App 已升级。后续真实安装采用仍保留在原任务。

对主干的风险

最强反例是“store 有当前归属正确的租约,但页面未提交证明”:若把它当作可以完成,就会扩大终态权限。真实 File 与 SQLite 详情都保持拒绝,任务全文、备注、claim、状态及来源版本不被页面改写。无租约的列表同样拒绝。四条 soft 正路径均实际确认提交、写入 done 和 completion receipt,并独立回读。其他 typed error 与 unrelated action 保留原诊断。

SSR 通过曾不足以发现窄屏裁切:中间构建在 390px 下抽屉内容宽度达到 418px,修复后抽屉和 alert 的 client/scroll width 都为 389px,中英文截图及键盘路径均验证。该反例已保留为历史证据,最终 head 无尚未解释的产品失败。

相同合成 SQLite 状态和不变后端下,基线界面不满足“下一执行者明确且未完成状态真实”的独立 oracle,head 满足;重复点击后的完整 canonical 行仍一致。基线采用不可变 c51 前端,其相关源文件与接受规格的主干基线相同。新 wheel SHA-256 为 dd7608acb3b86699fa99eb5e50b1bd2babe35f1861b0c55475d887efbfb52040。合成状态与浏览器验证没有证明原生 App、真实 Host/model 或自然试用完成。

语义与 CI 对齐

handoff_mode_requires_lease 与 lease_fence_required 复用原 TS owner 语义;没有新增共享 vocabulary 或状态分类。advisory 工具只覆盖 loopx 源目录,不能据此声称检查了 apps;本次另行检查 UI 定义和真实调用链。最终 canary 的 19 项选择检查及 3 项 diff 检查、ownership smoke、类型及打包构建、bundle verify、完整 semantic drift 均通过。当前评审合同 wait_for_ci=false,未查询或等待 GitHub CI。没有 optional/default-off 能力变化;合法 soft 路径、输入/schema 和后端调度/effect 语义保持。文档明确这是不可用说明,不是 hard_lease 完成合格证明。冻结的容量验证结果没有被本 PR 改写或重新计为通过。

我的整体评价

交付判断为 justified_increment:long_horizon preserved,拒绝不产生额外效果或持续自动重试,合法完成保持 durable receipt;user_experience improved,两个入口给出一致、可读且真实的下一执行者提示。本 PR 交付完整的不可用反馈与真实状态回读,不把反馈通过计为 hard_lease 手动完成通过。

机制成本与实际失败相称,保留现有 owner 比自动 acquire、第二套策略判断或通用 registry 更合理。相邻有界重构已经应用,兼容输入和持久回执没有删除。未发现本 head 的阻塞问题;认可这个完整失败路径增量,保留 hard 完成证明、实际安装/Host 采用和 legacy 退役的既有验收缺口。APPROVE 仅为精确 head 的评审结论,不是合并授权;运行时/UI 变更继续交由维护者合并。

English verdict: APPROVE - b4c869a; actionable completion refusal through the shared Task preview, canonical proof authority preserved. Eight packaged File/SQLite paths and focused repository checks pass; native App/model adoption and hard completion proof transport remain unqualified.

@loopx-agent loopx-agent left a comment •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

APPROVE — 精确 head b4c869af649f93dad9ec9819422247ecaad767ab,未发现阻断问题。

动机

任务完成操作者需要知道页面为何拒绝,以及由谁带着当前执行证明完成原任务。

相同隔离任务在基线只显示租约错误;候选的列表和详情说明页面不能代为完成、负责人应从原执行完成后刷新。

实际打包页面的列表和详情已核验,任务仍为 OPEN、claim 和租约版本不变;原 Agent 携带证明的 CLI 完成后,规范记录读回为 done。

本次只解释既有拒绝,不代借或新建租约,也不完成 hard_lease App 全流程验收。

hard_lease App 完成能力仍由既有 handoff-mode 文档的待验收边界保留。

这个有界切片交付真实不可用说明、原状态保留与负责人恢复路径。

改动思路

复用既有共享预览入口与 TypeScript 本地提示 helper;真正的完成判断仍由 typed lifecycle owner 作出。 这个有界切片交付真实不可用说明、原状态保留与负责人恢复路径。 本地显示状态从既有事实派生,操作和持久化 owner 保持原处;不添加权限、后台 provider 或新的配置。需要的判断与观察阶段分开:真实 owner 的拒绝或读回是依据,提示、折叠和页面可见性不能代替完成或验收。失败后继续由已有负责人或刷新流程恢复。

具体改动

完整6文件包含16行本地 helper、共享 catch、两种语言的具体提示、手机 drawer 的 min-width/grid 修正、既有文档的不可用边界和精确码负例。任务列表和详情继续走同一个完成预览;只有 todo.update/complete 且原错误为两个租约码时更换人读文案,原 payload 继续保留。编辑、非完成操作、普通 error 和其它错误码都走原分支。真实页面拒绝后三个任务仍为 OPEN、claim 是 codex、active lease version1、没有 proposal 写入。原负责人携带当前证明通过既有 CLI 完成,独立读回为 done;页面不代借或创建证明。

关键代码讲解

  • todoCompletionPreviewFeedback:Match native completion refusal and translate;仅改变呈现,底层 typed authority 和 payload 保留。
  • createPreview catch:Apply local text and preserve original native payload;仅改变呈现,底层 typed authority 和 payload 保留。
  • requestQuickTodoCompletion:All Task list/drawer complete controls reach shared preview;仅改变呈现,底层 typed authority 和 payload 保留。

规格映射:docs/reference/handoff-mode.md,spec_revision 43173c0b8c8761abee4cdddc665f0f0f20f194f7,判据 execution-proof, no-borrowed-authority, unavailable-recovery 均 implemented;基线契约在实现前读取,当前文档增补不被用来倒推验收标准。

对主干的风险

独立通过正式 npm run smoke:personal-workspace-packaged 全入口:51 个 browser 场景及 team-evidence-return、team-feedback-recovery;todo-ownership、74 项后端/扩展测试、正常打包与 source verify、CSS、diff 检查。相同12个真实 HTTP 输入在基线和候选的 File/SQLite×soft/hard 上均满足原规则:预览不写、soft 201 后确认完成、hard 400 两个原错误码。真实 Ego 打包页面的列表和详情拒绝、390px、Escape 焦点回原按钮与后端规范状态均已核验。

语义与 CI 对齐

先执行 changed-diff semantic advisory,再完整 semantic-vocabulary-drift smoke,既有45处 unresolved producer 保留;空 probe 不覆盖动态构造/TSX,也不证明语义。复用既有 vocabulary,新增解读留在本地投影。CI 未查询、轮询或等待。探针的相对 runtime、soft_claim 误申请租约、含空格的 key 和两个错误脚本路径失败均保留;修正的是一次性 helper,固定 v4 在两版重新执行。Ego 手机导航和歧义 selector 在同一自有页面修正后完成核验,未修改产品或放松断言。最小 Goal fixture 的独立健康诊断不是已安装系统验收。

我的整体评价

长期继续路径保留,用户体验改善:实际打包页面的列表和详情已核验,任务仍为 OPEN、claim 和租约版本不变;原 Agent 携带证明的 CLI 完成后,规范记录读回为 done。 复用既有共享预览入口与 TypeScript 本地提示 helper;真正的完成判断仍由 typed lifecycle owner 作出。 这个有界切片交付真实不可用说明、原状态保留与负责人恢复路径。 future-facing pass 已用本地 helper 收拢列表和详情的重复解读,不需要广泛页面重构。 范围与成本相称,完整 hard_lease App 验收继续保留原缺口;已安装行为、真人模型/真实 provider 与更广路线图未验证。批准当前有界精确 head;平台/Code Owner与维护者合并权限另行读回,本评审不执行 merge。

English verdict: APPROVE

@loopx-agent

Copy link
Copy Markdown
Collaborator Author

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | xhigh

English verdict: APPROVE

Exact head b4c869af649f93dad9ec9819422247ecaad767ab: no blocking finding in the complete 6-file diff.

Task list/detail now explain the existing native proof refusal, identify the responsible original executor and state that completion did not happen. The same12 real HTTP cases per revision preserve File/SQLite soft/hard behavior and full preview canonical-state equality. Actual packaged Ego UI refusal,390px layout and Escape/focus return were verified; all3 rows stayed OPEN with original claim/lease version and zero proposals. The original executor then completed through the existing proof-bearing CLI with done readback. This does not qualify a complete hard-lease App journey.

Independent required whole packaged entry passed51browser scenarios and both team evidence/recovery checks; focused ownership and74backend/extension tests passed. Normal build/source verification,CSS,diff and semantic checks passed;changed-diff advisory preceded full smoke,45existing unresolved producer sites remain. Disposable helper/setup/selector failures are retained and corrected without product changes or weakened assertions. Synthetic fixtures and response-only faults do not qualify installed behavior,live models or real finance/account sources. CI was not queried,polled or awaited.

Specification: docs/reference/handoff-mode.md at 43173c0b8c8761abee4cdddc665f0f0f20f194f7; criteria execution-proof, no-borrowed-authority, unavailable-recovery implemented. Existing TypeScript presentation and canonical owners are reused;narrow text helper avoids repeated caller logic. Useful,proportionate bounded change. COMMENTED records the author-owned approval conclusion; no merge or authority grant.

@huangruiteng
huangruiteng merged commit 6c99e89 into main Oct 11, 2026
19 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants