Skip to content

Level the leg scaffold, round 3: opendox pinned to openDox-code 8e9ffa62 (seams in the wheel) and validate narrowed to the shape assertions (RULED Q-L8 (a)/(b′)) - #6

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

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

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

RULED Q-L8 (Brett Heap, 2026-09-10, verbatim "rule Q-L8 (a) approve, (b) (b′), (c) approve"):

  • (a) APPROVED — openDox-code levelling round 4 packaged the two Q-L1 extension-point seams, route_extension and subcommand_extension, as top-level modules of the opendox distribution (merged 8e9ffa628e96f621ab23af47873e5f2c2267b8db, parent ce53b489f8007c37f70da19c90c95ba89156feed). Then openXdox-code levelling round 3 bumps the pinned dependency to that commit.
  • (b) = (b′) — validate on openXdox-code narrows to the scaffold's shape assertions (tests/test_leg_shape.py --noconftest) with a workflow comment and a README line citing this ruling and the BUILD arc, in the same levelling PR as the pin bump; the full suite returns when the BUILD arc inverts the dependencies and the remaining reaches are declared.

What changed (scaffold files only — nothing under src/, scripts/ or tests/ that the manifest moves)

  1. Pin bump. pyproject.toml:

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

    →

    "opendox @ git+https://github.com/opensoft/openDox-code@8e9ffa628e96f621ab23af47873e5f2c2267b8db",
    

    Nothing else in that file changes.

  2. (b′) narrowing. .github/workflows/validate.yml's pytest step becomes:

    python -m pytest -q tests/test_leg_shape.py --noconftest
    

    preceded by a comment citing RULED Q-L8 (b′), opensoft/openxFactory#656, 2026-09-10, and the disclosure that the same narrowing openDox-code itself carries under RULED Q-L5 (b′). One README line added with the same citation, mirroring openDox-code's own round 3 (PR § 4.1: invert the openDox→openXdox dependency direction (split-opendox, RULED 5626260214) #7 → fe71247e).

Probe evidence — leg 3's real carved tree (PR #5, head a985a227), overlaid with these two scaffold files

Clean venv, pip install -e ".[test]":

Resolved https://github.com/opensoft/openDox-code to commit 8e9ffa628e96f621ab23af47873e5f2c2267b8db

Round-4 fix confirmed directly (old pin vs new pin, same venv family):

  • under ce53b489 (the pin before this PR): import opendox.cli →
    File ".../opendox/cli.py", line 65, in <module>
        import subcommand_extension  # noqa: E402
    ModuleNotFoundError: No module named 'subcommand_extension'
    
  • under 8e9ffa62 (this PR's pin): python -c "import route_extension, subcommand_extension" succeeds — both seams now import from the installed wheel. import opendox.cli alone now proceeds past that point and fails one level deeper, at the already-disclosed, out-of-scope doc_health cross-column reach (opendox.branch_session → openxdox.gate_console → doc_health, causes 2/3 of the leg-3 memo) — a pre-existing condition unrelated to this PR's two files, and never reached by the actual gate below.

The workflow's exact pytest command:

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

The same command without --noconftest, showing the disclosed red it avoids (the autouse fixture declared_human_console in tests/session_fixtures.py imports opendox.cli for every test):

EEEEEEEEEEEE                                                             [100%]
...
>       from opendox import cli as cli_mod
tests/session_fixtures.py:413:
...
>   from doc_health import corpus
E   ModuleNotFoundError: No module named 'doc_health'
src/openxdox/gate_console.py:63: ModuleNotFoundError

tests/test_leg_shape.py is byte-identical between this scaffold and leg 3's carved tree. The same install + pytest sequence was also run on this PR's own branch tree (no carved content) with the same result: 12 passed, exit 0.

Lands on Brett Heap's ruling Q-L8 via the lane's gate; leg 3 (#5) re-runs validate against this base and lands under "merge openXdox-code when green".

🤖 Generated with Claude Code

Summary by Sourcery

Pin openDox to the revision that packages its extension seams and align validation with the scaffold’s currently supported shape assertions.

Bug Fixes:

  • Update the pinned openDox dependency to include the packaged extension-point modules required by the scaffold.

Enhancements:

  • Narrow validation to the scaffold shape assertions until the BUILD dependency inversion and remaining reaches are complete.

CI:

  • Adjust the validate workflow to run the narrowed shape-assertion test command without project fixtures.

Documentation:

  • Document the temporary validation scope and its governing ruling in the README.

Tests:

  • Validate the scaffold with the 12 shape assertions, which pass under the narrowed workflow.

…a62 (seams in the wheel) and validate narrowed to the shape assertions (RULED Q-L8 (a)/(b′))

RULED Q-L8 (Brett Heap, 2026-09-10, verbatim "rule Q-L8 (a) approve, (b)
(b′), (c) approve", opensoft/openXfactory#656):

(a) openDox-code levelling round 4 packaged the two Q-L1 extension-point
seams, `route_extension` and `subcommand_extension`, as top-level modules
of the `opendox` distribution (merged
8e9ffa628e96f621ab23af47873e5f2c2267b8db, parent
ce53b489f8007c37f70da19c90c95ba89156feed — the commit this leg was pinned
to since levelling round 2). Before that fix, a `pip install` of openDox-code
from git shipped an `opendox` package whose own CLI could not import
(`ModuleNotFoundError: No module named 'subcommand_extension'` at
`site-packages/opendox/cli.py:65`) — 493 of leg 3's 615 `validate` errors.
This PR bumps the pin to the fixed commit. Nothing else in `pyproject.toml`
changes.

(b) = (b′) `validate` on openXdox-code narrows to the scaffold's shape
assertions (`tests/test_leg_shape.py --noconftest`) until the BUILD arc
(split-opendox § 3.5/3.6) inverts the cross-column dependencies and the
remaining reaches are declared. Even with (a) fixed, the full suite stays
red: the autouse fixture chain in the carved tests reaches
`opendox.cli` -> `opendox.branch_session` -> `openxdox.gate_console` ->
`doc_health` (openxFactory-only tooling, not a dependency here) — the
already-disclosed causes 2/3 from the leg-3 memo. `validate.yml` carries
the ruling citation as a comment; `README.md` carries one line doing the
same, mirroring the disclosure openDox-code itself carries under RULED
Q-L5 (b′) (its own PR #7).

Proof (leg 3's real carved tree, PR #5 head a985a22, overlaid with these
two scaffold files): `pip install -e ".[test]"` resolves
`opendox @ git+...@8e9ffa628e96f621ab23af47873e5f2c2267b8db` and builds;
`python -m pytest -q tests/test_leg_shape.py --noconftest` -> 12 passed;
the same command without `--noconftest` reproduces the disclosed red
(12 errors at fixture setup, `ModuleNotFoundError: No module named
'doc_health'` via the chain above). Old pin vs new pin contrast confirms
the round-4 fix itself: under `ce53b489`, `import opendox.cli` fails at
`cli.py:65` (`subcommand_extension`); under `8e9ffa62`, that import
succeeds and the (separately disclosed) `doc_health` reach is what is
hit next. `tests/test_leg_shape.py` is byte-identical between this
scaffold and leg 3's carved tree.

Lands on Brett Heap's ruling Q-L8 via the lane's gate; leg 3 (#5)
re-runs validate against this base and lands under "merge openXdox-code
when green".

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 16:09
@brettheap
brettheap marked this pull request as ready for review September 10, 2026 16:10

@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 8 hours and 21 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 (collapsed on small PRs)

Reviewer's Guide

Updates the opendox dependency to the commit containing the packaged extension seams and narrows the required validation gate to the scaffold’s 12 shape assertions, with documentation explaining the temporary scope under RULED Q-L8 (b′).

Sequence diagram for the pinned opendox extension seams

sequenceDiagram
    participant Install as Editable install
    participant Wheel as opendox wheel
    participant CLI as opendox.cli
    participant Seams as Extension seams

    Install->>Wheel: Resolve opendox@8e9ffa62
    Wheel-->>Install: Install route_extension and subcommand_extension
    CLI->>Seams: import route_extension
    CLI->>Seams: import subcommand_extension
    Seams-->>CLI: Imports succeed
Loading

Flow diagram for the narrowed validation gate

flowchart LR
    Install[Install package and test extra] --> Validate[Run pytest tests/test_leg_shape.py --noconftest]
    Validate --> Assertions[12 scaffold shape assertions]
    Assertions --> Pass[12 passed]
    Full[Full pytest suite] -. deferred until BUILD arc lands .-> Validate
Loading

File-Level Changes

Change Details Files
Pin the scaffold to the openDox-code commit that packages both extension-point seams in the distribution.
  • Update the direct Git dependency from the previous commit to 8e9ffa62.
  • Verify route_extension and subcommand_extension import from the installed wheel at the new pin.
pyproject.toml
Narrow CI validation to isolated scaffold shape checks until the BUILD arc resolves cross-column dependencies.
  • Run only tests/test_leg_shape.py with --noconftest, avoiding the autouse fixture and its undisclosed dependency reach.
  • Document the RULED Q-L8 (b′) scope, issue reference, and planned restoration of the full suite.
.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 pin is verified and all 12 scoped shape assertions pass.

Pull request overview

Updates the scaffold to use the packaged openDox extension seams and temporarily validate shape assertions.

Changes:

  • Pins opendox to commit 8e9ffa62.
  • Narrows CI validation to shape assertions.
  • Documents the temporary validation scope.
File summaries
File Summary
README.md Documents the narrowed validation scope.
pyproject.toml Updates the opendox dependency pin.
.github/workflows/validate.yml Runs the scaffold shape assertions without fixtures.
Review details
  • Files reviewed: 3/3 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 3487e47 into main Sep 10, 2026
4 checks passed
brettheap added a commit that referenced this pull request Sep 10, 2026
…plit-opendox § 3.2) (#5)

Carve leg 3 of split-opendox-two-layer-product (§ 3.2, RULED OQ-H): opensoft/openXdox-code receives its 92 manifest rows at carve_commit b075fd91dc8fced8e1373825ba80220c33536bae (tag opendox-carve-0), on Brett Heap's standing word "merge openXdox-code 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 (main aef883d: the `opendox` dependency pinned to openDox-code ce53b489) with an unrelated-histories merge, per the landed cutover runbook (openxFactory #875 → a970fd9d) and the manifest as amended by #889 → 15ebb37d and Q-L7 #895 → b08b6280. Two content commits: A (158052b) places every row byte-identical to the carve commit — `verify-carve-arrival.py --phase A`: OK, 92 rows arrived, 92 digests verified, 93 files under scripts, src/openxdox, tests, none undeclared (1 scaffold). B (a985a22) applies exactly the 537 declared lines over the 83 `moved_with_declared_edit` rows (450 import rewrites / 73 path constants / 14 adapter calls; 542 carried with Q-L7's five replica-row lines; 483 changed, 59 left — the 14 `doc_health` adapter calls RULED OQ-N, 24 import rewrites, 21 path constants) and places five declared replicas, including `tests/session_fixtures.py` also-replicated here under RULED Q-L7 and the `tests/conftest.py` replica with its declared line-25 depth edit; B′ (24f3d6a) places the sixth, `src/subcommand_extension.py`, which runbook § 5.5 says both code legs carry — RULED Q-L9 (a), a third content commit on an unchanged manifest — `--phase B`: OK, 92 rows arrived, 9 digests verified, 81 declared-edit rows within their lines, 4 unapplied, 6 of 6 declared replicas verified (byte-identical, or differing only on their declared lines), 97 files under scripts, src/openxdox, tests, none undeclared; the sixth declaration proven load-bearing (a one-byte perturbation refuses `arrival-digest-mismatch`; the verifier's root-scoped walk never visits `src/<seam>.py`, so the flag's name+digest check is what makes the placement proven — recorded on #656); the fence and reverse fence proved. A `--no-ff` merge of main (3487e47) brought round 3's narrowed `validate` and the 8e9ffa62 `opendox` pin onto the branch without touching a carve byte. Census 92 = 9 verbatim / 83 declared-edit. History: 143 exclusive commits from the carve, two roots (the scaffold seed and the carried openxFactory history), authorship preserved; every path in every tree a row, replica or scaffold path. Pre-flight: `import opendox` resolves via the pinned dependency; `import openxdox` too; `doc_health` (openxFactory-only tooling) and the autouse-fixture chain remain the BUILD-arc reds, disclosed; findings recorded on #656 for later declared acts: the U+2028 line-count divergence between the two floor scripts (RULED Q-L8 (c), next), 7 undeclared depth lines, 23 undeclared `scripts/ideation_dashboard` reaches over 15 rows, three undeclared third-party test imports. `validate`: green on the scaffold's shape assertions (RULED Q-L8 (b′), openXdox-code #6 → 3487e47), 12 passed; the `opendox` wheel it installs now carries its seams (RULED Q-L8 (a), openDox-code #8 → 8e9ffa62). Independent verification: CARVE VERIFIED at a985a22 — 92/92 three-way digests with mode; both OK lines reproduced; fence exact with zero undeclared lines; 97 paths ever touched = the 92 rows ∪ the replicas; undeclared-content set empty; 15/15 threads resolved; closingIssuesReferences 0 — and B′ re-verified: READY — sha256 and mode match the carve blob byte-for-byte; the six-flag phase B line reproduced fresh; the perturbation refusal reproduced; phase A over the B′ tree refuses (fence intact); no carve byte moved since a985a22 (the diff is the three scaffold files main changed plus the one replica); scaffold files byte-identical to main; 17/17 threads; closingIssuesReferences 0.

Merged as a merge commit so the carried history arrives intact. Not in this PR: any other leg, the openXdox root's `carved_from` and pins, the openxFactory submodule pin.

Refs opensoft/openXfactory#656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
brettheap added a commit that referenced this pull request Sep 24, 2026
…tree (split-opendox § 8.9 residue (i)-(iii)) (#28)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

## What this repairs

The archived openxFactory `split-opendox-two-layer-product` booked three carve defects in this leg's snapshot validation at `tasks.md` § 8.9 (amendment #6, RULED Q-P3 (a), openxFactory #656 comment `5728856581`), "owed to a follow-up act with its own claim". The box took its `[~]` DEFERRED marker at the archive, by RULED `5778397686`. This PR is that act.

RULED at openxFactory #656 comment [5815412869](opensoft/openXfactory#656 (comment)) (item 3, **C3**, all (a)) and claimed at [5815613524](opensoft/openXfactory#656 (comment)):
- **Q-XDV1 (a):** `CONTRACTS_DIR` comes from the environment. The assembly root's export of it is a separate openRepoShape act, not this PR.
- **Q-XDV4 (a):** the two new suites stay OFF `validate.yml`'s named list.

The three defects:
- **(i)** `scripts/validate-ideation-dashboard-contracts.py`: `SCHEMAS_DIR` resolved to `ROOT / "contracts" / "schemas"`, a directory this leg does not have, "so as carved the validator cannot run from anywhere".
- **(ii)** `src/openxdox/snapshot.py`: `VALIDATOR_RELPATH` named `openxFactory/scripts/validate-ideation-dashboard-contracts.py`, which openxFactory shed at `cc4ae9d3`.
- **(iii)** `find_validator` walked every parent of its start (or of the cwd) and adopted whatever enclosing checkout still carried a pre-shed copy: "a reader adopting its enclosing tree".

**This lands AFTER opensoft/openXfactory#1153** (RULED Q-L1, `5642758731`: the row annotation for an edit to an arrived file lands first). **#1153 LANDED** as `1d14fee6`. Against openxFactory `main` at `1d14fee6`, `verify-carve-arrival.py --destination openxdox_code --phase B` with the six replicas answers **OK** for this head `3f32cb5d`: 96 rows arrived, 87 declared-edit rows within their lines, 3 unapplied, 135 files with none undeclared, 34 declared admissions used. Before #1153, `main`'s manifest refused this leg with `arrival-digest-mismatch` at `src/openxdox/snapshot.py`.

**Land it by squash, the way #16–#27 landed.** Both admissions' `since:` is `45825ff7`, this branch's first commit, which introduced both suites (`git log --diff-filter=A` on this branch). That stays true through a squash, as it does for the 17 existing admissions that name a pre-squash branch commit. It would stop being true only if this branch's history were rewritten, so it must not be.

**This does NOT discharge openxFactory#1144 (`add-neutral-product-standalone-operability`) task 7.3.** That box's FALSIFIED BY asks the INSTALLED distribution to find its own validator from a `start` outside the product. This PR's `find_validator` answers `None` for such a start. So when phase 2 realizes 7.3, it revisits `tests/test_snapshot_validator_home.py::test_a_start_outside_the_product_is_refused_not_walked`, and the holder is taking that tension to Brett as a phase-2 question.

The arrived `tests/test_snapshot_validation_launch.py` belongs to the same revisit (Copilot, round 2). It still writes its stub validator at `aggregation / VALIDATOR_RELPATH` and launches from the corpus root outside this product, so under this confinement its launch would report validation SKIPPED. It cannot be collected in this repository at the base or at this head: the pinned openDox-code `5c137a90`'s `serve.py` imports `ideation_dashboard`, which is not installed here. It is also not among `validate.yml`'s named files, so no gate's outcome moves.

Nothing changes for openDox-code's two live callers of `find_validator`, which are `workbench.validate_manifest` → `find_validator(path.parent)` and `cli._locate_validator` → `find_validator(written.parent) or find_validator(repo_root)`. Both pass a start outside this product. Both already get `None` at `main`, because the old relpath names the shed path. They still get `None` here.

## Before → after (re-cut on `main` `626f2c8d`; the four files are byte-identical to the helper bank's first cut `d3a90748` on `ab04453d`, and `#26`/`#27` touched none of them)

| | before (`626f2c8d`) | after |
| --- | --- | --- |
| (ii) `VALIDATOR_RELPATH` | `openxFactory/scripts/validate-ideation-dashboard-contracts.py` (absent everywhere since `cc4ae9d3`) | `scripts/validate-ideation-dashboard-contracts.py`, relative to this product's root |
| (iii) the product nested under a pre-shed openxFactory checkout | adopts the parent's validator | never looks up: the validator used is always the product's own. A dangling-edge snapshot is `not-conformant`, and `validate_or_raise` raises |
| (i) validator in the openXdox assembly root (`2f3f857d`, `code` at the test tree), `CONTRACTS_DIR=$PWD/spec/contracts` | rc=2 in every case: `ERROR harness failure: … code/contracts/schemas/ideation-dashboard-snapshot.schema.yaml` not found | snapshot example rc=0; `negative/snapshot-dangling-document-edge` rc=1 (1 error); `snapshot-index` example rc=0 |
| (i) the same without `CONTRACTS_DIR` | rc=2, as above | rc=2, now naming the channel: `… is not carried under …/code/contracts/schemas (this tree carries no contracts/ and CONTRACTS_DIR is not set; export it as the spec leg's contracts directory)` |
| the arrived, unedited `tests/test_snapshot.py`, in that assembly root with `CONTRACTS_DIR` | 3 failed / 14 passed | **17 passed** |

## How

- **(ii) and (iii).**
  - `product_root()` is fixed `parents[2]` arithmetic on the module's own path, confirmed by an explicit marker: the `src/openxdox/` layout and a `pyproject.toml` naming `openxdox`.
  - `find_validator(start=None)` keeps its signature, because openDox's `consumer_reach` binds it by name. It now CONFINES: a `start` outside the product answers `None`, a `scripts/` link that resolves out of the tree is refused, and neither the cwd nor the snapshot's own directory is a search root any more.
  - A validator from anywhere else must be passed explicitly (`validator=`).
- **(i).**
  - A resolved `schemas/` that carries NONE of the ten, or none at all, is refused before any mode runs: harness failure, exit 2 (`87e627c`, Copilot round 2). Otherwise an empty registry let a directory sweep that met no recognized instance exit 0 having loaded no schema.
  - An own `contracts/` or `contracts/schemas/` that resolves OUT of the tree is refused before any directory is chosen, whatever it reaches: a directory with `schemas/`, one without, or nothing, since a dangling link counts too (`3f32cb5d`, Copilot round 3). Otherwise a valid `CONTRACTS_DIR` let such a link pass unread.
  - The validator reads this tree's own `contracts/` when the tree carries `contracts/schemas/`. That covers the pre-shed layout and openxFactory's `doxbench_contracts._composed_validator` farm, both unchanged.
  - Otherwise it reads the directory **`CONTRACTS_DIR`** names. That is the channel the assembly root's `AGENTS-shape.md` declares for a contract the code reads but does not own: "the code leg's tooling now takes `CONTRACTS_DIR` from the environment … rather than each script guessing at `../`".
  - Nothing above the script's own root is read by position.
  - The registry loads the family schemas the resolved directory carries; three of the ten live in openXdox-spec since the carve. An instance of any other kind is refused with exit 2 and never passed. The refusal names the missing schema and the directory it read. For a possibles-register section, whose kernel stays with openxFactory, it is the registry's own `Unresolvable` naming that schema.

openXdox's root `Makefile` is a digest-pinned copy of openRepoShape's scaffold template. It does not export `CONTRACTS_DIR` today, so in the assembly root the validator still refuses by default, but it now says which variable supplies the contracts. Whether the root should carry that export is a shape question for openRepoShape (Q-XDV1 (a)), not this PR.

## Tests

Two created suites, both `--noconftest`-safe, each copying the REAL module or script into a `tmp_path` layout:

- `tests/test_snapshot_validator_home.py`, 12 tests.
  - (ii): the relpath and the own-tree answer.
  - (iii): none of these is ever adopted: an enclosing pre-shed validator, a pre-shed corpus, the cwd, a `start` outside the product, an installed copy, a `pyproject.toml` naming another distribution, and an escaping `scripts/` link.
  - The signature is kept.
- `tests/test_validator_schema_home.py`, 12 tests:
  - runs with `CONTRACTS_DIR` (exit 0);
  - a dangling edge is a finding (exit 1);
  - an uncarried kind is refused by name (exit 2);
  - both carved path constants follow the declared directory;
  - the refusal names the channel;
  - a declared directory without `schemas/` is refused;
  - an enclosing assembly root is never read by position;
  - a composed family's own tree still wins over `CONTRACTS_DIR`;
  - an own `contracts/` that is a LINK out of the tree is refused, with or without `CONTRACTS_DIR` (added at `0a1963f8` on Copilot's review);
  - a real `contracts/schemas/` of LINKED files (openxFactory's composed farm) is still the tree's own (a guard, same round);
  - no mode passes having loaded no schema: both sweeps, `--transition` and the default, with nothing resolved or with a `schemas/` of unrelated files, all exit 2 (added at `87e627c` on Copilot's review; it fails at `0a1963f8`, where the empty sweep exits 0);
  - an escaping own link is refused whatever it reaches: `contracts/` dangling, `contracts/` to an outside directory without `schemas/`, and `schemas/` dangling out of a real `contracts/`, each with and without `CONTRACTS_DIR` (added at `3f32cb5d`; it fails at `87e627c`, where the dangling link with `CONTRACTS_DIR` exits 0).

| measurement (python 3.12.3, pytest 8.4.2; venv from `pip install -e ".[test]"` as `validate.yml` installs, plus a second venv adding rfc3339-validator where noted) | `626f2c8d` | this head (`3f32cb5d`) |
| --- | --- | --- |
| **the required check replicated**: the 16 named files, `--noconftest`, no rfc3339-validator, as on the runner | 564 selected / 558 passed / 6 skipped / 0 / 0, **pin HOLDS** (floors ≥564, ≥558, ==6) | 564 / 558 / 6 / 0 / 0, **pin HOLDS** |
| the two created suites, with rfc3339-validator | 21 failed / 3 passed (the residues, the two link cases, the no-schema guard and the new marker's API; the 3 passes are guards) | **24 passed** |
| the two created suites, CI venv (no rfc3339-validator) | 11 failed / 1 passed / 1 skipped | 12 passed / 1 skipped (`test_validator_schema_home.py` skips at module level) |
| whole `tests/`, `--noconftest`, `--continue-on-collection-errors`, per-test JUnit diff | 174 F / 830 P / 10 S / 128 E of 1142 (with the two suites copied in) | 152 F / 852 P / 10 S / 128 E of 1142. **22 outcomes change, all fail → pass**: the 21 new-suite tests that fail on the base and `tests/test_snapshot.py::test_find_validator_locates_pinned_checkout`. **0 regressions.** The 128 collection errors (`No module named 'ideation_dashboard'` / `'doc_health'`) are carve residue on both sides |

## Not in this PR

- **The named list** (Q-XDV4 (a)). Both suites exercise carved modules, which RULED Q-L8 (b′) keeps off `validate.yml`'s list. `test_validator_schema_home.py` would also report as one module-level skip on a runner without rfc3339-validator (+1 against `EXPECT_SKIPPED == 6`).
- **rfc3339-validator is not declared** in `pyproject.toml`, yet the validator exits 2 at its FormatChecker guard without it. That is reported here, not fixed.
- **`tests/test_validate_ideation_dashboard_contracts.py`** keeps openxFactory's `parents[2]`, so it names the directory above this repository. That is another row's path constant, reported and not fixed.
- **The pin moves**, which are separate owed acts in the forced order:
  - first, the openXdox root's code pin (the `code` gitlink, `contracts/code-pin.yaml` `commit:` and `tree_sha256`, `contracts/manifest.yaml` and CHANGELOG, in the shape of openXdox#17/#18) at this PR's LANDED sha;
  - then openxFactory's openXdox pin, with the consumer updates it makes due (`test_dashboard_source_seal.py` asserts the old walk; `nightly_lane.py` calls `find_validator(agg_root)`).

## Review rounds

- **Round 1** (Copilot at `45825ff7`), fixed at `0a1963f8`. An own `contracts/` or `contracts/schemas/` that is a LINK out of the tree is refused with exit 2, with or without `CONTRACTS_DIR`. A real directory of linked schema files is still the tree's own.
- **Round 2** (Copilot at `0a1963f8`), fixed at `87e627c`. With no schema carried, a directory sweep that met no recognized instance exited 0 having loaded nothing. `build_registry` now refuses first. This also corrects my round-1 answer, which called that exit 0 pre-existing: measured, the base `626f2c8d` exits 2 there. The launch-harness finding is answered in its thread; it belongs to the #1144 task 7.3 revisit described above, and is not a change here.
- **Round 3** (Copilot at `87e627c`), fixed at `3f32cb5d`. The escaping-link check used to run only when `contracts/schemas/` was a directory, so a dangling link, or a link to an outside directory without `schemas/`, passed unread whenever `CONTRACTS_DIR` was valid. Both names are now checked as they resolve, before any directory is chosen. All eight probe cases exit 2; the composed farm still exits 0.
- **No round moves openxFactory#1153's window.** Against the carve blob, the diff still touches exactly lines 14, 15, 16, 115, 116, 224, 225, 226, 230 and 1822, plus insertions beside 94 and 237. `verify-carve-arrival.py --phase B`, with the six replicas, answers `OK` for `3f32cb5d` against the LANDED `main` `1d14fee6` (87 declared-edit rows within their lines, 34 admissions used). The two admissions' `since` stays `45825ff7`, the suites' introducing commit.


Lane: openxfactory-4
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