Skip to content

Commit fd65e71

Browse files
authored
perf(turn): reduce duplicate preflight projections and isolate imports (#5283)
Preserve complete fresh LoopX read decisions while reusing explicitly opted-in MCP preview processes. Keep existing typed effect owners and fence retirement retries behind verified cleanup. Exact-head independent review, qualification, and remaining evidence gaps are recorded on the pull request. This merge does not change the default provider. Signed-off-by: huangruiteng <huangrt01@163.com>
1 parent e55489c commit fd65e71

76 files changed

Lines changed: 4118 additions & 1181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/architecture/rfcs/loopx-overall-roadmap-v0.md‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,62 @@ bounded R2 recovery slice, not runtime provisioning or G1 completion; caller
597597
admission, fresh task derivation and frontend/Lark qualification remain open.
598598
中文:异常读回区分本次调用未知副作用与原 Turn 的持久观察/待核对效果,只完成
599599
R2 的一个恢复切片;调用方准入、新任务生成与前端/Lark 验收仍未闭环。
600+
601+
[PR #5283](https://github.com/loopx-project/loopx/pull/5283) is the proposed
602+
S2/S10 read-preview cost slice. Summary and succession validation share the
603+
existing TS owner request; empty succession skips transport. Read models are
604+
isolated from mutation adapters, and unselected report, Lark, extension and Host
605+
routes load lazily. Compatibility exports retain the original owner objects;
606+
complete provider facts, counts, ordering and acceptance remain authoritative.
607+
Only the long-lived MCP service reuses a private read-only Python CLI worker,
608+
under the existing TS Host supervisor. Each request re-enters the original
609+
CLI/Turn owner with fresh authority and validation reads. CLI and Goal Chat HTTP
610+
retain fresh subprocesses; execution, resume and mutations keep their existing
611+
leased transport. Fixed workspace/registry/runtime/Goal/Agent/Todo partitions,
612+
source/environment invalidation, 60-second requests, 128 requests, 30-second idle
613+
and five-minute lifetime limits bound the worker. A confirmed ordinary retirement
614+
can replace the worker for an unaccepted request within the original deadline;
615+
accepted-request failures and uncertain cleanup never permit replay. Source
616+
metadata remains complete and fresh; directory-entry traversal reduces caller
617+
IO without caching authority or results. Git-root reuse is confined to a single
618+
fresh observation. Projection discovery still rejects ambiguous mirrors and
619+
never selects a machine default or migrates state.
620+
621+
Qualification follows the frozen
622+
[caller-path protocol](../../reference/local-delegation.md#preview-performance-qualification--预检性能验收),
623+
with all original functional cases, exact complete-result parity, unchanged
624+
fixtures and six alternating pairs per File/SQLite provider. Historical failed
625+
experiments remain failed: at `b7cb2dc3`, File's added cold maximum exceeded the
626+
one-second allowance, although warm/sequence savings and SQLite passed. The
627+
current repair also closes reproduced idle/lifetime retirement races. Its final
628+
head needs independent qualification; fewer imports/RPCs or one fast sample are
629+
not acceptance. Current results and exact head belong in the PR's validation
630+
record. Sustained R2, real caller adoption, cold-CLI/p95 qualification and provider
631+
admission remain separate open acceptances; this PR does not retire Python
632+
planning or establish a machine default.
633+
634+
中文:
635+
[#5283](https://github.com/loopx-project/loopx/pull/5283) 是拟交付的 S2/S10
636+
只读预检成本切片:摘要与继承验证共用既有 TS owner 请求,空继承行跳过传输;
637+
读模型与写适配器分离,未选中的报告、Lark、扩展及 Host 路由延迟加载。兼容导出
638+
保持原 owner 对象身份,完整源事实、计数、排序与当前验收仍是权威。
639+
只有长驻 MCP 服务复用由既有 TS Host 监督的私有只读 Python CLI worker,每次
640+
重新进入原 CLI/Turn owner 并新读权限与 validator;CLI 与 Goal Chat HTTP 保留
641+
fresh subprocess,执行、恢复和写入沿用原租约传输。固定 workspace/registry/
642+
runtime/Goal/Agent/Todo 分区、源码/环境失效、单次 60 秒、最多 128 次、空闲 30 秒
643+
及总寿命 5 分钟形成边界。确认正常退役且请求尚未接收时,才可在原截止时间内换一次
644+
worker;已接收请求失败或清理不确定不允许重放。源码元数据仍完整新读,目录条目
645+
遍历只减少调用方 IO,不缓存权限或结果。Git 根目录只在同次新鲜观测内复用。
646+
投影发现仍拒绝歧义镜像,不选择机器默认、不迁移状态。
647+
648+
按既定[调用路径标准](../../reference/local-delegation.md#preview-performance-qualification--预检性能验收)
649+
保留全部原功能案例,核对完整结果相等、fixture 未变及每个 File/SQLite provider
650+
六组交替配对。旧失败保持失败:`b7cb2dc3` 的 File 冷读最大值新增超过 1 秒,虽热读、
651+
序列净节省及 SQLite 已通过。本次还修复了已复现的空闲/寿命退役竞争,最终头须
652+
独立验收;导入/RPC 减少或单次加速不算验收。确切头及当前结果由 PR 验证记录维护。
653+
R2 持续运行、真实调用方采用、冷 CLI/p95 与 provider 准入仍是独立开放验收;
654+
此 PR 不代表 Python 规划退役或机器默认切换。
655+
600656
The same owner-local panel now opens current validated artifact text and its
601657
version/source identifiers, accepts feedback through the original coordinator
602658
inbox and exposes coordinator pause with its actual scope. Stale reads clear prior

‎docs/architecture/rfcs/loopx-overall-roadmap-v0.zh-CN.md‎

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,64 @@ DSH 采用已验收分析并处理修订,Ark 采用已验收的修订证据。
456456
本地 Goal 对话现可按需读取该持久目录,并按绑定调用实际 Turn dry-run 与所选
457457
executor/profile 检查启动条件。任务准入、当前 pinned 验收绑定、运行时可用性分开
458458
表达;未探测的通用/云端运行时保留未知。CLI、已启用 MCP 和新 Chat 工具共用此
459-
检查,不新增状态账本,也不启动执行。同一 owner 本地面板可打开当前核验产物正文、版本及来源标识,向原协调员收件箱
459+
检查,不新增状态账本,也不启动执行。
460+
461+
[#5283](https://github.com/loopx-project/loopx/pull/5283) 是拟交付的 S2/S10
462+
只读预检成本切片:摘要与继承验证共用既有 TS owner 请求,空继承行跳过传输;
463+
读模型与写适配器分离,未选中的报告、Lark、扩展及 Host 路由延迟加载。兼容导出
464+
保持原 owner 对象身份,完整源事实、计数、排序与当前验收仍是权威。
465+
只有长驻 MCP 服务复用由既有 TS Host 监督的私有只读 Python CLI worker,每次
466+
重新进入原 CLI/Turn owner 并新读权限与 validator;CLI 与 Goal Chat HTTP 保留
467+
fresh subprocess,执行、恢复和写入沿用原租约传输。固定 workspace/registry/
468+
runtime/Goal/Agent/Todo 分区、源码/环境失效、单次 60 秒、最多 128 次、空闲 30 秒
469+
及总寿命 5 分钟形成边界。确认正常退役且请求尚未接收时,才可在原截止时间内换一次
470+
worker;已接收请求失败或清理不确定不允许重放。源码元数据仍完整新读,目录条目
471+
遍历只减少调用方 IO,不缓存权限或结果。Git 根目录只在同次新鲜观测内复用。
472+
投影发现仍拒绝歧义镜像,不选择机器默认、不迁移状态。
473+
474+
按既定[调用路径标准](../../reference/local-delegation.md#preview-performance-qualification--预检性能验收)
475+
保留全部原功能案例,核对完整结果相等、fixture 未变及每个 File/SQLite provider
476+
六组交替配对。旧失败保持失败:`b7cb2dc3` 的 File 冷读最大值新增超过 1 秒,虽热读、
477+
序列净节省及 SQLite 已通过。本次还修复了已复现的空闲/寿命退役竞争,最终头须
478+
独立验收;导入/RPC 减少或单次加速不算验收。确切头及当前结果由 PR 验证记录维护。
479+
R2 持续运行、真实调用方采用、冷 CLI/p95 与 provider 准入仍是独立开放验收;
480+
此 PR 不代表 Python 规划退役或机器默认切换。
481+
482+
English:
483+
[PR #5283](https://github.com/loopx-project/loopx/pull/5283) is the proposed
484+
S2/S10 read-preview cost slice. Summary and succession validation share the
485+
existing TS owner request; empty succession skips transport. Read models are
486+
isolated from mutation adapters, and unselected report, Lark, extension and Host
487+
routes load lazily. Compatibility exports retain the original owner objects;
488+
complete provider facts, counts, ordering and acceptance remain authoritative.
489+
Only the long-lived MCP service reuses a private read-only Python CLI worker,
490+
under the existing TS Host supervisor. Each request re-enters the original
491+
CLI/Turn owner with fresh authority and validation reads. CLI and Goal Chat HTTP
492+
retain fresh subprocesses; execution, resume and mutations keep their existing
493+
leased transport. Fixed workspace/registry/runtime/Goal/Agent/Todo partitions,
494+
source/environment invalidation, 60-second requests, 128 requests, 30-second idle
495+
and five-minute lifetime limits bound the worker. A confirmed ordinary retirement
496+
can replace the worker for an unaccepted request within the original deadline;
497+
accepted-request failures and uncertain cleanup never permit replay. Source
498+
metadata remains complete and fresh; directory-entry traversal reduces caller
499+
IO without caching authority or results. Git-root reuse is confined to a single
500+
fresh observation. Projection discovery still rejects ambiguous mirrors and
501+
never selects a machine default or migrates state.
502+
503+
Qualification follows the frozen
504+
[caller-path protocol](../../reference/local-delegation.md#preview-performance-qualification--预检性能验收),
505+
with all original functional cases, exact complete-result parity, unchanged
506+
fixtures and six alternating pairs per File/SQLite provider. Historical failed
507+
experiments remain failed: at `b7cb2dc3`, File's added cold maximum exceeded the
508+
one-second allowance, although warm/sequence savings and SQLite passed. The
509+
current repair also closes reproduced idle/lifetime retirement races. Its final
510+
head needs independent qualification; fewer imports/RPCs or one fast sample are
511+
not acceptance. Current results and exact head belong in the PR's validation
512+
record. Sustained R2, real caller adoption, cold-CLI/p95 qualification and provider
513+
admission remain separate open acceptances; this PR does not retire Python
514+
planning or establish a machine default.
515+
516+
同一 owner 本地面板可打开当前核验产物正文、版本及来源标识,向原协调员收件箱
460517
反馈,并显示协调员暂停的实际范围。读取失效时清除旧内容;投递不等于应用、验收
461518
不等于请求方采用、暂停协调员不等于停止成员。可选的类型化输入现可绑定回应、修订、
462519
使用所针对的已验收版本;请求方显式采用记录绑定使用该输入的后续已验收结果。面板

‎docs/reference/authority-archive.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ A process killed before publication may leave a private `.partial` sibling;
4343
verify any completed output before deciding whether an interrupted export needs
4444
to be repeated.
4545

46+
Publication syncs the archive file and uses the existing File authority owner's
47+
directory-sync policy: directory fsync is required on supported non-Windows
48+
paths, while Windows retains file sync without unsupported directory fsync.
49+
Other IO errors still reject; verification and no-overwrite publication remain
50+
required on every platform.
51+
52+
中文:发布仍同步归档文件,并复用既有 File authority owner 的目录同步规则:
53+
非 Windows 路径执行目录 fsync,Windows 保留文件同步,不调用不支持的目录 fsync。
54+
其他 IO 错误仍拒绝;完整校验与不覆盖既有输出的规则在所有平台保持不变。
55+
4656
## Restore an isolated copy
4757

4858
The destination is a **new directory**, not a runtime root or a provider selector.

0 commit comments

Comments
 (0)