Skip to content

Show when a delegation operation is settling - #9235

Merged
loopx-agent merged 6 commits into
mainfrom
codex/delegation-cancellation-readback
Nov 22, 2026
Merged

loopx-agent merged 6 commits into
mainfrom
codex/delegation-cancellation-readback

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Return verification during settlement

At 7b2b2ccca595, the same delegation can show Original operation settling and Return needs verification. Check original conversation opens the exact original Turn. The existing typed return error and settlement step remain independent.

Verified on the built Chat at 1440 and 390 CSS px using a populated synthetic inventory, the actual isolated File/SQLite history reader, and an overlapping-state fixture. Original readback produced no write. The File/SQLite return-conflict tests and 10 TypeScript agenda tests passed. The historical captures below document the preceding candidate. Formal Desktop, live Feishu, and hosted checks for this candidate are tracked separately.

return-verification-desktop return-verification-narrow-summary return-verification-narrow

Previous candidate

c8a3c5a5c1 incorporates main d38052695c (#9222). While the original operation is settling, the agenda keeps the earlier peer result available at its own revision. If the terminal message identity cannot be verified, the return stays pending and the original conversation remains available for inspection. Cancellation settlement retains its own status.

This composition passed 96 Python tests, 93 TypeScript tests, the control-plane typecheck and the diff-based premerge checks. A separate Python 3.11 installation of the candidate wheel passed 16 focused File/SQLite cases. The installed Chat App showed original operation settlement, cancellation settlement, return verification and ordinary queued delivery together in a 13-request synthetic SQLite fixture at 1440 and 390 CSS pixels. The screenshots at the end show this revision. The checks and independent reviews below describe earlier heads. The current candidate still requires exact-head review. Live Desktop and Feishu acceptance remain open.

Behavior

An unfinished delegation shows that its original operation is settling while a request-derived Goal amendment still has an active reservation. The current request revision stays visible during a readback or after a correction. Once the reservation settles, the corrected request can proceed from its current revision.

If the requester cancels while the operation is reserved, the App shows Cancellation settling. After settlement, the item leaves the unfinished list and remains in request history. Unreadable evidence still takes precedence.

The per-Turn Inbox also surfaces saved peer feedback while its original operation is settling. In the CLI and host context, the request keeps its settlement step and the earlier result keeps its own revision and acknowledgement. Acknowledging that result leaves the active reservation in place.

Verification

  • Reproduced both misleading agenda states against the original Show when a delegation operation is settling #9235 wheel with File and SQLite storage. Verified known Goal effects with missing request linkage, a correction requiring recovery of an older effect, and cancellation races where commit or abort wins.
  • Checked the requester and receiver Inbox and the original App request-control and inventory routes. The updated wheel passed 14 recovery and readback cases. The request and inventory suite passed 100 cases and the shared TypeScript suite passed 32. Sixteen source-checkout guard and host-envelope regressions passed.
  • On the previous installed wheel, both File and SQLite kept revision 2 in reservation recovery but showed zero actionable results for the saved revision 1 reply. On b526f49eff, both stores show the original result in return attention. The requester can read and acknowledge it during recovery. Its acknowledgement removes the return reminder while the operation still needs settlement. Recovery then leaves the corrected revision able to proceed.
  • The updated head passed 107 Python source tests, 99 TypeScript tests (four skipped), the control-plane typecheck and standard premerge. The installed package passed 38 cases on Python 3.14 and four focused cases on Python 3.11. The previous Python 3.11 wheel failed both focused overlap scenarios.
  • The head composes cleanly with main 1b17c0c7fd. An isolated source composition with Keep terminal returns pending until their message identity matches #9222 needed one local conflict resolution in the shared agenda projection and passed six tests for both behaviors. Each proposal retains its own review and hosted checks.
  • GitHub’s PostgreSQL Integration job passed on b526f49eff using a disposable PostgreSQL service. The job qualified the authority store, service admission, and authenticated remote task commands. This is shared authority coverage. The focused reservation and reply cases above use File and SQLite. The hosted Core and browser checks and independent review remain open.
  • The head also composes cleanly with main 43b7e58204, including the Inbox readback recovery change in Keep the Manager Inbox readable during prior Turn recovery holds #9241.

Independent review and shared CI gates

An independent review approved b526f49eff. On File and SQLite, the original reply remained readable while the current amendment was pending. A different agent and a Turn that had not read the result were refused. The original Turn could acknowledge and replay the same receipt while preserving the reservation and amendment identity. The review passed 36 Python cases and nine TypeScript cases, plus two focused identity and replay cases in source and in an isolated wheel. It also checked four rendered agenda states at desktop and narrow widths with synthetic API data.

The hosted Core job passed 57 cases and failed the catalog parser check on the combined Workbench example. We combined the reviewed head with main 43b7e58204 and #9240 5e417ffd6d locally. The separately installed Core wheel passed all 58 cases and the delegation recovery suite passed all 36 cases on Python 3.11. Hosted Core validation of the combination and formal GitHub review remain open.

The hosted Windows job failed in the captured research fixture when the worker pipe returned WinError 10038. The equivalent native Windows step on #9218 passed.

A local composition with main 0814f04e94, #9218, and #9240 passed 91 delegation, claim preparation, and fixture tests on macOS with Python 3.11. Seven standalone Core catalog and context cases and the CLI output differential also passed. The combined tree still awaits hosted Windows and Core validation.

All 87 scenarios passed across the three hosted browser partitions. The release assembly verified that each partition used the same candidate. The package manifest ties the wheel to CI merge commit 384bd8dac9, whose PR parent is b526f49eff. The downloaded wheel matched the manifest and checksum file. It passed 38 delegation and request-inventory tests in an isolated Python 3.11 installation using File and SQLite.

The wheel’s 31 current frontend assets and entry HTML match the locally tested package byte for byte. Live desktop and Feishu acceptance remain open.

Compatibility with mainline recovery

The hosted static checks and source-verified Chat bundle passed on b526f49eff. The full kernel job reports queued.

A local composition with main 2ab0d1a42b passed 48 tests covering unsettled Turn admission, lease-loss closeout, request correction and cancellation. Two focused cases used File and SQLite to check the same hold before and after reading the Inbox. A pending operator request and a saved peer result stayed readable while delivery remained blocked, the original settlement identity stayed fixed, and quota consumption stayed at zero.

Scheduler observations and delegation during recovery

We combined the same #9235, #9218 and #9240 heads with main ca0ab3b0ad. The source CLI journey passed on File and SQLite. Repeated scheduler observations preserved the original unsettled Turn identity and left its recovery admission count unchanged. Each of three work guards still showed the incoming request and the unconsumed peer conclusion. Once the recovery limit was reached, the Codex App opening still showed both items while delivery and quota spend stayed blocked.

With the same PR heads on the earlier main 0814f04e94, a scheduler observation wrote a normal-run journal entry marked as requiring closeout on both providers. The newer composition passed both direct journeys and 22 focused cases covering scheduler recovery, claim TTL, bounded Inbox opening and bound result readback. Scheduler recovery #9229 and claim TTL #9225 are in the newer base.

Frontend evidence

The before captures use the original #9235 wheel. The after captures use the installed candidate 75eb76c6151b3ffb36cb693dba572aa54033e52d. Both use the packaged Chat App and its real local request-inventory API with synthetic SQLite requests. The mixed list includes delivery pending, original-operation settlement, cancellation settlement, and ordinary work. At 1440 and 390 CSS pixels, the active reservation's status is visible without expanding the original brief. The bundle on b526f49eff has identical frontend asset bytes. The provenance manifest reflects the updated backend source. The live desktop and Feishu entry points remain pending.
delegation-before-1440
delegation-after-1440
delegation-before-390
delegation-after-390

Previous candidate at 1440 and 390 CSS pixels

delegation-combined-1440 delegation-combined-390

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

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent loopx-agent changed the title Show pending cancellation in the delegation agenda Show when a delegation operation is settling Nov 22, 2026
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 · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

委派发起者需要跟进原操作,同时处理已送达的反馈。 原操作的 reservation 尚在收尾时,普通状态会盖住恢复进度,旧版本回复也无法在同一条 Turn 的待处理反馈中操作。 请求改为修订 2 后,修订 1 的回复仍可在原 Turn 读取和确认,当前请求同时继续显示原操作待收尾。 管家明确区分原操作收尾与取消收尾,CLI 和宿主的 Turn Inbox 也能在保留预留的同时显示待确认的旧回复。 独立测试运行于精确源码的 File、SQLite。截图使用合成数据。未独立验证已安装 Desktop、真实飞书、PostgreSQL 或远端 CI。

改动思路 / Approach

将请求下一步和回复待确认项分开投影,分别使用当前请求修订与各条结果自己的修订。 状态仍由请求控制和原 Turn 的回执决定,界面只显示该状态。用户在原对话确认反馈后,预留仍由其原有收尾路径结算。 复用既有 reconcile_reservation、消费守卫与议程列表。没有新增数据存储或写权限。

具体改动 / Changes

准确头 b526f49,merge base dc79482,3 个文件,+75/-12。前端改状态文案,类型化议程补旧回复待确认项,并新增实际恢复用例。 按修订 dc79482 的现有规范核对各项要求。 目标规范

关键代码讲解

  • 委派状态 先处理证据不可读,再按 effect_pending 和取消分支呈现收尾。

  • Turn 投影 按现有 reservation 选择恢复步骤,保留仍待确认的旧修订结果。待确认项 独立读取这些结果。

  • 原 Turn 确认 核对原身份、交付状态和读取记录后才写回确认。恢复用例 核对修订、预留和收尾。

  • A6 请求与回复分别沿用已存修订。

  • A7 纠偏、取消与旧操作竞争时保留预留。

  • A8 旧回复留给原受众,确认重放可读回。

  • A10 委派界面显示真实收尾状态;活体飞书本轮未验。

  • A28 本轮核对已授权的 File、SQLite 两条 Inbox 样本及打包桌面与窄屏状态。

对主干的风险 / Risks

File 和 SQLite 的独立用例确认旧结果后,只有回复的待确认提示消失,活动 reservation 与当前请求修订保持原样。重试复用确认,随后原操作只结算一次,修订 2 可继续推进。 独立用例拒绝无关 Agent 和未读过该结果的 Turn。已取消但仍有预留的请求留在待跟进,收尾后退出该列表并留在历史;读不到证据时仍优先提示恢复证据。 精确头的 36 项 Python 恢复用例、32 项 TypeScript 用例和本地 premerge 12 项选中检查均通过。当前主干 856cd6a 没有三方合并冲突。 独立测试运行于精确源码的 File、SQLite。截图使用合成数据。未独立验证已安装 Desktop、真实飞书、PostgreSQL 或远端 CI。

我的整体评价 / Verdict

批准。将请求下一步和回复待确认项分开投影,分别使用当前请求修订与各条结果自己的修订。 状态仍由请求控制和原 Turn 的回执决定,界面只显示该状态。用户在原对话确认反馈后,预留仍由其原有收尾路径结算。 当前提交在已验证范围内满足纠偏收尾、旧回复读回与原 Turn 确认。

核对了 PR 的 1440 与 390 px 截图。含有多种状态的委派列表在两个视口都能直接区分「原操作待收尾」与「取消待收尾」。截图对应前端源码与当前头一致的打包版本。 独立测试运行于精确源码的 File、SQLite。截图使用合成数据。未独立验证已安装 Desktop、真实飞书、PostgreSQL 或远端 CI。 桌面截图 窄屏截图

English verdict: APPROVE at b526f49. Approve this exact head. An earlier reply remains readable and acknowledgeable by its original Turn during amendment recovery, without releasing the active reservation. File and SQLite were independently verified.

@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 · Gemini · Google · self_reported

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

动机 / Motivation

在请求修正(amendment)或取消请求竞争期间仍持有活动 active_reservation 的委派发起方(LoopX 管家前端界面及每轮 Turn 上下文消费方)。
在基线 dc79482c88 上,当请求处于 effect_pending 且仍有活动预留时,turn_context.ts 仅在 cancelled 分支返回 reconcile_reservation,把原操作待收尾误投影为 consume_peer_result 或把 cancellation_pending 误投影为 await_peer_result;同时在前端界面中所有 reconcile_reservation 均笼统显示为“取消待收尾”,且修订 1 已送达的同行回复在修订 2 挂起预留期间不会进入 return_attention 提醒。在精确头 b526f49eff 上,turn_context.ts 基于 active_reservation != null 统一输出 reconcile_reservation,继续将修订 1 未确认的同行回复暴露到 return_attention,前端则在 control_state === 'effect_pending' 时准确渲染“原操作待收尾”。
本地基线对照实测表明:effect_pending 伴随未消费的修订 1 回复时,step 为 reconcile_reservation 且 return_attention.count=1 保留旧修订回复;cancellation_pending 时 step 为 reconcile_reservation;evidence_unavailable 时优先保持 recover_evidence;原对话确认旧回复后仅清除 return_attention 而不提前释放活动预留。
本 PR 不修改请求控制的持久化状态机或 peers.py 消费权限边界,也不覆盖已安装 Electron 桌面壳或飞书在线通道的端到端交付。

改动思路 / Approach

将状态展示与预留收尾决策严格分离:控制状态与 active_reservation 继续由既有的 request_control 所有,Turn 上下文投影与前端列表只忠实投影当前阶段并分开保留旧修订回复的待确认通道,不引入新的持久状态或权限分支。
仅调整 turn_context.ts 的 projectDelegationTurnItem / peerReturnNeedsAttention 投影逻辑与 conversation-requests.tsx 中 requestStage 的单行阶段标签,并补充 test_request_amendment_recovery.py 端到端恢复用例。

架构流上,后端每轮 Turn 议程构建函数 projectDelegationTurnItem 从既有 request_control_view 读取 control_state 与 active_reservation:当 kind === 'receipt_unavailable' 或 evidence_unavailable === true 时保持最高优先级输出 recover_evidence;否则只要存在 active_reservation 就输出 reconcile_reservation,同时对发起方(direction === 'outgoing')允许在 reconcile_reservation 与 consume_peer_result 两个阶段下都通过 canSurfacePeerReturns 保留未消费同行回复并在 peerReturnAttention 中以 step: 'consume_peer_result' 提醒确认。前端 requestStage 则依据 row.control_state === 'effect_pending' && row.agenda?.step === 'reconcile_reservation' 输出“原操作待收尾” / Original operation settling,与取消路径的“取消待收尾”清晰区分。

具体改动 / Changes

  • 改动统计(b526f49effb9a5e7bcf7c378966b0dc0ea439592 相对 merge base dc79482c88dd75ea59785d165fd3050d9d5508c3):3 个文件,+75/-12 行(前端 apps/presentation/dashboard/src/features/personal-workspace/conversation-requests.tsx +3/-0、控制面 loopx/control_plane/collaboration/turn_context.ts +14/-6、Python 恢复测试 tests/control_plane/test_request_amendment_recovery.py +58/-6)。
  • 规范对照(spec_ref:
    | A6 | Manager→worker and worker→worker run the same handoff fixture | Both paths use the same identity construction and invariants—not the same literal ID across distinct requests—for revision, assessment, state links and return, including cross-Goal consultation without an initial Todo and a second review round of one Todo; no second task database |
    | A7 | Duplicate ingress; correction/cancellation races a late receipt and a request-derived amendment commit; effectful pre-Todo reassignment; concurrent claim; repeated same-Todo review; crash after a non-Core effect | An authorized old attempt can append its exact receipt after the request head advances without authorizing new work; no duplicate effectful attempt executes; an obsolete unreserved source cannot commit; reserved commit/abort races follow alignment §5.1, including crash, lost reply and delayed executor cases; no false cancellation or silent priority/ownership override |
    | A8 | Worker finishes while manager/transport restarts | Result survives; original audience receives it automatically; ambiguous send is reconciled, not blindly repeated |
    | A9 | Long response and truncated protocol trailer | Full valid answer is preserved and recoverable; no leaked protocol, lost obligation or replayed action |
    | A10 | Owner frontend and authorized Lark conversation | Consistent request facts; truthful queued/assessed/resolved/delivery states; different audiences remain isolated |
    | A11 | Registered SSH host unavailable or older receiver | Coverage and pending route are explicit; local mentions do not pretend to be remote evidence; recovery resumes correctly |
    | A12 | Model/session/tool-profile upgrade | Compatible session resumes; incompatible recovery preserves constraints and pending requests; effective configuration is visible |
    | A13 | Work spans two days; replace the executable session after an accepted plan, a rejected approach and a later correction | Receiver reconstructs current commitments and unresolved obligations from canonical state/context; refreshes time-sensitive evidence; explains its actual plan delta and returns the owed conclusion without silently reviving the rejected path or requiring the original transcript |
    | A14 | Authorized handoff carries a decision-relevant image/document through a text-only entry point to another configured host; paired denied and unavailable cases use the same fixture | Positive case proves remote retrieval/extraction, artifact version and a concrete effect on the receiver's obligation or plan. Negative cases record the exact unread reason without fabricated receipt, private disclosure or sender-local path dependence |
    | A15 | Same handoff fixture on legacy and explicitly promoted Goal sources; provider offline; crash between request/work commits | Exactly one selected work-state writer; canonical empty/failure never falls back; recovery links the original work receipt without replay; request-pending and work-committed states remain distinct |
    | A16 | Receiver replan and shared amendment; stale basis; peer-held work; source request corrected/cancelled while commit races | Route changes stay inside intent/permission; admission does not change the Goal; unsupported commit remains explicit. A supported amendment requires the separately qualified commit class, exact receipt and peer rebase/lease disposition; a request-derived proposal additionally requires the exact source reservation and Goal-owner terminal receipt from alignment §5.1; repeat its A7 race matrix across both owners, including same-operation abort/recovery—not manager or verifier prose |
    | A17 | Abrupt loss before a fresh brief; replace the same Agent session with no recall provider, after an external action with uncertain outcome | Same Agent/new-session fixture preserves the work owner and does not fabricate a cross-Agent transfer grant or mutate the note merely to restore context; read back the actual claim/lease disposition. Last durable context and missing interval are explicit; reconcile uncertain effects, perform a justified next step and return without the old session |
    | A18 | Old session stays live or returns; concurrent replacement, cancellation and a late correction | Make the stale executor actually attempt a conflicting Core and external effect after replacement: reject at the owning enforceable boundary, or withhold replacement execution where fencing is failed/unsupported. Reconcile already submitted effects; test late return/correction/cancellation and read back current binding/claim; no duplicate effect or false cancellation |
    | A19 | Decision-gap recall with same-Agent replacement versus another Agent; disabled provider, stale index, timeout and zero hits | Stage 1 never auto-calls; Stage 2 requires qualified admission/readback. Reject out-of-scope returned rows; another Agent receives only explicitly authorized source-authored context, not raw private provider hits or archive access. No source impersonation; zero hits preserve unknown; no-provider continuation works; revalidate historical facts |
    | A20 | Context compaction and bounded projection omit a material rejected approach or unresolved question | Coverage exposes the omission; authorized drill-down restores required context or records a real gap; no unbounded TurnEnvelope, lost obligation or false completed handoff; frontend/Lark/CLI show the same actual restoration and result |
    | A21 | Short question and long evidence-rich investigation through owner Chat and Lark | The short answer is direct; the long answer has a readable conclusion, preserved full Markdown report, source/version links and bounded gaps. Frontend rendering treats model HTML as inert; Lark does not truncate away the conclusion or silently lose the report. Neither answer requires identical boilerplate sections |
    | A22 | Tool/progress events, reconnect, SSE replay and delayed final answer | The current phase and only host-emitted public activity are visible; replay deduplicates by event identity, keeps the complete final answer and does not restart the Turn. Failures and absent activity remain truthful |
    | A23 | Stop and steer an active Turn; stale button, duplicate ingress, completion race and unsupported adapter | Stop affects only the selected Turn and reports the actual outcome. Steering retains its original Turn and ingress identity; stale/unavailable targets are refused. Later queue delivery requires a previously permitted fallback or a new explicit delivery choice, with a distinct truthful receipt. No silent loss, retargeting, duplicate model run or unrelated worker cancellation |
    | A24 | Steward routes a product request to a responsible active Agent amid stopped, registered-only, stale and model-mismatched decoys | Fresh responsibility, authorization, runtime reachability, capacity and profile fit determine the recipient; receiver assessment, work and final evidenced conclusion return once to the original frontend/Lark conversation. Catalog discovery and inbox delivery alone fail |
    | A25 | Idle and busy receivers accept a request without a pre-created Todo; crash between persistence and wake, lose the ACK, revoke the grant or stop before execution | Accepted scope reaches the existing plan/request-bound execution and original return. Busy work queues; restart reconciles the same operation without duplicate invocation/debit. Revoked, stopped, unknown-host and budget-denied paths do not execute; delivery/read/adoption/wake alone fail |
    | A26 | Multiple requests share one work item; later corrections, independent same-text requests, new arrivals and a delivered misroute coexist | Each obligation/revision remains attributable and adopted corrections affect the actual work. Existing priority/capacity/stop rules hold while an eligible older commitment progresses. No similarity-only merge, automatic priority change or assumed cancellation; delivered corrections are reused |
    | A27 | A linked Todo ends or a partial plan is returned as a conclusion; the actual result arrives during sender/transport restart | Completion follows the original current requirement and qualified result version. A bounded remainder retains its owner/continuation; committed results return without replay. Sender integration and delivery remain distinct from fulfillment; no extra routine user confirmation or invented acceptance for historical artifacts |
    | A28 | More than 40 requests across recipients, long details, paging/search, changing snapshots and a historical request/Turn receipt conflict; paired denied audiences | Counts distinguish total/matched/loaded/unknown scope, all authorized pages and original details are reachable, and recovery identifies the exact gap. No mixed snapshots, hidden records, private leakage or bypass of source/receipt guards. Validate real File/SQLite and any additional affected supported provider, packaged desktop/narrow/keyboard, and separately advertised Lark/CLI boundaries |
    · spec_revision: dc79482c88dd75ea59785d165fd3050d9d5508c3)
    :
    • A6(implemented):请求投影使用当前 control.revision,而结果项保留各自 result.request_revision,由 test_request_amendment_recovery.py 与 collaboration_turn_context.test.ts 验证。
    • A7(implemented):effect_pending 与 cancellation_pending 竞争或纠偏期间保持 active_reservation 与 reconcile_reservation 步骤,不提前释放或重复提交。
    • A8(implemented):修订 1 已送达同行结果在 reconcile_reservation 阶段仍进入 return_attention 且可被原 Turn 幂等确认并清除提醒。
    • A10(implemented;实机飞书未在本轮测试):委派弹窗在桌面与窄屏中准确显示“原操作待收尾”与“取消待收尾”。
    • A28(implemented):File 与 SQLite 存储均在多状态恢复用例下通过完整端到端验证。

关键代码讲解

  • projectDelegationTurnItem 与 canSurfacePeerReturns:以 cancellationRequested(兼容 cancelled 与 cancellation_pending)配合 reservationPending(active_reservation != null)判定保留条目与 reconcile_reservation 步骤,并在 canSurfacePeerReturns 中将 reconcile_reservation 与 consume_peer_result 并列,使未消费的旧修订回复优先保留在 visibleReturns 并进入 return_attention。
  • peerReturnNeedsAttention 与 peerReturnAttention:统一复用 canSurfacePeerReturns 筛选需确认项目,同时将提醒项自身的 step 保持为 consume_peer_result 以符合下游 requirePeerReturnAttention 校验。
  • requestStage:先判已完成项,再为 effect_pending + reconcile_reservation 单独呈现“原操作待收尾”(Original operation settling),不改变 recover_evidence 优先顺序或取消分支。
  • test_source_correction_aborts_unknown_effect_and_next_revision_can_continue:验证修订 1 回复在修订 2 挂起 abort_request 预留时进入 return_attention,原 Turn 确认后仅清除 return_attention 而保持预留与修订 2 继续推进。

对主干的风险 / Risks

  • 状态投影兼容性与优先序:recover_evidence 仍优先于 reconcile_reservation,保证凭证不可读时优先提示恢复证据;peerReturnAttention 仍固定输出 step: 'consume_peer_result' 并通过 requirePeerReturnAttention 跨批次校验;已取消且无预留的条目依然从待跟进列表移除。
  • 独立验证与基线对照(精确头 b526f49effb9a5e7bcf7c378966b0dc0ea439592):
    • node --test collaboration_turn_context.test.ts request_control.test.ts:PASS(17 passed, 0 failed)。
    • npm run typecheck:control-plane 与 apps/presentation/dashboard tsc --noEmit:PASS(0 错误)。
    • ruff check tests/control_plane/test_request_amendment_recovery.py:PASS。
    • pytest tests/control_plane/test_request_amendment_recovery.py -q:PASS(36 passed,覆盖 File 与 SQLite 恢复场景)。
    • loopx check --scan-path ...:PASS(errors=0, warnings=0)。
    • loopx canary premerge --from-git-diff --git-diff-base origin/main:PASS(5/5 直接检查、12/12 选定检查全过,0 失败)。
    • Base vs Head 对照实测:在基线 dc79482c88dd75ea59785d165fd3050d9d5508c3 上 effect_pending+活动预留+修订1回复返回 step="consume_peer_result"、cancellation_pending 返回 step="await_peer_result";在精确头 b526f49effb9a5e7bcf7c378966b0dc0ea439592 上两者分别修正为 step="reconcile_reservation",且 effect_pending 同时保持 return_attention.count=1(含修订 1 回复),evidence_unavailable=true 时仍优先返回 step="recover_evidence"。

我的整体评价 / Verdict

本 PR 以最小且高内聚的修改修正了活动预留期间的 Turn 议程阶段投影、旧修订回复提醒保留及前端“原操作待收尾”状态展示,long_horizon 与 user_experience 均显著改善且未引入新存储或权限副作用。已实查 1440×900 桌面视口与 390×844 窄屏视口下的完整委派弹窗渲染(含待送达、原操作待收尾、取消待收尾、待结论等 13 条混合状态及底部分页),折叠行标题直接区分原操作收尾与取消收尾,两档视口均无文本截断或横向溢出。 桌面打包壳实时连接与飞书线上会话渲染未在本工作树实测;前端列表使用合成数据集截图复核,本地执行控制面与 dashboard tsc --noEmit(0 错误)。 本地双语言测试、类型检查、代码规范检查及 canary premerge 全部通过,无阻塞性发现;按作者同账户 PR 规则发布 COMMENTED 批准结论并保持 OPEN 等待维护者按仓库规范合入。

English verdict: APPROVE at b526f49 — turn_context.ts and conversation-requests.tsx accurately project active reservations (effect_pending / cancellation_pending) as reconcile_reservation while keeping earlier unconsumed peer returns actionable in return_attention; verified via 17/17 TS tests, 0-error control-plane & dashboard tsc, 36/36 File/SQLite pytest recovery cases, 12/12 premerge checks, base-vs-head counterfactuals, and 1440/390 viewport inspection.

@mergify

mergify Bot commented Nov 22, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 22, 2026
Keep active reservations visible while retaining independently recoverable return evidence and the original response revision.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 22, 2026

@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.2-sol · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

委派发起者需要看清原操作是否仍在收尾,同时读取已经送达的上一版回复。 基线在活动预留时可能只显示普通待结论,让已读回的原操作与取消走相同表面。基线也依赖整个议程先走消费分支才能将旧回复放进待确认区。 已交付的旧回复和当前请求预留分别由原有 typed 状态绑定,并分别呈现原结果的确认与当前操作的修复。 请求卡片显示实际收尾状态,原 Turn 可以读回上一版回复并确认,原预留保持有效直到它自己的收尾。 范围是现有委派议程、CLI、原生 Turn 的读取和确认投影。

改动思路 / Approach

沿用既有 request control、agenda projection 与原回复 receipt。 请求议程使用当前请求修订。返回项保有各自旧修订。ack 仍由读回和原 Turn 作用域判定。 复用 reconcile_reservation,另在原返还注意列表交付已有可确认结果。显示层只消费 typed state。

具体改动 / Changes

准确头 c8a3c5a,merge base d380526,4 个文件,+100/-12。四个文件分为 TS 投影、Chat 状态文案、File/SQLite 真实恢复测试与 TS 投影回归。 按修订 d380526 的现有规范核对各项要求。 目标规范

关键代码讲解

  • projectDelegationTurnItem 先处理证据不完整,再从原 active_reservation 得到收尾步骤。 议程

  • peerReturnAttention 在同一个操作恢复期间携带旧回复的准确修订。 返回证据

  • requestStage 用 effect_pending 和已存 agenda 区分两类收尾。 Chat

  • 原 Turn 的确认和重放仍走既有 consumer,真实修订恢复用例验证不影响原预留。 确认 · 回归

  • A6 与 A7 区分已送达的旧回复与未结算的当前操作。

  • A8 在原受众和原 Turn 内确认及重放。

  • A10 与 A28 在当前构建的混合列表及原会话读取中核对,跨端边界保留。

对主干的风险 / Risks

File 和 SQLite 各核验同一修订 2 的活动预留与已送达的修订 1 回复。原 Turn 读取、确认和重放后,确认只清除原回复提醒。旧预留在原操作完成确认前仍有效。 独立负例中,其他 Agent 和未读过结果的 Turn 均不能确认。取消在预留期间显示待收尾,结束后退出未完成列表;已收到的真实结果仍归原受众。 36 项 Python 恢复测试、2 项独立作用域及重放用例、10 项 TS 测试、类型检查和 Ruff 通过。预合并 5 项直接和 12 项选中检查通过。 预合并直接和选中检查均通过,仍缺本地严格质量回执。未查询远端 CI。

我的整体评价 / Verdict

批准当前提交,未发现阻断项。局部行为符合已验证的作用域。当前主干三方合并干净,所核对入口与投影文件一致。 用当前提交构建的 Chat 在 1440 与 390 CSS 像素上加载 13 条合成委派,首批有 12 条。状态始终随行可查。滚到对应记录可以直接区分原操作待收尾、取消待收尾、待恢复及待送达。在窄屏展开原操作记录成功读回原会话,状态保持,页面无横向溢出,Escape 后焦点回到委派入口。 独立后端验证采用当前源码的 File 和 SQLite。浏览器走当前构建的 Chat 与隔离 HTTP 库,状态组合由合成的 typed 行提供,原会话通过本地实际读取链。未独立验证安装版 Desktop、Feishu 或 PostgreSQL。

English verdict: APPROVE at c8a3c5a. Approve this exact head. File and SQLite keep the earlier reply bound to its original Turn while the active reservation still needs recovery. The current Chat build distinguishes operation settlement, cancellation, and unavailable evidence in a populated responsive list.

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 · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

委派发起者需要看清原操作是否仍在收尾,同时读取已经送达的上一版回复。 基线在活动预留时可能只显示普通待结论,让已读回的原操作与取消走相同表面。上一提交已修复收尾状态,但处于 reconcile_reservation 时隐藏了回传待核对。 已交付的旧回复和当前请求预留分别由原有 typed 状态绑定,并分别呈现原结果的确认与当前操作的修复。 请求卡片显示实际收尾状态,原 Turn 可以读回上一版回复并确认,原预留保持有效直到它自己的收尾。 范围是现有委派议程、CLI、原生 Turn 的读取和确认投影。

改动思路 / Approach

沿用既有 request control、agenda projection 与原回复 receipt。 请求议程使用当前请求修订。返回项保有各自旧修订。ack 仍由读回和原 Turn 作用域判定。 复用 reconcile_reservation,同时显示独立的回传核对提示,并把原对话作为仍需核对时的入口。显示层只消费 typed state。

具体改动 / Changes

准确头 7b2b2cc,merge base d380526,6 个文件,+146/-21。六个文件覆盖复用的 TS 议程、现有 Chat 委派入口和 File/SQLite 及浏览器用例。新提交改动集中在状态文案、样式和浏览器用例。 按修订 d380526 的现有规范核对各项要求。 目标规范

关键代码讲解

  • projectDelegationTurnItem 先处理证据不完整,再从原 active_reservation 得到收尾步骤。 议程

  • peerReturnAttention 在同一个操作恢复期间携带旧回复的准确修订。 返回证据

  • requestStage 用 effect_pending 和已存 agenda 区分两类收尾。 Chat

  • 原 Turn 的确认和重放仍走既有 consumer,真实修订恢复用例验证不影响原预留。 确认 · 回归

  • A6 与 A7 区分已送达的旧回复与未结算的当前操作。

  • A8 在原受众和原 Turn 内确认及重放。

  • A10 与 A28 在当前构建的混合列表及原会话读取中核对,跨端边界保留。

对主干的风险 / Risks

File 和 SQLite 各核验同一修订 2 的活动预留与已送达的修订 1 回复。原 Turn 读取、确认和重放后,确认只清除原回复提醒。旧预留在原操作完成确认前仍有效。 独立负例中,其他 Agent 和未读过结果的 Turn 均不能确认。取消在预留期间显示待收尾,结束后退出未完成列表;已收到的真实结果仍归原受众。 36 项 Python 恢复测试、10 项 TS 测试、Chat 类型检查和精确构建通过。已看过桌面与窄屏采集,并读回原会话。 快速预合并的直接检查均通过,maintainability 和 vocabulary 检查均到 120 秒时限,未确认超时原因。保留预合并资格缺口。

我的整体评价 / Verdict

批准当前提交,未发现阻断项。局部行为符合已验证的作用域。已核对该提交和当前主干的比较范围。 用当前提交构建的 Chat 在 1440 与 390 CSS 像素上加载 13 条合成委派,首批有 12 条。状态始终随行可查。桌面把原操作待收尾与回传待核对放在同一行的状态区。窄屏在标题下面分两行,状态与相邻普通待跟进记录可区分。展开同一行的核对原对话读回两条原始消息,无横向溢出。 独立后端验证采用当前源码的 File 和 SQLite。浏览器走当前构建的 Chat 与隔离 HTTP 库,状态组合由合成的 typed 行提供,原会话通过本地实际读取链。未独立验证安装版 Desktop、Feishu 或 PostgreSQL。

English verdict: APPROVE at 7b2b2cc. Approve this exact head. File and SQLite keep the earlier reply bound to its original Turn while the active reservation still needs recovery. The current Chat build shows both the still-settling operation and the return that needs verification, and reads the original conversation. Two local premerge commands timed out.

@loopx-agent
loopx-agent merged commit adf4f44 into main Nov 22, 2026
20 of 24 checks passed
@loopx-agent
loopx-agent deleted the codex/delegation-cancellation-readback branch November 22, 2026 12:42
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.

1 participant