Repository navigation
Defer material inventory during configuration discovery - #8807
Conversation
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com>
5888464 to
7d6c1ed
Compare
cocolord
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | GPT-6 | OpenAI | self_reported (runtime observation unavailable)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
设置与 CLI 的内容配置目录读取者,以及显式使用 reference inventory/search/capture 的调用者。之前只读取内容配置描述也加载材料迁移和排名模块;现在描述输出相同,材料库存模块只在显式库存检查时加载。同一新进程配置描述由 108 降至 88 个 LoopX 模块,完整描述输出相同;详细帮助仍为相同输出和 39 个模块。本 PR 只缩小配置加载,不改变安装包、执行权限、任务结算或原生模型行为。完整 D2/D5 闭包、真实模型采纳和可比完整 Task 成本仍未验证,R1/M3 与 C1 切换保持后续验收。
这是默认加载范围中的真实开销:配置目录展示内容功能的说明,并不需要迁移、排名或修订材料。保留原 eager import 会在这条读取路径继续加载整包;本次没有把模块数当作耗时或完整成本收益。当前结果是可独立回滚、可直接使用的配置改进,parent roadmap 仍未完成。
改动思路 / Approach
同一条 import 回到显式库存函数即可消除无关加载,原 TS reference 校验与 Python inventory owner 继续负责原规则。当前 PR 的完整边界是静态配置无需材料库存依赖,显式库存的输入、错误、读写与原产物契约保持一致。
配置读取仍由 configuration_catalog 调用 reference_configuration_descriptor;显式 inventory 才进入 inspect_reference_materials。import 位于函数内第一条执行语句,先于读取原材料,之后仍按原顺序执行 JSON 解析、TypeScript reference search 校验、计数和 digest、Python inventory 构造。没有新增状态、配置开关、权限判断或另一条 C1 执行管线,也没有把必需校验降为观察器。对整个 material package 改造 lazy facade 的范围更大,这一调用边界已足够解决观察到的无关加载。
具体改动 / Changes
规范依据是 docs/architecture/rfcs/monorepo-distribution-split-v0.md,spec_revision 为 35c5efbd4b9015f1f784be218d003334f51f0601,依据变更前的“Demand loading and context”及既有 milestone 定义,不以本次新 ledger 自证。
- Load — implemented:“Optional imports stay behind their owning route, including fallback paths.” inventory import 由模块顶层移到原 inspection;基线有 18 个材料模块及两个 project-skill 模块,候选均不加载,descriptor 全对象和帮助输出一致。
- **Activate — out_of_scope:**当前没有修改安装、enablement、scoped permission 或服务生命周期;既有库存和 TypeScript reference 仍执行原验证,静态 discovery 仍 noneditable/not_configured。
- **R1 — deferred:**这是配置闭包的增量;完整支持组合、原生模型/连续性、完整成本及原目标回归继续由既有 RFC qualification 路径承担。
关键代码讲解
reference_configuration_descriptor 仍返回原 feature_id、availability、effect 和文档位置;改变的是读取它时的依赖加载,不是用户可见说明。实际模块图 108→88,新增模块为零,详细帮助保持 39。
inspect_reference_materials 在显式调用时加载 canonical Python inventory builder。library 原始字节用于原 digest;缺省旧 lifecycle 继续 unknown,不被提升为 active;backup_verified、apply_available 和 store_write_performed 仍为 false。content_reference_operation 继续通过原 TypeScript owner 验证 search/capture/draft,原异常转换没有改动。
共三个文件,36 行新增、1 行删除;生产改动为移动一条 import,其余为成对 RFC checkpoint。未发现 reference.build_material_store_inventory 的已知调用/patch 契约,canonical material package 的公开导出保持原位。独立审查指出的 Python/TypeScript owner 误写已在当前两份文档和 PR 描述中修正。
对主干的风险 / Risks
未发现阻塞 finding。最有价值的反例是 descriptor 看似减少加载,却使真正的库存读取缺 provider、吞掉错误或修改原材料。当前已有 Python reference 5 项、TypeScript reference 6 项、真实 CLI 11 项,以及材料状态/位置拒绝检查通过;实际验证了原 catalog 不变、unknown 计数、0600 产物、拒绝覆盖、非法 schema/JSON/state、缺 lineage、过期 revision 和 raw 字段拒绝。还核对了完整调用顺序、公开导出及 unchanged frontend/CLI 消费路径。另在不可变基线和当前 head 执行同一组 10 个真实 CLI 案例,共 20 次调用,完整 JSON、exit/error、stdout/stderr、原材料和产物字节全部一致;公开 configure-goal 配置路径为 330→312,显式库存仍为 1165→1165。静态描述 108→88 属于另一范围。首次 collector 混淆紧凑 stdout 与缩进产物,被保留为失败;按原 JSON/schema/0600 契约独立回读确认,未重跑 CLI。
标准 premerge 在当前 head 通过 6 个直接检查和 18 个自动检查,包括双语 RFC、编译、维护预算、语义词表及 public boundary。早先预检因该新 worktree 未安装 TypeScript 检查依赖而失败,原失败保留;按明确报错安装 npm dev dependencies 后,在更新 head 重新执行完整标准检查,没有放宽预算或删除断言。远端 CI 只有快照,部分 build/browser 尚未完成,单独记录为诊断与 merge readiness,不能称为全绿。
我的整体评价 / Verdict
APPROVE。同一条 import 回到显式库存函数即可消除无关加载,原 TS reference 校验与 Python inventory owner 继续负责原规则。当前 PR 的完整边界是静态配置无需材料库存依赖,显式库存的输入、错误、读写与原产物契约保持一致。long_horizon:preserved,用户原工作、权限、校验和恢复没有变化;user_experience:preserved,输出及真实操作保持原契约,未证明延迟或长期效果收益。visual_review 不适用:本 PR 没有渲染层或描述文本变化;unverified_scope 为无新增 UI 未验证范围,真实模型与完整 Task 成本属于上面的后续验收。
这是既有 vocabulary/owner 的复用,没有新增 enum/schema/CLI,语义词表检查通过。当前 head 7d6c1eddf96dbb88921e7c8142d806f9e1647d1f 的独立审查为 0 findings;合入授权和 readiness 仍单独核对。
English verdict: APPROVE. The existing reference and inventory contracts are preserved while configuration import closure is reduced. Full-task cost, native-model qualification and C1 promotion remain open.
…000 commits (#8759) * Deliver verified images in private Lark answers Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Keep image retries behind new private Lark replies Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recover missing images from one verified private Lark reply Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Use one wall clock for private Lark image retries Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recheck the original Lark reply before historical image writes Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Verify private Lark image sources before every redirect Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * feat(coordination): add postgresql authority checkpoints and local-to-pg-seed exporter - Add authority_checkpoints table DDL and tenant-scoped RLS policies. - Store incremental delta in authority_commits and bounded checkpoints every 64 commits and on genesis cursor 1, resolving table bloat and the 20,000 commit recovery ceiling. - Implement scanCommitted bounded delta replay from covering checkpoint via AuthorityStateReplay. - Add setupPostgreSqlAuthoritySchemaAndRole for explicit schema installation and least-privilege restricted role assembly. - Add exportLocalToPgGenesisSeed with sanitization (expired leases, local absolute paths, .local/ references, Feishu IDs, private materials) and fail-closed privacy boundary scan. - Add loopx postgres setup and loopx postgres local-to-pg-seed CLI commands. - Add test suites for checkpoints, sanitization, role assembly, and CLI invocation. Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recheck the historical Lark reply before each media write Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Retry Lark image uploads after an explicit App scope rejection Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Honor original Lark stop and closure before deferred images Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recheck private answer control after Lark source read Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Read the current Core session after delayed image controls Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Fence private answer media dispatch with original controls Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Keep Lark media checks with private delivery Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recheck Lark image sources after recording upload intent Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Read both original Feishu messages together before media upload Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Verify Feishu sources at the guarded image dispatch Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Preserve pre-dispatch Feishu source and session validation Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recover and verify PostgreSQL checkpoint history with append-only privileges Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Verify backup history to its captured cursor beyond 20000 commits Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Generate explicitly synthetic secret fixtures at test time Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recover private image uploads when the Lark CLI cannot start Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * fix(chat): preserve the first Goal's registered conversation (#8798) * fix(chat): preserve the first Goal's registered conversation Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * test(chat): keep original Goal adoption compatible with Python 3.11 Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> --------- Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Avoid rereading delivered Lark settings records and empty queues Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recover private Lark images after a CLI descriptor limit Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Enable existing checks and the original authorized Task in managed Chat Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Reuse the canonical boundary projection and narrow Task JSON types Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Keep confirmed Goal creation attached to its original Task (#8805) Reuse the existing C1 source observation guard Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Assert the lease source probe returned an observation (#8796) (cherry picked from commit 2c099be) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recover an owed replan debit before the next host Turn (#8794) * Recover an owed replan debit before the next host Turn Consider the original Todo binding when an admitted replan has verified writeback. Require the exact spend receipt before another guard grants delivery, even if the Todo lifecycle has changed. Keep explicit selection on the same recovery path and let the existing settlement owner replay the original debit. Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Preserve ordinary completed-Todo successor admission Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Replay one validated Turn debit across concurrent observations Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Validate original Turn spend terms before debit and replay Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Keep conversation history rendering off the typing path (#8781) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * feat(coordination): complete remote task lifecycle and opt-in gateway access (#8747) (#8765) * feat(coordination): add complete remote task lifecycle and opt-in gateway access (#8747) Align with PR #8747 (multi-loopx-agent-cloud-collaboration-v0) and remote-authority-task-service-v0 (#8508): 1. Extend RemoteAuthorityService with full remote task settlement: - Add 'complete', 'block', 'defer', 'todo_add', and 'snapshot' operations. - Enforce hard-lease fencing and claim-request ownership checks. - Settle completion receipts and deterministic cross-machine snapshot digests. - Maintain default-deny Tenant/Goal/Actor authorization and incarnation pinning. 2. Introduce controlled remote authority gateway in Python control plane: - Default-disabled access: local private Goals never connect to remote authority or leak local credentials. - Opt-in gateway metadata projection for explicitly configured goals and the 'loopx-quality-review' canary. - Fail-closed should-run health check when remote authority is unconfigured or unreachable. 3. Conformance and unit test coverage across TypeScript and Python suites. Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * test(coordination): assert subprocess readback before decoding Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * fix(coordination): qualify explicit remote task reads and lifecycle receipts Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * fix(coordination): preserve existing successors on remote completion Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * test(remote-authority): prove ordinary admission stays local Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * test(chat): preserve create-only intent in workspace selection smoke Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Defer material inventory during configuration discovery (#8807) Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Defer report providers during Turn reads Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * test(core): require installed provenance before qualification Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Reuse the final source check for staged Turn requests (#8820) Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Defer PR wait provider loading until permission is checked (#8821) Load the optional PR reconciler only after the invocation-time observation permission check, inside the existing provider failure boundary. Preserve original permission, cadence, result and unknown-effect owners, and document the bounded default-closure and timing-window change. Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Load provider options only for the selected capability editor (#8822) Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * docs: describe README session continuity directly (#8823) * Skip automatic usage observers for supported opt-outs (#8824) * Skip automatic usage observers for supported opt-outs Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Record installed Core and C1 observer qualification Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> --------- Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * docs(blog): add EdgeBench controlled Context ON vs OFF 10-task score comparison (#8760) * docs(blog): add EdgeBench controlled Context ON vs OFF 10-task score comparison Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * docs(blog): use declarative mechanism-led opening in zh context-delivery score section Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * fix(heartbeat): preserve proven waits before their due time (#8825) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Fix manager discovery in ordinary installs (#8830) * Package the manager discovery projection Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * Record selected manager discovery distribution qualification Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> --------- Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * test(workspace): verify confirmed Goal creation against the current contract (#8816) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Fix Windows CLI output probe reader invocation (#8817) Port the probe fixture and native Windows regression coverage from e6eb92d and 8d200aa. Decode the generated PowerShell literals into argv before launching the pinned reader. Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * refactor(issue_fix): fold reviewer source trust/freshness vocabularies into one owner (#8826) reviewer_recommendation.py restated the trust and freshness sets that repository_context.py already owns. Import both as aliases of the owner objects so the decision has a single source, and add an architecture guard that pins single ownership by value, by identity, and by wiring through both public builders. REVIEWER_SOURCE_KINDS stays local (deliberately narrower). Signed-off-by: psychologister <230141834+psychologister@users.noreply.github.com> Co-authored-by: psychologister <230141834+psychologister@users.noreply.github.com> * fix(scheduler): reject superseded heartbeat receipts on the Python follow-up route (#8708) * fix(scheduler): reject superseded heartbeat receipts on the Python follow-up route The Python compatibility route for scheduler-ack-current/scheduler-fail-current checked only that the receipt for --turn-instance-id exists; a receipt already superseded by a newer heartbeat Turn still committed scheduler state, while the native TypeScript transaction rejects it as heartbeat_receipt_stale. Thread the Turn from build_scheduler_followup_payload through record_quota_scheduler_ack / record_quota_scheduler_ack_for_decision / record_quota_scheduler_failure_for_decision into _run_native_followup, which now sends turn_instance_id with require_heartbeat_receipt=true. The TypeScript transaction remains the single owner of the missing/stale/superseded fence (it also rechecks under the scheduler state lock); optional parameters keep the in-process API, which has no Turn, unchanged. Fixes #8605 Signed-off-by: Lihua <1017343802@qq.com> * Keep scheduler follow-up hint reads out of legacy migration Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: Lihua <1017343802@qq.com> Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Co-authored-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Resume the original quota settlement after lifecycle writeback (#8728) * fix(replan): resume settlement after lifecycle review writeback Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Recover committed replan settlement before rebuilding its review Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * fix(antigravity): keep the project registry in generated wakes (#8768) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * fix(chat): keep workspace checker reads portable (#8814) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Reject external Turn retries when the captured work changes (#8828) * Recheck captured work before launching an external Turn host Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Keep complete-source metadata assembly outside Turn planning Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Preserve PostgreSQL runtime access and recover seed output retries Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * Validate recovery cursor metadata without a fixed history ceiling Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Signed-off-by: psychologister <230141834+psychologister@users.noreply.github.com> Signed-off-by: Lihua <1017343802@qq.com> Co-authored-by: Lusen Dong <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> Co-authored-by: Lusen Dong <cicomaple@gmail.com> Co-authored-by: psychologister <st040325@gmail.com> Co-authored-by: psychologister <230141834+psychologister@users.noreply.github.com> Co-authored-by: Lihua <1017343802@qq.com>
读取静态内容配置描述时,会提前导入 Material Lifecycle 的库存、迁移、排名和修订模块。本次把库存 provider 的导入移到显式
inspect_reference_materials操作中,沿用原 TypeScript reference 校验、Python 库存 owner、验证顺序和私有产物边界。关联 最小内核 RFC,同步更新中英文记录。该 adapter 在 C1 #8266 中使用同一实现;没有新增 composition 或决策 owner。
Static configuration discovery now loads material inventory only when inspection is requested. Descriptors and operation contracts remain unchanged.
验证:
configure-goal --help的输出和 39 个模块保持一致。本次只减少配置加载;安装包大小、execute/replay 加载、完整 Task 成本、完整 D2/D5 和 R1/M3 验收仍需后续证据。