From 10c3edbf1d39f9dc24abd28cb31d2ea48058a917 Mon Sep 17 00:00:00 2001 From: "lusendong.6789" Date: Sun, 15 Nov 2026 22:30:24 +0800 Subject: [PATCH 1/2] Package the manager discovery projection Signed-off-by: lusendong.6789 Co-authored-by: TRAE CLI --- pyproject.toml | 2 +- tests/presentation/test_distribution_build.py | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b128a7989d..fdc6cddab9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ include = ["loopx*"] "*" = ["README.md", "README.zh-CN.md", "docs/*.md", "docs/protocols/*.md"] "loopx.capabilities.content_ops" = ["templates/*.json", "experiences/*.json"] "loopx.capabilities.pr_review_queue" = ["experiences/*/*/*.json", "experiences/*.md"] -"loopx.capabilities.manager_context" = ["skills/loopx-manager/SKILL.md"] +"loopx.capabilities.manager_context" = ["*.ts", "skills/loopx-manager/SKILL.md"] "loopx.extensions.lark" = ["extension.toml", "README.md", "docs/*.md"] "loopx.extensions.openviking_periodic_report" = ["extension.toml"] "loopx.extensions.openviking_semantic_preference" = ["extension.toml"] diff --git a/tests/presentation/test_distribution_build.py b/tests/presentation/test_distribution_build.py index acd0405c40..eb233f8957 100644 --- a/tests/presentation/test_distribution_build.py +++ b/tests/presentation/test_distribution_build.py @@ -13,6 +13,7 @@ import shutil import subprocess import sys +import tomllib import zipfile import pytest @@ -120,6 +121,30 @@ def wheel(source, output, *, keep_temp=False, skip_build=False): } +def test_manager_discovery_projection_ships_with_its_skill(checkout, tmp_path): + """The installed lazy handler must have its original typed dependency.""" + package = "loopx.capabilities.manager_context" + data = tomllib.loads((ROOT / "pyproject.toml").read_text())["tool"]["setuptools"]["package-data"] + with (checkout / "pyproject.toml").open("a") as configuration: + configuration.write(f'"{package}"={json.dumps(data[package])}\n') + for name in ("loopx/capabilities", "loopx/capabilities/manager_context"): + directory = checkout / name + directory.mkdir(parents=True, exist_ok=True) + (directory / "__init__.py").write_text("", encoding="utf-8") + resources = ( + "loopx/capabilities/manager_context/discovery_projection.ts", + "loopx/capabilities/manager_context/skills/loopx-manager/SKILL.md", + ) + for name in resources: + target = checkout / name + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / name, target) + packaged = wheel(checkout, tmp_path / "manager-wheel") + for name in resources: + assert name in packaged, f"installed manager discovery dependency missing: {name}" + assert packaged[name] == (ROOT / name).read_bytes() + + @pytest.mark.parametrize("keep_temp", [False, True]) def test_reused_build_removes_deleted_sources_and_keeps_current_resources( checkout, tmp_path, keep_temp From 53a624a5b1892031fb291ed17239168346bdd4ad Mon Sep 17 00:00:00 2001 From: "lusendong.6789" Date: Sun, 15 Nov 2026 22:50:07 +0800 Subject: [PATCH 2/2] Record selected manager discovery distribution qualification Signed-off-by: lusendong.6789 Co-authored-by: TRAE CLI --- .../rfcs/monorepo-distribution-split-v0.md | 22 +++++++++++++++++++ .../monorepo-distribution-split-v0.zh-CN.md | 17 ++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/docs/architecture/rfcs/monorepo-distribution-split-v0.md b/docs/architecture/rfcs/monorepo-distribution-split-v0.md index 953ae4c5e2..52e272a236 100644 --- a/docs/architecture/rfcs/monorepo-distribution-split-v0.md +++ b/docs/architecture/rfcs/monorepo-distribution-split-v0.md @@ -4562,6 +4562,28 @@ view shows its independently checked result in the same conversation. cost, natural process drain, complete D2/D5 closure, R1/M3, full C1 acceptance and its default cutover remain unqualified. +### 2026-11-15 — Ship the selected manager discovery projection + +- **Gap:** an ordinary wheel omitted the existing + `manager_context/discovery_projection.ts` resource. Authorized Agent discovery + across multiple sources reached `manager.discovery.project` and failed when + its lazy handler imported that missing file. Source checkouts and Core already + contained the original typed projection. +- **Delta:** ordinary distribution package data includes the package's existing + TypeScript resource alongside its skill. The original projection, callers, + authorization and lazy dispatch keep their ownership; no parallel decision + owner or new activation setting is introduced. +- **Validation:** the real setuptools build regression fails with the original + package data and passes with the resource included. Installed ordinary and C1 + #8266 at `1c578cfe85c23db40605843a0afc1d9d37caad39` plus this patch are qualified + separately against their source, wheel and RECORD. Selected projection checks + cover bounded source-qualified results, unavailable-source readback and invalid + bounds; unselected dispatch retains lazy loading. +- **Boundary:** this repairs a selected distribution resource. It does not + establish complete D2/D5 closure, actual-model/context adoption, total-cost + improvement, full R1/M3 acceptance or C1 default cutover. Earlier failures, + budgets and checkpoints retain their original scopes. + ### 2026-11-15 — Skip automatic usage observers for existing opt-outs - **Gap:** Python observation hints recognized fewer environment opt-outs than diff --git a/docs/architecture/rfcs/monorepo-distribution-split-v0.zh-CN.md b/docs/architecture/rfcs/monorepo-distribution-split-v0.zh-CN.md index c9ee8b7dec..42514445b3 100644 --- a/docs/architecture/rfcs/monorepo-distribution-split-v0.zh-CN.md +++ b/docs/architecture/rfcs/monorepo-distribution-split-v0.zh-CN.md @@ -3531,6 +3531,23 @@ workspace 批准和脚本模型工作。桌面视图在采用检查后显示原 全 Settings 旅程、真实模型采纳、总成本、自然进程 drain、完整 D2/D5 闭包、 R1/M3、完整 C1 验收及其默认切换仍未资格化。 +### 2026-11-15 — 打包所选 manager discovery 的既有 projection + +- **缺口:**普通 wheel 遗漏了既有的 `manager_context/discovery_projection.ts` + 资源。已授权的多来源 Agent discovery 到达 `manager.discovery.project` 后, + lazy handler 导入缺失文件而失败;源码 checkout 和 Core 已包含原 typed projection。 +- **增量:**普通发行包的 package data 将该包既有 TypeScript 资源与 skill 一起打包。 + 原 projection、caller、授权和 lazy dispatch 继续由原 owner 持有,不增加并行 + decision owner 或 activation setting。 +- **验证:**原 package data 下的真实 setuptools 构建回归失败,包含资源后通过。 + installed ordinary,以及 C1 #8266 + `1c578cfe85c23db40605843a0afc1d9d37caad39` 加入本补丁的实际组合,分别按自身 + source、wheel 和 RECORD 资格化。所选 projection 检查覆盖有界且标明来源的结果、 + 来源不可用的回读和非法 bounds;未选中的 dispatch 保留 lazy loading。 +- **边界:**本次修复所选发行包资源,不完成完整 D2/D5 闭包、真实模型/上下文 + 采用、完整成本改善、完整 R1/M3 验收或 C1 默认切换。历史失败、预算和 checkpoints + 保留各自原范围。 + ### 2026-11-15 — 既有 opt-out 提前跳过自动 usage 观察 - **缺口:**Python observation hints 识别的环境 opt-out 少于原 TypeScript usage