Skip to content

chore(census): follow the moved history registry reads - #5321

Merged
huangruiteng merged 1 commit into
loopx-project:mainfrom
songoow:codex/census-follow-history-reads
Sep 30, 2026
Merged

huangruiteng merged 1 commit into
loopx-project:mainfrom
songoow:codex/census-follow-history-reads

Conversation

@songoow

@songoow songoow commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Why

main fails tests/architecture/test_project_registry_io_census.py and tests/architecture/test_goal_instance_binding_inventory.py again. 7123bbeac ("fix(run-index): keep the terminating LF out of the rewritten rows") edited loopx/history.py and moved four registry reads without regenerating the manifest. Since #5286, a moved site must be regenerated, so every open PR inherits this failure.

What changed

Regenerated loopx/semantics/project_registry_io_manifest_v1.json with scripts/generate_project_registry_io_manifest.py. Only the line of four loopx/history.py sites changes; site ids and classifications are unchanged, and there are 0 unclassified sites.

Checks

Check Result
pytest tests/architecture/test_project_registry_io_census.py tests/architecture/test_goal_instance_binding_inventory.py 10 passed (fails on main)

Separate break on main, not fixed here

examples/semantic-vocabulary-drift-smoke.py also fails on main: "44 independently maintained py/ts twins; budget is 43". The new pair is loopx/control_plane/content_digest.py and content_digest.ts from #5252 and #5254. The ratchet belongs to the semantic vocabulary convergence RFC; resolving it means generating one side from the other or an explicit budget decision, so it is left to that change's owner.

Rollback

Revert the commit; only the manifest changes.

🤖 Generated with Claude Code

7123bbe edited loopx/history.py without regenerating the project registry
I/O manifest, so the census tests fail on main: four history sites moved.
Regenerated with scripts/generate_project_registry_io_manifest.py; site ids
and classifications are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
songoow added a commit to songoow/loopx that referenced this pull request Sep 29, 2026
Regenerated with scripts/generate_project_registry_io_manifest.py after the
history.py sites moved on main (see loopx-project#5321). Site ids and classifications are
unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>

@huangruiteng huangruiteng 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.

Exact-head review: de0dd3e919eb95e862e17d29f5681daf7e071927; baseline: 9c29941559cff92f675c37cc80c4cf87a23f8448.

未发现阻塞性问题。评审结论为 APPROVE;下述主干既有语义预算失败与合并门禁另行区分。

动机

主干的 history 修复把四个 registry 读取位置各下移一行,却没有同步已有的 I/O census。独立执行确认,主干的两项架构测试因此失败。这个 PR 修复的是生成清单与真实源码不一致,不是取消位置检查;它能消除后续 PR 反复遇到的同一验证噪声,完整完成这一维护切片。

改动思路

继续使用已有源码扫描器和生成器,不增加手写规则或第二份状态来源。读取源码、生成实际站点、保留已有分类,再由验证器比较 tracked manifest;修正四个位置后,整份生成结果与提交文件逐字节一致。相比放宽验证器或删除站点,重新生成更小,也保留了发现下一次漂移的能力。

具体改动

完整差异仅一个生成文件,四增四删:collect_history、inspect_index_duplicates、rebuild_index_artifact_collisions、repair_index_duplicates 的 line 分别更新为 342、598、812、702。站点身份、列号、codec 分类、扫描根目录和排除范围均未改变;共有 258 个站点。去掉位置坐标后的站点/分类指纹与 baseline 相同,没有借维护清单扩大白名单或覆盖范围。

关键代码讲解

  • build_project_registry_io_manifest(project_registry_io.py:453)从 Python/TypeScript 源码获取真实读取站点,沿用既有分类。这个 PR 不改扫描算法,只把其结果写回原 manifest。
  • validate_project_registry_io_manifest(同文件第 485 行)按完整站点身份比较位置和分类,并继续拒绝缺失、重复、未知和未分类的直接 I/O。架构测试及语义 smoke 都调用它,没有新建绕过路径。
  • 生成器 main(scripts/generate_project_registry_io_manifest.py:30)提供原有 --check 路径;本次实际执行成功。故意把 collect_history 的行号改错,仍由该公开入口明确拒绝,证明修复没有削弱门禁。

对主干的风险

主要风险是清单位置看似正确、实际漏掉站点或改变分类。因此既检查完整生成结果,也运行两个架构测试文件:baseline 为 8 passed / 2 failed,head 为 10 passed。生成器验证通过;位置变异负例被拒绝;完整 diff 的空白检查和 changed-path 公私边界扫描通过。不存在运行时状态、权限、quota、安装指令或默认启用变化。

语义与 CI 对齐

本次没有查询远端 CI。原生 premerge 选择的 2 项检查全部执行,其中公共边界通过,语义 smoke 仍失败于 44 independently maintained py/ts twins; budget is 43。主干全量 smoke 先被旧 census 挡住;因此另外在同一不可变 baseline 和 head 上执行同一个、未修改扫描根和预算的 twin 检查,得到完全相同的 44/43 失败。该失败的源码、预算及相关模块均不在本 PR 差异内;受影响的 census 已有独立通过证据。这是主干既有失败,不要求本 PR 调高预算或修无关代码,也不把 premerge 报告说成全绿。合并仍须单独处理当前分支更新及仓库门禁。

我的整体评价

这是必要且比例合适的清单修复:持续验证能力改善,贡献者无需重复诊断位置噪声,产品用户入口保持原样。未来维护检查已考虑现有生成器与类型化分类边界,没有值得随本 PR 增加的新抽象或重构。语义上复用既有词汇和验证合同,不新增 authority 或 actor 生命周期。剩余风险是合并后源码再次移动,需要照常重新生成;无关 twin 预算问题由其既有 owner 处理。此评审只覆盖上述精确 head,不替代合并授权。

English verdict: APPROVE - At de0dd3e, the census matches the unchanged generator and restores the affected architecture checks. The independently reproduced baseline twin-budget failure is unrelated; merge readiness remains a separate gate.

@huangruiteng
huangruiteng merged commit 6e03640 into loopx-project:main Sep 30, 2026
27 of 31 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.

2 participants