Skip to content

fix(runtime): keep relative authority roots bound to the registry - #7450

Merged
loopx-agent merged 1 commit into
mainfrom
codex/release220-relative-runtime-20261027
Oct 27, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/release220-relative-runtime-20261027

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

A registry can store Goals in a separate checkout. When its common_runtime_root is relative, Todo reads incorrectly resolved it from the Goal checkout while handoff writes used the registry root, splitting the same Goal across authority stores.

Reuse paths.resolve_runtime_root(..., registry_path=...) and remove the duplicate path rule. Absolute roots, explicit diagnostic overrides, global source-registry forwarding and unavailable-source refusal keep their existing behavior. New regression coverage separates the registry root from the Goal checkout for both standalone and .loopx/registry.json layouts.

Validation: 35 source-route and real File/SQLite Todo/handoff isolation tests passed; the six routing tests passed again after removing the unused private helper argument. Changed Python Ruff, diff hygiene and public-boundary scan passed. The repository risk-based premerge and exact-head review remain required before merge. PR CI is not consulted under the configured local-validation policy.

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

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

把Goal放在独立代码目录、并在注册表中使用相对runtime路径的本地用户。 同一个Goal的Todo读取落到Goal代码目录下,而handoff写入落到注册表拥有的目录;用户因此收到缺少canonical存储的错误,无法读回已有工作。 相对runtime统一由注册表根目录解析;真实File和SQLite的Todo读取、handoff更新及重放重新访问同一存储。 不迁移、复制或重建存储,不改变显式override、全局source_registry转发、权限、数据格式或新Goal默认provider。 整版发布的其余回归、真实模型、完整工作台和各渠道制品仍在验证;本PR不宣称发布完成。

改动思路 / Approach

现有paths.resolve_runtime_root已经拥有注册表相对路径规则;直接传入registry_path并删除重复的goal.repo推断,减少同一配置的第二解释。 本PR只修复注册表相对runtime的源路由,保留全局转发、显式诊断override和不可用源的拒绝。 Todo/Explore读取先解析当前注册表或global声明的source_registry,再由统一路径owner得出实际runtime。修复没有触碰provider数据或权限:它使已有存储重新可达,不通过创建空存储、迁移或者旧Markdown回退掩盖错误。最强反例是registry和Goal恰好同目录时旧测试也通过,因此本次明确把两者分开,并保留真实File/SQLite读写与重放断言。

具体改动 / Changes

规格依据是 loopx/paths.py:effective_runtime_root 的existing relative-runtime contract,不是新建规则。registry-owned-relative-root 已实现:相对common_runtime_root从registry_project_root解析;source-and-override-boundaries 已实现:global源转发、源不可用拒绝与显式诊断override沿用原分支。这两个标签对应现有条文,不伪称已有编号。

关键代码讲解

  1. _registry_runtime_root 将registry_path传给已有resolve_runtime_root,删除goal.repo推断以及不再使用的私有goal_id参数。两个源路由调用点同步移除该参数,绝对路径仍由原owner直接保留。
  2. test_relative_runtime_belongs_to_registry_even_when_goal_repo_differs 独立写入相对runtime和另一个Goal checkout,分别覆盖standalone与.loopx/registry.json布局。期望路径从测试作者给出的注册表根推导,不复制产品函数输出;既有CLI集成还验证实际canonical读写、模式更新和重复操作读回。

完整差异为两文件+16/-22,没有新增模块、状态、配置、公共CLI参数或词汇。Python只承担已有IO/路径适配,领域决策与存储事务owner没有迁移或复制。

对主干的风险 / Risks

35项source-route、override、不可用源和真实File/SQLite Todo/handoff回归通过;去掉无用私有参数后6项route测试再通过;Ruff、双语、公开边界、严格CQR及13项risk premerge通过。 原始全量测试中的File和SQLite失败保留;从该失败源到本PR基线的runtime_projection_route解析blob未变化,归因没有借用不同实现。最值得防范的是把有意使用Goal目录的相对配置重定向;但共享paths合同和handoff写入已经明确registry为owner,旧读取才是相互矛盾的实现。新例区分两种目录,其他测试覆盖显式override、有效共享decoy不可替代缺失source、已存在canonical状态与回放。没有查询、轮询或等待PR CI。

语义与 CI 对齐

复用现有route schema和路径合同,没有新增状态分类、prose heuristic、默认provider或可选能力开关;无agent义务文本删减。绝对root/显式override/缺失源分支保留,真实存储不迁移、不重建。公开扫描只含通用代码和合成fixture,没有私有Goal或操作路径。严格CQR和风险门通过,merge授权与即时readiness仍分别核对;已通过测试不授予合并权限。

我的整体评价 / Verdict

APPROVE,justified_increment。 long_horizon与user_experience均improved:工作从声明的持久authority读回,用户无需额外路径参数恢复正常读写;没有长程benchmark提升声明。现有paths.resolve_runtime_root已经拥有注册表相对路径规则;直接传入registry_path并删除重复的goal.repo推断,减少同一配置的第二解释。 本PR只修复注册表相对runtime的源路由,保留全局转发、显式诊断override和不可用源的拒绝。 无新增兼容协议或后续人工同步成本。该内部路径修复没有页面、布局或视觉呈现改动,整版packaged UI与真实模型验证仍有单独证据门。整版发布的其余回归、真实模型、完整工作台和各渠道制品仍在验证;本PR不宣称发布完成。

English verdict: APPROVE — c911b5a6a2d31bacebcaabd5bc4a035bc4e7e38e. Reuse the existing registry-aware path owner to correct a real relative-runtime read/write split. File/SQLite CLI, source/override/refusal tests, strict CQR, boundary and local premerge pass. No PR CI was consulted; complete release qualification remains pending.

@loopx-agent
loopx-agent merged commit bafbafc into main Oct 27, 2026
11 of 34 checks passed
@loopx-agent
loopx-agent deleted the codex/release220-relative-runtime-20261027 branch October 27, 2026 05:43
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.

1 participant