chore: Debt cleanup — dead code deletion, small repairs, distribution alignment - #5
Merged
Conversation
class_diagram_generator.py (1,191) / screen_utils.py (424) / collection_utils.py (251). References verified zero by grep across src/ and tests/ (only _FORCE_ORDER entries and self-references existed). _FORCE_ORDER pruned accordingly; conftest had no stub entries tied to these modules. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…4 §4) Never registered and zero call sites (grep verified; only the conftest stub comment referenced it). The companion timeout() helper goes with it. Linked deletion: the bpy.types.Operator stub entry in tests/conftest.py existed solely for this class-construction at import time — removed as its own comment instructed, shrinking the stub. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Registration was commented out and the class crashes on instantiation if ever registered (element_config.get does not exist on ElementConfig - the known defect noted in analyze/04 §4). Linked deletions: the commented register_element call and the commented alphabetic_counter enum entry in core/constants.py. counter_element.py coverage 65% -> 85%. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- core/schema/pattern.py: 136-line commented NAMING_PATTERN_SCHEMA - core/target/registry.py: commented _initialize_defaults with TEMPLOG prints (zero references) - core/namespace/conflict.py: commented blender_counter takeover experiment inside _resolve_with_counter Kept on purpose (milestone §3.5 revival candidates): the STRATEGY_FORCE dispatch comment, _resolve_with_force, and the commented _find_unused_min_counter_value with its trade-off analysis. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-verified unreachability before deleting (Phase 2.5 finding, recorded in dev-note/testing/01-phase-plan.md): its only caller synchronize_patterns always runs _synchronize_modified_patterns first, whose trailing integrity loop already purges every cached id missing from prefs, and the update loop only adds prefs-derived ids - so the set difference here is provably empty. Empirically the deletion-path test (test_pattern_removed_from_prefs_is_purged) stays green and facade coverage rises 94% -> 98%. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…inding #5) Aligns with text_element.py's lazy-import style: core.utils pulls in the whole target layer at module level, so the eager import coupled the element layer to the target layer for every consumer. With the deferral, the conftest stub no longer needs the explicit Object/PoseBone/EditBone/Node entries that documented this coupling - removed (collector.py's own legitimate demand falls through to the fabrication fallback, observable via bpy.types._fabricated). The stub shrinking is the proof the coupling is gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
preferences.py register() clobbered every module's configured level with WARNING on each enable (the self-admitted FIXME defect, milestone section 3). Newly discovered modules still register at INFO; stored levels are now respected and applied via update_logger_settings. Verified in real Blender (isolation recipe): module prefs and actual logging.Logger levels both come up INFO instead of WARNING. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
blender_manifest.toml's 1.1.0 is the source of truth: docs index and
the reference schema comment follow; bl_info blender minimum goes
(3,6,5) -> (4,2,0) to match blender_version_min. README's supported
list ("Objects, Bones only" with Nodes/Materials still "planned") is
replaced by the 19 implemented target types; getting_started's preset
examples now use file names that actually ship. Preset JSON
"version": [0,9,0] is the pattern-format version and stays untouched.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The frozen requirements.txt was the source of 24 Dependabot alerts and was simultaneously incomplete: docs/source/conf.py requires myst-parser, furo, sphinx-automodapi, sphinx-design, sphinx-copybutton, sphinx-togglebutton and atsphinx-color-text, none of which were pinned there. The new docs group is derived from the actual extensions list and verified by a clean sphinx-build (exit 0). black moves to the dev group ([tool.black] config already lives here); jsonschema and the transitive pins are dropped (zero imports in src/ and tests/). fake-bpy-module is intentionally in NO group: if uv sync installed it, 'import bpy' would succeed in unit tests and break the conftest stub discipline (00-policy principle 2). IDE handling proposed in the PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
司令塔レビュー(独立検証): 受け入れ条件すべて確認、マージします。
発注者の意向によるフォローアップ(司令塔が main に直接実施予定): class_diagram_generator を tools/ へ復元、NAMING_PATTERN_SCHEMA を dev-note の設計資料として保全。 |
Pluglug
added a commit
that referenced
this pull request
Jun 12, 2026
…inding #5) Aligns with text_element.py's lazy-import style: core.utils pulls in the whole target layer at module level, so the eager import coupled the element layer to the target layer for every consumer. With the deferral, the conftest stub no longer needs the explicit Object/PoseBone/EditBone/Node entries that documented this coupling - removed (collector.py's own legitimate demand falls through to the fabrication fallback, observable via bpy.types._fabricated). The stub shrinking is the proof the coupling is gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pluglug
added a commit
that referenced
this pull request
Jun 12, 2026
…ols/ Owner feedback on PR #5 deletions: - NAMING_PATTERN_SCHEMA: the intent ("define the data schema properly") predates the dead code. Preserved from 939c5a9 into dev-note/reference/naming-pattern-schema.md as the design artifact for the validation-consolidation task; also earmarked as the contract for AI-assisted pattern generation - class_diagram_generator: restored verbatim to tools/ (stdlib-only, no addon coupling). Its previous in-package placement was the problem, not the tool itself Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
発注書
dev-note/orders/2026-06-13-debt-cleanup.md(#2)の納品 PR です。テストは原則無変更のまま(変更は conftest スタブの連動縮小のみ)、製品コードを削って全テスト緑を維持しています。1. 結果サマリー(数値はすべてツール出力から)
10 コミット(1コミット=1クラスタ)。全コミット時点で両 Tier 緑を検証エージェントがループ実測済み — bisect 可能です。
削除内訳: utils 3 ファイル(class_diagram_generator 1,191 / screen_utils 424 / collection_utils 251)、addon.py の Timeout/TimeoutOperator/timeout、AlphabeticCounter、コメントアウト残骸(schema/pattern.py の旧 JSON スキーマ 136 行、target/registry.py の _initialize_defaults、conflict.py の BlenderCounter 実験ブロック)、facade の
_remove_deleted_patterns。2. 判断と根拠
addon_utils.enable/disableを含む)+ 隔離レシピのプローブで代替・確認_remove_deleted_patternsは削除前に到達不能性を再検証: 唯一の呼び出し元では直前の_synchronize_modified_patterns末尾ループが prefs に無いキャッシュ ID を必ず先に削除し、update ループは prefs 由来しか足さないため差集合は恒真で空。検証エージェントも独立に同じ結論。削除系テストは緑のまま、facade 94%→98%_find_unused_min_counter_value・STRATEGY_FORCE関連(milestone §3.5 の設計判断で復活候補)は残していますbpy.types._fabricatedで観測可能)update_logger_settingsは維持。実機プローブ(隔離レシピ)で prefs・実ロガーとも INFO 立ち上がりを確認docsグループへ。旧ピンは Dependabot 24 件の発生源かつ不完全(conf.py が要求する myst-parser / furo / sphinx-automodapi 等を欠き、docs ビルドが成立しない構成だった)。新グループは conf.py の extensions から導出し、sphinx-buildexit 0 で完全性を実証。black は dev グループへ移動uv run python -c "import bpy"が ImportError であることを確認済み — スタブ規律(00-policy 原則2)は無傷。IDE 用の提案: 必要な人はuv pip install fake-bpy-moduleを venv に手動投入するか、uv sync が既定で入れない opt-in グループ(例:ide)を将来追加する方式を推奨3. 発見事項(修正していません)
docs/source/development/design_notes/class_diagrams.rst:251,487(AlphabeticCounter、Sphinx ビルド対象)、docs/debug/class_diagram.mmdほか(削除した class_diagram_generator の生成物)。発注の「文章の改善・構成変更はしない」に従い残置 — 次の docs 整備の候補NumericCounterimport は残置コメント(_find_unused_min_counter_value)専用で、live コードは element_type 文字列で判定している。§3.5 の復活候補に付随するため温存import json、typing のDict)— 発注リスト外のため未削除4. 受け入れ条件チェックリスト
uv run pytest166 passed / 6 xfailed・tests/blender/run.sh39 passed)+ 実機で enable/disable エラーなし(隔離レシピのプローブ + Tier 2 の addon_utils.enable/disable 経路)-rxX出力を突き合わせて同一確認)_FORCE_ORDER/ conftest スタブの連動削除が漏れていない(削除シンボル横断 grep でヒットゼロ)dev-note/plans/2026-06-12-milestone.md§3 を実績更新(スコープ外の2項目は未チェックのまま明示)🤖 Generated with Claude Code