Skip to content

fix(cli): classify anti-entropy on its command help surface - #8129

Merged
loopx-agent merged 1 commit into
mainfrom
niu/anti-entropy-manpage-20261105
Nov 5, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
niu/anti-entropy-manpage-20261105

Conversation

@NIU-123370

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis / optional anchor: the nightly Full Public Smokes cli-help-manpage-smoke.py failure after feat(capability): introduce opt-in anti-entropy code governance #7545 introduced the anti-entropy command.
  • Goal/source and gap: every top-level parser command must be either in COMMAND_GROUPS or explicitly kept on its command-specific help surface. anti-entropy was added by feat(capability): introduce opt-in anti-entropy code governance #7545 but was in neither, so the smoke reported unclassified: ['anti-entropy']. This change classifies it on its command help surface, consistent with the other capability commands such as material-lifecycle and decision-context.
  • Observable before → after, with the validation row that proves it: assert_top_level_commands_are_explicitly_classified() raises on base; after this change it passes. The full smoke then proceeds to its npm-backed installer checks.
  • Issue/task and intended base: no issue; self-contained maintenance repair. Intended base is loopx-project/loopx:main.

Author Declaration

  • Written by: model_agent — Qoder AI assistant, at the contributor's direction; no human review has occurred.

Implemented against

  • Specification and revision: examples/cli-help-manpage-smoke.py at 1b636dee16, classification assertion at line 102; loopx/help_surface.py owner comment at lines 365-367.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Every parser command is in COMMAND_GROUPS or MANPAGE_COMMAND_HELP_ONLY implemented loopx/help_surface.py:368 assert_top_level_commands_are_explicitly_classified()
anti-entropy keeps a command-specific help surface without entering the core manual implemented MANPAGE_COMMAND_HELP_ONLY same targeted assertion
The existing set stays disjoint from manual commands implemented examples/cli-help-manpage-smoke.py:101 same targeted assertion
  • Self-check before submission: traced the command to feat(capability): introduce opt-in anti-entropy code governance #7545, confirmed the omission is the only classification delta, added the single set entry, compiled the module, and ran the targeted assertion. Deliberately did not add a manual section: capability commands follow the command-help surface.

Scope And Continuation

  • Completed scope and remaining work: complete within this scope; no command behavior or help text changes.
  • Slice boundary / successor: N/A — the classification is the whole exit.

Validation

  • Tested revision: 6c7145803733dd94e7daf118c77d468b7febd499
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
unit passed python3 -m py_compile loopx/help_surface.py; assert_top_level_commands_are_explicitly_classified() → classification assertion ok.
regression_parity passed The same targeted assertion raises unclassified: ['anti-entropy'] on base 1b636dee16 and passes on this head.
integration not_run The full smoke was attempted locally; it passes classification and then stops in assert_installer_manpage_surface() at npm ci because this host cannot validate the registry certificate (UNABLE_TO_GET_ISSUER_CERT_LOCALLY). Hosted CI has working npm; that step is not affected by this diff.
static passed git diff --check.
  • Coverage and gaps: the changed mapping is exercised by the targeted classification assertion. The remaining smoke stages are installer/manpage rendering checks and were not reachable on this host because of the local npm TLS boundary; no code path in this diff touches them.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • First viewport and preview: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A
  • Craft review: N/A

Type of Change

  • Bug fix

LoopX Area

  • Public docs or presentation surface (README, protocols, dashboard)

Technical Direction

  • Direction / acceptance reference, when applicable: N/A

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal (required for promotion, runtime-routing, or compatibility-projection changes): N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • Existing English/Chinese RFC pairs both have a diff, and the local premerge check passes, or no paired RFC changed (no RFC changed here).
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

Signed-off-by: NIU-123370 <191000457+NIU-123370@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: actor_kind=model_agent; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max.

动机 / Motivation

维护 CLI 命令目录的人运行可见性检查时,会因已注册的 anti-entropy 没有明确归类而失败。

之前 anti-entropy 已能显示自己的帮助,却不在两种目录分类的任何一边;现在只把它补入既有 help-only 集合,目录检查通过,用户原来的帮助入口和正文保持一致。

可见性测试由基线 1 failed/1 passed 变为当前 2 passed;六种真实 CLI 输出与完整 manpage 逐字相同,唯一集合差异为新增 anti-entropy。

本 PR 只补目录维护元数据,不启用 anti-entropy,不新增命令、帮助正文、安装行为或执行权限。

改动思路 / Approach

命令注册、帮助渲染和执行权限各有既有归属;这一行只应留在现有可见性元数据中,由原检查消费。 当前 PR 的完整边界是一项 help-only 归类,不新增核心手册段落、状态或能力开关。

删除检查会丢掉已有的目录维护约束;给核心手册加一整段,又会扩大用户表面。这里命令本来就存在,也有独立帮助,复用现有 help-only 归类足够。搜索全部调用方后,分类集合只被两个既有仓库检查读取,渲染仍从 COMMAND_GROUPS 生成,执行继续由原 capability 负责。因此这是一项 coverage/维护边界修复,不是新能力、默认启用或新操作入口。

具体改动 / Changes

完整 6c7145803733dd94e7daf118c77d468b7febd499 仅一文件 +1/-0。没有独立 accepted RFC/契约文档或 linked issue 专门规定这一项归类;验收来自不可变基线 1b636dee161f5ec0039b2c0121ef7ff7060dcb72 的既有 owner 注释、完整/互斥测试约束和已注册 parser,而不是作者新造的要求。

关键代码讲解

  1. MANPAGE_COMMAND_HELP_ONLY 添加现有名称 anti-entropy;它不是权限或启用集合,仍由可见性检查消费。
  2. manpage_top_level_commands 未改,继续从核心 COMMAND_GROUPS 推导手册目录;render_manpage 的完整输出也逐字不变。
  3. register_anti_entropy_commands 原本已注册命令、verify/inspect 及各自帮助。新归类没有新增 parser、参数、提示正文或能力执行逻辑。

已比较后提交的 #8132,其 stable patch-id 相同但作者不同;那是重复提案,不构成本 PR 的额外交付收益,也没有另作第三项正式评审。

对主干的风险 / Risks

没有发现阻塞问题。最强风险是借归类隐藏错误命令,或顺带改变帮助/执行默认。原检查仍同时要求完整与互斥,基线实际为 1 failed/1 passed,报告唯一未分类项 anti-entropy;当前 head 为 2 passed。六种真实 CLI(无参数、--help、commands、anti-entropy 及 inspect/verify 的帮助)共 16,469 字节 stdout,加 11,414 字节完整 manpage,全部原样相等;parser 和核心手册集合也相等,未归一化输出。

完整 head manpage smoke 仍为 failed,失败在临时目录退出时的 Err66 清理。随后对固定 target main 和该 head 运行同一原安装阶段,两者均复现同一完整错误栈;仅规范化临时 fixture 路径,源码 fixture、检查器和环境摘要一致。分类常量没有安装、渲染或清理调用方,六种 CLI 输出和完整 manpage 又独立逐字相等,因此该清理失败归为无关既有问题;不宣称完整安装 smoke 通过或原作者的 npm TLS 原因已解决。

配置 mypy 在双方通过(17 source files),变更文件 Ruff 通过;quick premerge 的六个直接检查及三个选中检查完成,语义、CLI 输出预算、编译和双语检查通过。单文件公开边界扫描 exit 0、errors/warnings 0/0。原始 maintainability ratchet 仍失败:固定 target main 与 head 的完整 JSON 仅去除 repository_root 后相同,唯一未审查项仍为未改动的 _admitted_interaction_next_cli_actions(62 decision points,阈值 60)。保留 failed 和原阈值,不以此要求本 PR 修改无关函数。 CQR 对原始 ratchet 和独立安装阶段只采用当前 exact-scope 的可复核 optional 归因,失败仍写为 failed。未查询或等待 CI。

语义与 CI 对齐

diff advisory 明确报出既有 Python closed set 新增一个名字。判断是留在原 local metadata owner:它不是共享状态协议、用户 prose 分类或运行时资格门;不能从“帮助可见”推出“能力已启用”。仓库检查的强制性保持不变,没有把硬约束称为建议。

我的整体评价 / Verdict

goal_achieved 只针对遗漏分类的维护修复。long_horizon 和 user_experience 均为 preserved:原续跑和能力行为不变,现有帮助无需新配置、信息重填或确认,用户路径没有增加轮次。本次只补测试与治理读取的分类集合,实际 CLI 帮助和 manpage 全文逐字相同,未改变 frontend/Lark 或页面布局。 完整安装 smoke 的临时目录清理失败仍保留;不宣称原生 Windows 或实际能力执行已验证。

命令注册、帮助渲染和执行权限各有既有归属;这一行只应留在现有可见性元数据中,由原检查消费。 当前 PR 的完整边界是一项 help-only 归类,不新增核心手册段落、状态或能力开关。 这一行是当前最小改动,不需要为单一 metadata 项再提取 helper 或增加核心手册内容。记忆中的产品旅程建议在这里适用于核对真实 help 入口,不能扩成要求实现新功能。现有 exact-scope CQR 有效;批准不等于完整安装 smoke 通过,也不授予合并、修复无关清理路径或推广能力的权限。

English verdict: APPROVE — the existing command gains its missing help-only classification, while all inspected public help and manual bytes remain unchanged. The full installer/manual smoke remains failed at an independently reproduced, unchanged cleanup stage; no runtime activation or merge authority is granted.

@loopx-agent
loopx-agent merged commit ea1f292 into main Nov 5, 2026
26 of 37 checks passed
@loopx-agent
loopx-agent deleted the niu/anti-entropy-manpage-20261105 branch November 5, 2026 17:11
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