You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dead code sweep (Python): legacy phase-based hook engine, tests-only helpers, unused --no-config-propose flag #39
tests/core/config/test_models_refactored.py, test_reader_refactored.py, tests/core/processing/test_column_extractor_refactored.py sit next to their originals — merge or delete the leftovers.
Note: the 14 gui-only telemetry helpers (app_closed, filter_changed, …) are intentionally not in this list — they die with the gui/ phase-2 removal.
New evidence strengthening the "delete now" call for the legacy phase-based hook engine — it is not merely uncalled, it is broken against every documented config, and the docs still teach it:
Silently no-ops on real configs.run_hooks_for_file looks up config.launch_hooks by bare file suffix (src/profiles/core/environment/execution.py:257-259, ext_key = file_path.suffix.lower()), but the reader keys launch_hooks by glob pattern (src/profiles/core/config/reader.py:211-232; README documents "*.mttl": keys). ".mttl" in {"*.mttl"} is always False, so the function returns HookOutcome.CONTINUE without running anything. Production's step-based path matches properly via select_most_specific_pattern (src/profiles/core/actions.py:190-194).
Would crash if the lookup matched. The pipeline then filters on hook.when (execution.py:266-267), an attribute that exists only on the legacy HookSpec; the reader builds WorkflowStep objects, which have no .when → AttributeError.
Tests mask both failures.tests/core/environment/test_execution.py injects HookSpec(when=...) configs (line 98 etc.) — a shape production never produces — so the suite stays green.
Still exported and documented.run_hooks_for_file ships on the public surface (profiles.core.__init__) and docs/advanced/advanced-guide.en.md:256-262 teaches it in the "Launch hooks" import block for alternative front-ends. Anyone following that guide gets silently-skipped hooks.
Suggestion: when executing this issue, also rewrite that guide section to the step-based workflow API — the section can't be fixed by keeping run_hooks_for_file, since the whole engine is what gets removed.
Activity
falbany commentedon Oct 31, 2026
New evidence strengthening the "delete now" call for the legacy phase-based hook engine — it is not merely uncalled, it is broken against every documented config, and the docs still teach it:
run_hooks_for_filelooks upconfig.launch_hooksby bare file suffix (src/profiles/core/environment/execution.py:257-259,ext_key = file_path.suffix.lower()), but the reader keyslaunch_hooksby glob pattern (src/profiles/core/config/reader.py:211-232; README documents"*.mttl":keys).".mttl" in {"*.mttl"}is always False, so the function returnsHookOutcome.CONTINUEwithout running anything. Production's step-based path matches properly viaselect_most_specific_pattern(src/profiles/core/actions.py:190-194).hook.when(execution.py:266-267), an attribute that exists only on the legacyHookSpec; the reader buildsWorkflowStepobjects, which have no.when→AttributeError.tests/core/environment/test_execution.pyinjectsHookSpec(when=...)configs (line 98 etc.) — a shape production never produces — so the suite stays green.run_hooks_for_fileships on the public surface (profiles.core.__init__) anddocs/advanced/advanced-guide.en.md:256-262teaches it in the "Launch hooks" import block for alternative front-ends. Anyone following that guide gets silently-skipped hooks.Suggestion: when executing this issue, also rewrite that guide section to the step-based workflow API — the section can't be fixed by keeping
run_hooks_for_file, since the whole engine is what gets removed.Found during automated audit 2026-11-01