Skip to content

refactor(collaboration): compose delegation inventory pages in TypeScript - #6591

Merged
loopx-agent merged 7 commits into
loopx-project:mainfrom
hhyykk:codex/ts-delegation-inventory-20261016
Oct 17, 2026
Merged

loopx-agent merged 7 commits into
loopx-project:mainfrom
hhyykk:codex/ts-delegation-inventory-20261016

Conversation

@hhyykk

@hhyykk hhyykk commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

Delegation requesters need to find existing work after losing context, without starting replacement operations or mistaking one saved page for current whole-Goal completion. This PR moves page composition into the existing TypeScript delegation owner and retires Python cursor/completeness decisions and per-item projection RPCs. Existing CLI, MCP and Goal Chat readers receive the same live requester-scoped page with the required additive projection envelope.

Related to #3225. Current reviewed head: 71254af951eacad8afc041d32138ff5dbe52a458, integrated with main 84dfa63c26a6b03a3c5e6039108f1540e8b2b1bb. The conflict resolution preserves both delegation and existing Goal-map/delivery-review envelope carriers.

Specification And Ownership

The accepted pre-change TypeScript migration RFC supplies T3 and §§2.6/5/6. The maintainer explicitly selected the existing default SQLite profile for default-delivery performance qualification; #6763 proposes the matching repository guidance. This changes qualification scope, not the numeric budgets or historical results.

Criterion Current disposition
T3 Implemented for requester inventory pages: existing TS query/item/page owner; replaced Python page decisions and item dispatcher removed
§2.6 Implemented: actual source times, unreadable omissions, fresh/complete/alert and explicit requester_page scope reach CLI/MCP/Chat
§5 Product six files +84/−20; tests/type configuration +238/−5; docs +39. Inventory policy crossings 1+N → 2; provider/validator calls remain. Empty pages increase from one inventory call to two
§6 Current real File/SQLite correctness, normal packages and default SQLite performance qualify; File-specific performance remains unqualified and disclosed

Python retains bounded directory scanning, requester registration, and live Delegations.read IO including canonical acceptance and artifact validation. Its facade exits when those actual providers migrate. Each page reuses the existing executable-revision request scope; no operation/authority cache is added, and the next page resolves code again. The existing private snapshot transport carries complete large pages; ordinary 2 MiB and private 64 MiB bounds remain unchanged.

Current Validation

Current source and normal noneditable wheel/sdist installations were checked on macOS, Python 3.14.8 and Node 24.21.0 using disposable synthetic fixtures.

  • 67 focused Python caller/inventory/request-scope tests, 37 native delegation/envelope tests, plus two real stdio MCP disconnect/reconnect cases passed.
  • Five ordinary-wire rejection cases and two native private-snapshot integrity cases passed. Corrupt/revoked operations remain visible as unavailable, denied directories still fail, changed accepted artifacts are rechecked, and listing launches no Host.
  • Normal Chat build, wheel/sdist builds and isolated installations passed. Six changed product files match source/archive/install byte for byte. Across 72 actual CLI observations on base/source/wheel/sdist and both providers, all original JSON, errors and exit codes match; the additive envelope is asserted separately. Canonical Tasks and registry remain unchanged.
  • Whole TS compile, Ruff, semantic advisory followed by the full semantic smoke, bilingual RFC and public-boundary checks passed. The current exact-scope CQR passes with the File risk retained; standard premerge passes six direct and 15 selected checks with no source/policy failure or manual hold.

The original full-CLI workload uses the same seven-operation fixture, 32 alternating pairs per provider and complete semantic assertions. Its 128 timed calls and 36 additional source observations are retained without resampling unchanged code to select a passing result.

Profile Baseline p95 Candidate p95 Delta Qualification
Default SQLite 170.611875 ms 170.179750 ms −0.432125 ms / −0.253280% Passes unchanged 5%/25 ms targets
File 165.575209 ms 179.150625 ms +13.575416 ms / +8.198942% Original relative target failed; nonblocking risk for default SQLite delivery

File performance is not marked passed or explained. All earlier failed heads retain their original measurements and criteria. File functionality, data integrity, safety and recovery remain required; an explicit future File performance claim must qualify that profile.

For the current SQLite page, a separately captured actual CLI request also passed 128 warm native snapshot-page calls at 1.385041 ms p95, with 16 cold runtime starts and 256 burst pages. This native measurement excludes provider IO and executable resolution, which remain covered by the complete CLI comparison; it does not replace end-to-end qualification.

Initial local frontend build dependencies were installed through normal npm ci before the successful build. Earlier missing-CQR and historical performance failures remain recorded separately. Hosted CI was neither queried nor awaited under the configured policy. Windows, real models, production adoption, sustained fleet throughput and PostgreSQL writer qualification are not claimed; this PR changes no PostgreSQL store/transaction behavior.

Review, Continuation And Scope

Current exact-head review: APPROVE for this page-readback increment and default SQLite qualification. It includes maintainer patch self-review and does not claim a separate independent reviewer. GitHub approval requirements and exact-head merge readiness remain distinct gates.

Original proposal: @hhyykk, whose author declaration identified OpenAI Codex/GPT-6-family assistance. Maintainer repairs preserve the contributor's commits and DCO trailers. No new service, capability, configuration flag, persisted state, provider default or execution grant is introduced.

Existing CLI/MCP/Goal Chat operations are exercised; no new frontend operation or setting is introduced. Async lifecycle, receiver adoption and complete user-Agent migration remain with their existing roadmap/RFC owners. This bounded read-model result does not close whole T3, provider promotion or migration acceptance.

…ript

Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
@hhyykk

hhyykk commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Author validation for bd465fc1c9abf031e370439c0c128e3942994039, based on main bf7c58ba8.

Migration economics receipt:

Field Evidence
Owner Existing TS delegation owner now projects the complete bounded page; Python supplies fresh host IO
Legacy deletion 17 Python lines removed, including page decisions and per-item RPC sequencing
Bridge 6 Python transport lines added; two existing private-snapshot allowlist entries; item dispatch replaced by page dispatch
Crossings Inventory policy: 1 + N → 2 (50 rows: 51 → 2). Invalid returned observations stay within that reduction. Provider/validator calls remain; empty pages increase from one request to two
Product net +28 lines, excluding tests, docs and typecheck configuration
Scaffolding No production parity helpers; retained behavior, malformed-input, large-page and RPC-budget tests
Facade exit Item RPC retired. Host adapter remains until current delegation/acceptance/artifact IO is migrated
Correctness 24 real-entrypoint/integration cases, 28 TS tests, 308 architecture checks; full TSC/Ruff/diff checks passed. The added File/SQLite RPC-budget regression fails on the unmodified base and passes on head (2 cases each)

A normal installed wheel matches source CLI pages on File/SQLite: changed artifacts become unavailable; restored original artifacts recover accepted readback without Host reexecution. The packaged product files match this exact head. CLI, real stdio MCP and Goal Chat operations were exercised with isolated synthetic fixtures. Guard self-review completed for code, tests and docs.

Linux only; Windows/macOS and full-suite qualification remain unrun. CI and independent PR review are pending. This is an inventory readback cutover; execution/provider defaults and the broader migration are not qualified here.

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max

动机

接续已有委派工作的 Agent 需要分页找回原操作,并独立检查每个结果是否仍可用,避免因为忘记操作编号而重复启动工作。

旧实现每个条目都跨一次 Python/TypeScript 边界,整页的游标与完整性又由 Python 决定;本提案合并页级决定,但新迁移的页面仍缺少规范要求的来源与新鲜度信息。

当前头保留了分页、坏条目隔离及请求者范围,并减少 inventory 专有 RPC;保存或晚消费页面时的机器可判断新鲜度仍未达成。

本 PR 只迁移既有委派清单读回,不新增执行授权、Agent 创建、异步生命周期或接收方采用能力。

改动思路

把页内地址校验、条目投影、lookahead、游标和页级完整性集中到现有 collaboration/delegation.ts,比逐字段桥接或新增状态库更合适。Python 继续承担目录和身份 IO,以及当前 Delegations.read 的 canonical 验收和产物检查;provider 失败仍由现有读回转成 unavailable,畸形 framing 则拒绝整次请求。

这里减少的是 inventory 专有策略往返:1+N 变为两次,实际 provider/validator 调用没有消失;空页从一次增至两次,是明确代价。保留既有 64 MiB 私有快照传输来容纳整页,普通 effect 仍受 2 MiB 边界约束。没有永久双引擎或新的用户操作,现有 CLI、MCP、Goal Chat 继续消费同一页;完成本切片不代表整体 T3 或 R1/R2 已完成。

具体改动

关键代码讲解

  1. delegationInventoryPage:校验已排序且在游标之后的地址、限制最多 limit+1,再读取前 limit 个观察并推导下一页。lookahead 只证明另一页存在,不读取那个操作,也不把页完整误作整个 Goal 完成。
  2. inventoryPageItem / delegationInventoryItem:复用原条目语义;合法地址下的畸形当前观察降为 unavailable,仍保留健康 sibling;accepted 只输出产物 ref/hash,不导出正文。
  3. read_delegation_inventory:保留 requester 检查、目录扫描和当前结果 IO,删除 Python 的页级返回与逐条投影 RPC,转交一次完整观察列表。未撤销真实 IO provider,保留这层 adapter 有明确理由。
  4. effect_runtime 的两端 snapshot allowlist 与 handler registry:替换内部 inventory_item dispatch,接入 inventory_page;普通 oversized 请求拒绝仍通过。完整 50 条、超过 2 MiB 的合成 accepted 引用页通过真实传输,产物正文不进入返回页。

先读固定 bf7c58ba8b77dc01750b1b3921b2be6ea111474c 的 迁移 RFC:T0 的当前 owner/调用方明确;T3 的页级决定和逐条 RPC 退役已实现;§5 的 owner、桥接、删除、往返与 facade exit 有对应源码;§6 的正常/负向调用有证据,但“新增或迁入的面向操作者/Agent 读模型发出 projection_envelope”这一项 not_met。R1_R2 完整产品旅程为 out_of_scope,继续归既有 owner。关联 envelope 契约 明确区分来源读取时间、服务时间和覆盖范围。

完整 10 路径(+184/-23)包含五个产品模块、两处回归、typecheck 配置和双语 RFC checkpoint。当前共享权威 provider 的事务和持久格式未改,不把无关 PostgreSQL promotion 或全量迁移作为此页投影的前提;frontend/Lark 没有新的交互或设置需要伴随实现。

对主干的风险

[P2] 给新迁移的 inventory 页补齐既有 projection envelope。 当前新 TS return object 仍只有 items、has_more、next_cursor、page_readback_complete 和说明文字,没有调用现有 envelope owner。独立 File/SQLite 真 CLI 的完整分页及正常 wheel、sdist 读回都缺少这个字段,fresh read 与保留旧页因而没有可判定的读取/服务时间、source 状态与页 scope。page_readback_complete=true 只说明本次列出的条目可读,不能替代来源新鲜度;“live page”说明也不能认证稍后消费的副本。

这是接受的迁移规范对当前切片的门,并非要求补完所有旧读模型。请在现有 IO adapter 采集真实 source read facts,由已有 projection.envelope.seal 的 TS owner 在整页投影中统一封装;保留 requester、分页和条目兼容,不另建时钟/缓存/完整性规则。回归覆盖 fresh、stale、unreadable、partial scope 与 replay:保留原 observed_at、更新 served_at,并让 CLI/MCP/Goal Chat 能读回同一信息;不要把“页完整”改成“整个 Goal 完成”。

独立 26 项 Python 调用方测试、28 项 TS 测试、3 项普通 oversized 拒绝、2 项 snapshot 边界测试通过;原生 canary 5 direct +15 selected 全过、0 hold,DCO/diff/公共扫描通过。相同不可变 File/SQLite journal 的三页、坏 sibling、无关 requester 和非法 limit 的完整 CLI JSON 与 base 相同,原 journal 字节不变、无 Host 启动。七次全 CLI 读回的中位数 File 约 564→571 ms、SQLite 554→532 ms,仅是该小夹具的观测,不能证明冷启动、p95 或长期吞吐资格。普通 Chat 构建及正常 wheel/sdist 独立安装读回通过;未借用作者的 Linux 结果,没有查询或等待 CI。

语义与 CI 对齐

复用现有 inventory schema、状态词和 typed owner;本地私有 transport allowlist 增加一个已接入的 method,不创造新的执行生命周期。开发期 advisory 明确报告这一个命名集合扩展,之后完整语义检查通过。当前读模型的 envelope 义务却尚未接入,说明现有绿测没有覆盖该规范项;应修既有 owner 与真实调用方回归,不能仅把义务改称 guidance。

我的整体评价

当前头 bd465fc1c9abf031e370439c0c128e3942994039 请求修改。当前调用结果与请求者隔离得到 preserved,减少往返的架构改进合理;面向长时任务的已保存页面新鲜度仍 not_yet_proven,不能据此认证完整 T3 迁移。有限未来改动检查认同把页级决定收敛到已有 owner,下一步只需在同一边界复用 envelope,不需要独立新框架。修复后保留当前全部正常/坏页/权限/大页和打包读回,再按真实 head 复核。

English verdict: REQUEST_CHANGES - bd465fc; page composition and scoped caller parity pass, but the migrated operator/agent read model omits the projection envelope required by RFC section 6. Reuse the existing owner and cover freshness, coverage and replay.

Comment thread loopx/control_plane/collaboration/delegation.ts
@mergify

mergify Bot commented Oct 16, 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, @hhyykk.

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 Oct 16, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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 Oct 17, 2026
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 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max

动机

接续已有委派工作的用户与 Agent,需要分页找回原操作,并知道其中哪些结果现在仍可使用。

旧清单逐条跨语言投影,又没有来源读取时间;一份后来重看的完整页面容易被当成当前整个 Goal 的状态。

当前页仍按原请求者、游标与实时产物检查读回,同时明确披露来源新鲜度、不可读条目及本页覆盖范围。

本次只完成既有委派清单的读模型迁移,不新增执行授权、接收方采用、Agent 迁移或整个 T3 的完成声明。

异步执行与接收方采用、用户 Agent 的完整迁移仍由原能力与路线继续验收,不以本页投影替代。

本轮在原作者 hhyykk 的分支补齐了缺失封套及当前 main 冲突;本评审也包含对这些补丁的自审,没有把它冒称为另一位独立审查者的结论。

改动思路

页级规则与封套归同一现有 TS 边界,Python 只收集真实 IO;无需第二个状态、时钟或额外策略 RPC。

本提案完成原请求者清单的整页读取及封套;执行、接收方采用和完整 Agent 迁移继续由原 owner 验收。

沿用既有 delegation query/item 和 projection envelope owner,删除 Python 的游标、完整性及逐项投影调用。原来的每页 inventory 策略请求是 1+N,当前仍为两次,封套在 TS 进程内组合;provider、验收和产物检查没有被删除。空页由一次变为两次是保留的代价,不能把 inventory 请求数当作全部 CLI RPC 数或实际性能证明。

路径 当前行为
正常分页 当前请求者目录 → 原操作实时检查 → TS 整页投影及既有封套
坏条目或撤销 保留 unavailable 条目与健康 sibling;封套报不可读及遗漏
以后重看旧副本 保留 observed_at,既有 serve owner 更新 served_at 并重算过期
其他请求者、非法地址或参数 原拒绝或自己的空页;不获得别人的工作或执行权

requester_page 的完整性只覆盖所请求的页。目录本已完整扫描,新增计数只披露游标之后的可用条目;它不多读 lookahead 操作,也没有全 Goal 快照、缓存或自动恢复执行。

具体改动

精确 head:63d0d79ab8886d51602858396ac877ced191af09。规范 spec_ref=docs/architecture/rfcs/typescript-control-plane-migration-v0.md,spec_revision=83faa5bd9f7667ae104943feacdc1536a3d57f74;依据是改动前的 Accepted RFC 和既有 projection envelope 契约,候选 checkpoint 不反过来定义验收。

原规范条款 本头判断
T3 implemented:整页消费、原 item 规则原位复用,旧 item handler 和 Python 页级决定退役
§2.6 implemented:同一次 TS page reduction 调用已有 sealProjectionEnvelope;真实来源时间、不可读和本页覆盖可读回
§5 implemented:原 owner、删除、桥接、两次 inventory 请求及仍存 IO facade 的退出条件明确
§6 not_met:正确性有真实读回;当前 SQLite CLI 尾延迟不合格,最终正常包与合并资格待更新;不扩大为 provider 晋升或整个 T3

关键代码讲解

  1. read_delegation_inventory 仍检查注册请求者、扫描合法地址并实际读原操作。它只传目录计数和读取时间;操作来源取最早读取边界,最后组装时间不能刷新早先来源。目录不可读继续拒绝,单条不可用不会吞掉健康 sibling。
  2. delegationInventoryPage 校验排序、游标、观察数量及计数与 lookahead 一致性,再复用原 item 语义和已有封套 owner。一个 unavailable 计数同时驱动页完整性与遗漏声明,没有第二套新鲜度算法。
  3. delegationInventoryItem 保留 accepted 必须有当前产物的约束,只输出 ref/hash;坏观察降为 unavailable,未删 canonical 验收或 artifact 复核。CLI、MCP 与 Goal Chat 透传同一页;MCP 说明补上了先读封套、披露告警的责任。

当前提案为 15 路径:产品六文件 +84/−20,测试及类型配置六文件 +238/−5,文档三文件 +39/−0。没有新增模块、依赖、配置或持久化账本。后续修复在 Delegations.operations 复用已有 effect_runtime_request_scope:只固定一页的代码版本,原操作仍实时读取,下一页重新解析;独立反例先证明原实现在一页解析 6 次,修复后为 1 次,损坏记录仍即时可见。这个调用次数变化不是实际性能资格。

对主干的风险

[P2,阻塞] 当前 SQLite 完整 CLI 尾延迟仍不合格,暂不合并。 固定同一七操作合成 journal、原始 CLI、完整 JSON/退出码断言及每 provider 32 个交替配对,当前头的结果:

实际入口 baseline p95 candidate p95 差值 原要求
File 306.332 ms 313.093 ms +6.761 ms / +2.21% 通过
SQLite 294.116 ms 420.847 ms +126.731 ms / +43.09% 未通过

5% 与未解释 25 ms 的要求保留。原 7bc2849 配对失败(File +32.078 ms/+13.63%,SQLite +21.476 ms/+10.32%)也保留;新请求作用域没有被当成尾延迟已修复。采样和实际 RPC 分段诊断定位了代码版本解析成本,但尚不能证明剩余尾延迟的原因。不能通过挑选较好样本、缓存 authority/source 数据、改变时钟或缩小原工作量来关闭此项。

当前源代码完成 164 次原 CLI 观察(包含上述配对及九类分页/拒绝/坏条目场景),原完整字段、错误和退出码保持;新增封套单独验证。29 个分页/请求作用域用例、4 个普通 wire 负例、2 个私有快照完整性用例及已提交的双语 RFC 检查通过。普通 2 MiB 与私有 64 MiB 边界保留,未通过全局放宽传输来消除失败。

证据分层:早先 7bc2849 的 72 次 base/source/正常 wheel/sdist CLI 对照、65 个调用方用例、真实 MCP 重连、37 个 native 用例和 6 direct + 15 selected premerge 均保留为旧头证据。当前追加的代码版本作用域尚未重新做最终正常分发包及完整 premerge,不能把旧结果改签为新头。当前 exact-scope CQR 已实际记录 tail blocker。

封套缺口的历史反例仍成立:整合后的原提案在 File/SQLite 真 CLI 成功返回后,均因缺少封套失败;修复后的同一断言通过。仍保留 directory 拒绝、损坏/撤销 sibling、accepted 产物变化、CLI/MCP/Goal Chat 接收方与只读边界。requester_page 是页范围,不是整个 Goal 完成或接受结果的授权。

语义与 CI 对齐

原字段、typed item/query 及封套规则复用现有 owner;没有用字符串黑名单或新 Python 决策源替代它们。私有 IO facts 只传真实时间和计数,MCP 的封套披露是消费责任,不变成执行或额度义务。源码 advisory/full semantic 的旧头结果保留,现有 59 处未证明 producer 不被空 advisory 认证。新增请求作用域复用既有代码版本合同,未新增状态词汇。未添加执行开关,原未配置、暂停和非法请求者规则保持。

依当前 no-CI 策略,没有查询、等待或触发 hosted CI。Windows、PostgreSQL、真实模型、生产安装采用与持续 fleet 性能未测。当前读投影不改 PostgreSQL writer/事务。

我的整体评价

原作者的整页 TS 收敛方向合理,缺少封套的旧阻塞已修复,当前 API 的页范围、来源时间和不可读结果可真实读回。有限后续重构也复用了原有代码版本作用域,删除重复解析而保留实时数据检查。long_horizon=preserved、user_experience=preserved 只指已验证的原操作接续、分页及零新增必要交互,不是模型效果或完整 Agent 迁移的证明。

本轮结论仍是 REQUEST_CHANGES:修复 SQLite 原 CLI 尾延迟并更新最终正常包、premerge、CQR 与 exact-head 评审/merge readiness 后,再重新判断合并。正确性、类型检查、历史包验证和更少 RPC 均不能替代这项成本门槛。本评审包含维护者补丁的自审,不冒称另一名独立 reviewer。

English verdict: REQUEST_CHANGES - 63d0d79. The missing projection envelope is repaired and exercised source callers preserve original operation semantics. The bounded executable request scope retains live record reads, but the current SQLite full-CLI p95 still fails the unchanged 5%/25 ms targets. Historical package/premerge evidence is retained at its actual revision; final package and merge qualification remain held. No CI was queried or awaited.

@mergify

mergify Bot commented Oct 17, 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, @hhyykk.

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 Oct 17, 2026
…yykk-6591-repair

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

# Conflicts:
#	docs/reference/contracts/projection-envelope-contract.md
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 17, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; reasoning_effort=max; declaration_source=runtime_reported

动机

本轮复核完整当前版本 71254af951eacad8afc041d32138ff5dbe52a458,基线为 84dfa63c26a6b03a3c5e6039108f1540e8b2b1bb。委派请求者在上下文丢失后,需要从现有清单找回原来的操作,继续检查原结果;清单不能让一份旧页或部分页看起来像当前整个 Goal 已完成。原作者把分页规则收敛到现有 TS owner,这个目标合理;维护者修复补齐了迁移后读模型要求的来源时间与覆盖封套。

这次按维护者明确的默认 SQLite 性能资格判断默认交付。原 2 ms、5% 和未解释 25 ms 门槛保留;File 功能、安全和恢复仍验收,File 性能失败继续披露。仓库规范同步提案为 #6763,目前不冒称已合并。

执行生命周期、接收方采用及用户 Agent 的完整迁移仍由各自 owner 验收。

改动思路

既有 CLI delegation operations、MCP list_delegations 和 Goal Chat operations/read_team 仍先经原请求者注册与查询检查,读取同一 durable journal,并实时调用 Delegations.read 检查 canonical 验收和产物。Python 保留这些真实 IO,把当前地址、观察及读取时间交给 delegationInventoryPage;TS 在进程内复用原 item 规则与 sealProjectionEnvelope,统一决定游标、不可读条目和本页完整性。

这是同一领域的有界替换:逐项投影 RPC 退役,每页只保留查询与整页投影两次跨界;provider/校验调用仍在,空页从一次变为两次的代价已披露。每页复用既有代码版本请求作用域,固定的只是可执行代码,记录与下一页都重新读取。无新增缓存、服务、配置、执行授权或 Python 决策源。执行生命周期、接收方采用及用户 Agent 的完整迁移仍由各自 owner 验收。

具体改动

依据为变更前接受的 TS migration RFC,当前候选的 checkpoint 只描述实现,不能自行证明验收。

原规范条目 本版本判断 证据与边界
T3 implemented TS 完整页消费;Python 页级游标/完整性决定与逐项 dispatcher 删除
§2.6 implemented 真实来源时间、requester_page、不可读遗漏;原 CLI/实际 MCP/Chat 均收到封套
§5 implemented 15 路径 +361/−25;产品六路径 +84/−20,测试/类型配置 +238/−5,文档 +39;保留 IO facade 的退出条件明确
§6 implemented(默认 SQLite 范围) 正常 source/wheel/sdist、File/SQLite 功能及负例、原完整 CLI 成本与当前 native 成本;File 性能未获资格

关键代码讲解

  1. read_delegation_inventory 保留原目录扫描和实时原操作读取,坏条目变为不可读观察,目录拒绝仍报错。时间在真实读取处采集;扫描所得可用数量只是 IO 事实,没有第二套新鲜度或生命周期规则。
  2. delegationInventoryPage 校验顺序、游标、lookahead 和观察数量,复用 delegationInventoryItem。lookahead 不读取其操作,坏观察不能隐藏健康 sibling;原结果仍按相同顺序返回。它在同一次 native 调用中复用封套 owner,完整性只认证请求的页,不能代替 Goal 验收。
  3. Delegations.operations 复用 effect_runtime_request_scope,一页只解析一次代码版本;当前反例证明两次分页分别解析,破坏原记录立即产生 unavailable。快照白名单只增加整页方法,普通 2 MiB 和私有 64 MiB 边界未变。
  4. 当前 main 的冲突已解决,contract 同时保留 delegation_inventory、goal_task_map 和 delivery_review 消费者说明。测试补齐真实 CLI、MCP、Chat 的封套透传、旧观察重放、不可读源与大完整页。

对主干的风险

当前完整 CLI 使用原固定七操作合成夹具、每 provider 32 个交替配对,未挑选新样本或改写先前结果:

Provider baseline p95 当前 p95 差值 本次资格
SQLite(默认) 170.611875 ms 170.179750 ms −0.432125 ms / −0.253280% 通过原门槛
File 165.575209 ms 179.150625 ms +13.575416 ms / +8.198942% 原相对门槛失败;默认交付的非阻塞风险

File 的失败没有改成通过,也没有宣称已解释或修复其尾延迟。 旧 7bc2849 与 63d0d79 的失败保留原头与原条件;当前结果只认证上述当前基线和候选。维护者明确选择 SQLite 作为默认性能资格,因此旧的双 provider 性能阻塞不再适用于本次默认交付;未来显式宣称 File 性能仍须单独合格。

当前执行证据:67 个 Python 调用方/清单/作用域用例、37 个 native 委派/封套用例、另跑 2 个真实 stdio MCP 断开重连用例,以及 5 个普通 wire 负例、2 个 native 私有快照完整性用例均通过。正常 Chat 构建、wheel/sdist 打包与隔离非 editable 安装完成,六个产品文件在候选、archive、安装中逐字节一致。72 次 base/source/wheel/sdist 实际 CLI 对照与原成本运行中的 164 次 source 观察保留全部旧 JSON、错误和退出码;只对新增封套单独断言,Task/registry 未变且列表零 Host 启动。

当前 SQLite 实际 CLI 输入另做 native 验证:16 次冷 runtime 启动,128 次 warm 私有快照整页 p50/p95 为 0.653333/1.385041 ms,256 页 burst 保持结果和 PID,RSS 87.94→90.86 MiB。冷 ping p50/p95 为 132.95/149.75 ms;这是 runtime 启动观察,不是完整页或 CLI。warm 测量不含 provider IO 和代码发现,它们仍由上面的完整 CLI 对照承担,不能互相替代。

语义与 CI 对齐

当前 whole TS compile、Ruff、双语检查、先 advisory 后 full semantic smoke 及公开边界检查通过;精确范围 CQR 为 pass,保留 File 风险。当前风险 premerge 的六项 direct 与 15 项 selected 检查全部通过,零源码失败、零 policy failure、无 manual hold;合并前仍须读回 unchanged-head readiness。最初缺少前端依赖的 build 已经由正常 npm ci 恢复,早先缺少当前 CQR 的整体 gate 也保留为原失败,不与后续结果混写。

使用既有 Observation 与 envelope 词汇,只扩展现有本地传输方法集合;没有 substring 分类、场景特定控制面义务或默认执行切换。原“列表不启动工作、完整结果读原操作、仅需恢复时 resume”义务保持;MCP 增加的是已有来源与页范围披露义务。配置关闭、未注册请求者、暂停 Chat 及无操作路径保留原行为。依当前 no-CI 策略,未查询或等待 hosted CI。未运行 Windows、真实模型、生产采用、持续 fleet 或 PostgreSQL writer 验收;本次不改 PostgreSQL store/事务。

我的整体评价

结论 APPROVE,范围为当前整页读模型与默认 SQLite 资格。long_horizon=preserved 与 user_experience=preserved 的依据是原工作发现、原操作重连、当前产物复核、拒绝边界与零新增必要交互保持,不是模型效果或完整用户 Agent 迁移已经证明。删掉重复页级决策、复用同一个 typed owner 与代码版本作用域,使后续改动可以局部验证和撤销;受控诊断不足以支持进一步优化,因而没有添加猜测性的缓存或加载框架。

此评审包含维护者补丁的自审,不冒称另一名独立 reviewer。已获该 refactor 批次的推动授权仍不替代 GitHub 审批和 native readiness;发布本次 APPROVE 后,应核对并只撤下已证实过期的旧阻塞,再以未变 head 判断合并。File 性能观察和更大迁移任务继续保留,不把这一页的合格当作 C1/T3 全部完成。

English verdict: APPROVE - 71254af. Current real CLI, normal wheel/sdist, File/SQLite correctness, MCP/Chat and transport negatives preserve original operation semantics with the required additive page envelope. Default SQLite passes the unchanged full-CLI and warm native targets. File's original relative-performance failure remains disclosed and unqualified under the maintainer's explicit default-profile decision; historical failures are preserved. Exact-head readiness and GitHub approval remain separate. No CI was queried or awaited.

@loopx-agent
loopx-agent merged commit 2af53ab into loopx-project:main Oct 17, 2026
31 of 59 checks passed
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.

2 participants