Skip to content

Port table: each wanted legacy behaviour → its landing point in the skeleton, marked port / adapt / simplify #69

Closed

Description

@Simon-AI-coding

Part of #67

Question

Produce the code-level port table this map's rule 3 requires. For every behaviour the bridge-only v1.0 keeps — Session registration, stop analysis (pending question / permission request / tool summary), progress inspection, delivery with receipts on both lanes, Session naming, the child-process rule, Duty bookkeeping while off, Codex rollout location — record:

| behaviour | legacy implementation (legacy@1d32845:file:line-range) | what it actually does (two sentences, from reading the code) | landing point in v1.0 (seam / module / new module) | port / adapt / simplify | what is left behind and why |

Rules: read legacy from the Git object (git show 1d32845:<path>), never the dirty working tree. "Port" per the map: understand, then rebuild inside the skeleton in the simplest form that keeps the effect — name the simplification where one is visible (e.g. legacy's dual Stop ledger collapses to current-Engine state per #61 rows S5/R1). Explicitly mark what is not carried: store.py durable ledgers, host.py, terminal.py launching, test_bridge.py. Where #61's gap table (docs/parity-gap.md, local) already ruled a row, cite the row rather than re-deciding it; where the new Session definition flips a #61 "adapt" into a "port", say so.

Deliverable: docs/port-table.md (local-only per map rule 6) and the table's row list plus the groups it suggests for build tickets in the resolution comment. Signed off by Simon before any build ticket graduates from it.

Activity

  1. Simon-AI-coding commented on Aug 25, 2026

    @Simon-AI-coding
    OwnerAuthor

    签字前重贴:以下行清单已按 session-monitor survey 的 lane-specific 结论更新。

    Rows

    1. P1a — Discovery and roster:adapt/new。 Claude 使用官方 claude agents --json;Codex 使用共享 daemon。Legacy 没有 machine-wide analogue。无已证明 channel 的行保留 provenance,并保持 discovered, unattached。
    2. P1b — Reachability injection:仅 Claude port。 Claude 接管命令只为启动时注入 Channel + Approval hook;Codex 不接管命令,只要求运行中的共享 daemon。
    3. P2 — Current waiting state / Reply Window:simplify。 P1a 提供当前状态,只有 P1b/daemon 证明附着后才开放 Relay window。
    4. P3 — Stop analysis / pending question:port(仅精确证据可用的 attached Claude)。
    5. P4 — Stop analysis / permission request:Claude classification port,Codex 适配现有 wire。
    6. P5 — Stop analysis / tool summary:port。
    7. P6 — Read-only progress inspection:在精确 lane reader 可用处 port。 P1a 提供 identity/provenance;attached Codex 用 daemon thread/read;不得从 unattached row 推断详细 progress。
    8. P7 — Claude Answer delivery receipt:已存在的 port,验证而不重写;只作用于 P1b attached Session。
    9. P8 — Codex Answer delivery receipt:已存在的 port,验证而不重写;只作用于 daemon-owned thread。
    10. P9 — Delivery settlement and duplicate safety:port safety + simplify storage。
    11. P10 — Stable Session naming:Claude 适配官方 roster name;仅 unnamed attached Codex 保留 legacy self-report port。 两 lane 都保留 immutable/idempotent,且 display name 永远不是 target。
    12. P11 — Child-process rule:adapt。 Child 可见但不可 Relay/Approval/Stop Notice。
    13. P12 — Duty bookkeeping while off:adapt/simplify。 只按当前状态 reconcile,不重放历史。
    14. P13 — Codex unattached rollout locator:缩小范围后的 port。 仅服务 unattached candidate correlation 与 child classification;daemon-attached thread 的 identity/status/progress/Stop 全走 thread/list/thread/read。

    Build groups

    1. Discovery, roster, and reachability injection — P1a、P1b、P2 bootstrap、缩小后的 P13。
    2. Stop analysis — P3、P4、P5。
    3. Progress inspection — P6。
    4. Delivery receipts and settlement — P2 transitions、P7、P8、P9。
    5. Session naming — P10。
    6. Child-process rule — P11,消费 P13。
    7. Duty bookkeeping — P12。

    Binding gate for group 1

    Group 1 的 ticket body 必须先锁定 Agent seam 上唯一一个 Session-inspection result type以及 event/verb split。每个 lane adapter 私下生产该类型,只有 Bridge Core 消费;字段必须覆盖 state、P3–P5 的 typed waiting_for(question / permission / tool summary)、P6 的 recent progress + last activity、P11 的 child classification、P1b 的 reachability。

    Groups 2–7 全部被 group 1 阻塞;各自 brief 必须引用已锁定类型,不能重新定义 Session projection。失败测试:若后续 brief 缺少 Session fact,必须扩宽这一个 seam type 及适用的 lane projection;增加 sibling reader、Progress seam 或 per-consumer parsing 即为失败。

    没有创建任何 build ticket;现停在 Simon sign-off。

  2. Simon-AI-coding commented on Aug 25, 2026

    @Simon-AI-coding
    OwnerAuthor

    P1b must change again after #70's follow-up (Claude reach without injection), reviewed by Simon's wayfinder session.

    Claude no longer needs the taken-over command. Verified against the official docs and #70's live probes on 2.1.241:

    So P1b for Claude becomes: port legacy's hook-client registration model (legacy@1d32845:bridge/hook.py:119-207, hookconfig.py:56-84) minus the launch marker and preflight.sh wrapper; adapt the Relay route to the inbox socket; keep the Approval hook contract but installed user-scope instead of per launch. Leave behind: the wrapper, ADR 0006's channel server, ADR 0007's --plugin-dir injection, --channels, the bootstrap env var (all superseded pending #71's proof). Also record in P7 that the Claude receipt protocol changes with the route — acknowledged_by_claude was the channel's; the inbox route's receipt is for #71 to define, and P7's "port already present; verify" no longer holds as written.

    Caveats #71 must clear before this is final (do not resolve them in the table, cite them): peer-message authority (cannot answer an open dialog), bypass-mode receivers hold untagged senders, undocumented wire frame → version pin, hook install/uninstall boundary. #71 has been rewritten accordingly.

  3. Simon-AI-coding commented on Aug 25, 2026

    @Simon-AI-coding
    OwnerAuthor

    按最新两次签字前拍板重贴;docs/port-table.md 已同步。

    Revised rows

    1. P1a — Discovery and roster:adapt/new。 Claude 用官方 claude agents --json,Codex 用共享 daemon;Relay 与 Approval attachment 分开记录,无已证明 route 的行保持 discovered, unattached。

    2. P1b — Reachability registration and routes:lane split。 两 lane 都不接管用户命令。Claude port legacy hook-client/config 注册模型但删除 launch marker/wrapper;Relay adapt 到 built-in inbox;Approval 保留 decision contract、改成 user-scope 安装。Codex adapt 到 shared daemon。

    3. P2 — Current waiting state / Reply Window:simplify。 只为已证明的具体 route 开 window;inbox peer message 不自动等于可回答 Approval 或 question dialog。

    4. P3 — Pending question:optimised port。

    5. P4 — Permission classification:Claude optimised port,Codex adapt existing wire。

    6. P5 — Tool summary:optimised port。

      P3–P5 共同落入一个无副作用的 adapters/agent/claude/stop_analysis.py 深模块:输入 transcript/Notification records,输出结构化 stopped-on result;不碰 socket、store、Core,约 300 行以内。禁止先搬 2.9k 行 legacy transcript.py 再删。

    7. P6 — Read-only progress:exact reader 可用处 port。 Claude transcript route 来自 P1b user-scope registration;attached Codex 用 daemon thread/read。

    8. P7 — Claude delivery receipt:adapt。 撤回“port already present; verify”。旧 queued_for_claude / acknowledged_by_claude 随 Channel 一起淘汰;Prototype the Claude lane: official roster, built-in inbox socket and user-scope hooks, with no wrapper #71 必须定义 inbox route 上什么事实才算 DELIVERED,其余为 UNKNOWN。

    9. P8 — Codex delivery receipt:existing port,verify。

    10. P9 — Settlement safety:只 port 一条规则。 仅修改现有 core/relays.py 几十行:DELIVERED 完成、proven FAILED 可重试、UNKNOWN 永不自动重发;不新增模块,不移植 539 行引用里的 coordinator/store 状态机。

    11. P10 — Naming:Claude official name;仅 unnamed attached Codex 保留 self-report port。

    12. P11 — Child rule:adapt。

    13. P12 — Duty while off:adapt/simplify。

    14. P13 — Unattached rollout locator:缩小范围后的 port。

    Deliberately left behind

    • preflight.sh wrapper、launch marker、命令接管;
    • ADR 0006 Channel server;
    • ADR 0007 per-launch --plugin-dir;
    • --channels 与 GPT_VOICECODING_CLAUDE_CHANNEL_CONFIG;
    • Channel wire、queued_for_claude / acknowledged_by_claude receipt;
    • legacy durable ledgers、coordinator state machines、per-TUI Codex host。

    这些 Claude route 淘汰项仍以 #71 combined no-wrapper proof 为条件;表不替 #71 猜 peer authority、bypass-mode hold、undocumented frame/version pin、hook install/uninstall ownership 或新的 DELIVERED 证据。

    Binding design gates

    1. **One inspection type:**Agent seam 只有一个 Session-inspection result,由 lane adapters 私下生产,只由 Bridge Core 消费;缺 fact 只能扩宽这个类型,禁止 sibling reader、Progress seam、per-consumer parsing。
    2. **P9 one-policy edit:**只改 core/relays.py,无新 module,无 coordinator/store migration。
    3. **P3–P5 one pure deep module:**小 interface 包住解析算法,约 300 行上限,无 I/O/side effect;禁止 copy-then-delete legacy parser。
    4. **Shape before code:**每张 build-ticket brief 的第一部分必须写 rebuilt shape:module name、public function signature、interface invariants/error modes、approximate line-count ceiling。没有 shape 描述,票不开工。

    Build groups

    1. Discovery, roster, and reachability routes — P1a、P1b、P2 bootstrap、P13。
    2. Stop analysis — P3–P5,一个 pure stop_analysis.py。
    3. Progress inspection — P6。
    4. Delivery receipts and settlement — P2 transitions、P7–P9;Codex receipt 保留,Claude receipt 由 Prototype the Claude lane: official roster, built-in inbox socket and user-scope hooks, with no wrapper #71 定义,P9 只改 core/relays.py。
    5. Session naming — P10。
    6. Child-process rule — P11/P13。
    7. Duty bookkeeping — P12。

    Groups 2–7 仍被 group 1 的 locked inspection type 阻塞;同时每组各自被 rebuilt-shape section 阻塞。未创建任何 build ticket,等待 Simon sign-off。

  4. Simon-AI-coding commented on Aug 25, 2026

    @Simon-AI-coding
    OwnerAuthor

    Simon signed off on 2026-08-25.

    The revised port table and binding design constraints in the latest row-list comment are accepted as the source for later build briefs. This records sign-off only: no build ticket was created, and this issue was not closed.

  5. Simon-AI-coding commented on Aug 25, 2026

    @Simon-AI-coding
    OwnerAuthor

    Resolution (wayfinder session): the signed table has graduated into seven build tickets — #74 (discovery/roster/reach, the architecture gate that locks the one Session-inspection type), #75 (stop analysis), #76 (progress), #77 (delivery receipts and settlement), #78 (naming), #79 (child rule), #80 (Duty bookkeeping). Each brief carries its rows, legacy citations, a rebuilt-shape section written before code, what is left behind, the red-first acceptance step, and its blockers. #74 is blocked by #68/#71/#72/#73; #75–#80 by #74; #77 also by #71; #80 also by #75; #54 by all seven.

  6. Simon-AI-coding commented on Aug 25, 2026

    @Simon-AI-coding
    OwnerAuthor

    Amendments after sign-off, approved by Simon on 2026-08-25 following the Codex consistency review of #74–#80 (recorded in docs/port-table.md § Amendments): (1) P10 narrowed — the legacy self-report fallback for an unnamed attached Codex Session is dropped; the display label is <project> · <short thread id>. (2) P14 (approval outcome wording, #61 R5) and P15 (Companion reply outcome, #61 C2) added to build group 4 (#77) — signed behaviour that had no table row. Groups 4 and 5 updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions