Files
deepseek-harness/missions/tasks/20260720-2125-gateway-design
imccyu 0681ac47de chore(gui): mission work logs
chore(gui): mission work logs — cordis design finalization, tool-card wire archive, incident records

chore: missions

chore: missions

chore(gui): mission ledger — batch-2 answers, parallel dispatch state, jsdom coverage re-scope

chore(gui): ledger — night-mode standing orders (self-commit small, no push, 5-min refresh)

chore(gui): ledger — jsdom batches 2-4 landed (233 green), coverage probe next

chore(gui): ledger — web-ui coverage probe 65%, four-tier fill plan approved

chore(gui): ledger — cordis-impl B1 state after third API drop, decisions on file

chore(gui): ledger — 01:32 patrol snapshot (jsdom tier-1 landed, coverage-fixer probed)

chore(gui): ledger — 01:37 patrol (peer src trio landed, coverage-fixer still silent)

chore(gui): ledger — 01:42 patrol (jsdom tier-2 landed, peer committed x2, coverage-fixer 2nd probe)

chore(gui): ledger — coverage diagnosis complete (6-file gap list), web-ui at 91.4%

chore(gui): ledger — 01:46 patrol (B1 done, jsdom tier-3 landed, coverage fix batch running)

chore(gui): ledger — 01:51 patrol (jsdom tails x2 landed, B2 underway)

chore(gui): ledger — 01:56 patrol (gateway.ts 337 lines, checkpoint T-7min)

chore(gui): ledger — hold/pending split ruling, coverage-fixer externalize-or-restart ultimatum

chore(gui): ledger — 02:01 patrol (B2 done, jsdom final arms, coverage ultimatum pending)

chore(gui): ledger — 02:03 checkpoint executed (fixer2 respawn, four lanes released, three owners cold-started)

chore(gui): ledger — all six lanes acked, type isolation first live proof (client closure clean)

chore(gui): ledger — 02:08 patrol (all seven lanes active, wire carrier assembled)

docs(gui): respond-design task checkpoint — apiproxy wire-layer recon done

chore(gui): ledger — P0-2 contributor AGENTS.md landed (dd28a5019)

docs(gui): respond-design checkpoint 2 — host-side recon (stub respond, frame types, approval seam, ACP answerer precedent)

docs(gui): OOP debt inventory — seven territories, 2 real debts (createApiProxy, createFixtureApi), rest ruled keep-as-is

docs(gui): disambiguation note on the archived i18n design task

chore(gui): ledger — 02:12 patrol (exclude removed, mixed-knife incident under reconciliation)

chore(gui): ledger — 02:15 wave (jsdom mission closed, OOP audit done, B3 isolation proof, mixed-knife resolved)

chore(gui): ledger — 02:17 patrol (attribution reversal filed, arch-session probed)

chore(gui): ledger — 02:22 patrol (B4 done, B5+B6 merged batch, arch-session deadline set)

docs(gui): respond-design checkpoint 3 — client-side recon (pending map, PendingCard onRespond stub, AbstractApiClient.respond ready, bootHost missing approval mounts)

docs(gui): peer carrier territory review — 2 fixes (SSE cancel leak, route-reservation guard), 1 ruling ask (RPC-log visibility), compliance ledger

chore(gui): ledger — 02:27 (arch-shell respawn, territory review verdicts routed, ask-deny finding flagged)

docs(gui): P1-5 respond design page complete — pending registry, wire answerer, client state machine, first-wins arbitration

chore(gui): ledger — 02:31 patrol (respond design complete, B5 wire smoke green, shell knife 1 underway)

docs(gui): respond design — add §0 status warning (web host ask defaults to deny), mount-behavior delta, no-timeout ruling with Config discipline

chore(gui): ledger — 02:42 patrol (respond line closed pending review, B7 last piece underway)

docs(gui): respond design contract review — direction pass, 2 doc fixes (settle-order contradiction, answering-state race), A/B/C compliance ledger

docs(gui): respond design — contract review fixes (R1 verify-before-delete arbitration, R2 answering+resolved-frame transition, ask dual-source wording, rejected-is-ok-value note)

chore(gui): ledger — 02:46 patrol (respond line final, two user decisions distilled, arch-shell deadline)

docs(gui): respond review addendum — contract-gap ruling: approve plan A (ApprovalRequest.id), wire unchanged, drop plan B backscan

chore(gui): ledger — cordis B7 summit: real-browser 10/10 green, user acceptance criterion proven

docs(gui): respond design — contract gap #4 approved as plan A (ApprovalRequest.id), backscan fallback retired, blade 0 prepended

docs(gui): respond design — final polish (owner-approval vs user-go-ahead wording, implementation handoff notes)

chore(gui): ledger — 02:51 (shell-exec third respawn with operational script, respond line 4-knife final)

chore(gui): ledger — 02:53 wave (respond five-knife true final, B7 closed 12/12, client.ts green)

chore(gui): ledger — 02:56 patrol (cordis closeout bounced pending R1/R2/N1, shell-exec first sign of life)

chore(gui): ledger — 03:01 patrol (R1/R2/N1 remediation in flight across four files)

chore(gui): ledger — cordis line officially closed and archived, verified on disk (24 knives, 12/12, reviews closed)

chore(gui): ledger — 03:06 patrol (shell-exec final window, lowered first-knife bar)

chore(gui): ledger — 03:11 patrol (shell line iced-broken: three registries on disk)

chore(gui): ledger — 03:15 patrol (quiet window, both active lanes within threshold)

chore(gui): ledger — 03:20 patrol (shell five files up, api-proxy plan reported)

chore(gui): ledger — 03:25 patrol (shell migration in flight with history-preserving moves, webserver green)

chore(gui): ledger — 03:30 patrol (shell knife-1 in verification, api-proxy patching)

chore(gui): ledger — shell knife 1 accepted (694cecc53), knife 2 released

chore(gui): ledger — 03:40 patrol (knife 2 pre-move stage, cold-list spec appears)

chore(gui): ledger — 03:45 patrol (rpclog moves staged, api-proxy two specs in flight)

chore(gui): ledger — 03:54 patrol (knife-2 code done, coverage full-run final check)

docs(gui): coverage-fixer task ledger — fixer2 takeover, per-file fix log, isolated reportsDirectory pitfall

chore(gui): ledger — coverage lane closed and accepted (a19f069a5), the PR #443 CI fix knife

chore(gui): ledger — 04:04 patrol (knife-2 calibration, sole active lane)

chore(gui): ledger — shell knife 2 accepted (f8fb77b95), knife 3 released as final night task

chore(gui): ledger — 04:19 patrol (knife-3 past half: callback chain through, ToolCallDetail up)

chore(gui): ledger — night closeout summary: seven lanes closed, wake-up decision sheet

chore: missions

chore: missions

chore: missions

chore(gui): mission-local browser/probe verify scripts under missions/scripts/

The six acceptance/probe scripts move here as mission-side working
material (headers and relative imports adjusted for the new location):
carrier-errors, rpclog-panel, session, session-real,
webserver-backpressure, webserver-hardening.

chore(gui): verify-relocate mission log

chore(gui): verify-relocate mission log — R1 guard addendum

chore(gui): gates-continue mission log — CI-equivalent sequence all green

chore(gui): VS Code 扩展体系双边设计调研报告

chore(gui): 调研追加 4.5 节——git 扩展数据面与 scope 绑定

docs(gui): web plugin system RFC — walkthrough + design notes

docs(gui): RFC — restore existing SSE/POST as the v1 transport; envelope rides on it (D16)

docs(gui): RFC — envelope demoted to chan-dispatch, scope out of envelope, rpc-log cut, peer deferred, scope tree is native cordis (D17-D21)

docs(gui): RFC — hooks re-derived from component needs: useWatch/useAction only, useService removed; sessionHub cut, projections user-space, router rename, loader-only root (D22-D25)

docs(gui): RFC — drop stale fork vocabulary (vendored cordis has Fiber only; scope = mintScope pattern), hook idempotence contract (D26-D27)

docs(gui): RFC — session precision seam: plugins read scope key (host paradigm), React gets it from tree position via SlotOutlet (D28)

docs(gui): RFC — domain hooks owned by plugins over framework primitives; useConversation paradigm carried over (D29)

docs(gui): RFC — ctx services are the inter-plugin API (cordis proper); declarations are wire-only; get(id) returns scoped ctx (D30)

docs(gui): RFC — full ctx.conversation walkthrough: root-singleton scope-sensitive service, caller-ctx scope key, get(key) as scoped ctx (D31)

docs(gui): RFC — no client-side agents collection: session state machine already expresses the duality; agent resolution stays host authority (D32)

docs(gui): RFC — v1 stays session-precision, no agent-level isolation; incarnation/agent-axis designs archived in ledger (D33)

docs(gui): RFC walkthrough — full rewrite to final state (D16-D33 consolidated), end-to-end chain restored

docs(gui): RFC — apiproxy demoted to generic channel routing; domain RPCs dissolve into owner plugins (D34)

docs(gui): RFC — TS-interface-first wire contract (zod internal), conversation owns the dialogue frame with pluggable views (D35)

docs(gui): RFC — page skeleton (sidebar+conversation), projects as plugin not service, nested slots via owner registries (D36)

docs(gui): RFC — SlotMap declaration-merging slot model: single register API, inject-as-ownership, FC-typed registration, typed outlets (D37)

docs(gui): RFC — slot props whitelist: identity, display params, materialized snapshot slices, stable UI callbacks (D38)

docs(gui): RFC — end-to-end data flow: three transforms, equality protocol table, immer placement; i18n/theme kept standard (D39-D40)

docs(gui): RFC — full external-injection model: props carry values + stable injected hooks; shared/client/react example rewritten (D41-D43)

docs(gui): RFC final trio — modules.md (agent implementation spec), architecture.md (human walkthrough), plugins.md (business plugin inventory)

docs(gui): RFC — props three-source merge (scope-standard useSession auto-injected); keyed key vs list id disambiguated (D44)

docs(gui): RFC — inject comment says what it is (the React-facing props bundle); SessionHandle rename; snapshot-production story unified on buildSnapshot

docs(gui): RFC architecture — full React component tree walkthrough: props three sources, slot vs plain children, hook taxonomy per node

docs(gui): RFC — module map finalized (ui-slots/web-react/connection/runtime/ui-*/web); slots onChange replaced by cordis events; toolcall dimension; detail sidebar default-collapsed with toolName-keyed routing

docs(gui): RFC plugins — openDetail relay chain: toolcard calls chat-view injected action, chat-view relays to conversation sidebar

chore(gui): progress ledger — full archive rewrite: RFC outcome digest, open gaps, dispatch plan, cold-start entry

docs(gui): RFC grill pass 1 — SlotScope axis (root/session) on declares, Gate dependency inversion, inject handle by scope, W5 acceptance list, gantt relay chain fixed

docs(gui): figma analysis — sidebar/projects/sessions 区域交互视觉理解报告

docs(gui): figma 解析报告 — details 面板/多视图 tabs/未来功能区盘点 + slot 需求清单

docs(gui): figma 对话主区解析报告 — 消息流/tool calls 变体/审批接管输入框/Header tabs/视觉 token

docs(gui): plugins.md rewritten from figma analysis — three-column layout, full slot reservation table, selection channel, composer-takeover approvals, phased scope

docs(gui): layout dynamics ruled (drag+collapse both rails, details yields first, composer swap-panel, same-component transition); toolviews promoted to named scope-aware registry

docs(gui): P-I scope locked (details minimal, dual theme, chat-view, custom toolview sample); teammate dispatch plan — 6 owners by package, dependency-driven waves, contract arbitration

docs(gui): P-I api-contracts (full inter-package API spec) + dispatch plan (T0 skeleton knife, 7-dev roster, task briefs, milestones)

docs(gui): api-contracts v2 — scope tree in P-I, bundle loader + per-plugin CSS isolation in P-I, agent-scoped toolviews live, zustand engine, renames (SessionProvider/ObservableSnapshot/SessionBinding), router owns all shell view-state

docs(gui): services roster + progressive loading (no blocking loadAll), SlotsService as real cordis Service, renderSlot/renderSuspenseSlot duo, ui-traj teammate

docs(gui): loading-chain gaps ruled — dev=rebundle no HMR, ui-primitives package, externals on globals (no import map), host injects __DSH_BOOT__ into HTML (zero round-trip)

docs(gui): api-contracts v3 + dispatch v2 final — 12 packages, services merged in, progressive loader, global externals, __DSH_BOOT__ injection, 8-dev roster with convo split and ui-traj

docs(gui): v3 amendments — router renamed ctx.layout, ui-trajectory has no service (pure consumer sample), wait-for-settled loading (no Suspense in P-I, ledger 6b)

chore(gui): progress — pre-compact final state: v3 revision chain, 8-dev roster, T0 procedure, doc authority order

docs(gui): authority banners — modules/architecture get v3 term-mapping headers, walkthrough marked as archived process doc

docs(gui): cssdesign token set is THE theme source (--dsw-* variables, data-ds-dark-theme switch); recorded in contracts + progress

docs(gui): architecture.md full v3 rewrite — loading chain, 12-package map, service roster, slot/inject/toolviews, data flow, component tree, perf model, all current

docs(gui): contracts — UI plugins are dual-entry host plugins (node half serves client asset via ctx.webPlugins; __DSH_BOOT__ derives from it; client-closure gate back in scope)

docs(gui): contracts — closure-factory bundles with DI require (no globals), package.json dshWeb declarative discovery (no serve ritual), create-then-send empty state with project picker, ancestry() for breadcrumb, unload stubbed until HMR, props.renderSlot confirmed

docs(gui): dshClient declaration (inject/platform/immediately, exports./client), closure-DI require loading — synced across contracts/dispatch/modules/architecture/walkthrough

chore(gui): progress — record final loading-chain rulings (dshClient declaration, closure-DI require, startSession) before compact

docs(gui): architecture.md — developer-facing whole-web architecture on master baseline 6b16a67cb: what exists, what is new, no process narrative

docs(gui): architecture.md — self-contained whole-web architecture: absorbs still-valid substance from the branch RFCs (host layering, four-quadrant RPC, object layer, testing tiers) under the new plugin system as the override

chore(gui): progress — final pre-compact snapshot: contracts digest, apiproxy purity ruling, T0 procedure with first-action list

docs(gui): api-contracts v3 §3.1 — apiproxy purity principle with three-way existing-code verdicts

docs(gui): api-contracts v3 — immediately reinterpreted as static-infra group (8-package dshClient scope, boot manifest reconciliation)

docs(gui): api-contracts v3 — immediately corrected to early-load dynamic group (prod shell must not rebundle); loader shell-held; bundles register their export surface into module table

docs(gui): architecture — align with immediately=early-load dynamic group ruling; loader shell-held; module-table registration of loaded bundles

docs(gui): T0 checklist — 12-package skeleton table, 4-cut sequence, mv/attic/rewire rules (pre-drafted, awaiting go)

docs(gui): t0-checklist — pin figma-flows findings (missing font-family base vars, three alias vars behind upstream)

docs(gui): dispatch v2.1 — drop cordis-web salvage wording, two-wave staffing, loader/immediately boundary updates

docs(gui): progress + t0-checklist ledger — T0 landed, staffing status, execution accounting

docs(gui): api-contracts v3 — arbitration round 1: renderBody deps, RootBindingProvider, flush default sync, prune current, loader subpath, config-source P-I bar

docs(gui): v3 §3.2 connection 导出清单附录(rt-core 对账)+ rt-core 实现计划档案

docs(gui): progress — T1 milestone, arbitration round 1 ledger, fw-react timeout escalation

docs(gui): progress rolling update — per-line battlefield state at 00:2x, mailbox-vs-contract lesson, small-batch discipline reinforced

docs(gui): fw-react notes — v3 §2 complete, seven knives, T1/T2 follow-ups

docs(fw-slots): archive — four packages landed, open tails logged

docs(gui): progress — framework layer complete (web-react five, fw-slots four packages), T2 gated on rt-core runtime knife only

docs: api-contracts

docs: style-spec

docs

docs(gui): tsconfig convergence ruling — no host.json, root resumes host-aggregate duty, typecheck = root + client aggregates

docs(gui): missions 根三份 07-18 世代档案加「已被取代」头注——指向 web-plugin-rfc 现行权威并注明新旧对应

missions

docs(gui): progress rewritten for post-closeout state — wave ledger, architecture finale, teammate roster with handover notes, pending-user-command queue
2026-07-22 21:30:30 +08:00
..
2026-07-22 21:30:30 +08:00
2026-07-22 21:30:30 +08:00

20260720-2125-gateway-design — host 侧 Client Gateway 设计

任务理解(外化,防掉线)

身份:gateway-design owner(常驻 teammate),工作树 worktree-web2(分支 worktree-web2)。 铁律:零 git 操作、零源码改动,纯设计文档作业;文档只落盘不 commit。history-rebase 手术进行中。

任务:产出 design.md(中文,供用户 review)——host 侧 Client Gateway 设计: 面向对象的 client 身份底座 + 输入排队广播。用户核心要求原话:「有一个面向对象的 Gateway + 一堆在 host 侧的 client proxy,这个标准对象我希望是有的」。

设计必须覆盖

  1. 对象模型:Gateway(单实例、client 注册表)+ ClientConnection/ClientProxy (每 client 一个 host 侧对象:clientId 铸造、拥有 mux/host 流与 FrameQueue、 unary 归属、断线 dispose 级联)。与 peer 体系 PeerGateway/ClientPeerProxy 的 关系定调(同一对象 vs 分层),给推荐+理由,命名与 blueprint §6a.4 协调。
  2. client 身份 wire 形态:clientId 铸造时机、同页面多流归属同一 client 的机制 (握手参数/首帧)、刷新=新 client 还是恢复(推荐+理由)、describe/attachedSessions 是否透出 client 列表。
  3. 输入排队广播:队列镜像数据结构(挂 Gateway vs 挂 session)、queue/updated 帧形态(全量 vs 增量)、三态生命周期(本地乐观→排队可见→定格)与 rpcId 关联、 cancel/断线清理、重连重放时序(与 subscribed 帧先后)。 主会话方案雏形:apiproxy impl 维护按 prompt rpcId keyed 的队列镜像,受理广播 queue/updated live 帧(控制面不进 log,与审批 requested 帧同族)、开轮见同 rpcId 的 user/message 即移出、cancel 清空、重连后 subscribed 帧后重放。
  4. 复用面:T4 审批 pending、将来 peer hold 账本共享此底座(一节带过)。
  5. 红线:harness core 零改动(core FIFO 一字不动,全住 apiproxy/host 侧); live 控制帧不进 log(web 纯呈现层);「model-visible⟺logged」不破。
  6. 妥协台账三段式;方向性分叉(如刷新恢复语义)列选项给用户拍,不替拍。

输入排队问题(需求脉络)

两浏览器=两 client 连同一 host;A 在对方 turn 运行中 queue 提交 → 输入进 host FIFO 但不发事件(未达模型不进 log)→ B 看不见、A 刷新也看不见。同步一定是 host 侧维持的广播状态,绝不进 harness core。

背景材料状态 ⚠️

派发单指定的材料在本工作树/全 workspace 均未找到(已 find 到 depth 12):

  • missions/tasks/20260720-0356-multiclient-research/report.md — 不存在
  • missions/tasks/20260719-2339-web-cordis-design/blueprint-v2.md + design.md — 不存在
  • missions/conventions.md — 不存在

已向 team-lead 索要正确路径。在等待期间直接读实际代码面: packages/host/apiproxy(mux/host 流、FrameQueue、session/subscribed 重放)、 contract 的 attachedSessions/describe、T4 审批 pending registry 现状。

批次计划

  1. ✅ README(本文件)→ 回执
  2. ✅ 对象模型批 → design.md §对象模型
  3. ✅ wire 身份 + 输入排队批
  4. ✅ 复用面 + 妥协台账批

追加口径(team-lead 四单,2026-07-20 晚)

  1. 范围收窄(轻底座):Gateway/ClientProxy 只管「身份铸造+连接聚合+dispose 级联+session 排队镜像」;unary API(list/create/history/describe…)照旧直通 impl 不经 Gateway 路由。设计里画「管什么/不管什么」边界表,防过度设计。
  2. 侵入性正面评估:「侵入式改道 vs 旁挂观察者」两案对比+推荐(预期旁挂—— mux 出帧路径 impl→FrameQueue→SSE 不动,Gateway 订阅同源事件维持 queue 状态 并注入自己的 queue/updated 帧);改动面量化到文件/函数级。
  3. peer 关系定调作废重写:用户已定「两个独立对象,各归各层」——PeerGateway 在 host 插件内部(cordis ctx 域),本 Gateway 在外部(apiproxy 载体层), 不合并、不做上下层视图。唯一连接点:clientId 语义要不要打通(给建议)。 命名提 2-3 候选(避免与 §6a.4 撞):ClientGateway/ConnectionGateway/ ClientRegistry 之类,用户挑。
  4. 社区调研只看 opencode(本机 /weka-hg/.../github/opencode):server 侧有无 client/connection 概念、多端输入怎么同步、session 数据流有无 Gateway 类中介。 Live Share/tmux/Figma 对照不做。
  5. 材料读法:missions 背景材料用 git show 7be03e985:<path> 直读(重排前 顶刀快照);packages 源码以 git show 94ff2fad2:<path> 为准(工作树在手术 中间态)。归档目录 untracked 不受影响。

批次计划(第二轮)

  1. ✅ 消费材料:conventions.md + multiclient report + blueprint-v2 §6a 原文全读
  2. ✅ opencode 调研(server/event handler、session/prompt+run-state、sync/README、 CLI runtime.queue 实读)→ design.md §1.4
  3. ✅ 修订批:design.md 整体重写为 v2——轻底座边界表(§2.2)、侵入性两案+改动面 行级量化(§2a,推荐旁挂观察者+微任务合批)、peer 独立定调+clientId 打通建议+ 命名三候选(§2.4)、originClientId 撤到台账 T-1(unary 彻底直通)、台账改 conventions#12 三段式(T-1..T-6)、分叉收敛为 F-1 刷新/F-2 命名。

v2 关键修订记录(对 v1)

  • opencode 结论:server 无 client 对象、受理即持久所以无排队镜像需求——支持 轻底座方向,也证明我们的镜像是自家「未达模型不进 log」纪律下的必要补位。
  • 侵入性:案二旁挂观察者,api-proxy.ts 仅 +18 行、unary 零触碰;定序靠 queueMicrotask 合批(机制保证,非注册顺序约定)。
  • peer:两个独立对象各归各层(用户定调);唯一连接点 clientId 打通(建议打通, peer 层复用 hello 铸造的 id + 订阅 client 生命周期)。
  • hold 账本从复用面撤下(归 peer 域 ClientPeerProxy,§6a.3)。

v2.1(L-1 对表收尾,重排收官后)

  • 重排收官(missions 树全量恢复),blueprint-v2 §6a + web-cordis 正式稿 design.md §1 树上直读对表完成。§2.4 补三条注记:①命名不撞车(peer 五词全避开,N3 的 ClientProxy 与 ClientPeerProxy 一字之差故不推荐);②生命周期桥接(§6a.3 定 ClientPeerProxy 断线即 dispose vs 本层 linger——生命周期通知暴露两档粒度, peer 层按 §6a.3 选断流档,不替 peer 改已拍语义);③hold 账本归属经原文确认。
  • F-2「peer 分层 vs 同体」分叉按用户定调收敛为注记(不再是开放分叉);现存分叉 仅 F-1 刷新语义 + F-2(新编号)命名候选。
  • 行号引用全部校准到重排后 HEAD 树(api-proxy.ts:359-394/319、session.ts:220)。

v3(标准底盘与特殊功能拆两层,用户结构性口径)

  • 用户锚点:「标准化指代的是统一 Map clients / connection 订阅的分发」;queue/ broadcast 只是当下特殊需求,加功能必须不动底盘。
  • 重构:§2 重画为底盘+插槽两层——底盘(clients Map + attach/detach + send/ broadcast 通用动词 + onClientChange 两档粒度 + use() 插槽)零业务语义,词汇表 只有 client/connection/frame + send/broadcast/replay;任何 sessionId/rpcId/ approval 逻辑只能住 feature 文件。
  • ReplayableDomain 升格为公开 GatewayFeature 接口(name/setup→disposer/ replayFrames/onClientAttach/Detach);queue-mirror 是第一个 feature(§4 整节 改写为 feature 视角,业务语义不变);T4 审批第二候选。
  • 重放定序改 feature 注册序(boot 装配处 use 顺序即 v2 写死顺序的等价还原); 显式 priority 进台账 T-7。
  • 微任务合批定序上移到底盘 send/broadcast 动词(feature 作者免知约定)。
  • §2a 旁挂结论、边界表(加 feature 列)、命名候选、F-1 全保留;改动面重量化: 底盘 gateway.ts 120-150 行一次写成后稳定 + features/queue-mirror.ts 80-100 行, impl 接触面不变 ~18 行。
  • 验收剧本 +第 7 条:加功能零动底盘的不变量自查。

v4(用户拍方案一:下行全帧过切面)

  • 执行解读 A:切面=下行分发咽喉——所有下行帧(core 帧+feature 帧)统一过底盘 send/broadcast 入队;帧生产留 impl 侧单例 producer(一套监听+一份 openCalls 视图,从 per-stream 闭包平移收敛);上行 unary 不过切面。解读 B(producer 一并 进 Gateway/含上行)列 F-3 待确认,返工面隔离在 producer 归属一格。
  • v3 反对改道三理由逐条正面回应(§2a.2 表):①视图进底盘→生产/分发拆开消解, 底盘纯度反升;②动主干→承认,用户知情拍板,且主体是代码搬家非重写;③故障半径→ 承认变大,四条缓解(底盘稳定/per-conn 隔离/feature 不在主通路/纯内存可全测)。
  • 切面净收益:监听×1 视图×1(消 per-client 线性复制)、信封 rpcId 统一铸造 (逐字节一致,强于现状 E1)、统一治理点(T-8 加界/踢流、将来过滤、观测单点落地)。
  • FrameQueue 定调:切面内部实现(ClientConn 拥有 muxQueue/hostQueue),推荐案+ 否决备选(决策/缓冲劈两截会重引缝)。
  • 定序升级结构保证:core 帧同步入队、feature 帧微任务合批入队,相位差与注册序无关。
  • 改动面重量化:gateway.ts 180-220、frames.ts(producer,主体搬家)90-110、 queue-mirror 80-100;api-proxy.ts mux/host 主干重构净 -40 行;sseResponse/ webserver 不动。台账 +T-8(FrameQueue 加界,切面单点落地)。
  • 验收 +第 8 条:切面一致性(信封 id 逐字节一致+到达序一致)。

进度日志

  • 2126 README 落盘;发现背景材料缺失,向 team-lead 报告并索要路径。
  • 2135 材料未到,不阻塞:直接读实际代码面打底(api-proxy.ts 现状、agent/queued、 FrameQueue、rpc 四象限、connection 握手、session.ts pending 机制)。
  • 2140 批 2 落盘:design.md §0-§2(对象模型,peer 关系推荐分层 A)。
  • 2150 批 3 落盘:§3-§4(hello 握手 + header 归属 + 队列镜像 + 快照帧 + 重放时序)。
  • 2155 批 4 落盘:§5-§8(ReplayableDomain 小契约、变更清单、台账 L-1..L-6、 分叉 F-1..F-3、验收剧本)。design.md 完稿待 review;L-1(blueprint 对表)悬置 等 team-lead 给路径。