Repository navigation
Lower the openDox back-import ratchet to ZERO at import time after BUILD slice 2b, and guard the values openDox now owns - #13
Conversation
…ILD slice 2b, and guard the values openDox now owns The openXdox half of BUILD slice 2b. It is REQUIRED for this leg's `validate` to stay green once `opensoft/openDox-code` #10 lands, and it must land in the same window: the ratchet refuses an unrecorded FALL exactly as it refuses a rise, so a green check here goes red on somebody else's merge otherwise. THE TABLE. 9 import-time / 19 deferred over five modules becomes 0 / 19 over five. `branch_session.py` (1, 7) -> (0, 7), `cli.py` (3, 1) -> (0, 1), `serve.py` (5, 2) -> (0, 2); `serve_project.py` and `serve_workbench.py` were already at zero import-time and are unchanged. No module leaves the table, because none reached (0, 0): every one of the five still reaches the consumer from inside a verb, which is the direction working rather than surviving. THE WHOLE INVERSION IS GONE AT IMPORT TIME, which this table has never been able to say before. The 13-line openDox->openXdox inversion the census RULED 5626260214 named is at zero. The 19 deferred reaches are not a lesser version of the same defect and are owed no slice of this arc: § 4.3/§ 4.5 injection removes the calls themselves, at this leg, on its own schedule. THE PIN moves with the table, because the table is MEASURED through it — `_pinned_opendox_root()` reads `find_spec("opendox")` and `validate` installs whatever `pyproject.toml` names. Bumping one without the other is the state the ratchet exists to refuse. This names openDox-code #10's HEAD, which is correct for review and wrong for `main`: the lane re-pins to the MERGE sha before this lands. THE DRIFT GUARD, which is new machinery and the reason this is not a two-line act. Slice 2b could not defer eleven of the reaches behind a stand-in, because a DEFAULT ARGUMENT is evaluated where the `def` sits: `branch_session.py`'s nine `records_dir` sites and `serve.py`'s two in `build_server`. openDox had to stop reaching and hold the values itself (`opendox/defaults.py`), which is the right answer for values openDox owns and buys the one failure mode a reach does not have — the two copies can DRIFT, and after the direction fix neither repository imports the other, so nothing would notice. A gate record would be written to one directory and looked for in another, or a snapshot peeked with one TTL and served with another, with every suite on both sides green. `test_the_opendox_owned_defaults_match_this_leg` holds the three values together. It lives HERE and the asymmetry is deliberate: this leg pins openDox and can read both spellings, while openDox pins nothing back and by construction cannot read this one (design.md:243, RULED OQ-2) — a drift guard at the neutral leg would be the back-import all over again. It compares by AST rather than by import, because `openxdox.gate_console` pulls in `doc_health` and the rest of this leg's runtime, and a drift in a CONSTANT should not be reportable only when every unrelated dependency of its module happens to be installed. A COUNT CORRECTED. The census note said the reverted default-argument conversions were "(7 sites and 2)". It is NINE and 2 — slice 2 miscounted `branch_session.py` and openDox-code's own test file repeated it, until a review pass on #10 caught it there. Corrected in both files in this window. WHAT THE TABLE STILL CANNOT SEE, recorded rather than papered over. Two modules of the pinned openDox still do not import with no consumer present, and NEITHER is blocked by `openxdox` any more: `opendox.serve` and `opendox.cli` are blocked by `ideation_dashboard`, openxFactory's pre-carve package name, a `stays_openxfactory_adapter` row (RULING DQ-1) present at neither carve destination. It is censused at openDox-code and owed a later act, and it is invisible to this table by construction — the table counts `openxdox` and nothing else. openDox-code's `tests/test_consumer_reach.py` is where the import property itself is asserted, and its `NEUTRAL_MODULES` now holds `branch_session` beside `workbench`, `serve_workbench` and `consumer_reach`. Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Reviewer's GuideThis PR pins openDox-code #10 and completes BUILD slice 2b by eliminating all measured openDox-to-openXdox import-time reaches, replacing unavoidable default-argument and mixin dependencies with openDox-owned implementations, and adding an AST-based guard to prevent duplicated defaults from drifting. Sequence diagram for pinned openDox validation and ratchet measurementsequenceDiagram
participant Validate
participant Pin as Pinned openDox code
participant Census as Dependency census
participant Guard as AST drift guard
Validate->>Pin: install dependency at pinned commit
Census->>Pin: find_spec(opendox)
Pin-->>Census: pinned package root
Census->>Census: measure import-time reaches
Census-->>Validate: ratchet result 0 / 19
Guard->>Guard: compare openDox and openXdox defaults by AST
Guard-->>Validate: pass or report drift
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 drift guard duplicates ownership metadata and may validate the wrong module pair if defaults move.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Completes BUILD slice 2b by repinning openDox, eliminating import-time back-imports, and guarding mirrored defaults.
Changes:
- Updates the openDox dependency pin.
- Lowers the import-time back-import ratchet to zero.
- Adds AST-based default consistency checks.
File summaries
| File | Description |
|---|---|
tests/test_dependency_direction.py |
Updates ratchet data and adds default-value validation. |
pyproject.toml |
Repins the openDox dependency. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
`e07e3de8` was that pull request's head when this branch was cut; two review rounds have landed on it since (`cc1d806b`). The census this file records is MEASURED through the pin, so a stale one means `validate` here proves the table against a tree nobody is reviewing any more. The two commits since are test additions and carry no census change — the table is unchanged, and that is the claim this bump lets CI check rather than assert. Still a HEAD sha, which is right for review and wrong for `main`: the lane re-pins to the MERGE sha before this lands. Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`opendox/defaults.py` exports `MIRRORED_AT_CONSUMER` — `(consumer module, attribute) -> the name THERE` — with a docstring naming this guard as its only reader: *"so the guard reads the pairing from the side that owns the values rather than restating it a third time."* The guard restated it anyway, which a review pass caught. The restatement is not merely redundant, it is the guard's own failure mode one level up. Re-home a value from `gate_console` to another module of this leg, or rename it, and a hand-kept inverse goes on naming the old pair — so every literal comparison keeps passing while the thing being compared is no longer the thing in use. A guard that can hold the wrong pair silently is the position the mirrored literal was in before this guard existed. `test_the_owned_defaults_table_matches_the_mapping_opendox_publishes` now inverts the published mapping and compares it against this file's table, and the per-value test resolves its pair from the published mapping rather than from the table. The table stays as a RECORDED expectation for the reason the census above is recorded: a change in what openDox owns should reach a reader of this file as a failure that names the change, not as a table that quietly follows whatever the pin happens to publish. It falls back to the table only when the mapping itself has gone missing, so that failure stays about the literals while the test above says what actually broke. `_module_level_literals` also widens its `except` to `TypeError` and `SyntaxError`: `MIRRORED_AT_CONSUMER` is the first non-scalar it reads, and a malformed one should be skipped as "not a literal" rather than erroring out of the walk and taking every other constant with it. Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Two moderate findings remain unresolved, including the required merge-SHA pin.
Review details
Suppressed comments (3)
pyproject.toml:106
- Before this can land on
main, replace this head SHA with openDox-code #10's merge commit SHA. The current pin is intentionally the PR head for review, but it does not satisfy the stated landing pin contract and will leave this leg pointing at the pre-merge revision until it is repinned.
"opendox @ git+https://github.com/opensoft/openDox-code@cc1d806be6453fcf82b71040724b9a67532c3647",
tests/test_dependency_direction.py:313
- The sentence is grammatically malformed:
stood atis left inside the quoted phrase aftercalled, so the note does not clearly state what the census described. Close the thought afterinversion(or rephrase it asdescribed as ...).
#: from the 13 / 19 over six modules that the census RULED 5626260214 called
#: "the 13-line openDox->openXdox inversion" stood at.
tests/test_dependency_direction.py:431
openDox-code#10also exposesdefaults.MIRRORED_AT_CONSUMERspecifically as the owner-side mapping for this guard, but this table retypes the three pairs instead of reading or validating that mapping. If the owner adds, removes, or renames a mirrored default, this test can remain green while no longer covering the value set the upstream declares. Derive the pairs fromMIRRORED_AT_CONSUMER(using the same AST-only approach) or assert that the two mappings are identical.
#:
#: THE PAIRING IS NOT AUTHORED HERE. `opendox/defaults.py` publishes
#: `MIRRORED_AT_CONSUMER` — `(consumer module, attribute) -> the name THERE` —
#: for exactly this guard, in its own words: *"so the guard reads the pairing
#: from the side that owns the values rather than restating it a third time."*
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
The dependency must use the merge SHA, and the mapping guard needs stronger cardinality validation.
Review details
Suppressed comments (2)
pyproject.toml:106
- Before landing, replace this PR-head SHA with openDox-code #10's merge SHA. The referenced PR is still unmerged, so this dependency currently installs
cc1d806be645...rather than the merged BUILD-slice revision; the PR description explicitly requires the merge pin formain.
"opendox @ git+https://github.com/opensoft/openDox-code@cc1d806be6453fcf82b71040724b9a67532c3647",
tests/test_dependency_direction.py:493
- The inversion loses information when two consumer pairs map to the same openDox-owned name: the later entry overwrites the earlier one, so a mapping with an extra duplicate can still produce the expected
inverteddict (depending on insertion order) and leave the guard green. Assert that the published mapping has exactly the recorded number of entries before inverting it, so additions or duplicate ownership cannot be silently ignored.
inverted = {owned: pair for pair, owned in published.items()}
assert inverted == OPENDOX_OWNED_DEFAULTS, (
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
…2b landed) The ratchet table is measured through the pin; #10 landed on openDox-code main as 0f1f2e59e31b8304979f18d8af7108b0f82899fb, so the pin names the commit main carries rather than the pull request's head. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 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 2 days and 23 hours by commenting @sourcery-ai review. Upgrade to get a review now.
…statuses and immutability point from a registered DomainProfile (RULING C2; ASK-4 5634195861) (#14) Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 § 4.4 of split-opendox-two-layer-product, the CODE half, on RULING C2 (parameterize, do not ship one domain's words) and ASK-4 (5634195861); the openxFactory half — the real engineering profile and the ONE process-start registration — follows per the § 4.4 sequencing ruling (5634218589). The openXdox lifecycle engine gains its own DomainProfile: domain_profile.load() builds a validated, typed runtime object from a canonical YAML — status vocabulary by neutral role, per-kind terminal statuses, an immutability point, declared-only transitions and authorities — and one register() call a descendant makes at process start, with a late current() accessor that refuses loudly (DomainProfileNotRegistered) instead of falling back to openxFactory's hardcoded words. All eighteen sites across gate_console.py and generator.py that carried openxFactory's Status: taxonomy as literals (the eighteenth caught by this PR's own AST guard) now read the profile by role or act, so a descendant renaming a status needs no engine change. Two Copilot rounds closed the loader's robustness gaps: cross-axis referential integrity in load(); a malformed non-string field no longer loads as absent; a falsy-but-present gates declaration no longer loads as omitted; duplicate ids on four axes are refused by name; the recorded count reads eighteen. One finding stays on the record as a BUILD-arc follow-up: generator.py's separate doc_health-gated status check (doc_health is not importable at this leg). Lands after #13 (01357c8); validate 122 passed at 3c32203; 23 threads / 0 unresolved. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…he declared exclusion (#32) Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Arc: neutral-product-standalone-operability **On `main`.** #30 (T041) landed as `5fbd188e`, and #31 (T042) as `4e16db95` at 23:11:08Z. This PR was retargeted to `main` straight after, while #31's branch still existed, and `7a3e4882` merges `main` in, with no force-push and no rebase. Plan 034 task **T043** (openxFactory `specs/034-opendox-standalone-operation/tasks.md`, read at openxFactory `main` `7af30fc5`), slice P1-J, box 9.2: **the required check runs the whole suite, less the declared exclusion.** Claimed on openxFactory#656, comment `5860269897`. It is re-verified at the final head (§ "Checks on this PR"): CI's triple and the whole-suite triage, each as before. Brett ruled its one open question (b), openxFactory#656 comment `5870594693`. F9.1's pytest line takes one `--deselect` for the help-tree test, and F9.1 so amended passes here (§ "The falsifier"). Ruled: R1Q6 (d), R1Q7 (a), R1Q22 (a), openxFactory#656 comment `5817152735`; R1Q24 (a), R1Q25 (b), comment `5850003126`; F9.1's pytest line, comment `5870594693` (§ "Ruled: F9.1 and the left-out help-tree test"). After: T019, T041, T042, T007 batches C (#1172) and F (#1178); both batches have landed. T061 stays in phase 2, so `tests/test_snapshot.py` keeps its `consumer-schemas` entry. ## What changes 1. **`.github/workflows/validate.yml`** (`0b506a92`). - The `pytest` step loses its sixteen-file list and pytest's no-conftest flag. It runs `python -m pytest -q --junitxml=pytest-report.xml` with the conftest chain in play and no path. pytest takes `testpaths = ["tests"]`, so `tests/` is collected whole, `tests/integration/` included. The root `conftest.py` (T041) leaves out `tests/declared_exclusion.yaml`'s 66 files and prints them as an open extraction. - All eight lines that named the flag are gone, comments included, because F9.1 counts them with `grep -c`. The long per-file account of the old list is replaced by a pointer to its history (`git show d84b504:.github/workflows/validate.yml`). That replacement also removes the stale `5c137a90` line at `:198`. - T042's `integration (9.3)` step folds into the whole-suite step, since the whole suite collects `tests/integration/` itself. The exclusion that step carried comes with it unchanged: the `LEFT_OUT` deselect and the `::notice::` line for RULED openxFactory#656 comment `5859927858` (the 31-entry help-tree test, out with its stated reason until T008). The guard test beside that test, and its module docstring, now name the whole-suite step (`tests/integration/test_assembled_surface.py`, three wording edits). - The triple reads one report again. Its comment names every skip it pins (§ "The triple"). - **The floors were not moved in this commit.** Its CI runs printed the numbers against the old pins and failed on the exact skip pin, as #25's rule has it ("the first commit of that pull request having printed them before this step pinned them"). `b1d127c0` then pinned what CI printed (§ "The triple"). 2. **The stale present-tense `5c137a90` pin claims** (`69646675`), in `src/openxdox/view_extensions.py`, `tests/test_dependency_direction.py` and `tests/test_gate_loop_probes.py:197`. Each is respelled to what it says at `2d116415`, measured there (§ "The sweeps"). The protected `tests/test_gate_loop_views.py` is left alone. 3. **The docstrings T043's own change made untrue** (`01fbbd98`). Six places said in the present tense that `validate` names a file or runs it with the conftest chain off: `tests/test_corpus_shape.py`, `tests/test_domain_corpus_adapter.py`, `tests/test_domain_profile.py`, `tests/test_dependency_direction.py`, `tests/test_gate_loop_probes.py` and `tests/opendox_bundle.py`. 4. **The re-pin** (`b1d127c0`): `MIN_SELECTED` 574 -> 890, `MIN_PASSED` 568 -> 880, `EXPECT_SKIPPED` 6 -> 10, from CI's own run, with a RE-PINNED BY paragraph (§ "The triple"). 5. **Two wording fixes from Copilot's rounds.** - `799a4950` names the one deselected test beside the exclusion wherever the check's scope is stated: `tests/test_dependency_direction.py`'s module docstring and `validate.yml`'s header (thread `4117373483`). - `b944104a` respells `tests/test_gate_loop_probes.py`'s call-site note, which said "`validate.yml`'s record block carries the total, 43". That block is gone since T043, so the note says it carried the total until then, and names `git show d84b504:.github/workflows/validate.yml`. The same note's "at THIS head" now names the head it meant, #21's: squashed as `2529c10`, its diff adds 37 tests there and 6 in the views file. 6. **Merges, never a rebase or force-push.** - `33937b4a` merges `main` (#29's landing, `d84b5048`), bringing only `pyproject.toml`'s pin, `5c137a90` -> `2d116415`. #31 then carried that line too. - `9a67bafb`, `4e1def2d`, `890a4809` and `88cd8d4c` merge #31 at `bd34a141`, `412ce90a`, `2d1340f8` and `44902aec`. - `4e1def2d` had one conflict, in `validate.yml`. It keeps T043's rewrite and carries #31's two changes into it: its floors, `574/568`, and its RAISED BY paragraph. - `7a3e4882` merges `main` at `4e16db95`, #31's squash. That squash's tree is `44902aec`'s (`32a04bd1`), which `88cd8d4c` had already merged, so the merged tree is this branch's own (`eb9c2396`). Its two conflicts, `validate.yml` and `tests/integration/test_assembled_surface.py`, are T043's edits of #31's lines, and both resolve to this branch's side. Against `main`, this PR changes nine files. Commits 2, 3 and 5 change only comments and docstrings. Each touched file's AST, with docstrings masked, is unchanged (checked with `ast.dump`). No protected suite is edited (the 16 of 12.5's `git grep` and the 7 of 5.4a's glob). So no respelling needs R1Q7 (a)'s allow-list, and this PR does not create `tests/protected_suite_respellings.yaml`. ## The falsifier: F9.1 (openXdox-code), as T007's batches B and F amend it, and as RULED `5870594693` amends its pytest line Quoted from #1144's `tasks.md` at openxFactory `8421603a` (`sha256 ec2acf0c…`), with the ruling's one `--deselect` added to the ratified pytest line. The amendment itself is T007's: a bookkeeping PR that another writer is authoring, which lands through a Rule 6 window. This block is the text as run (`sha256 06921b49…`): ```sh set -euo pipefail W=$(mktemp -d) # scratch space, resolved at run time (never a host path) python -m venv --clear "$W/v9" # a FRESH environment: nothing already installed stands in . "$W/v9/bin/activate" pip install ".[test]" python -m pytest -q --deselect tests/integration/test_assembled_surface.py::test_the_assembled_help_tree_is_the_31_entry_tree_the_manifest_records # NOT --noconftest, NOT a file list test "$(grep -c -- --noconftest .github/workflows/validate.yml)" -eq 0 # AND no pytest step enumerates a subset: a named file list with no # --noconftest would otherwise pass the assertion above. python - <<'EOF' import re, sys, pathlib w = pathlib.Path(".github/workflows/validate.yml").read_text() body = "\n".join(l.split("#")[0] for l in w.split("\n")) named = set(re.findall(r'tests(?:_runtime)?/test_[A-Za-z0-9_]+\.py', body)) sys.exit(0 if not named else (print("FAIL: workflow still enumerates", len(named), "test files"), 1)[1]) EOF ``` The one line it changes, against #1144's ratified text: ```diff -python -m pytest -q # NOT --noconftest, NOT a file list +python -m pytest -q --deselect tests/integration/test_assembled_surface.py::test_the_assembled_help_tree_is_the_31_entry_tree_the_manifest_records # NOT --noconftest, NOT a file list ``` - **Batch B** (R1Q6 (d), `5817152735`; recorded in plan 034 § "Ruled amendments", not yet in #1144, since it lands once T041 names its file): `python -m pytest -q` collects the whole suite less the files in T041's declared exclusion file. The falsifier asserts three things: the file's count equals its entries, every entry carries its reason, and the run prints the exclusion as an open extraction. The two `validate.yml` assertions stay. - **Batch F** (R1Q24 (a), R1Q25 (b), `5850003126`; landed as #1178): the exclusion takes three more reasons, the rail, openxFactory's contracts, and the consumer's schemas for `tests/test_snapshot.py` alone. Every entry is reported as an open extraction. **Run as amended at `7a3e4882`, the final head**, from this checkout, in a fresh venv: **exit 0**. `pip install ".[test]"` gave openDox `commit_id 2d116415159b721b55613fe20a159afc46202d1f` (read from `direct_url.json`). Python 3.12.3, pytest 8.4.2. | line | result | |---|---| | `python -m pytest -q --deselect` the help-tree test | **PASS: `880 passed, 10 skipped, 1 deselected`**, the reading of the required check's own step (CI run `36357895876` at `7a3e4882`) | | batch B: the run prints the exclusion | yes: `open extraction: the declared exclusion`, `declared exclusion: 66 files, listed in tests/declared_exclusion.yaml and left out of this run`, the four reasons with their rulings, and 66 `excluded` lines | | batch B: count equals entries; every entry carries its reason | the root conftest refuses to load otherwise, and `tests/test_declared_exclusion.py` asserts both inside this run (`test_the_count_equals_the_entries`, `test_every_entry_carries_its_reason`), both passed | | `test "$(grep -c -- --noconftest …)" -eq 0` | **PASS**, `grep -c` prints `0` | | no pytest step names a test file | **PASS**, exit 0 | **Unamended**, the ratified pytest line exits 1 on that one test alone: `1 failed, 880 passed, 10 skipped`. The failure is `ModuleNotFoundError: No module named 'doc_health'`, through `openxdox/cli_gate.py`, measured at `7a3e4882` and at `b1d127c0`. That is the question the ruling answers (§ "Ruled"). **So F9.1 as amended passes at this head.** The required check and F9.1 now leave out the same one test, each by its own `--deselect`, and T008 removes both. ## Ruled: F9.1 and the left-out help-tree test RULED `5859927858` left the help-tree test out of T042's step until T008, with its stated reason, "which is R1Q6 (d)'s kind of exclusion", and said "F9.2 is unchanged". It said nothing of F9.1. The required check carries that exclusion as a workflow `--deselect`, because T041's declaration lists whole `tests/test_*.py` files directly in `tests/`. F9.1's bare `python -m pytest -q` never sees a workflow flag, so its pytest line exited 1 on that one test. This PR put three ways to settle it: (a) the declaration carries the one test; (b) T007 amends F9.1's pytest line to deselect it; (c) F9.1 stays red on it until T008. **RULED (b)**, openxFactory#656 comment `5870594693` (Brett Heap, 2026-09-28, verbatim choice: "(b) Amend F9.1 to deselect it (Recommended)"): - "A small T007 bookkeeping amendment adds one --deselect to F9.1's pytest line for tests/integration/test_assembled_surface.py::test_the_assembled_help_tree_is_the_31_entry_tree_the_manifest_records." - "It cites 5859927858 and this comment." "It lands through a Rule 6 window." - "T008 removes it together with the workflow deselect." So this PR changes no code for it. The step's `LEFT_OUT` stays, and T041's declaration stays file-only, as T041 landed it. Copilot's thread on it (`4117316098`) is answered with the ruling in `4122573866`, and resolved. ## The whole suite at T040's pin, every red file with its class T043 first runs openXdox-code's whole suite at T040's pin, as T005 did at `e28930bf`. Each `tests/test_*.py` file is named on the command line, so the declaration hides nothing (pytest collects a file named there whatever `collect_ignore` says), and `tests/integration` is named too. The conftest chain is in play, with `--continue-on-collection-errors`. At `7a3e4882`, the final head, openDox `2d116415`: **`107 failed, 1249 passed, 10 skipped, 127 errors`**, which is **234 red results in 67 files**. The table is the same one `b1d127c0` gave. The same run at `9a67bafb`, before T043's own commits, gave the same 234 in the same 67 files, with the same classes, and 1242 passed. The classifier is T005's persisted `classify_whole_suite.py` (`sha256 3a76945d…`), with one rule added for this pin. At T027's seam (openDox-code#41), the rail's reach now fails closed as `StatusExemptionNotRegistered`, not as a missing module, so class H also takes that refusal (the extended tool's `sha256 0721b897…`): ```diff + if "StatusExemptionNotRegistered" in txt or "the status-exemption rail cannot answer it" in txt: + return "H" # T043: the rail's refusal at openDox's seam (plan 034 T027), which replaced the module reach if "rfc3339-validator" in txt: ``` | class | cause | red | files | |---|---|---|---| | A | `doc_health` | 70 | 60 (59 declared, and the ruled-out help-tree test) | | H | openxFactory's status-exemption rail, refused at openDox's seam | 87 | 3 | | I | the contract family, read outside the checkout | 75 | 5 | | J | the consumer's schemas (7.3) | 2 | 1 (`tests/test_snapshot.py`) | | B–G, M | carve residue, `rfc3339-validator` | **0** | — | | ? | unclassified | **0** | — | - **No carve residue is left at this pin.** Classes B to G and M are empty, so T043 clears none. - The layer T005 found behind `tests/test_snapshot_validation_launch.py`'s fixture, `ProfileNotRegistered`, is gone at the pin, because T016 registers the default. Its 9 cases now fail on `doc_health` (no `ProfileNotRegistered` in any message), and the file is a `doc_health` entry. - **Every red file's classes equal its declared reasons exactly.** The two-reason entries are `tests/test_doxbench_packet.py` (A 3, H 54) and `tests/test_doxbench_blank_reason.py` (A 1, I 1). No declared file is green, and the one red file that is not an entry is the help-tree test, which the ruling handles. <details><summary>All 67 red files, each with its class and its declared reasons</summary> | file | red results, by class | declared reasons | |---|---|---| | `tests/integration/test_assembled_surface.py` | A `doc_health` (1) | not an entry: RULED 5859927858 leaves it out (`LEFT_OUT`) | | `tests/test_authoring_agent.py` | A `doc_health` (1) | doc_health | | `tests/test_branch_session.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_canvas.py` | A `doc_health` (1) | doc_health | | `tests/test_completeness.py` | A `doc_health` (1) | doc_health | | `tests/test_create_document_cli.py` | A `doc_health` (1) | doc_health | | `tests/test_create_project.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_abstract_envelope.py` | H the rail (1) | status-exemption-rail | | `tests/test_doxbench_abstract_route.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_blank_reason.py` | A `doc_health` (1), I the contracts (1) | doc_health, openxfactory-contracts | | `tests/test_doxbench_knowledge_service.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_mutation_boundary.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_doxbench_packet.py` | A `doc_health` (3), H the rail (54) | doc_health, status-exemption-rail | | `tests/test_doxbench_request_handling.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_save.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_scope.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_share.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_doxbench_thread_wiring.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_threads.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_transport.py` | A `doc_health` (1) | doc_health | | `tests/test_doxbench_turns.py` | H the rail (32) | status-exemption-rail | | `tests/test_doxchat_model_intake.py` | A `doc_health` (1) | doc_health | | `tests/test_edit_action.py` | A `doc_health` (1) | doc_health | | `tests/test_edit_project.py` | A `doc_health` (1) | doc_health | | `tests/test_explorer_viewer.py` | A `doc_health` (1) | doc_health | | `tests/test_gate_console.py` | A `doc_health` (1) | doc_health | | `tests/test_gate_failure_diagnostics.py` | A `doc_health` (1) | doc_health | | `tests/test_gateway_provenance.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_generated_at_anchor.py` | A `doc_health` (1) | doc_health | | `tests/test_generator.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_grouping.py` | A `doc_health` (1) | doc_health | | `tests/test_header_value_readers.py` | A `doc_health` (1) | doc_health | | `tests/test_hermeticity_gate_verbs.py` | A `doc_health` (1) | doc_health | | `tests/test_hosted_actor.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_kickoff.py` | A `doc_health` (1) | doc_health | | `tests/test_notebook_action.py` | A `doc_health` (1) | doc_health | | `tests/test_project_action_contracts.py` | I the contracts (11) | openxfactory-contracts | | `tests/test_project_aggregates.py` | A `doc_health` (1) | doc_health | | `tests/test_project_schema_election.py` | I the contracts (13) | openxfactory-contracts | | `tests/test_readiness_gate.py` | A `doc_health` (1) | doc_health | | `tests/test_register_edit_lane.py` | A `doc_health` (1) | doc_health | | `tests/test_renderer.py` | A `doc_health` (1) | doc_health | | `tests/test_repo_root_guard.py` | A `doc_health` (1) | doc_health | | `tests/test_repo_selector.py` | A `doc_health` (1) | doc_health | | `tests/test_round_trip.py` | A `doc_health` (1) | doc_health | | `tests/test_session_commits.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_confinement.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_document_ownership.py` | A `doc_health` (1) | doc_health | | `tests/test_session_gates.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_lifecycle.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_notebook.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_records.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_runbook.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_snapshot.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_transaction.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_session_verbs.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_snapshot.py` (protected) | J the consumer's schemas (2) | consumer-schemas | | `tests/test_snapshot_determinism.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_snapshot_registry.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_snapshot_validation_launch.py` (protected) | A `doc_health` (9) | doc_health | | `tests/test_source_dot_directories.py` | A `doc_health` (1) | doc_health | | `tests/test_staging_workbench.py` (protected) | A `doc_health` (1) | doc_health | | `tests/test_trust_gaps.py` | A `doc_health` (1) | doc_health | | `tests/test_validate_ideation_dashboard_contracts.py` | I the contracts (32) | openxfactory-contracts | | `tests/test_wheel_action_contracts.py` | I the contracts (18) | openxfactory-contracts | | `tests/test_wheel_model.py` | A `doc_health` (1) | doc_health | | `tests/test_wheel_verbs_cli.py` | A `doc_health` (1) | doc_health | 67 red files. </details> **The protected suites** (12.5's 16 and 5.4a's 7): 21 are red, each only for a declared reason. 20 are `doc_health`, and `tests/test_snapshot.py` is `consumer-schemas`. 2 are green: `tests/test_gate_loop_views.py` (74 passed) and `tests/test_snapshot_validator_home.py` (12 passed). No protected suite is red for a cause no bucket takes, so nothing stops this task, and none needs a respelling. **T041's layer 2, re-run at the pin** (the holder's decision on T041's landing). `tests/test_declared_exclusion.py` with `tests/test_hermeticity_runner_seams.py` gives 212 passed. `tests/test_hermeticity_gate_verbs.py` alone stops at collection on `No module named 'doc_health'`, its declared reason. The same file, with openxFactory's `scripts/` at `7af30fc5` on `PYTHONPATH` (R1Q23 (a)'s composition), gives 2 passed. ## The whole-suite step, as `validate.yml` runs it CI's own run `36357895876` at `7a3e4882`, the final head, is green. It measured `refs/pull/32/merge` over `main` `4e16db95`, with openDox-code `2d116415`. The `pytest` step gives **`880 passed, 10 skipped, 1 deselected`**, and `Pin the triple` reads `selected=890 passed=880 skipped=10 failures=0 errors=0`, at margin 0. A local run of the same step at the same head gives the same triple. It collects 27 files: - the sixteen the list named, still 564 tests between them (the old floor exactly: 558 passed, 6 skipped); - eight more under `tests/`, 316 tests: `test_declared_exclusion.py` (207), `test_doxbench_bridge.py` (60), `test_validator_schema_home.py` (12), `test_snapshot_validator_home.py` (12), `test_register.py` (10), `test_scope_column_split.py` (6), `test_hermeticity_runner_seams.py` (5) and `test_aggregation_register_instance.py` (4, all skipped); - `tests/integration/`, 10 tests: 4 + 5, plus the guard test in `test_assembled_surface.py`, with the help-tree test deselected. `tests/test_validator_schema_home.py` runs its 12 cases now that T040 declares `rfc3339-validator`, and all 12 pass, so it adds no skip. ## The triple **Re-pinned in `b1d127c0` from CI's own reading** (#25's rule: the numbers are CI's own, printed before they are pinned). - Run `36356408029` measured `890a4809`, the head before the re-pin, at `selected=890 passed=880 skipped=10 failures=0 errors=0`. It was refused only by the exact skip pin (`##[error]skipped 10, pinned exactly 6 …`). The pytest step passed. - The pins moved: `MIN_SELECTED` 574 -> 890, `MIN_PASSED` 568 -> 880, `EXPECT_SKIPPED` 6 -> 10. 574/568 were #31's floors, which this branch took in with its base, and floors only rise. The margin is zero, as #25 set it, and restoring it is T044's (9.4). - The pin step, run from the file over reports shaped as CI writes them: the measured report passes; one test fewer is refused at 889/879; one more skip is refused (`skipped 11, pinned exactly 10`); a missing report is refused. The ten skips, all named in the workflow comment: - **six**, the three seam suites' `doc_health` pairs, two each in `test_evidence_provenance_surface_seam.py`, `test_model_scenario_workbench_seam.py` and `test_role_authority_projection_seam.py` ("doc_health reachability is BUILD-arc work (§ 3.5/3.6) ... this test will assert for real once that lands"); - **four**, all of `test_aggregation_register_instance.py` ("aggregation checkout (seed register + pinned validator) not reachable"), which the list never ran. ## The sweeps (`69646675`, `01fbbd98`, `799a4950`, `b944104a`), each measured at `2d116415` - **`src/openxdox/view_extensions.py`**: the pin names `2d116415`, where `view_extension` imports and `ViewBinding` takes `exports`. `ViewBinding`'s fields, read from each commit's own source, lack `styles` at `0b4e8bbf` and carry it at `5c137a90` and `2d116415`. At `2d116415`, `specs_for()` drops nothing: six bindings materialize, five carry sheets, and the four distinct sheets are live. - **`tests/test_dependency_direction.py`**: - There were four pin bumps, not three. - The census the file itself computes (its own `_modules`/`_census`) was run over openDox-code's `src/opendox` at every first-parent commit. It equals `OPENDOX_BACK_IMPORTS` at all 14 from `a99eba03` to `5c137a90`, and at all 29 from `5c137a90` to `2d116415`. - The note called the first range five landings. `git rev-list --count --first-parent a99eba03..5c137a90` gives 13 (#13 to #27), so it now says 13, and still names the five it named. - At `2d116415`, openDox-code's `NEUTRAL_MODULES` holds nine modules and `STILL_REACHING` is empty. `opendox.serve` and `opendox.cli` import in a venv holding that commit alone, with none of `openxdox`, `ideation_dashboard`, `doc_health` and `corpus_adapter_openxfactory` findable. So the paragraph that said they did not import (the reach T011, openDox-code#46, removed) is respelled. - **`tests/test_gate_loop_probes.py:197`**: the declared leg is `2d116415` now. - **`tests/test_gate_loop_probes.py:1635-1643`** (`b944104a`): the call-site note's record-block total is history now (§ "What changes", 5). The file gives 55 passed. - **The docstring sweep**: each place now says how the file ran until T043 and how it runs since. The standalone property each one states still holds, so it stays. - With these edits, the touched test files pass at `2d116415`: `test_dependency_direction.py`, `test_gate_loop_probes.py` and `test_gate_loop_views.py` give 145 passed. The docstring sweep's five test files give 312. **Left alone, for the holder:** - `tests/test_gate_loop_views.py` is protected (12.5). Its `:1046`, `:1146` and `:1166` still name `5c137a90` as today's pin, and its `:15` still places it "on `validate`'s explicit list". Respelling them needs an entry in R1Q7 (a)'s allow-list. - `tests/test_hermeticity_gate_verbs.py:27,59` (T041's file, #30) names `5c137a90` beside `71b631bc` as the openDox it was measured at, which is history. - `tests/integration/test_assembled_bundle.py:164` (T042's file, #31) says the relocated files "are collected `--noconftest` as top-level modules", which was openDox-code's state before its T036. Here they run with the chain in play. ## Checks on this PR - **validate**, each run CI's own, on `refs/pull/32/merge`: - `7a3e4882`, the final head, over `main` `4e16db95`: run `36357895876`, green. The `pytest` step gives `880 passed, 10 skipped, 1 deselected`, and `Pin the triple` reads `selected=890 passed=880 skipped=10 failures=0 errors=0`, margin 0. - The heads before it, all green with the same triple: `b944104a` (run `36357806519`), `799a4950` (`36357279997`), `88cd8d4c` (`36357038236`) and `b1d127c0` (`36356547905`). - The runs before the re-pin, `36356259272` at `4e1def2d` and `36356408029` at `890a4809`, each passed the pytest step and were refused only by the exact skip pin, which is the refusal working. - **SonarCloud**: green at `7a3e4882`, as at every head since `b1d127c0`. - **Re-verified locally at `7a3e4882`**: - The step as CI runs it gives `880 passed, 10 skipped, 1 deselected` and the triple `890/880/10/0/0`. - The whole-suite triage gives the same 234 red results in 67 files. Each file's classes equal its declared reasons, and the one undeclared file is the ruled-out help-tree test. - F9.1 as the ruling amends it: exit 0 (§ "The falsifier"). - **Copilot**: - `5332460299` at `01fbbd98` ("Changes recommended") found two things. On the stale floors: fixed in `b1d127c0`, answered in `4117343809` (the thread was already resolved). On F9.1 and the workflow-only deselect: answered with the measurement in `4117343892`, then with the ruling in `4122573866`, and resolved. - `5332487263` at `4e1def2d` repeats the F9.1 finding. The overviews `5332499740` at `890a4809` and `5332517512` at `b1d127c0` are answered in comment `5860616093`. - `5332550775` at `88cd8d4c` found a scope sentence that left out the deselected test. It is fixed in `799a4950`, answered in `4117377168`, and resolved. - `5332570488` at `799a4950` named "the workflow and probe comments". The workflow's is the F9.1 thread. The probe comment's was the record-block total, fixed in `b944104a`. Both are answered in comment `5860781990`. - `5332612906` at `b944104a` and `5332620490` at `7a3e4882`, the final head, raise nothing new. Their one open finding was the F9.1 thread, now ruled and resolved. - **Clean at `7a3e4882`**: the dependencies have landed, validate and SonarCloud are green, and every review thread is resolved. ## For T044 (9.4, openXdox's half) - The floors T044 inherits are this PR's: `890/880/10`, at zero margin. T044 re-pins at CI's own reading, as 9.4 and T044's text have it for openXdox, not in openDox-code's form three below CI's reading (the holder's direction, 2026-09-28). - The six `doc_health` skips live in three files that also hold passing tests. The seam suites have 10, 12 and 8 tests, 24 passing among them, and all 24 would leave with their files. - **A file that only skips cannot be declared as it stands.** `tests/test_declared_exclusion.py` holds each entry to failing alone for exactly its reasons, and a file that skips does not fail. So each skip must first become a real assertion (which fails on `doc_health` until T008). Then either its file joins the declaration, taking the 24 passing tests out with it, or its two cases move to a file of their own that joins it. Whichever it does, the counts drop, and T044 re-pins these floors in the same commit, as the workflow comment now says, before restoring the margin. - The four aggregation-register skips are not `doc_health` skips. 9.4 names only the six. They skip because the aggregation checkout (the seed register and its pinned validator) is not in a lone checkout. If T044 reads them as carrying the gap, the declaration has no reason that admits them, and a fifth reason needs a ruling first. Otherwise `EXPECT_SKIPPED` stays at least 4 after T044. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>



Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
The openXdox half of BUILD slice 2b. It is required for this leg's
validateto stay green onceopensoft/openDox-code#10 lands, and it must land in the same window — the ratchet refuses an unrecorded FALL exactly as it refuses a rise.Refs opensoft/openXfactory#656
1. Two moves, and they are one act
pyproject.tomlopendox @ git+…@da8aae969b40@0f1f2e59e31b— openDox-code #10's merge sha on mainOPENDOX_BACK_IMPORTSNo module leaves the table, because none reached
(0, 0): all five still reach the consumer from inside a verb. The pin and the table are one act because the table is measured THROUGH the pin —_pinned_opendox_root()readsfind_spec("opendox"), andvalidateinstalls whatever that line names.2. The whole inversion is gone at import time
This table has not been able to say that before. The census RULED
5626260214called "the 13-line openDox→openXdox inversion" stood at 13 / 19 over six modules; slice 2 took it to 9 / 19 over five; slice 2b takes the import-time half to zero.The 19 deferred reaches are not a lesser version of the same defect and are owed no slice of this arc. They resolve inside verbs — the direction working, not the direction surviving (
design.md:243) — and § 4.3/§ 4.5 injection is what removes the calls themselves, at this leg, on its own schedule.3. The drift guard, which is why this is not a two-line act
Slice 2b could not defer eleven of the reaches behind a stand-in, because a default argument is evaluated where the
defsits:branch_session.py's ninerecords_dirsites andserve.py's two inbuild_server. openDox had to stop reaching and hold the values itself (opendox/defaults.py).That is the right answer for values openDox owns, and it buys the one failure mode a reach does not have: the two copies can drift, and after the direction fix neither repository imports the other, so nothing would notice. A gate record written to one directory and looked for in another; a snapshot peeked with one TTL and served with another — with every suite on both sides green.
test_the_opendox_owned_defaults_match_this_legholds the three values together:opendox/defaults.pyDEFAULT_RECORDS_DIRgate_console.DEFAULT_RECORDS_DIRDEFAULT_INDEX_NAMEsnapshot_registry.DEFAULT_INDEX_NAMEPEEK_TTL_SECONDSsnapshot_registry.PEEK_TTL_SECONDSIt lives here, and the asymmetry is deliberate. This leg pins openDox and can read both spellings; openDox pins nothing back and by construction cannot read this one (
design.md:243, RULED OQ-2). A drift guard at the neutral leg would be the back-import all over again.It compares by AST, not by import.
openxdox.gate_consolepulls indoc_healthand the rest of this leg's runtime, and a drift in a constant should not be reportable only when every unrelated dependency of its module happens to be installed.4. A count corrected
The census note said the reverted default-argument conversions were "(7 sites and 2)". It is nine and 2 — slice 2 miscounted
branch_session.py, openDox-code's owntests/test_consumer_reach.pyrepeated it, and a review pass on #10 caught it there. Corrected in both files in this window.5. What this table still cannot see — recorded, not papered over
Two modules of the pinned openDox still do not import with no consumer present, and neither is blocked by
openxdoxany more.opendox.serveandopendox.cliare blocked byideation_dashboard— openxFactory's pre-carve package name, astays_openxfactory_adapterrow (RULING DQ-1) present at neither carve destination, so the carve'simport rewritesclass had nothing lawful to rewrite it to. It is the same defect class § 4.1 fixed on this side, it is censused at openDox-code, and it is owed a later act.It is invisible to this table by construction: the table counts
openxdoxand nothing else. The import property itself is asserted at openDox-code, intests/test_consumer_reach.py, whoseNEUTRAL_MODULESnow holdsbranch_sessionbesideworkbench,serve_workbenchandconsumer_reach, and whoseSTILL_REACHINGnow records the blocking package per module so that this substitution cannot pass unread.🤖 Generated with Claude Code
Summary by Sourcery
Complete the next openDox extraction step by eliminating its import-time dependency inversion and guarding mirrored defaults against drift.
Enhancements:
Build:
Tests: