feat(workhub): add linked delegation correction - #4242
Conversation
75d1c5e to
44d5a26
Compare
5ccc341 to
e8905df
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for carrying Slice 5 through the existing Session, Turn, Message, and Coordination authorities. I reviewed exact head e8905df81f83dacc983f398649ba31f032bbc6df. The overall ownership direction is sound, but the destructive replacement and recovery boundaries are not safe yet.
I found two P1 issues and two P2 issues inline:
- correcting a steered delegation can stop a pre-existing user-owned Turn and retract unrelated queued Messages;
- an explicitly negated creation phrase is still committed as a new Session;
- the durable replacement intent can become unrecoverably pinned to volatile candidate state after retirement;
- a transcript reset after recovery drops active linkage that was outside the resident window.
Please fix these paths and add production-composition coverage for an active manual Turn plus WorkHub steering, crash/retry with candidate or target lifecycle changes, and subscription reset after full-history reconstruction. The exact-head test check is currently failing and the PR is conflicting; those are next-step gates rather than additional review findings.
Because this is a new product behavior, human UI/UX acceptance is still required before approval.
Review analysis was assisted by Codex and independent @reviewer agents. Astro-Han verified the exact-head diff, production paths, reachability, and severity before publication and owns this review.
中文对照
谢谢你把 Slice 5 放在现有 Session、Turn、Message 和 Coordination authority 上推进。当前 ownership 方向是正确的,但 destructive replacement 与恢复边界还不安全。
我在行内标出了两个 P1 和两个 P2:纠正 steered delegation 会误停原有 Turn 并撤销无关排队消息;明确否定“创建新会话”的文本仍会创建 Session;持久 replacement intent 会被易变 candidate 状态锁死;恢复后的 transcript reset 会丢失 resident window 之外的 active linkage。
请修复这些路径,并补真实 production-composition 覆盖。当前 exact-head test 失败且 PR 冲突,这些是后续门槛,不是额外代码 finding。作为新的产品行为,在 Approve 前仍需要人工 UI/UX 验收。
本次审查分析由 Codex 和独立的 @reviewer 子代理协助;Astro-Han 核验了精确 head、生产路径、可达性和问题分级,并对本次 Review 负责。
e8905df to
192f34c
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for the comprehensive correction and recovery follow-up. I rechecked exact head 192f34c: root-owned versus shared Turns, negated creation clauses, stable replacement identity, durable abort/recovery, and transcript-reset history reconstruction are all closed, with exact-head checks green. One non-blocking functional suggestion remains: please surface the assignment link state (active, superseded, or aborted) in the WorkHub UI so a corrected or aborted delegation does not continue to look running or merely accepted. This feels like functional feedback rather than visual polish. Please push back if another existing surface already owns that state. This was an AI-assisted review using Codex; I independently verified the production and recovery paths and own this approval.
Generated-by: Codex
Bind durable delegation replay to the selected candidate and refresh a prepared replacement target display identity before retiring the source delegation. Generated-by: Codex
Revalidate replacement targets after source retirement and canonicalize their current display identity at the SQLite assignment boundary without weakening fresh-delegation checks. Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Keep executable WorkHub requests as implicit new-work creation while validating creation intent in Core and the Runtime action gate. Surface durable created-new feedback and linked replacement state in the UI, preserve connection metadata atomically, and cover cancellation and correction races. Generated-by: Codex
Generated-by: Codex
192f34c to
777ab0c
Compare
Summary
active,superseded, oraborted) and explicitly announce when WorkHub creates new work.Refs #3492
Verification
npm run format:checknpm run lintnpm run typechecknpm run buildnpm run check:renderer-architecturenpx knip --workspace apps/desktopnpx knip --workspace packages/ui777ab0c77bd397b372137c4ab65716f941bc9813: PASS / PASSgit diff --check upstream/main...HEADReview focus
AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex implemented the change, tests, documentation, conflict resolution, and adversarial review under human direction. Claude Opus provided a bounded read-only design consultation; Codex independently implemented and verified the result. Every affected commit includes the required
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?