Repository navigation
Level the leg scaffold, round 2: runtime dependencies, package install in validate, and the disclosed collect_ignore list (RULED Q-L2/Q-L3(b)) - #5
Conversation
…idate (RULED Q-L2) Round 1 of this levelling pass built the import root and stopped. So `pyproject.toml` declared no dependencies and `validate.yml` installed the test runner alone, and the first carved commit (#4) failed the one required check with `No module named 'yaml'` — cause 4 of the four reds recorded on openxFactory#656, and the only one of the four that is a levelling gap rather than carve-arc work. `dependencies` now names every third-party module the arrived rows import, derived by an `ast` walk over all 88 `.py` files under `src/opendox/` and `tests/` in the carve leg's tree (#4, head `cfabe3c4`) — module body plus module-level `if`/`try`/`with` blocks, relative imports discarded, top-level names partitioned against `sys.stdlib_module_names`. 37 names are standard library; exactly two are third-party. `yaml` (PyYAML) is the runtime one, and `pytest` moves into a `test` extra. Everything else non-stdlib is a file this repository already supplies: the `opendox` package, the test-tree helpers that arrive as rows or declared replicas, and Q-L1's two stdlib-only extension-point modules. `openxdox` and `ideation_dashboard` are deliberately NOT declared. They are the cross-column reaches the BUILD arc removes (split-opendox § 3.5/3.6), not dependencies; declaring either would buy a green check by pinning openxFactory's tree shape into this leg's dependency set. Lower bounds only. The floor is stated rather than guessed: the carved modules use `yaml.safe_load` (9 sites) and `yaml.safe_dump` (5, with `sort_keys` / `default_flow_style` / `allow_unicode`), and the newest of those is `sort_keys=`, carried since PyYAML 5.1 — so `>=6.0` is not the oldest release that would work, it is the floor this leg has been exercised against and what openxFactory itself runs (`pyyaml==6.0.3` in its lockfile at the carve commit). `validate.yml` installs `-e .[test]` in place of the bare runner. The pytest range round 1 chose is unchanged — `pytest>=8,<9`, still the only upper bound — but its home moves into the extra, so it is declared once and the workflow reads it rather than carrying a second copy that can drift while both keep passing. `permissions: contents: read` and the `python -m pytest -q` step are untouched; the install step is the only workflow change. Scaffold files only. No carved row is touched: the arrival verifier admits a scaffold file only when its bytes equal `origin/main`'s copy, so this lands BEFORE leg 1 is re-cut. Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reviewer's GuideThis round levels runtime dependency handling by declaring PyYAML and the existing pytest range in File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟡 Changes recommended
The PR description indicates it is still a draft with a second planned commit (the disclosed collect_ignore list) that has not landed yet.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR levels the openDox “code leg” scaffold by formally declaring runtime/test dependencies in pyproject.toml and updating the validate GitHub Actions workflow to install the package (and its test extra) before running the test suite.
Changes:
- Declare
PyYAML>=6.0as a runtime dependency and move the pytest range into atestoptional extra. - Update
validate.ymltopip install -e ".[test]"before executingpython -m pytest -q.
File summaries
| File | Description |
|---|---|
| pyproject.toml | Adds runtime deps (PyYAML) and defines a test extra containing the pytest version range. |
| .github/workflows/validate.yml | Installs the package plus .[test] in CI so runtime deps are present during validation. |
Review details
- Files reviewed: 2/2 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.
…ox leg and the BUILD arc (RULED Q-L3 (b)) Seven arrived test modules cannot import at this leg's position in the runbook § 5.1 order, because they reach across the carve for something not yet carved. Six import `openxdox.*`, directly or through `opendox.workbench` / `branch_session` / `cli` — the ruled § 5.5 rewrite pointing at the next-but-one leg. One, `tests/test_session_harness.py`, is a `moved_verbatim` row that `exec`s `scripts/sync-notebooklm-books.py`, an openxFactory-only file with no row that never travels, so no leg can ever satisfy it. Naming them here turns 8 collection errors into 0, which is the difference between a suite that is interrupted at collection and one that runs. Each entry carries its reason and its removal condition. The list is a levelling artefact removed by the BUILD arc (split-opendox § 3.5/3.6) or by the openXdox-code leg, whichever reaches it first; deleting an entry is the whole of the removal. `tests/test_boundary.py` is deliberately ABSENT, and the header says why. It fails to import on a bare `import output_boundary` at its line 14 — an UNDECLARED line, so the leg could not rewrite it. That is cause 3 of openxFactory#656, and RULED Q-L1 has the manifest amendment declare exactly that line; with the rewrite simulated, collection is clean. It is fixed upstream, not ignored. Only two reasons qualify for this list, and any other failure is a finding reported on the pull request rather than added here. Verified against the carve leg's own tree (#4, head `cfabe3c4`) in a throwaway worktree with this branch's `pyproject.toml` installed and Q-L1's two extension-point modules placed: 8 collection errors before, 1 after (the finding above), 0 with that line's declared rewrite applied; 993 tests collected. FINDING, disclosed on the pull request: this list does NOT make `validate` green on the re-cut leg, because the remaining failure is not a collectible file. The arrived `tests/conftest.py` re-exports two AUTOUSE fixtures from `tests/session_fixtures.py`, and their bodies import `opendox.cli` / `opendox.actor_identity`, which reach `openxdox.snapshot` through `authoring` -> `workbench`. Autouse applies to every test under `tests/`, including the scaffold's own `tests/test_leg_shape.py` — 12 setup errors when it is the only file collected. `collect_ignore` removes files from collection and cannot remove a fixture, and both files are carved rows this pull request may not touch. Scaffold file only: the root `conftest.py`, which carries no manifest row (RULED OQ-C). Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 (1M context) <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 20 hours and 50 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
There was a problem hiding this comment.
🟡 Changes recommended
The new conftest.py documentation and collect_ignore configuration are currently inconsistent with the repository contents (nonexistent tests/conftest.py mention and ignore entries for missing files), which should be corrected to avoid misleading behavior as the carve progresses.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
… round) Copilot read the list against this branch, where none of the seven files exist yet, and reported the header as misleading on two counts: it calls `tests/conftest.py` "arrived" when this repository has only a root `conftest.py`, and it names test modules absent from `tests/`. Both observations are correct about this branch, and both were the intended meaning stated in a tense that did not carry it. The header now says outright that nothing the list names exists here yet and why that is the point: every path arrives with the carve, and the file has to be carrying the list already when they do, because the arrival verifier admits a scaffold file only when its bytes equal `main`'s copy — so `conftest.py` cannot be edited during or after the re-cut. It also records that a `collect_ignore` entry naming an absent file is inert, so the list is a no-op here and takes effect when the rows land, and that `tests/conftest.py` likewise arrives with the carve, as a declared replica. Comment text only. The seven entries are unchanged, and filtering them to paths that exist today would empty the list and defeat RULED Q-L3 (b). Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to scaffold configuration/docs and correctly align CI installation with declared dependencies without introducing functional code-path risk.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite




Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
Refs opensoft/openXfactory#656
Round 2 of the levelling pass for the carve. Scaffold files only — three of
them, and no carved row is touched, because the arrival verifier admits a
scaffold file only when its bytes equal
origin/main's copy. This must landBEFORE leg 1 is re-cut.
The ruling this lands on
Cause 4 of the four reds recorded on openxFactory#656 is the only one of the
four that is a levelling gap rather than carve-arc work:
validate.ymlinstalled pytest alone and
pyproject.tomldeclared no dependencies, so thefirst carved commit (#4) failed the one required check with
No module named 'yaml'.1.
pyproject.toml— the runtime dependency set (Q-L2)Derived, not guessed: an
astwalk over all 88.pyfiles undersrc/opendox/andtests/in the carve leg's tree (#4, headcfabe3c4),collecting every
Import/ImportFromin the module body and inmodule-level
if/try/withblocks, discarding explicitly-relative imports,then partitioning the top-level names against
sys.stdlib_module_names.37 names are standard library. Exactly two are third-party:
PyYAML>=6.0dependenciessrc/opendox/branch_session.py,canvas_drafts.py,workbench.pysrc/opendox/doxbench_binding.py,doxbench_intake.py,serve_project.py,tests/test_doxbench_chat_view.py,tests/test_model_provider_broker.pypytest>=8,<9[project.optional-dependencies] testEvery other non-stdlib name is a file this repository already supplies: the
opendoxpackage itself; the test-tree helpers that arrive as rows or declaredreplicas (
conftest,session_fixtures,staging_shapes,hermeticity,import_scan,smoke_signals,test_doxbench_view); and Q-L1's twoextension-point modules, both stdlib-only (
route_extensionimportsdataclasses/typing,subcommand_extensionimportstyping), so neitheradds a dependency.
openxdoxandideation_dashboardare deliberately NOT declared. They arethe cross-column reaches the BUILD arc removes (
split-opendox§ 3.5/3.6), notdependencies. Declaring either would buy a green check by pinning openxFactory's
tree shape into this leg's dependency set.
Lower bounds only, and the floor is stated rather than guessed. The carved
modules use two PyYAML entry points —
yaml.safe_load(9 sites) andyaml.safe_dump(5, withsort_keys/default_flow_style/allow_unicode) — and the newest of those issort_keys=, carried sincePyYAML 5.1. So
>=6.0is not the oldest release that would work; it isthe floor this leg has been exercised against, and what openxFactory itself runs
(
requirements/hermes-runtime-contracts.lockat the carve commit pinspyyaml==6.0.3). Deliberately not done: a--require-hasheslockfile —pinning this leg's supply chain by digest has a real owner and is not something a
levelling PR should invent for a destination's
validate.2.
.github/workflows/validate.yml— install the package (Q-L2)python -m pip install -e ".[test]"replacespip install "pytest>=8,<9".The pytest range round 1 chose is unchanged —
pytest>=8,<9, still the onlyupper bound — but its home moves into the extra, so it is declared once and the
workflow reads it instead of carrying a second copy that can drift while both
keep passing.
permissions: contents: read, both triggers, and thepython -m pytest -qstep are untouched; the install step is the only change.3.
conftest.py— the disclosedcollect_ignorelist (Q-L3 (b))Two reasons qualify and nothing else. Counts, measured against the carve
leg's own tree:
collect_ignorelisttest_boundary.py:14rewrite simulatedtests/test_doxbench_chat_view.pyopenxdox.*)tests/test_doxbench_entrypoint.pyopenxdox.*)tests/test_hermeticity.pyopenxdox.*)tests/test_model_provider_broker.pyopenxdox.*)tests/test_subcommand_extension.pyopenxdox.*)tests/test_workbench.pyopenxdox.*)tests/test_session_harness.pyexecs openxFactory-only script)Six reach
openxdox.*, directly or throughopendox.workbench/branch_session/cli.tests/test_session_harness.pyis amoved_verbatimrow thatexecsscripts/sync-notebooklm-books.py, anopenxFactory-only file with no row that never travels, so no leg can satisfy
it — only the BUILD arc's rework. Deleting an entry is the whole of the removal;
nothing else in the repository refers to it.
Mechanics checked against pytest's own source rather than assumed:
_getconftest_pathlistresolves a conftest'scollect_ignoreagainst thatconftest's own parent directory and walks the conftest chain most-specific
first, returning the first module that defines the name. The arrived
tests/conftest.pydefines nocollect_ignore, so this root list is the onepytest reads, and its entries are repository-relative.
tests/test_boundary.pyis deliberately ABSENT — a FINDING, not an entryIt fails to import on a bare
import output_boundaryat line 14, anUNDECLARED line the leg could not rewrite. That is cause 3 of #656, and
RULED Q-L1 has the manifest amendment declare exactly that line, after which
the row rewrites to
from opendox import output_boundaryand the moduleimports — simulated above, and collection goes to 0 errors. It is fixed
upstream, not ignored.
The replica-placement assumption
Computing the list needs Q-L1's two modules present, so this PR had to decide
where the leg's imports expect them. Determined from evidence, not assumed:
the importing lines are bare, top-level imports on lines the leg did not
rewrite —
— and
edit-plan.txtconfirms no declared line touches any of them (cause 1'slines are undeclared, and Q-L1 declares cause 3's lines, not these). A bare
top-level name resolves only against a
sys.pathroot, so the modules wereplaced at
src/route_extension.pyandsrc/subcommand_extension.py—directly on this leg's
src/import root, one level abovesrc/opendox/,which mirrors their openxFactory home (
scripts/route_extension.py, one levelabove
scripts/ideation_dashboard/) exactly. Both then resolved; neitherappears in any remaining error.
FINDING — this list does not make the re-cut leg's
validategreenDisclosed rather than discovered later. With the list active, Q-L1's replicas
placed and its
test_boundaryline simulated, the leg's suite reports:The remaining failure is not a collectible file. The arrived
tests/conftest.pyre-exports two autouse fixtures fromtests/session_fixtures.py(line 106,from session_fixtures import …), andtheir bodies import
opendox.cli/opendox.actor_identity:Autouse applies to every test under
tests/— including the scaffold's owntests/test_leg_shape.py, which reports 12 setup errors when it is the onlyfile collected.
collect_ignoreremoves files from collection; it cannot removea fixture. Both files are carved rows this PR may not touch.
So Q-L3 (b) is necessary but not sufficient: it converts an interrupted
collection into a suite that runs, and it documents exactly which suites await
which arc, but
validateon the re-cut leg stays red until the openXdox-codeleg lands or the BUILD arc inverts the direction. This needs Brett Heap's word
before the re-cut — the options are Q-L3 (a) (land red on his word) for leg 1
only, or an additional scaffold act that neutralises the two autouse fixtures,
which is beyond both this PR's fence and the ruling as written.
Verification
Computed in a throwaway worktree of #4's head (
cfabe3c4) with this branch'spyproject.tomlinstalled — Python 3.12.3, PyYAML 6.0.3, pytest 8.4.2, allwithin the declared ranges. Nothing was written to #4 or its branch.
This branch's own
validate, run locally exactly as the workflow does:tests/test_leg_shape.pyis untouched and green; its assertions forbid nothingthis PR needs (it fixes the role directory, requires
pyproject.tomlandconftest.pyto exist, and says nothing about their contents).collect_ignoreentries naming files absent from this branch are inert.
Not done, deliberately
tests/test_leg_shape.py.--require-hashes.main.Copilot round
Two threads, both on
conftest.py, both replied to and resolved.tests/conftest.pyin this repo" — correct about thisbranch, and the header said "arrived" where it meant "arrives with the
carve".
tests/conftest.pyis one of leg 1's eight declared replicas.FIXED in
a0358ac(comment text only): the header now states the tenseoutright. The underlying claim was verified rather than assumed — in the
leg's tree that file defines no
collect_ignore,pytest_ignore_collectorpytest_collect_*, which is what keeps this root list the one pytest reads.answer would be zero entries, because the list is necessarily
forward-declared: the arrival verifier admits a scaffold file only when its
bytes equal
main's copy, soconftest.pycannot be edited during or afterthe re-cut. Staleness is bounded by each entry's named removal condition
rather than by presence on disk — a filtered list would silently drop an
entry the moment its path moved, which is the masking the comment warns
about. Documented in
a0358ac.Sourcery skipped (account review budget exhausted). SonarCloud Code Analysis
is red and is NOT a required check —
validateis the only one(
repos/opensoft/openDox-code/rules/branches/main); it reports no descriptionon the commit status, and this PR adds one comment block and two declarations to
three scaffold files. Disclosed rather than silently passed over.
Rollback
Revert the two commits. The scaffold returns to what #3
left, and the leg pins nothing and is pinned by nothing until Phase 3.
Lands on Brett Heap's rulings Q-L2/Q-L3 (b), via the lane's gate; must land
BEFORE leg 1 is re-cut.
Head:
a0358ac3d9c9a0bef69df90eeb2df131b26a8919(three commits)🤖 Generated with Claude Code