Repository navigation
chore(examples): prune 100 zero-reference ceremonial and parity smokes - #8883
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
维护示例与 smoke 测试套件的开发者及日常执行全局测试与索引清理的维护者,在处理长期积累、已无引用且依赖源码字符串锚定的旧 smoke 脚本时会受到影响。
此前 examples/ 中积压了 100 个已无任何外部或内部引用、以源码文本正则检查内部 helper 或重复纯规则校验的 ceremonial smoke 与孤立夹具,导致维护者每次重构 CLI 模块或调整文案都需额外承担清理与误判成本;清理后,仅保留验证真实公共边界的测试与 smoke,并由全库文件及 stem 扫描证明零残留引用。
在精确 head 8686ec6d5a1375bbc8846966bd448a40bb2a3074 上,全部改动仅限于删除 examples/ 下的 100 个文件(净删 17,235 行,0 行新增),剩余代码树与文档、CI 配置均无对其文件名或 stem 的引用。
本 PR 不修改任何 loopx/、apps/ 或 packages/ 生产代码,不重构被删脚本原本对应的产品模块,也不削弱任何 tests/ 中的单元测试或现存架构守卫。
改动思路 / Approach
依据 docs/development/good-smokes.md(规则 durable_smoke_retention,基线修订 8686ec6d5a1375bbc8846966bd448a40bb2a3074)对 smoke 的定位(只保留真正跨越 CLI、序列化或权限/状态边界的轻量化不变量验证;纯函数规则归入 tests/),本 PR 识别并清理了四类长期失活或纯仪式性文件:紧耦合源码文字列举与正则匹配的 CLI 模块化 smoke(6 份)、纯内存 read-model 校验重复脚本(52 份 examples/control_plane/)、过时一次性演示/工作流脚本,以及零引用示例夹具(3 份 examples/fixtures/ 与 3 份 examples/project/)。整个清理遵循零替换侵入原则:只删静态扫描确认为零引用且原有契约已被留存单元/所有权检查覆盖的脚本,不修改任何 loopx/ 业务代码。
具体改动 / Changes
在精确 head 8686ec6d5a1375bbc8846966bd448a40bb2a3074 上,origin/main...refs/remotes/origin/pr-8883 共删除 100 个文件、合计 -17,235 行(+0 行新增),改动目录完全局限在 examples/:
- 源码文本锚定类 CLI smoke(6 份):删除如
examples/cli-project-lifecycle-command-modularization-smoke.py等通过读取loopx/cli.py与loopx/cli_commands/__init__.py文本来锁死内部 helper 命名的脚本;CLI 命令体积与模块归属边界继续由examples/cli-command-module-size-ownership-command-modularization-smoke.py及入口测试守护。 - 纯规则/重复 read-model smoke(52 份):如
examples/control_plane/active-state-metadata-readmodel-smoke.py仅校验parse_state_frontmatter与todo_role_for_heading,经核对这两项契约已分别在tests/control_plane/test_goal_objective_projection.py(L87)与tests/control_plane/test_todo_machine_region.py(L136)中由标准单元测试覆盖。 - 孤立示例与夹具(其余 42 份):清理过时端到端/文档 walkthrough 演示脚本及
examples/fixtures/、examples/project/下不再被任何流程读取的夹具。
在代码体量与兼容性方面,本 PR 仅做减法删除(-17,235 行),不涉及协议字段、持久化格式或兼容层增删,无需额外兼容开关。
对主干的风险 / Risks
对精确 head 8686ec6d5a1375bbc8846966bd448a40bb2a3074 执行了完整静态核验:全量比对剩余 git 对象树内所有非二进制文件的文本内容,确认 100 个被删文件的文件名与无扩展名 stem 均出现 0 次引用;所有删减完全局限在 examples/,对运行时状态机、权限边界及持久化结构没有任何爆炸半径,如需找回任一历史脚本也可通过单次 git revert 无损回滚。
在测试与 CI 对齐方面:本地检核替换用的 examples/cli-command-module-size-ownership-command-modularization-smoke.py 在较新主干工作树上因另一处无关增量导致 project_lifecycle_refresh_state.py 达到 1001 行(超出 1000 行预算)而报错;而核查精确 head 8686ec6d5a 上该文件仅为 986 行、未触及该阈值。远端 GitHub Checks 在 8686ec6d5a 上共 36 项检查记录且无任何失败(PASS)。残余风险仅在于若有未入库文档或私人笔记曾提及历史脚本名,需后续以 tests/ 或正式 CLI 命令为准。
我的整体评价 / Verdict
本次仅删除零引用的内部 smoke 与示例夹具,未改动任何用户可见的渲染界面或 CLI 输出。
综合评价:本 PR 在不改动任何生产代码、不丢失核心单元与边界覆盖的前提下一次性减去 17,235 行零引用历史仪式脚本与孤立夹具(code_volume: necessary、problem_context: goal_achieved),long_horizon 与 user_experience 均判定为 not_applicable(纯 examples/ 静态清理),无新增行为或权限语义变化,兼容性评估为 not_applicable。由于作者与审阅身份同源,按规定以 COMMENTED 形式发表批准结论(不构成自合并权限)。
English verdict: APPROVE (published as COMMENTED because GitHub blocks formal self-approval on author-owned PRs) - exact head 8686ec6d5a1375bbc8846966bd448a40bb2a3074 deletes 100 zero-reference ceremonial smokes and orphan fixtures (-17,235 lines, +0 lines) under examples/ with 0 remaining tree/stem references and intact unit/ownership coverage.
Summary
Audit
examples/against docs/development/good-smokes.md and prune 100 dead, zero-reference ceremonial/dated/source-pinning/wrapper-parity scripts and orphaned demo fixtures (-17,235net lines,0lines added).Every deleted file had 0 references across
.github/,scripts/,loopx/(includingloopx/canary/),apps/,packages/,docs/,skills/,tests/,benchmark/,regression/,package.json,pyproject.toml,AGENTS.md,CONTRIBUTING.md,README*, and every remaining file underexamples/(verified for both filename and stem).Deletion Criteria & Breakdown (
100files,-17,235lines)Source-text-pinning CLI modularization smokes (
6files,-1,245lines)examples/cli-benchmark-boundary-command-modularization-smoke.pyexamples/cli-bootstrap-rollout-helper-command-modularization-smoke.pyexamples/cli-history-command-modularization-smoke.pyexamples/cli-project-lifecycle-command-modularization-smoke.pyexamples/cli-registry-admin-command-modularization-smoke.pyexamples/cli-support-control-command-modularization-smoke.py.pysource strings insideloopx/cli.pyandloopx/cli_commands/__init__.pyfor internal helper splits. CLI module-size ownership and command registration/lazy-import isolation remain guarded byexamples/cli-command-module-size-ownership-command-modularization-smoke.pyandtests/test_cli_entrypoint.py.Ceremonial doc-prose, roadmap, and layout pinning smokes (
19files,-1,405lines)codex-app-control-plane-hook-cache-smoke.py,codex-subagent-orchestration-contract-smoke.py,control_plane/agent-management-{observability-mvp,projection-contract}-smoke.py,control_plane/local-state-write-correctness-rollout-gate-smoke.py,control_plane/todo-claim-lease-roadmap-smoke.py,core-control-plane-diagrams-smoke.py,cs-notes-explore-capability-map-smoke.py,dashboard-installed-quickstart-doc-smoke.py,explore-executive-projection-contract-smoke.py,host-integration-plugin-plan-smoke.py,lark-capability-layout-smoke.py,long-horizon-agent-state-protocol-smoke.py,loopx-project-skill-goal-text-precedence-smoke.py,loopx-turn-codex-cli-quickstart-smoke.py,public-adoption-loop-doc-smoke.py,self-repair-upstream-issue-escalation-smoke.py,showcase-animation-source-boundary-smoke.py,value-connectors-finance-probe-doc-smoke.py).Retired demos, superseded regressions, walkthroughs, and orphaned demo fixtures (
10files,-2,165lines)examples/control_plane/auto-research-role-successor-completion-smoke.py&examples/fixtures/{decentralized-auto-research-knn,knn-eval-dev,knn-eval-holdout}.public.json(retired auto-research demo artifacts)examples/control_plane/fresh-project-onboarding-regression-smoke.py(superseded byexamples/project/first-connect-contract-smoke.py)examples/control_plane/legacy-runtime-goal-attention-smoke.py(in-memory legacy runtime attention fixture)examples/control_plane/stale-primary-successor-model-behavior-qualification.py(credentialed live script superseded bytests/control_plane/test_actual_default_model_behavior_live.py)examples/pr-program-snapshot-walkthrough-smoke.py(covered bytests/test_pr_program_snapshot.py&tests/test_pr_program_snapshot_diff.py)examples/reward-memory-walkthrough-smoke.py(17/17 imported symbols covered bytests/capabilities/test_reward_memory*.py)examples/host-mode-plan-smoke.py(in-memory selector + doc check covered bytests/test_host_mode_planner.py&examples/project/host-mode-plan-cli-smoke.py)Pure in-memory read-model wrapper parity & internal-helper smokes covered by
tests/(65files,-12,420lines)examples/control_plane/*-readmodel-smoke.py, parity/helper checks, and redundant chat/delivery/projection/extension unit smokes (finance-value-discovery-extension-smoke.py,operator-provider-credential-smoke.py,loopx-chat-{agent,contract,endpoint-registry,store,stream-throughput}-smoke.py, etc.) that exercise no real CLI, HTTP, subprocess, or multiprocessing boundary and whose modules are tested undertests/.Retention Policy (Intentionally Preserved)
The remaining unreferenced files under
examples/were intentionally kept because they satisfy one or more of:examples/codex-cli-*,examples/cli-starter-*,examples/cli-command-module-size-ownership-*,examples/cli-help-manpage-smoke.py, andexamples/canary/catalog-planner-smoke.py.examples/computer-use-runtime-contract-fixtures/*.json(loaded bycomputer-use-runtime-contract-smoke.py),examples/control_plane/*_fixtures.py,examples/personal-workspace-browser/*,examples/managed-research-team/synthetic_fixture.py,examples/fixture_support.py,examples/operation_action_fixtures.py,examples/issue_fix_reviewer_notification_test_support.py, andexamples/local-agent-launch-plan-smoke.py(which referencesexamples/fixtures/local-agent-launch-plan.public.json).loopx-chat-server-smoke.py,loopx-chat-acp-adapter-smoke.py,loopx-chat-provider-adapters-smoke.py,loopx-chat-codex-resume-e2e.py,explore-feishu-singleflight-smoke.py,lark-{event-collector-lifecycle,event-inbox,goal-topic-connection}-smoke.py,control-plane-configure-api-smoke.py,loopx-turn-*-smoke.py,traex-turn-host-adapter-smoke.py,ready-score-smoke.py,backlog-hygiene-smoke.py,beginner-preset-picker-smoke.py,state-backup-smoke.py,static-site-presentation-smoke.py,release-wrapper-import-isolation-smoke.py,frontstage-pages-workflow-smoke.py,github-actions-runtime-smoke.py,dashboard-local-status-gitignore-smoke.py,dashboard-tracked-fixtures-smoke.py, recently maintained.mjsbrowser/desktop smokes (dashboard-*-browser-smoke.mjs,desktop-update-browser-smoke.mjs,desktop-recovery-diagnostics-test.mjs),showcase-html-pages.py, doc.example.*files, and 4 pure-helper smokes without direct unit test coverage intests/(active-state-todo-attention-helper-smoke.py,connected-attention-action-helper-smoke.py,peer-supervisor-inject-adapter-smoke.py,review-packet-handoff-context-smoke.py).Verification
rg -F -n -f <deleted filenames + stems> .):exit 1(0 hits across all 7,517 remaining files for all 303 filenames/stems).uv run --extra test python examples/canary/catalog-planner-smoke.py->catalog-canary-planner-smoke okuv run --extra test python -m pytest -q --no-cov tests/test_python_ci_workflow.py tests/test_release_smoke_archive_helpers.py tests/canary/->653 passed in 64.93suv run --extra test python examples/canary/smoke-suite-runner-smoke.py->canary-smoke-suite-runner-smoke okuv run --extra test python examples/cli-help-manpage-smoke.py->cli-help-manpage-smoke okuv run --extra test python examples/canary/quality-surface-catalog-smoke.py->quality surface catalog smoke okuv run --extra test python examples/canary/premerge-validation-gate-smoke.py->premerge-validation-gate-smoke okuv run --extra test python examples/semantic-vocabulary-drift-smoke.py->semantic-vocabulary-drift-smoke: okHOMEuv run --extra test loopx --format json check --scan-path examples->ok: true,summary.errors: 0,public_boundary_scan.ok: true(scanned_files: 523)HOMEuv run --extra test loopx canary premerge --from-git-diff --git-diff-base origin/main->passed selected=19 failures=0,merge_gate_passed: truegit diff --check-> clean (exit 0)