From the 2026-06-09 Architecture Review. Recommendation strength: Worth exploring.
Files
src/codeforerunner/distribution.py
src/codeforerunner/installer.py:19-23 (constant re-exports), installer.py:120 (hardcoded marketplace path)
src/codeforerunner/doctor.py:20-25 (constant re-exports)
Problem
The Distribution Inventory defines marketplace_destination(), yet installer.py::resolve_marketplace_target() hardcodes .codex/marketplaces/codeforerunner.json inline. Installer and doctor also re-export inventory constants (MARKER_BEGIN, CANONICAL_SKILL_REL, …), so the same distribution fact has three import paths — a typo or path change in one is not caught by the others, and tests inconsistently import from either source.
Solution
Every distribution fact flows through the Distribution Inventory's interface:
resolve_marketplace_target() calls _dist.marketplace_destination() (matching how resolve_skill_target() already uses _dist.skill_destination()).
- Delete the re-exports in installer and doctor; callers and tests import from
codeforerunner.distribution directly.
Benefits
- Locality: install paths and markers change in one module.
- Deletion test: the re-exports vanish and nothing reappears — they were pure pass-throughs.
- Tests: one import path; test files stop choosing between two sources for the same constant.
From the 2026-06-09 Architecture Review. Recommendation strength: Worth exploring.
Files
src/codeforerunner/distribution.pysrc/codeforerunner/installer.py:19-23(constant re-exports),installer.py:120(hardcoded marketplace path)src/codeforerunner/doctor.py:20-25(constant re-exports)Problem
The Distribution Inventory defines
marketplace_destination(), yetinstaller.py::resolve_marketplace_target()hardcodes.codex/marketplaces/codeforerunner.jsoninline. Installer and doctor also re-export inventory constants (MARKER_BEGIN,CANONICAL_SKILL_REL, …), so the same distribution fact has three import paths — a typo or path change in one is not caught by the others, and tests inconsistently import from either source.Solution
Every distribution fact flows through the Distribution Inventory's interface:
resolve_marketplace_target()calls_dist.marketplace_destination()(matching howresolve_skill_target()already uses_dist.skill_destination()).codeforerunner.distributiondirectly.Benefits