Skip to content

fix(codex): preserve heartbeat cadence across aliased homes - #7230

Merged
huangruiteng merged 5 commits into
mainfrom
codex/codex-home-alias-20261024
Oct 26, 2026
Merged

huangruiteng merged 5 commits into
mainfrom
codex/codex-home-alias-20261024

Conversation

@BigDataDZ

@BigDataDZ BigDataDZ commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem and result

An aliased Codex home made the installed-heartbeat reader count one automation twice and omit its cadence. Preserve global discovery's logical profile names and ordering, and deduplicate only the installed-automation reader by the followed directory's device/inode identity. Both ordinary discovery and explicit homes inputs retain one physical read. Two actual automations remain ambiguous; pausing the duplicate restores the cadence.

An unavailable discovered home is isolated to that source. Healthy lanes retain their cadence, unmatched lanes remain unknown, and a recovered directory is read on the next scan.

Author Declaration

Written by: model_agent (OpenAI Codex), under the author's direction. Basis: demonstrated alias cadence defect and the published saved-profile, case-alias and source-isolation counterexamples. Intended base: main; latest integrated main parent: 2b72d30. Tested head: 822f4fb.

Owner: existing read-only Codex filesystem provider in loopx/codex_app_thread_activity.py. Existing typed cadence and profile rules remain authoritative. No new capability, configuration, protocol vocabulary, scheduler or second decision owner. Python placement follows the existing OS filesystem adapter. The bounded refactor confines physical identity to its actual consumer.

Validation

Run state: finished. Inputs: synthetic disposable files, native Windows / CPython 3.12.10.

  • Five owner/profile/history/conversation modules: 154 passed. Includes configured/sibling/explicit junction aliases, logical profile selection through real configuration/controller persistence, distinct-automation ambiguity and paused recovery. Only final native adapter launch is stubbed.
  • The two new counterexamples both fail with the prior identity implementation and pass with this repair. Real case-insensitive directory identity and manifest IO are used. The case-alias test explicitly models POSIX case-sensitive resolved-name comparison on Windows; this is not native macOS execution.
  • A real directory discovered before scanning becomes a self-referential native junction. Healthy public delivery-window projection remains fresh and the unrelated lane unknown. Removing the loop and adding an automation restores the new lane on the next read without a restart.
  • Ruff, diff hygiene, diff-scoped semantic advisory and staged/committed bilingual RFC checks pass. No supported new vocabulary carrier was detected; advisory coverage remains limited. Public boundary inspected: no logs/private state included.
  • Full semantic drift smoke passes after installing the missing locked repository TypeScript dev dependencies in this checkout. The initial missing-dependency failure is retained as setup evidence.
  • Prior integrated expanded suite: 167 passed / 32 skipped / 1 rotation failure, also reproduced against its immutable main activity source; transport remains owned by fix(codex): keep Windows rollout reads from blocking native rotation #7222. This historical failure is not rewritten as a current broad pass.

Scope and continuation

Three PR-owned files. Global profile names are retained. Frontend: existing profile editor/new-conversation backend and actual delivery-window projection are covered; packaged profile UI, installed/live adapter, native macOS, UNC/network filesystems and sustained operation remain unqualified. Lark/CLI interfaces and rendering are unchanged. No live Goal, model, benchmark, OS upgrade or self-merge.

Current-head CI and maintainer re-review remain separate gates; previous-head review is not transferred. This repairs both remaining P2 findings within the existing reader rather than adding a parallel source or configuration.

Signed-off-by: BigDataDZ <76271875+BigDataDZ@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 | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Exact head: 347133c28ab138f3f6658e9507fbad60f778b9d3

动机

使用本机心跳且已保存普通 Codex 聊天配置的用户。 同一 Codex 目录通过别名被扫描两次,单个心跳因此被误判为冲突,周期显示未知。 同一个目录有默认名和别名时,心跳应只读一次,但原先可选、已保存的 profile 仍须能打开同一原生配置。 心跳的五分钟周期确已恢复;但三种别名入口均使一个原来有效的 profile 消失,新建会话在原生适配器启动前报 profile unavailable。 本轮不安装修复、不迁移用户配置、不启动模型,也不把正常心跳投影当作聊天或 Windows 全面验收。

改动思路

物理目录身份去重属于文件读取的正确性规则;已保存 profile 的别名则是独立的用户选择,不能因另一读者去重而消失。当前全局 codex_homes 同时承担两种含义,现有 profile owner 只按保留路径的名字查找,放置边界需要修正。 保留单物理目录一次心跳观察,同时保留所有已支持 profile 名称的发现和解析;无需迁移、删除用户默认值或新建配置协议。

No change leaves cadence ambiguous. Keep physical identity dedup in scan consumers, or make profile discovery/resolution retain alias identities independently. Do not require users to clear/reenter valid settings to accommodate an internal scan. 现有意图已足够,不增加用户确认轮次、配置复制或手动账本。物理来源的读取与用户选择分别归原 owner;本次没有把发现、安装或可用性当成激活、执行、验收或升级授权。这个分支用文字即可说明,未引入未核实图示。

具体改动

规格来源 docs/integrations/session-runtime-control-plane-adapter.md,不可变版本 58e646f7115b167df60442f8766a37ba50fa1a71。ordinary-native-profile-selection 要求已有 native profile 通过原机器配置事务保存并可选择,本头 not_met;existing-session-identity-retained 的既有运行中/精确恢复隔离路径未被修改,相关原 home 用例通过,但不外推全平台或真实模型。

关键代码讲解

  • codex_homes:候选顺序保留,但第82行按 resolve 后的物理身份丢弃其他名字。它是共享发现函数,调用者还包括 profile 设置、普通会话与本机绑定发现;“同一物理目录”不能替代所有这些名字的语义。
  • codex_delivery_expectations:现有 TOML 读者按 Goal、Agent、thread 和 App surface 匹配,重复自动化仍给未知。三种别名入口的单心跳确从未知变为5分钟,第二真实自动化仍未知,暂停后恢复5分钟。
  • codex_profile_home:未改动的 profile owner 按 home.name 匹配已保存名字。默认目录被前面的别名吃掉时,codex 零匹配;默认名先出现时则 codex-alias 零匹配。共享设置表单同样少一个选项,open_session 在真正启动前抛出错误。

完整审查两路径 +57/-1,包括全部生产分支、未修改共享消费者和新增真实后端测试;没有只看最后补丁或继承作者结论。

对主干的风险

[P1] 保留已保存 native profile 的别名解析。 三组实际目录软链接、TOML、SQLite 和机器配置 preview/apply/readback 场景均复现:configured 和 explicit 选 codex、sibling 选 codex-alias,基线可解析并新建原目录会话,本头均报 The selected Codex profile is unavailable or ambiguous,原生启动调用为零。配置和源目录没有丢失,错误来自去重后名称消失。独立正常行为回归是 base 3 passed、head 3 failed;新建会话的适配器在启动处用 stub 截断,失败发生在 stub 之前,不声称启动模型或 live App 已验证。

最小修复是在需要物理去重的观察边界去重,或让 profile 发现/解析独立保留所有受支持别名。不要以要求用户清空或重填原本有效的设置来掩盖回归。新增配置名和跨层迁移都不是必需;保留原单次周期、真实重复未知及已有会话隔离回归。

原四模块本头 137 passed, 5 failed;同输入接回不可变基线 owner 为 134 passed, 8 failed。其中三项新 cadence 回归由红变绿,另五项均在未改动 chat_runtime.py:873 因原 SimpleNamespace fixture 缺 read_only_review 失败,测试身份、位置及异常一致,因果路径与本次 alias 过滤不同,保留为既有检查缺口。它们不是本次 P1 的依据,也没有被声明修好。本地 quick premerge 6直接+2选中检查通过,不能覆盖这些完整调用者反例。作者报告的 Windows 旋转缺口属于另一个 #7222 transport,#7227 URI 修复也不保留 profile 名字;未继承它们的验收。

语义与 CI 对齐

没有新枚举或通用义务,但共享发现结果的名字本身是已有 profile 契约。当前重用 physical Path 身份违反该消费者要求,需要在原 owner 修复并重跑实际保存配置/新会话路径。wait_for_ci=false,本轮没有查询或等待远程 CI。

我的整体评价

存在上述 P1 阻塞,REQUEST_CHANGES。长程影响和用户体验均为 regression:周期读取可用,但已有配置阻止下一次普通会话。架构判断 simplify_now:修复观察去重和逻辑别名选择的边界,无需新框架或用户迁移。 物理目录身份去重属于文件读取的正确性规则;已保存 profile 的别名则是独立的用户选择,不能因另一读者去重而消失。当前全局 codex_homes 同时承担两种含义,现有 profile owner 只按保留路径的名字查找,放置边界需要修正。 保留单物理目录一次心跳观察,同时保留所有已支持 profile 名称的发现和解析;无需迁移、删除用户默认值或新建配置协议。

检查了共享设置 editor 的实际选项和聊天调用链;没有组件、布局、字体或视觉素材改动,视觉构图检查不适用。选项丢失是已复现的功能回归,另列阻塞,不以无布局改动免除。 未独立执行原生Windows junction/旋转、实际已安装App或真实模型;新建会话验证在原生适配器启动处用stub截断,真实配置事务、路径解析与失败前调用完整执行。 已通过、失败及未测试范围分别保留;全树健康、长期效果、实际主机升级与其他 PR 的合入不由本次结论认证。合并仍归维护者,本轮没有合并或安装。

English verdict: REQUEST_CHANGES. Physical-home deduplication fixes cadence but removes valid saved profile aliases from the shared discovery result; all three normal alias forms reproduce failed ordinary conversation opening. Preserve alias-aware profile selection and keep physical deduplication at the appropriate reader boundary.

Comment thread loopx/codex_app_thread_activity.py Outdated
@mergify

mergify Bot commented Oct 24, 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, @BigDataDZ.

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 24, 2026
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
@BigDataDZ

Copy link
Copy Markdown
Contributor Author

Addressed the P1 profile-alias regression in 78b266ec8471f179be5b382bc0d0cec90067e89c.

The previous global physical-home deduplication removed logical profile names used by saved configuration and ordinary conversation startup. Global discovery now preserves baseline logical names/order; physical deduplication is owned solely by the installed-automation reader, including explicit homes= inputs. No configuration reset or migration is required.

Three real Windows junction journeys cover configuration preview/apply/readback, editor options and ordinary open_session: parent discovery 3 passed, original PR discovery 3 failed, repaired discovery 3 passed. Only final native adapter launch is stubbed. Existing native config bytes and saved configuration remain unchanged. Genuine duplicate automations still yield unknown cadence; pausing one restores the interval.

Four owner/consumer suites: 129 passed, 25 skipped. Independent author-side review found no blocker and ran the two changed suites: 88 passed; a fresh primary-agent rerun also passed all 88. Ruff, whitespace, advisory semantic scan and bilingual RFC checks pass. The existing fake adapter now explicitly supplies read_only_review=False; production guards are unchanged.

Known limits remain explicit: companion settings tests have six periodic-report timezone failures identical with parent discovery (missing timezone data); full-suite collection stops at Windows-unavailable fcntl. No full-tree, packaged UI or live Codex execution pass is claimed.

The PR body now reflects the corrected ownership and current evidence. Ready for maintainer re-review on this head; no approval or self-merge claimed.

@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 | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

动机

使用已保存 Codex profile 的用户,以及查看自动化是否按周期交付的工作区使用者。

同一 Codex 目录通过别名出现时,旧扫描把一条自动化算成两条,周期显示未知;本次希望只读取一次物理目录,同时保留用户已保存的 profile 名称。

已验证符号链接场景恢复五分钟周期,三种 profile 入口均能创建并读回会话;大小写别名仍显示未知,扫描中失效的别名还会中断整个投影。

范围是本地只读发现与周期投影,不改变自动化调度、账号、凭据、配额、原生会话归属或模型执行。

剩余缺口:大小写别名与扫描期间的目录失效仍需作者在当前读取器内修复;这不是要求完成整个原生运行时路线图。

改动思路

本次复审覆盖完整 head 78b266ec8471f179be5b382bc0d0cec90067e89c,从原始基线 58e646f7115b167df60442f8766a37ba50fa1a71 比较,而非只复验上一个 P1。全局 codex_homes 恢复逻辑名称,保存的 profile 继续由原有机器配置、编辑器与会话控制器解释;物理目录去重移到 _installed_automation_intervals。周期只是读取原生 TOML 后的状态投影,不应成为调度或权限的第二个决策者。真正两条自动化仍应显示未知,暂停冲突项后才恢复原周期。

把物理目录去重留在周期读取器、保留全局逻辑名称,职责划分正确且成本很小;需要修正的是文件系统身份和单目录异常边界。本 PR 只交付现有原生目录读取器的兼容性修复,不引入调度策略、持久化状态或新配置。 这项同域简化已经落实,不需要增加配置、持久化日志或通用抽象。下面用文字说明调用链,未使用需要额外渲染验证的图。

具体改动

三文件净变更 +162/-2:生产代码增加读取器局部去重,测试增加三种普通 profile 入口、显式 homes、真实冲突与暂停恢复;测试原生 stub 补齐现有 read_only_review 字段。没有安装脚本、权限或模型策略变化。

依据先读的 docs/integrations/session-runtime-control-plane-adapter.md,固定规范版本 58e646f7115b167df60442f8766a37ba50fa1a71:ordinary-native-profile-selection 已实现;配置、同级目录和显式 homes 三条完整路径均能创建、持久化并读回正确的 profile/home。existing-session-identity-retained 在本次触及范围内保持:原生配置、机器配置与已归档 SQLite 线程没有被重写;现有会话归属路径不变。

关键代码讲解

  • codex_homes:61:保留已存在目录的不同名称和优先顺序。它同时服务配置编辑器、profile 解析和普通新会话,不能因为共享物理目录就删除一个名称。
  • _installed_automation_intervals:312:读取 ACTIVE heartbeat 清单,再按 Goal、agent 和绑定线程归组。新增 home.resolve() 集合能合并符号链接,但不是所有文件系统上的物理身份,且解析异常位于已有文件读取保护之外。
  • codex_delivery_expectations:368:非 App 请求直接返回;App 请求复用上述读取器。结果交给原有 attach_host_delivery_windows,其 provider 调用先于所有行赋值,因此目录解析异常会波及同一响应中的健康行。

对主干的风险

[P2] 用文件系统身份识别同一目录。 在实际大小写不敏感文件系统上设置 CODEX_HOME=.CODEX,默认路径为 .codex。两者 samefile() 为真且设备号、inode 相同,但 resolve() 后 Path 仍不相等。普通发现与显式 homes 均把唯一清单读两次,五分钟周期仍变成未知。原始基线也有此问题,这是原任务尚未修复的分支,并非声称新引入回归。最小修复是在当前读取器内使用真实目录身份;不要再次全局删除 profile 名称。

[P2] 把目录解析失败限制在单个来源。 使用真实发现得到有效目录列表后,在读取间隙将一个别名改成循环链接。同一合成输入下,基线的生产 attach_host_delivery_windows 返回健康行 fresh、周期5和无关行 unknown;当前 head 在第333行抛 RuntimeError,所有行的窗口都尚未赋值。事件由发现边界的调度包装器确定性触发,实际路径解析和清单读取没有伪造;未声称已执行 HTTP 服务器或发生过真实用户事故。最小修复是捕获单目录身份解析错误并继续健康来源,下一次正常读取能够恢复。

复审建议的回归用例为上述实际大小写别名和发现后失效场景,再运行 uv run --extra test python -m pytest tests/test_host_thread_activity.py tests/test_chat_codex_defaults.py -q。现有四个 owner 测试文件输出563 passed;其中 pytest 内部退出码未单独记录,所以决定性依据采用另有退出码的三臂完整源码对照。基线三种 profile 成功,前一个 PR head 三种失败,本 head 三种成功;真实第二自动化仍未知,暂停后恢复5,错误 Goal 不匹配,归档线程仍归档。

本地标准 canary premerge 六项直接检查、两项 catalog 检查和 Ruff 均退出0。没有查询、轮询或等待 GitHub CI,也没有把旧 Goal 质量失败、人工合并约束或作者 Windows 结果改写为本次通过。

语义与 CI 对齐

没有新增枚举、协议词汇或通用义务;沿用现有 home、scope 和 expectation。但新增路径解析影响了既有只读投影的来源隔离,语义结论为 violated,证据正是上述健康来源被异常中断;语义扫描通过不能替代此反例。最新主干的原生 URI/path 修复与队列内其他 Codex 改动不修复当前读取器的身份和异常边界。合并冲突状态是独立集成条件,不是本评审的问题依据。

我的整体评价

REQUEST_CHANGES。 上一个普通 profile 选择 P1 已独立验证修复;当前实现复用了正确 owner,规模适当,持久化兼容性应保留,不需要再做语言迁移或新框架。符号链接场景已取得可用增量,但尚不能把“每个物理目录只读一次”和来源失败隔离判为交付完成。长程状态观察与用户体验仍有回归风险,最低重审证据是两项新反例通过后重新验证原有 profile、冲突和暂停恢复路径。

视觉评审不适用:本次只改变 Python 发现/投影和测试,没有渲染布局变化。未验证范围:Windows/junction、已安装 App、实际模型启动及完整 HTTP 服务器;配置编辑器数据、真实文件系统、SQLite、控制器持久化和生产投影已按上述边界检查。此结论不授权合并或撤销旧评审讨论。

English verdict: REQUEST_CHANGES — 78b266e. The saved-profile regression is fixed in three source-pinned ordinary-entry comparisons. Two P2 issues remain: case-insensitive aliases still duplicate one physical store, and a discovered alias becoming unresolvable aborts the entire delivery-window projection. Local standard premerge and Ruff pass; no CI was consulted and no merge or review-dismissal authority is implied.

Comment thread loopx/codex_app_thread_activity.py Outdated
Comment thread loopx/codex_app_thread_activity.py Outdated
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
@BigDataDZ

Copy link
Copy Markdown
Contributor Author

Resolved the main-branch merge conflict at signed integration head 1ede00501b0b4b34b7da1e4e10a5b14c93ec174d, merging fetched main 59464f9741fe177381743eadaaffebbb54e5472e without rewriting prior commits. Only adjacent docstring explanations conflicted; both logical profile preservation and relative-home semantics are retained. The PR delta against that main remains the same three owned paths.

Fresh integrated validation:

  • Profile and activity suites: 91 passed, no skips, including the newly integrated relative-home cases and all alias/profile regressions.
  • Four-module expansion: 167 passed, 32 skipped, 1 failed. The sole failure is test_a_new_end_or_rotation_during_read_is_not_reported_as_open[True]. A process-local replay using the complete immutable latest-main activity module reproduces the identical failure; the existing Windows reader/ReplaceFileW repair remains fix(codex): keep Windows rollout reads from blocking native rotation #7222. No failure is hidden or weakened.
  • Ruff, staged whitespace, bilingual RFC check and semantic advisory pass. No supported new vocabulary carriers were found; the advisory has its documented static limits.

PR body is updated for this exact head. New hosted CI and maintainer re-review remain required; prior review evidence is not treated as approval of the integration head. No self-merge or live-host changes.

@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 25, 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 | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

动机

使用已保存 Codex profile 的用户,以及查看自动化是否按周期交付的工作区使用者。

同一 Codex 目录通过别名出现时,旧扫描把一条自动化算成两条,周期显示未知;本次希望只读取一次物理目录,同时保留用户已保存的 profile 名称。

已验证符号链接场景恢复五分钟周期,三种 profile 入口均能创建并读回会话;大小写别名仍显示未知,扫描中失效的别名还会中断整个投影。

范围是本地只读发现与周期投影,不改变自动化调度、账号、凭据、配额、原生会话归属或模型执行。

剩余缺口:大小写别名与扫描期间的目录失效仍需作者在当前读取器内修复;这不是要求完成整个原生运行时路线图。

改动思路

本次集成复审覆盖完整 head 1ede00501b0b4b34b7da1e4e10a5b14c93ec174d,从本次实际 merge base 59464f9741fe177381743eadaaffebbb54e5472e 比较,而非只复验上一个 P1。全局 codex_homes 恢复逻辑名称,保存的 profile 继续由原有机器配置、编辑器与会话控制器解释;物理目录去重移到 _installed_automation_intervals。周期只是读取原生 TOML 后的状态投影,不应成为调度或权限的第二个决策者。真正两条自动化仍应显示未知,暂停冲突项后才恢复原周期。

把物理目录去重留在周期读取器、保留全局逻辑名称,职责划分正确且成本很小;需要修正的是文件系统身份和单目录异常边界。本 PR 只交付现有原生目录读取器的兼容性修复,不引入调度策略、持久化状态或新配置。 这项同域简化已经落实,不需要增加配置、持久化日志或通用抽象。下面用文字说明调用链,未使用需要额外渲染验证的图。

本次相对上一评审的变化仅是合入主干与相邻发现注释整合;新增的相对目录测试来自主干。完整 base→head 仍是下述三个 PR 路径。两项既有 P2 未在该集成头修复,下面均按当前完整源码重新复现,不继承旧判定。

具体改动

三文件净变更 +162/-2:生产代码增加读取器局部去重,测试增加三种普通 profile 入口、显式 homes、真实冲突与暂停恢复;测试原生 stub 补齐现有 read_only_review 字段。没有安装脚本、权限或模型策略变化。

依据先读的 docs/integrations/session-runtime-control-plane-adapter.md,固定规范版本 59464f9741fe177381743eadaaffebbb54e5472e:ordinary-native-profile-selection 已实现;配置、同级目录和显式 homes 三条完整路径均能创建、持久化并读回正确的 profile/home。existing-session-identity-retained 在本次触及范围内保持:原生配置、机器配置与已归档 SQLite 线程没有被重写;现有会话归属路径不变。

关键代码讲解

  • codex_homes:61:保留已存在目录的不同名称和优先顺序。它同时服务配置编辑器、profile 解析和普通新会话,不能因为共享物理目录就删除一个名称。
  • _installed_automation_intervals:315:读取 ACTIVE heartbeat 清单,再按 Goal、agent 和绑定线程归组。新增 home.resolve() 集合能合并符号链接,但不是所有文件系统上的物理身份,且解析异常位于已有文件读取保护之外。
  • codex_delivery_expectations:371:非 App 请求直接返回;App 请求复用上述读取器。结果交给原有 attach_host_delivery_windows,其 provider 调用先于所有行赋值,因此目录解析异常会波及同一响应中的健康行。

对主干的风险

[P2] 用文件系统身份识别同一目录。 在实际大小写不敏感文件系统上设置 CODEX_HOME=.CODEX,默认路径为 .codex。两者 samefile() 为真且设备号、inode 相同,但 resolve() 后 Path 仍不相等。普通发现与显式 homes 均把唯一清单读两次,五分钟周期仍变成未知。原始基线也有此问题,这是原任务尚未修复的分支,并非声称新引入回归。最小修复是在当前读取器内使用真实目录身份;不要再次全局删除 profile 名称。

[P2] 把目录解析失败限制在单个来源。 使用真实发现得到有效目录列表后,在读取间隙将一个别名改成循环链接。同一合成输入下,基线的生产 attach_host_delivery_windows 返回健康行 fresh、周期5和无关行 unknown;当前 head 在第336行抛 RuntimeError,所有行的窗口都尚未赋值。事件由发现边界的调度包装器确定性触发,实际路径解析和清单读取没有伪造;未声称已执行 HTTP 服务器或发生过真实用户事故。最小修复是捕获单目录身份解析错误并继续健康来源,下一次正常读取能够恢复。

复审建议的回归用例为上述实际大小写别名和发现后失效场景,再运行 uv run --extra test python -m pytest tests/test_host_thread_activity.py tests/test_chat_codex_defaults.py -q。本轮四个 owner 测试文件为 566 passed,完整进程退出码0;另在不可变 base、当前 head 和旧347完整源码上重跑独立三臂配置/会话对照。基线三种 profile 成功,前一个 PR head 三种失败,本 head 三种成功;真实第二自动化仍未知,暂停后恢复5,错误 Goal 不匹配,归档线程仍归档。

本地标准 canary premerge 六项直接检查、两项 catalog 检查和 Ruff 均退出0。没有查询、轮询或等待 GitHub CI,也没有把旧 Goal 质量失败、人工合并约束或作者 Windows 结果改写为本次通过。

语义与 CI 对齐

没有新增枚举、协议词汇或通用义务;沿用现有 home、scope 和 expectation。但新增路径解析影响了既有只读投影的来源隔离,语义结论为 violated,证据正是上述健康来源被异常中断;语义扫描通过不能替代此反例。最新主干的原生 URI/path 修复与队列内其他 Codex 改动不修复当前读取器的身份和异常边界。合并冲突状态是独立集成条件,不是本评审的问题依据。

我的整体评价

REQUEST_CHANGES。 上一个普通 profile 选择 P1 已独立验证修复;当前实现复用了正确 owner,规模适当,持久化兼容性应保留,不需要再做语言迁移或新框架。符号链接场景已取得可用增量,但尚不能把“每个物理目录只读一次”和来源失败隔离判为交付完成。长程状态观察与用户体验仍有回归风险,最低重审证据是两项新反例通过后重新验证原有 profile、冲突和暂停恢复路径。

视觉评审不适用:本次只改变 Python 发现/投影和测试,没有渲染布局变化。未验证范围:Windows/junction、已安装 App、实际模型启动及完整 HTTP 服务器;配置编辑器数据、真实文件系统、SQLite、控制器持久化和生产投影已按上述边界检查。此结论不授权合并或撤销旧评审讨论。

English verdict: REQUEST_CHANGES — 1ede005. The saved-profile regression is fixed in three source-pinned ordinary-entry comparisons. Two P2 issues remain: case-insensitive aliases still duplicate one physical store, and a discovered alias becoming unresolvable aborts the entire delivery-window projection. Local standard premerge and Ruff pass; no CI was consulted and no merge or review-dismissal authority is implied.

Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
…ities

Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
@BigDataDZ

Copy link
Copy Markdown
Contributor Author

Addressed both remaining P2 findings at signed integration head 822f4fba8b56735b2d5f07fd40936fc40dde4bff (main parent 2b72d30fca7f452a71dffb723ebf6d1e2e878484). The installed reader now uses followed stat() device/inode identity and isolates per-directory IO failure. Global profile discovery is unchanged.

Fresh native Windows validation: five owner/profile/history/conversation modules 154 passed. Both new counterexamples fail under the old implementation and pass after repair. The case test uses real case aliases/stat/manifest IO with explicitly modeled POSIX resolved-name comparison; native macOS is untested. The real self-loop junction is introduced after discovery: actual public projection preserves healthy fresh and unmatched unknown; replacing the loop with a healthy store restores its new automation on the next scan. Existing logical-profile, junction, true-conflict and paused-recovery cases pass.

Ruff, whitespace, semantic advisory, full semantic drift smoke and bilingual checks pass. Full semantic scan first stopped on missing local TypeScript dependencies, then passed after locked checkout-only dependency installation. No new vocabulary, scheduler/config owner, Goal mutation, model or benchmark. Packaged profile interaction, live installed host and network filesystems remain unqualified. Maintainer exact-head re-review and CI remain required; no self-merge.

@BigDataDZ

Copy link
Copy Markdown
Contributor Author

Current-head CI follow-through: the static failure on 822f4fba8b56735b2d5f07fd40936fc40dde4bff is the same F401 at test_linked_goal_sources.py:23 reproduced on main; focused repair is #7351. The release build separately reaches the existing /goal-only-model/ assertion in chat-model-menu-smoke; #7346 already owns that changed model-selection surface. The stage2c aggregate fails because its prerequisite was skipped after static failure. These are observed CI failures, not a green readiness claim and not proof that every downstream test passes. Both fixes remain separate from this Codex filesystem change; current-head independent review is still requested.

@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 · gpt-6.1-sol · OpenAI · runtime_reported · max

动机

查看心跳周期且使用已保存 Codex profile 的用户。同一目录通过别名出现时,唯一自动化会被算成两条,周期变为未知;此前全局去重又删掉可选 profile,后续局部 resolve 方案仍遗漏大小写别名及来源失效。

本头在原读取器内完成修复:一次物理读取、保留逻辑名称,单个来源不可用时健康通道仍可读,目录恢复后下次扫描重新识别。已独验真实 macOS 文件系统、配置事务、普通会话和状态投影;不进行安装、模型执行、合并或历史评审撤销。真实使用发生频率与长期收益未测量。

改动思路

物理目录只读一次归现有自动化读取器;全局发现保留逻辑 profile 名称,配置事务、会话和 typed 窗口规则各归原 owner。

交付本地只读发现、普通配置/会话和周期投影的完整修复;实际已安装 App、原生 Windows 与网络文件系统不由本轮 Mac 合成场景认证。

这是同域简化:把设备号/inode 的去重留在实际消费清单的函数,异常只影响一个来源。没有引入新的配置、持久化表、协议、缓存服务或通用 helper。Python 保留既有 OS provider 职责,原 typed 窗口决策不动。已有有效配置不需清空、迁移或重填,正常操作也不增加确认轮次。

具体改动

先读改动前规格 Session Runtime Control-Plane Adapter,spec_revision 2b72d30fca7f452a71dffb723ebf6d1e2e878484。ordinary-native-profile-selection、existing-session-identity-retained 与 Projection boundary 分别要求既有别名仍可选、会话保留原目录、观察不成为执行权。当前分别由实际 preview/apply/editor/open/store、完整历史/绑定回归和真实窗口投影核验。5940/5944 的经验用于检查这一普通用户旅程,没有继承其历史结论或扩大成完整运行时迁移门槛。

  • codex_homes:61 保留逻辑名字和顺序,仅补说明。原 codex_profile_options/codex_profile_home 仍通过原配置和控制器选中、持久化及读回原目录。
  • _installed_automation_intervals:315 在本次扫描内以跟随目录的 stat() 设备号/inode 去重。身份和清单枚举的 OSError 限制在单个 home;集合随调用结束,没有长期失败缓存。
  • 原 codex_delivery_expectations 继续按 Goal、Agent、thread 和 App surface 匹配,再交给原 typed attach_host_delivery_windows。两个真实自动化仍是冲突,不会因别名修复猜成健康;暂停冲突项后恢复周期。

完整差异三文件 +279/-3,其中生产 +16/-1,两个既有测试 +263/-2。测试覆盖三种别名入口、真实文件系统大小写身份、发现后目录变成循环链接、恢复读取,以及真实机器配置/SQLite/会话回读;既有 fake adapter 补齐 read_only_review=False,未改生产保护。

对主干的风险

最强反例是再次混同名字和物理身份,或一个坏目录隐藏所有健康来源。独立探针使用三份不可变完整 activity owner:base 2b72d30fca7f452a71dffb723ebf6d1e2e878484、旧 1ede00501b0b4b34b7da1e4e10a5b14c93ec174d、本头 822f4fba8b56735b2d5f07fd40936fc40dde4bff;其余调用者相同。真实大小写别名的 samefile 为真;前两者两次读清单、周期未知,本头一次读、周期5。发现后把目录改成真实循环链接,base保留健康投影,旧1ede抛 RuntimeError,本头返回健康 fresh/无关 unknown。恢复目录后新通道周期7,毋须重启或改配置。

同一探针还验证两个真实清单始终冲突、暂停后本头恢复5,以及非 App 路径在三份源码均不访问文件系统。仅把临时路径转成相对显示;没有删除错误、身份或状态差异。三源结果留有独立命令退出码和完整源码指纹,旧失败保持失败,不改写为历史全绿。

五个完整模块 test_host_thread_activity、test_chat_codex_defaults、test_chat_codex_home、test_chat_codex_history、test_chat_agent 为 574 passed,零跳过;实际 profile 配置、editor、控制器和 store 执行,只在最后原生 adapter 启动处截断,因此不宣称模型或安装态 App 通过。三路径 Ruff、配置指定17模块 mypy、原生 standard premerge 6直接+2选中 检查通过,零失败/人工 hold;mypy 的17模块不包含本 OS adapter,不把它当该文件的类型覆盖。精确 CQR cqr_556ba6b4b30a924a3011 为 PASS,原生 verify 有效。

语义与 CI 对齐

没有新枚举、通用义务、持久化字段或 Agent 指令。此次改变的是既有来源的观察去重和异常隔离,不改变调度、权限、配额、原生账号或会话归属。判定依据为本地变更不变量证据,没有等待 CI;作者评论中的远端检查和 Windows 数字保留其来源。早期 Windows rotation 历史失败未被冒称修复,本次574项当前 Mac 回归不能替代该平台资格。

我的整体评价

对 822f4fba8b56735b2d5f07fd40936fc40dde4bff:APPROVE。原 profile P1 继续保持修复,本头两项 P2 已经由真实大小写文件系统及发现/读取间隙的反例验证解除,未发现当前范围的新阻断。long_horizon 和 user_experience 均为 improved:健康状态可继续读、原配置可继续使用,但不是对长期净收益的量化结论。

物理目录只读一次归现有自动化读取器;全局发现保留逻辑 profile 名称,配置事务、会话和 typed 窗口规则各归原 owner。 交付本地只读发现、普通配置/会话和周期投影的完整修复;实际已安装 App、原生 Windows 与网络文件系统不由本轮 Mac 合成场景认证。

已检查现有配置 editor 和投影调用者;没有渲染、布局、字体或素材变化,视觉构图评审不适用。网络文件系统、原生 Windows、真实已安装 App 与持续运行仍未独验。历史三份负面评审和 inline 讨论保留;本次批准、有效 blocker 对账、质量门和维护者合并授权分别处理,没有撤销评审或合并。

English verdict: APPROVE — 822f4fba8b56735b2d5f07fd40936fc40dde4bff fixes physical-store deduplication and per-source failure isolation while preserving logical native profile names. The immutable base/prior/head macOS comparison reproduces both old defects and verifies one read, healthy/unknown isolation and recovery; 574 current owner/consumer tests, Ruff, configured mypy and native6+2 checks pass. Exact CQR passes. Native Windows, network filesystems and installed/live-host operation remain unqualified; no merge or dismissal authority is implied.

@huangruiteng
huangruiteng merged commit 4c30ba3 into main Oct 26, 2026
21 of 27 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.

3 participants