Skip to content

Level the leg scaffold, round 3: validate runs the shape assertions only until the BUILD arc (RULED Q-L5 (b′)) - #7

Merged
brettheap merged 1 commit into
mainfrom
chore/level-round-3-validate-shape-only
Sep 10, 2026
Merged

brettheap merged 1 commit into
mainfrom
chore/level-round-3-validate-shape-only

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

DRAFT — not ready for review. Brett Heap is separately being asked whether a lazy import of find_validator in src/opendox/workbench.py (declared in the manifest) lets the full suite run instead of narrowing validate, in which case this PR lands only as a fallback, or not at all. Opened now so the mechanism is proven and ready either way.

The problem

The carved tests/conftest.py (arriving with leg 1, PR #6) re-exports two autouse fixtures from tests/session_fixtures.py whose bodies import opendox.cli → authoring → workbench → openxdox.snapshot. Autouse fixtures fire for every test under tests/, including the scaffold's own tests/test_leg_shape.py, so every test in the suite errors at setup until the BUILD arc inverts that dependency. The round-2 collect_ignore list (PR #5, on main at da2391e0) can remove files from collection; it cannot remove a fixture.

The ruling

RULED Q-L5 (b′) — Brett Heap, opensoft/openxFactory#656, 2026-09-10, verbatim "rule Q-L5 (b′)", on the request in that issue's comment immediately above the ruling ("LEVELLING ROUND 2 AUTHORED... Q-L5 — how does validate on openDox-code read until the BUILD arc inverts the dependency?"):

(b′) NARROW validate to what CAN run, disclosed — recommended: the workflow runs python -m pytest -q tests/test_leg_shape.py --noconftest (the scaffold's own shape assertions, which pass without the carved conftest's fixtures), with a comment in validate.yml and a line in the README naming RULED Q-L5 and the BUILD arc as the point where the full suite returns. The carved tests still arrive byte-identical and are runnable locally once openXdox exists; nothing is hidden — the workflow says in words what it does not run.

The change (scaffold files only)

  • .github/workflows/validate.yml: the pytest step now runs exactly
    python -m pytest -q tests/test_leg_shape.py --noconftest
    
    preceded by a comment block naming the ruling.
  • README.md (Posture section): one sentence with the same citation.
  • Nothing else changes — not pyproject.toml, not conftest.py, not tests/.

Proof, against PR #6's branch

Built a detached probe worktree on carve/opendox-code-leg-1-recut (commit A 8e8983d, the 123-row arrival at opendox-carve-0; commit B / the tests/conftest.py replica has not landed on that branch yet), created a venv, and ran pip install -e ".[test]" (succeeded: PyYAML 6.0.3, pytest 8.4.2).

With --noconftest (the command this PR ships) — green:

$ python -m pytest -q tests/test_leg_shape.py --noconftest
............                                                             [100%]
12 passed in 0.04s

Exit code 0. Re-ran the identical command against this PR's own branch tree (which only has tests/test_leg_shape.py under tests/, since the carve hasn't landed on main yet) — same result, 12 passed.

Without --noconftest — red today, running the current (unmodified) validate.yml step (python -m pytest -q, no path restriction) against PR #6's tree:

$ python -m pytest -q
...
_______________ ERROR collecting tests/test_account_menu_dom.py ________________
ImportError while importing test module '.../tests/test_account_menu_dom.py'.
Traceback:
  ...
tests/test_account_menu_dom.py:27: in <module>
    from conftest import REPO_ROOT
E   ImportError: cannot import name 'REPO_ROOT' from 'conftest' (.../probe/conftest.py)
...
!!!!!!!!!!!!!!!!!!! Interrupted: 31 errors during collection !!!!!!!!!!!!!!!!!!!
31 errors in 3.55s

Exit code 2. Note this is a different red than the 982-error No module named 'openxdox' signature in the round-2 finding — that measurement was taken against a tree that already carried the tests/conftest.py replica; commit B (which brings that file, a declared replica) has not landed on PR #6's branch as of this writing. It is the same family of cause: carved test modules reach for helper symbols (REPO_ROOT, and — once commit B lands — the autouse openxdox-importing fixtures) that this leg's tree does not yet fully carry ahead of the BUILD arc's inversion. Either way, the unrestricted pytest -q step is provably red on the leg's actual tree today; the narrowed command is provably green.

Also confirmed: .github/workflows/validate.yml still parses as valid YAML, and the preceding install the package and its test extra step (python -m pip install -e ".[test]") succeeds standalone against Python 3.12 (the pinned setup-python version), matching the workflow as written end to end.

Lands on Brett Heap's ruling Q-L5 (b′) via the lane's gate; must land BEFORE #6 (the re-cut) lands so #6's validate re-runs green.

🤖 Generated with Claude Code

Summary by Sourcery

Keep CI validation green during the scaffold phase by running only the available shape assertions until the BUILD arc restores the full test suite.

Bug Fixes:

  • Prevent the required validation workflow from failing before the BUILD dependency inversion by limiting pytest to the scaffold’s runnable shape assertions.

Enhancements:

  • Document the temporary validation scope and its governing Q-L5 ruling in the workflow and README.

CI:

  • Narrow the GitHub Actions pytest command to run tests/test_leg_shape.py without repository conftest fixtures until the BUILD arc lands.

Documentation:

  • Document that full validation resumes when the BUILD arc inverts the openDox-to-openXdox dependency.

…nly until the BUILD arc (RULED Q-L5 (b′))

The carved tests/conftest.py (arriving with leg 1, PR #6) re-exports two
autouse fixtures from tests/session_fixtures.py whose bodies import
opendox.cli -> authoring -> workbench -> openxdox.snapshot. Autouse fixtures
fire for every test under tests/, including this scaffold's own
tests/test_leg_shape.py, so every test in the suite errors at setup once
those carved files land -- the round-2 collect_ignore list (openxFactory#656,
PR #5, landed at da2391e) can remove files from collection but cannot
remove a fixture.

RULED Q-L5 (b′) (Brett Heap, opensoft/openXfactory#656, 2026-09-10, verbatim
"rule Q-L5 (b′)"): narrow validate to what CAN run, disclosed.
.github/workflows/validate.yml's pytest step now runs
`python -m pytest -q tests/test_leg_shape.py --noconftest` -- the scaffold's
own shape assertions, collected with no conftest.py loaded at all (root or
tests/) -- preceded by a comment naming the ruling. README.md's Posture
section gets the same citation in one sentence. Nothing else changes: not
pyproject.toml, not conftest.py, not tests/.

Proven against PR #6's branch (carve/opendox-code-leg-1-recut, commit A
8e8983d, the 123-row arrival; commit B / the tests/conftest.py replica has
not landed on that branch yet): `python -m pytest -q tests/test_leg_shape.py
--noconftest` exits 0, 12 passed. Without --noconftest, the CURRENT
validate.yml step (`python -m pytest -q`, unrestricted) is red today -- 31
errors during collection, first:
`tests/test_account_menu_dom.py:27: from conftest import REPO_ROOT` ->
`ImportError: cannot import name 'REPO_ROOT' from 'conftest'` -- a different
symptom than the 982-error/openxdox signature measured in the round-2
finding (that measurement was taken against a tree that already carried the
tests/conftest.py replica; commit B hasn't landed on PR #6 yet), but the same
family of cause: the leg's tests reach for carved helper files this branch
does not yet fully carry, which the BUILD arc's inversion resolves.

Opened as a draft, not ready for review: Brett Heap is separately being
asked whether a lazy import of find_validator in src/opendox/workbench.py
(declared in the manifest) lets the full suite run instead of narrowing it,
in which case this PR lands only as a fallback or not at all.

Refs opensoft/openXfactory#656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 10, 2026 12:05
@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the required validate workflow and README to transparently run only the 12 scaffold shape assertions with --noconftest until the BUILD arc makes the full carved test suite runnable, following RULED Q-L5 (b′).

Flow diagram for the interim validation workflow

flowchart TD
    A[Validate workflow] --> B[Install package and test extra]
    B --> C[Run pytest tests/test_leg_shape.py --noconftest]
    C --> D[12 scaffold shape assertions pass]
    E[BUILD arc lands] --> F[Full carved test suite returns]
Loading

File-Level Changes

Change Details Files
Narrow CI validation to the scaffold’s runnable shape assertions until the BUILD arc resolves the openDox/openXdox dependency.
  • Run only tests/test_leg_shape.py with --noconftest.
  • Document RULED Q-L5 (b′), the dependency boundary, and the planned return to the full suite.
  • Preserve the existing package/test-extra installation step and leave scaffold tests and configuration otherwise unchanged.
.github/workflows/validate.yml
README.md

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

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

The changes are limited, internally consistent (workflow + README), and implement the stated temporary CI scope without introducing functional code risk.

Pull request overview

Updates the scaffold-era CI posture so the required validate workflow runs only the leg’s runnable “shape” tests until the BUILD arc inverts the openDox → openXdox dependency, and documents that posture in the README.

Changes:

  • Narrow validate’s pytest invocation to tests/test_leg_shape.py --noconftest (per RULED Q-L5 (b′)).
  • Add an explanatory comment block in the workflow capturing the rationale and when full-suite CI returns.
  • Document the temporary validation scope in the README “Posture” section.
File summaries
File Description
README.md Documents that validate is intentionally scoped to scaffold shape assertions until the BUILD arc.
.github/workflows/validate.yml Narrows CI execution to tests/test_leg_shape.py --noconftest with an inline ruling citation.
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 marked this pull request as ready for review September 10, 2026 12:15

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

@brettheap
brettheap merged commit fe71247 into main Sep 10, 2026
4 checks passed
brettheap added a commit that referenced this pull request Sep 10, 2026
…arve-0 (split-opendox § 3.2, RULED Q-L4) (#6)

Carve leg 1 of split-opendox-two-layer-product (§ 3.2, RULED OQ-H; re-cut under RULED Q-L4): opensoft/openDox-code receives its 123 manifest rows at carve_commit b075fd91dc8fced8e1373825ba80220c33536bae (tag opendox-carve-0), on Brett Heap's standing word "merge leg 1 when green".

History-preserving `git filter-repo` over the rows from a `--mirror` of the public source, rewritten on the named `carve-src` ref and joined to the levelled scaffold with an unrelated-histories merge, per the landed cutover runbook (openxFactory #875 → a970fd9d) and the amended manifest (#889 → 15ebb37d): 207 commits, two roots, original authorship carried. Two content commits: A (8e8983d) places every row byte-identical to the carve commit — `verify-carve-arrival.py --phase A`: OK, 123 rows arrived, 123 digests verified, 124 files, none undeclared (1 scaffold); its tree is identical to the superseded first cut's A (#4, CLOSED) over the carve roots. B (749c926) applies exactly the 250 declared lines over 61 `moved_with_declared_edit` rows (220 edits, 5 deletions, 25 declared-and-lawfully-left) and places the 10 declared replicas, including the two § 2.4 extension-point seams at `src/route_extension.py` and `src/subcommand_extension.py` — `--phase B`: OK, 61 declared-edit rows within their lines, 10 of 10 replicas byte-identical, 132 files, none undeclared; the fence proved (`arrival-undeclared-edit`, exit 2; phase A over the B tree refuses). Census 123 = 61 verbatim / 62 declared-edit. Independent verification: READY FOR LANDING — whole-history path census over the 207 exclusive commits = 146 paths = 123 rows + 10 replicas + 13 scaffold files byte-identical to base (no unfiltered history, no undeclared bytes); three-way digests 123/123 at A; both OK lines and both refusals reproduced; the 13 module-level openXdox reaches confirmed on declared lines with no third failure class; the regenerated 246-line path file matches commit A's recorded sha256; 2/2 review threads resolved; closingIssuesReferences 0.

`validate` is green on the scaffold's shape assertions only (RULED Q-L5 (b′), #7 → fe71247): the carved openDox column reaches openXdox at module level from 13 declared lines across five core files, and the byte-identical `tests/conftest.py` replica's `REPO_ROOT` depth misresolves — both BUILD-arc items (§ 3.5/3.6), recorded on #656; Q-L6 (defer one import) was measured ineffective and withdrawn.

Merged as a merge commit so the carried history arrives intact. Not in this PR: any other leg, the assembly roots' `carved_from`, the openXdox submodule pin.

Refs opensoft/openXfactory#656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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