Repository navigation
Level the leg scaffold, round 4: ship the two extension-point seams in the wheel (RULED Q-L8 (a)) - #8
Conversation
…s in the wheel (RULED Q-L8 (a)) openDox-code's wheel omitted the two Q-L1 extension-point seams (route_extension.py, subcommand_extension.py) placed at the top of src/ by carve leg 1, because [tool.setuptools.packages.find] discovers only the opendox package. A pip install of this repository from git — the path openXdox-code's levelling round 2 uses — therefore installed an opendox.cli that raised ModuleNotFoundError: No module named 'subcommand_extension' at import time: 493 of leg 3's 615 validate errors at openXdox-code. The source-tree validate here never caught it because pip install -e '.[test]' puts src/ on the path directly instead of packaging it. Fix: declare both modules as top-level py-modules of the opendox distribution, alongside the existing packages.find. Scaffold file only; nothing else changes. RULED Q-L8 (a) (opensoft/openXfactory#656, Brett Heap, 2026-09-10, verbatim "rule Q-L8 (a) approve, (b) (b′), (c) approve"): APPROVED, proven by building the wheel and importing both modules from it in a clean venv. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 4 hours and 8 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
There was a problem hiding this comment.
🟢 Approval recommended
The change is minimal, correctly targets wheel packaging behavior (via py-modules), and aligns with the stated defect and proof without introducing behavioral risk.
Pull request overview
This PR updates the packaging configuration for the openDox code leg so that the two top-level extension-point “seam” modules (route_extension.py and subcommand_extension.py) are included in built wheels and therefore importable after non-editable installs.
Changes:
- Adds
py-modules = ["route_extension", "subcommand_extension"]under[tool.setuptools]so setuptools ships the two top-levelsrc/*.pymodules in the wheel. - Documents (in-file) the rationale and the specific failure mode that occurs when the modules are omitted from wheel builds.
File summaries
| File | Description |
|---|---|
pyproject.toml |
Declares the two seam modules as top-level py-modules so they are packaged into the wheel and importable post-install. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.



Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
Refs opensoft/openXfactory#656
Ruling
RULED Q-L8 (Brett Heap, 2026-09-10 ~15:4xZ, verbatim "rule Q-L8 (a) approve, (b) (b′), (c) approve"), (a):
(b)/(b′) and (c) of the same ruling are out of scope here — they land on openXdox-code and on openxFactory's own scripts respectively, in their own PRs.
The defect
Carve leg 1 placed the two Q-L1 extension-point seams at
src/route_extension.pyandsrc/subcommand_extension.py— top-level modules ofsrc/, because the arrived code imports them by bare name (src/opendox/cli.py:65 import subcommand_extension,src/opendox/serve.py:117 import route_extension).[tool.setuptools.packages.find]discovers only theopendoxpackage, so a built wheel — and thereforepip install git+…openDox-code@<sha>, which is how openXdox-code's levelling round 2 consumes this repository — omitted both modules, and the installedopendox.cliraisedModuleNotFoundError: No module named 'subcommand_extension': 493 of leg 3's 615validateerrors at openXdox-code. The source-treevalidatehere never caught it becausepip install -e ".[test]"putssrc/on the path directly instead of packaging it.The change
pyproject.tomlonly, alongside the existingpackages.find:Scaffold file only. No row in
docs/opendox-carve-manifest.yamlcoverspyproject.toml(RULED OQ-C: the manifest declares what leaves openxFactory, never what a destination assembles), and no carved row (src/opendox/**,tests/**) is touched.Proof
BEFORE (origin/main
ce53b489) — wheel omits both seams:Full BEFORE listing: 45 files, all under
opendox/oropendox-0.0.0.dist-info/— no top-level module.AFTER — wheel ships both:
Full AFTER listing: 47 files — the same 45 plus both seams at the wheel root.
Import proof 1 — clean venv,
pip install dist/opendox-0.0.0-py3-none-any.whl(not editable):Import proof 2 — clean venv,
pip install "git+https://github.com/opensoft/openDox-code@fd6ceb8615e4084de82541593c0df11520da1849"(the exact path openXdox-code's levelling round 2 uses):On the exact three-module compound line the task asked for (
import opendox.cli, route_extension, subcommand_extension) — run against both installs above, for the record:BEFORE this fix, the same command raises exactly the reported defect:
AFTER this fix, that specific error is gone —
cli.py:65now resolves — and the import proceeds to a separate, pre-existing, already-disclosed condition unrelated to this change:opendox.workbench(reached viaopendox.authoring, module-level) doesfrom openxdox.snapshot import find_validator, andopenxdoxdoes not exist yet — it is the package the next-but-one leg (openXdox-code) provides. This is not a new finding: this repository's own rootconftest.pyalready documents it verbatim —— and
pyproject.tomlitself already namesopenxdoxas a deliberate non-dependency.tests/test_workbench.pyis on the rootcollect_ignorelist for exactly this reason. This PR does not touchsrc/opendox/**(a carved row) and does not attempt to resolve it; it is the same reach the CARVE LEG 3 memo predicted would become dominant once thesubcommand_extensiondefect was fixed, and it is squarely inside the scope of the BUILD arc / openXdox-code leg, not Q-L8 (a).Diagnostic only, not part of this PR: installing a throwaway stub
openxdox.snapshot.find_validatorinto a scratch venv's site-packages (never committed, never touching this repository) letsimport opendox.cli, route_extension, subcommand_extensionproceed further, pastworkbench.py, until it reaches the next real cross-column import (opendox.branch_sessionneedingopenxdox.gate_console) — confirming this is a broad, multi-module, already-known gap, not anything this fix could or should paper over.validate(as written,.github/workflows/validate.yml), run locally:Lands on Brett Heap's ruling Q-L8 (a) via the lane's gate; openXdox-code's dependency pin bumps to this merge in its levelling round 3.
🤖 Generated with Claude Code