Skip to content

Pin the semantic definition budget to measured use - #9721

Open
cocolord wants to merge 1 commit into
loopx-project:mainfrom
cocolord:codex/semantic-inventory-ratchet-20261201
Open

cocolord wants to merge 1 commit into
loopx-project:mainfrom
cocolord:codex/semantic-inventory-ratchet-20261201

Conversation

@cocolord

@cocolord cocolord commented Dec 1, 2026

Copy link
Copy Markdown
Member

Goal And Delivered Outcome

  • The full Python suite fails test_inventory_report_discloses_budget_slack when the repository reopens headroom for conflicting definitions. Mainline and the local Start a checked local task directly from a goal #9053 integration tree each count 50 against the recorded ceiling of 52. Python Tests run · #9567
  • Pin the registry and executable anchor to 50. The complete inventory establishes the ceiling and the existing tests continue to detect both overflow and reopened headroom.

Author Declaration

  • Written by the Codex agent (OpenAI GPT-6).
  • This restores the inventory pin required by test_inventory_report_discloses_budget_slack at d19a0d7e0d and follows the paired registry and anchor update in 445ac862ed.

Validation

Tested 1ce938b880008495100c2e1678a013b163f8a6a4 on the complete tracked inventory.

Check Result Evidence
Regression parity Passed The original test failed at 50/52 and passed with 50/50 on this revision.
Semantic checks Passed 198 existing architecture cases on Python 3.14 and the full semantic vocabulary smoke.
Integration Passed The local #9053 integration tree counts the same 50 definitions and passes the pinned-budget case.
Standard premerge Passed Five direct and three selected checks with one existing maintainability advisory.

UI impact is none. The registry and anchor are the two changed lines in the signed-off commit.

@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.2-sol · OpenAI · runtime_reported · xhigh

动机 / Motivation

维护者合并定义清理后,希望持续阻止冲突定义回涨,也要让完整语义检查恢复通过。远端基线的 2,049 个登记源码观测到 50 条冲突定义,预算仍是 52。现有 smoke 能打印两项余量,专门的 pin 测试因此失败。候选把现存计数锁在 50,登记值和可执行锚点一起更新,固定此前回收的余量。变更只落在全量语义检查及其预算数据。扫描、已登记状态词汇、运行时行为与历史受审例外继续沿既有定义。核验覆盖当前远端基线、候选和按当前基线源码计算的合并效果。

改动思路 / Approach

已跟踪清单进入原 Python/TypeScript inventory scanner。check_inventory 将观察值交给同一个 budget owner,先核对锚点,再判超限,最后输出实测数和余量。两处配置改动沿这条路径合并。 仅在登记处改动会被原双点锚定拒绝。同步收紧两个值即可沿原检查器验证,无需新增字典或 vocabulary owner。 预算只供本地和发布前的现有检查消费。配对锚点是检查权限,其来源仍是完整跟踪源码与注册表。 变更只落在全量语义检查及其预算数据。扫描、已登记状态词汇、运行时行为与历史受审例外继续沿既有定义。

具体改动 / Changes

审阅提交 1ce938b,diff 基线 086afee,2 个文件,+2/-2。锁定冲突定义按源码实测 50 收紧原预算。防止单边或回涨继续由现有 guard 执行。合并基线本身已推进,实读当前目标 2,049 个输入并与候选逐项对照。Git 合并树无冲突。收紧的两个文件分别是检查器的预期值和 registry 的上限,其它度量按原值执行。源码列表由 Git index 确定。逐项比对包括定义模块与字符串值,可以区分计数一致和实际项目一致。 语义检查规范 · 现有余量断言 · 锚点及溢出判断 · 登记预算

对主干的风险 / Risks

基线推进后合并结果可能使用不同源码计数。本次验证使用目标基线扫描输入和候选阈值,实际两处变更均在扫描输入之外。

基线、候选和干净合并树的有效扫描输入得到同一组 16 个冲突名和 50 条定义,完整冲突条目逐项相同。候选和合并口径的阈值均为 50。 向现有冲突名加入一条合成定义,实际 scanner 计到 51。旧预算允许并显示余量,新预算拒绝。只把 registry 改回 52 也会被现有 anchor 一致性检查拒绝。 124 项语义架构测试、标准预合并 5 项直接及 3 项选中检查通过阻断门。独立复现基线原 pin 断言失败。保留一项涉及原 status.py 和可维护性基线的提示。

我的整体评价 / Verdict

APPROVE。 无阻塞发现。实际冲突组和定义保持一致,原本允许的第 51 条被拒绝。组织现有词汇保持原样。 调整的是语义检查阈值。 完整检查指 Git 已跟踪的 2,049 份 loopx 源文件及该扫描器支持的定义形状。没有做与该预算无关的整仓运行测试。

English verdict: APPROVE at 1ce938b. The full tracked inventory reconciles at 50 definitions on the candidate and proposed merge inputs. The existing guard rejects both a real 51st counted definition and an unpaired budget edit.

This branch has not been deployed

No deployments
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