Repository navigation
feat(workhub): scope task execution subscriptions (B1) - #20
Conversation
Add immutable admitted Turn/Run read scopes to existing subscriptions and indexed transcript paging. Keep whole-Session behavior and execution authority unchanged. This is the read-only transport foundation (B1) for issue #8, not the completed task view. Generated-by: OpenAI Codex
Preserve pending interactions by the canonical Session/Turn while retaining their physical Run for answers. Suppress scoped projections changed only by excluded state before they consume sequence/backpressure budget. Both independent-review P2 cases fail before and pass after this narrow fix. Generated-by: OpenAI Codex
|
Fresh independent Codex re-review completed for exact head The initial review demonstrated two P2 projection defects. Both were fixed narrowly in
The reviewer reran both original reproductions unchanged and found no remaining actionable B1 findings. Independent validation passed 181 repository tests and six probes, including sparse fragmented paging, a visible change and reversion behind a 400 KiB streamed prefix, sparse projection revisions, and simultaneous unscoped updates. The checkout stayed clean; the reviewer did not modify shared files, Git refs, or GitHub reviews/comments. Final local fixed-code checks passed: full build/typecheck/lint/format/ASF/diff; Storage 1561 pass / 8 existing skips; Host 2314 pass / 12 existing skips; Desktop 3273 pass; release 217 pass; epoch guard 213 -> 214. New-head CI is still pending/running at https://github.com/sunrioa/baka/actions/runs/38394431756; the earlier successful run on This is independent AI review, not human approval. Under the owner's standing authorization, B1 may merge only after the required exact-head checks pass and actual protections permit. B2's work-lineage resolution and focused UI remain subsequent work; phase B is not complete. 简体中文新开的独立 Codex 会话已完成对精确提交 初审独立复现的两个 P2 已在
审查会话未修改原复现,重新执行均通过,B1 范围内无剩余可操作问题。独立验证 181 项仓库测试与 6 项探针通过,包含稀疏分片分页、400 KiB 流式前缀背后的可见状态变化及恢复、稀疏投影版本号,以及同时存在的未限定订阅更新。审查期间工作区保持干净,没有修改共享文件、Git refs 或 GitHub review/评论。 固定代码最终本地验证通过:全仓库 build/typecheck/lint/format/ASF/diff,Storage 1561 通过/8 个既有跳过,Host 2314 通过/12 个既有跳过,Desktop 3273 通过,release 217 通过,epoch guard 213 -> 214。新提交 CI 仍在等待或运行:https://github.com/sunrioa/baka/actions/runs/38394431756;不会用旧 这是独立 AI 审查,不是人工批准。根据所有者的持续授权,只有精确提交的必需检查通过且真实保护规则允许时才合并 B1。B2 的执行关系解析和实际任务界面仍属于下一步,B 尚未完成。 |
Summary
Part of #8, phase B. This PR is B1: the read-only execution-subscription foundation, not the completed WorkHub task UI. A reused Session can contain unrelated work, so the focused view must have a server-side read scope before the renderer is connected.
subscription.openwith an optional immutable{turnId, runId}scope. The Host validates the exact durable logical Root admission, echoes the scope, and rejects unknown/mismatched executions without falling back to a whole-Session subscription. The client exposes the acknowledged scope. Existing unscoped subscribers retain their behavior.Verification
Reviewed head:
cc7ff8c9e8aa9020db6bffa29691921aac301533; merged as03faef3eed4bb929a8d7df79040dad42fc750f20. The independent review ofe3c92b775found two reproducible P2 projection defects: pending interactions from a physical handoff successor were dropped, and excluded activity could evict a scoped subscriber. Both now have red-before/green-after coverage and narrow projection fixes; 6 focused production/continuity/pager checks pass. The final local reruns below passed on the fixed code. Exact-head independent re-review passed with no remaining actionable B1 findings (181 repository tests and six independent probes passed). Hosted checks on this exact head completed successfully before the normal conditional squash merge.On macOS with Node
24.19.0/ npm11.17.0:213 -> 214) and its 17 tests passed; Windows skip inventory, Astryx surface inventory and renderer architecture checks passed.One initial full Host run hit
ENOTEMPTYduring temporary-directory cleanup in the unchangedbounded election never steals a live owner with no endpointtest. Its isolated rerun and the final full Host suite passed. Ten isolated runs on the clean main comparison also passed, so this is not claimed as a deterministically reproduced main defect. No election code, assertions, deadlines or retries were changed.The fresh independent Codex review and required exact-head hosted checks passed before merge. No Windows-machine, packaged-app or final focused-UI acceptance is claimed by this foundation PR.
Remaining phase B work
B2 will resolve stable work/assignment/generation lineage, group real attempts, and connect the WorkHub sidebar to these scoped streams and paginated records. It must not treat a shared Turn as exclusively task-owned or reuse an unscoped Desktop observer/cache. The view remains visibly read-only until phase C adds task-bound direct input. Phase B stays open in the tracker until that UI and its reconnect/selection coverage are delivered.
The supported
copilot-skiplabel opts out of the inherited optional Copilot-request workflow, which is not configured in this repository. It does not skip the codetestcheck or replace any required human approval. The repository owner requested the separate Codex review workflow.AI assistance: OpenAI Codex assisted with implementation, source inspection and verification under the repository owner's standing authorization. Independent AI review is not represented as human approval.
简体中文
概要
属于 #8 的 B 阶段。本 PR 是 B1:只读执行订阅基础,并非完整的 WorkHub 任务界面。同一个 Session 可能包含无关任务,因此在接入前端前,先提供服务端限定的读取范围。
subscription.open增加可选、不可变的{turnId, runId}范围。Host 校验真实持久化的逻辑 Root admission 并回显;错误或不存在的执行直接拒绝,不退回整段会话。客户端可读取已确认的范围,未限定范围的旧订阅保持原有行为。验证
审查提交:
cc7ff8c9e8aa9020db6bffa29691921aac301533;已正常 squash 合并为03faef3eed4bb929a8d7df79040dad42fc750f20。对e3c92b775的独立审查发现两个可复现 P2:物理 handoff 后漏掉待处理交互,以及无关状态变化可能挤掉限定订阅。已补修复前失败/修复后通过的回归并做窄投影修复,6 项定向生产/continuity/pager 检查通过。下面的最终本地全量重跑均在修复代码上通过;精确提交独立复审已通过,B1 无剩余可操作问题(独立运行 181 项仓库测试及 6 项探针通过)。该精确提交的远端检查 已在合并前全部成功。macOS,Node
24.19.0/npm11.17.0:213 -> 214)及其 17 项测试通过;Windows skip inventory、Astryx surface inventory、renderer architecture 通过。首轮 Host 全量中,未修改的
bounded election never steals a live owner with no endpoint测试在临时目录清理时发生一次ENOTEMPTY。该用例单独重跑和最终 Host 全量均通过;干净 main 比较环境的 10 次单独运行也都通过,因此不声称已稳定复现 main 缺陷。没有修改选举代码、断言、期限或重试策略。新开的独立 Codex 会话复审及该精确提交的必需远端检查均在合并前通过。本基础 PR 不声称已完成 Windows 真机、打包版或最终任务界面验收。
B 阶段剩余工作
B2 将解析稳定 work/assignment/generation 及执行关系,分组真实执行尝试,并把 WorkHub 侧栏接到限定流与分页记录。不能把共享 Turn 当作某任务独占,也不能复用未限定范围的 Desktop observer/cache。在 C 阶段增加任务绑定直接输入前,任务视图明确只读。实际界面及其重连/选择覆盖完成前,追踪 issue 中的 B 仍保持未完成。
使用既有支持的
copilot-skip标签跳过本仓库未配置的上游可选 Copilot 请求流程;不跳过代码test检查,也不替代任何必需人工批准。仓库所有者要求采用另开独立 Codex 会话审查的流程。AI 辅助说明: OpenAI Codex 在仓库所有者的持续授权下协助实现、源码检查和验证;独立 AI 审查不冒充人工批准。