Skip to content

Level the leg scaffold, round 2: the opendox dependency pinned to openDox-code ce53b489 and the package install in validate - #4

Merged
brettheap merged 1 commit into
mainfrom
chore/level-round-2-opendox-dependency
Sep 10, 2026
Merged

brettheap merged 1 commit into
mainfrom
chore/level-round-2-opendox-dependency

Conversation

@brettheap

@brettheap brettheap commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)

Refs opensoft/openXfactory#656

Brett Heap, 2026-09-10: "merge openXdox-code levelling round 2 when green" (openxFactory#656, "HEADS-UP for LEG 3" item 1, and the "LANDED — CARVE LEG 1" comment recording leg 1's merge commit).

Why

openXdox imports openDox by design (runbook § 5.1, "two pin moves per hop"). This leg's round-1 pyproject.toml declared no dependencies and validate.yml installed only pytest, so import opendox could not resolve once leg 3's carved content lands — the same gap that made openDox-code's own first carved commit fail its required check with No module named 'yaml' before its round 2 landed. This levels openXdox-code the same way, before leg 3 arrives instead of after. Scaffold files only (pyproject.toml, .github/workflows/validate.yml) — nothing under src/openxdox/, scripts/, or tests/; leg 3 has not landed.

The dependency

"opendox @ git+https://github.com/opensoft/openDox-code@ce53b489f8007c37f70da19c90c95ba89156feed"

A PEP 508 direct reference pinned to leg 1's landed merge commit (never a range or branch, per the estate's pin convention). Leg 1's pyproject.toml at that commit declares [project] name = "opendox" with a src/ layout and a real [build-system] (setuptools>=68), so it is pip-installable from git — proven below.

Third-party set (leg-3 rows, at carve commit b075fd91)

An ast walk over the manifest's 92 openxdox_code rows, scoped to the 89 that are .py files landing under src/openxdox/ or tests/ (the 90th .py row, scripts/validate-ideation-dashboard-contracts.py, lands at the repository root, outside both, and is excluded the same way openDox-code's own derivation scoped to src/opendox/ + tests/ only; the remaining 2 of the 92 rows are non-.py fixtures) — collecting every Import/ImportFrom at module level and in module-level if/try/with blocks, then partitioning against sys.stdlib_module_names:

  • yaml → PyYAML — module-level in 6 src/openxdox/-bound modules (gate_console.py, gate_routes.py, generator.py, kickoff.py, register.py, register_edit_lane.py) and 23 test modules. Added as a runtime dependency, PyYAML>=6.0 — the same floor openDox-code's own round 2 stated (what requirements/hermes-runtime-contracts.lock pins: pyyaml==6.0.3).
  • pytest — the round-1 pytest>=8,<9 pin, unchanged, moved into a [project.optional-dependencies] test extra so validate.yml installs it via .[test] instead of a copy in the workflow file.

No other third-party name turns up. Excluded, none of them dependencies: conftest / session_fixtures / staging_shapes (test-tree helpers arriving as rows or declared replicas), route_extension (the neutral extension-point module of RULED Q-L1), test_doxbench_routes / test_gate_routes / test_snapshot_registry (sibling test modules imported by name) — and, on openDox-code's own precedent, ideation_dashboard (the pre-carve package name the carve's "import rewrites" retire) and doc_health (openxFactory's own corpus machinery, a BUILD-arc cross-column reach, not a PyPI package, and not this PR's to resolve).

Proof (fresh venv, this branch)

pip install -e ".[test]" resolves the git dependency:

Collecting opendox @ git+https://github.com/opensoft/openDox-code@ce53b489f8007c37f70da19c90c95ba89156feed (from openxdox==0.0.0)
  Cloning https://github.com/opensoft/openDox-code (to revision ce53b489f8007c37f70da19c90c95ba89156feed) to ...
  Resolved https://github.com/opensoft/openDox-code to commit ce53b489f8007c37f70da19c90c95ba89156feed
...
Successfully installed PyYAML-6.0.3 iniconfig-2.3.0 opendox-0.0.0 openxdox-0.0.0 packaging-26.3 pluggy-1.6.0 pygments-2.21.0 pytest-8.4.2

import opendox resolves:

$ python -c "import opendox; print(opendox.__file__)"
/tmp/claude-1000/-home-brett-projects-xFactory-openxFactory/f9b90a9a-6c0d-45c2-b883-f05da2e2788b/scratchpad/oxd-code-lvl2/venv/lib/python3.12/site-packages/opendox/__init__.py

validate.yml's steps as written, green:

$ python -m pytest -q
............                                                             [100%]
12 passed in 0.05s

Lands on Brett Heap's word via the lane's gate; must land BEFORE leg 3 (openXdox-code) is carved.

🤖 Generated with Claude Code

Summary by Sourcery

Prepare the project scaffold for the next carved leg by pinning openDox, declaring required dependencies, and aligning validation with the package metadata.

Bug Fixes:

  • Ensure validation installs the package's runtime dependencies so imports remain resolvable when the carved content lands.

Enhancements:

  • Declare the pinned openDox git dependency and PyYAML runtime dependency in project metadata.
  • Move the existing pytest version constraint into a test extra and install it through the package configuration.

CI:

  • Update validation to install the package and test extra instead of installing pytest alone.

openXdox imports openDox by design (runbook § 5.1, "two pin moves per
hop"), but this leg's round-1 pyproject.toml declared no dependencies
and validate.yml installed only pytest, so `import opendox` could not
resolve once leg 3's carved content lands. openDox-code hit the same
gap on its own first carved commit ("No module named 'yaml'") before
its own round 2 landed; this levels openXdox-code the same way, before
leg 3 arrives rather than after.

Adds a runtime dependency on opendox, pinned to leg 1's landed merge
commit (opensoft/openDox-code@ce53b48)
as a PEP 508 git direct reference, plus PyYAML>=6.0 -- the one
third-party name an ast walk over the 89 in-scope openxdox_code
manifest rows (under src/openxdox/ and tests/, at carve_commit
b075fd91) turns up beyond the already-declared pytest range. Moves the
round-1 pytest>=8,<9 pin into a `test` extra and has validate.yml
install `.[test]` instead of a bare pytest, mirroring openDox-code's
own round 2 (#5) shape exactly.

Scaffold files only (pyproject.toml, validate.yml) -- leg 3 itself has
not landed.

Authorized by Brett Heap, 2026-09-10: "merge openXdox-code levelling
round 2 when green" (opensoft/openXfactory#656, "HEADS-UP for LEG 3"
item 1).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 10, 2026 13:17

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 11 hours and 14 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

This scaffold-only change prepares validation for the forthcoming carved content by pinning the landed openDox dependency, declaring PyYAML and the existing pytest range in pyproject.toml, and having the workflow install the editable package with its test extra.

Sequence diagram for package-aware validation

sequenceDiagram
    participant CI as Validate workflow
    participant Pip as pip
    participant Git as openDox-code Git repository
    participant Env as Python environment
    participant Pytest as pytest

    CI->>Pip: install -e .[test]
    Pip->>Git: resolve opendox at ce53b489f8007c37f70da19c90c95ba89156feed
    Git-->>Pip: pinned opendox package
    Pip->>Env: install opendox, PyYAML, pytest>=8,<9
    CI->>Pytest: python -m pytest -q
    Pytest->>Env: import openxdox and opendox
    Env-->>Pytest: dependencies resolve
    Pytest-->>CI: validation passes
Loading

File-Level Changes

Change Details Files
Declare the carved package’s runtime and test dependencies in project metadata.
  • Pin the opendox Git dependency to merge commit ce53b489f8007c37f70da19c90c95ba89156feed.
  • Add PyYAML>=6.0 as a runtime dependency based on the planned carved imports.
  • Move the existing pytest>=8,<9 constraint into a test optional dependency extra.
pyproject.toml
Make validation install the package and all declared test dependencies.
  • Replace the standalone pytest installation with pip install -e ".[test]".
  • Allow validation to resolve the pinned Git package, PyYAML, and pytest from project metadata.
.github/workflows/validate.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved blocking issues were identified.

Pull request overview

Prepares the scaffold for upcoming code by pinning opendox, declaring dependencies, and aligning validation.

Changes:

  • Pins the opendox Git dependency and adds PyYAML.
  • Moves pytest into a test extra.
  • Updates CI to install .[test].
File summaries
File Summary
pyproject.toml Declares runtime and test dependencies.
.github/workflows/validate.yml Installs the package with its test extra.
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.

@brettheap
brettheap merged commit aef883d into main Sep 10, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants