Repository navigation
T035: empty collect_ignore; the seven modules run in a lone checkout (plan 034) - #51
Conversation
…(plan 034 T035) The root conftest's collect_ignore held seven test modules under RULED Q-L3 (b). It is empty now, and requirement 9 (FR-006) is why: an entry there is an undeclared exclusion. Each module is rewritten in place as a neutral openDox test. Fifteen cases that test another repository's tree leave this suite, and the PR body lists each with its destination: thirteen become named openxFactory composition tests (T047), and two join openXdox-code's declared doc_health exclusion (T041). - tests/hermeticity.py: layer 2 of the guard was OFF in this suite. runner_seams() probed ideation_dashboard.*, a package this leg does not have, and returned no seams. It now names opendox.workbench and opendox.session_pr directly. The hookup set, the exempt set and the rootdir anchor (pyproject.toml) now describe this leg's layout. - test_hermeticity.py: the open-session-notebook case registers a home corpus first (the P1-E hand-off), over a scratch worktree. The slot, hookup, two-directory and anchor cases describe this layout. The handler scan reads src/opendox (it read nothing before) and fails if it reads no module. The anchor case matches the whole rootdir value. - test_doxbench_entrypoint.py: cmd_generate_and_open runs for real, with the six phase-1 reaches stood in (plan.md "Phase-1 limit"; T011's standalone fixture). - test_model_provider_broker.py: two carve-residue source paths, one import string, and the forbidden-member set carried in. - test_subcommand_extension.py: five core verbs; gate is host-contributed. - test_doxbench_chat_view.py: the browser/server ceiling pair is pinned here; the released-schema pair moves to openxFactory. - test_workbench.py, test_session_harness.py: the cases that read openxFactory's validator, doc-health check, sync script or aggregation checkout move to openxFactory. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewer's GuideThis PR empties the root pytest exclusion list and rewrites the seven previously ignored modules to run in a lone openDox checkout, replacing cross-repository dependencies with standalone paths, explicit phase-1 seams, and stronger hermeticity/collection guards while documenting fifteen cases for their declared destination repositories. Sequence diagram for phase-1 generate-and-open test seamssequenceDiagram
participant Test as Test
participant CLI as opendox.cli
participant Serve as opendox.serve
participant Model as declared_model_port_factory
participant Session as Session root
Test->>CLI: cmd_generate_and_open
CLI->>Model: declared_model_port_factory
CLI->>Session: corpus_root_refusal
CLI->>CLI: generate_snapshot
CLI->>Serve: build_server
Serve->>Serve: _checkout_real
Serve-->>CLI: server with phase-1 seams
CLI-->>Test: declared model port and session-root behavior
State diagram for hermeticity guard activationstateDiagram-v2
[*] --> Layer1
Layer1: PATH shim active
Layer1 --> Layer2
Layer2: runner_seams names opendox.workbench and opendox.session_pr
Layer2 --> Guarded: default runner and session runner intercepted
Guarded --> Green: tests remain hermetic
Green --> [*]
Flow diagram for emptying pytest collection exclusionsflowchart TD
Start["pytest collects tests/"] --> Ignore["collect_ignore = []"]
Ignore --> Modules["Seven rewritten test modules"]
Modules --> Standalone["Neutral standalone execution"]
Standalone --> Result["288 additional cases pass"]
Standalone --> Destinations["Cross-repository cases move to declared destinations"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The broad test-suite changes warrant final human review, with one documentation nit remaining.
Review effort: Lite
Findings: None
What changed in this PR
Adapts the openDox test suite for standalone operation by removing collection exclusions and updating repository-specific tests.
Changes:
- Empties
collect_ignore. - Updates standalone paths, seams, fixtures, and command expectations.
- Strengthens hermeticity, entrypoint, and browser/server consistency coverage.
| File | Summary |
|---|---|
tests/test_workbench.py |
Retains standalone workbench coverage. |
tests/test_subcommand_extension.py |
Updates standalone command expectations. |
tests/test_session_harness.py |
Preserves standalone ignore-pattern coverage. |
tests/test_model_provider_broker.py |
Retargets paths and provider checks. |
tests/test_hermeticity.py |
Updates standalone fixtures and rootdir checks. |
tests/test_doxbench_entrypoint.py |
Adds phase-one dependency stand-ins. |
tests/test_doxbench_chat_view.py |
Pins browser/server ceiling consistency. |
tests/hermeticity.py |
Updates standalone guard configuration. |
conftest.py |
Removes collection exclusions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
T034 landed after T032, so this takes main at 71b631b. No file overlaps: #50 repaired nine other modules. The seven modules and the whole tests/ directory re-run at this merged head. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ked (plan 034 T035) Copilot's review at 81f9377 asked for two cases. - The chat ceiling: the pair pin holds the browser's constant to the server's, and cannot see both move together. The case now also holds the server's to the released maxLength, 500, carried with its source (openDox-spec's xfactory-workbench-chat-turn.schema.yaml, read at openDox-spec main 8fe8c4c7). Planted: both constants at 600, and only this line fails. - The rootdir anchor: a negative control on a scratch tree. A nested tests/pyproject.toml with a pytest table makes tests/ the rootdir, and the header still prints configfile: pyproject.toml. The substring match and the configfile check both accept that; the whole-value match refuses it, and accepts the tree's own root once the nested file is gone. Planted: the substring match back, and the control fails. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…4 T035) Copilot's review at 4e5c89a read the case as leaking the registered home factory. It does not, and this was measured. In a pytest run whose only item is this case, `corpus_adapter._home_factory` is the same object after teardown as before, both when nothing was registered and when a different factory was. With the recording line removed, it is not, in either state. The line that does the restoring, `monkeypatch.setattr` handed the current value, now says so in a comment. No behaviour changes. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Copilot's review at The two lines are: monkeypatch.setattr(ca, "_home_factory", ca._home_factory)
ca.register_home(cli_mod._default_home_factory)Handing The probe. It runs pytest with this case as the only item. A The same probe with the So that line is what prevents the leak. Lane: openxfactory-4 (openXfactory-4-openDox_extraction) |
…lan 034 T035) Copilot's review at 4100cee found the two-directory case failing in a .[test]-only venv. There tests_runtime/test_oidc_verifier.py cannot import httpx, because the test extra gains the runtime packages only in T036. That error is the same in both argument orders, so it is not a slot defect. The case required a clean exit, and so turned a missing package into a slot failure. The case now compares the whole outcome of the two orders: the count, and the files that failed to collect. It fails when they differ, which is the only thing it can see that the whole-suite run cannot. Any collection error is still refused by the suite itself and by the pinned triple. Measured: - It passes in the full venv and in the lean one. - With tests/conftest.py's claim removed, it fails in both. - In the lean venv, `python -m pytest -q tests/` is now down to T030's pre-existing failure alone (1 failed, 1859 passed, 13 skipped). - All fourteen planted mutations are still caught. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
|
READY at b173a97 — Lane: openxfactory-4 (openXfactory-4-openDox_extraction) |
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 3 days and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.
T035 emptied collect_ignore, so the seven modules it repaired now join the whole suite this branch's `validate` runs. The pins are re-read from CI's own run over this merge, not derived. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…hy it was narrowed (plan 034) (#52) Plan 034, task **T036**, with **T031** in the same PR (its "Lands with: T036"), slice P1-G (the whole suite in CI). The plan is `specs/034-opendox-standalone-operation/tasks.md` at opensoft/openxFactory `main` `a9e7db75`; its T031, T035, T036 and T037 entries are unchanged since `133e37d9`. This PR realizes boxes **2.5**, **9.1** and **9.2a** (a required check now runs T030) of the ratified `add-neutral-product-standalone-operability`, and T031 realizes **2.6**. - **Ruled:** R1Q8 (a), openxFactory#656 comment `5817152735`: `tests_runtime/` is part of the whole suite, with PostgreSQL in the required job. - **Claim:** openxFactory#656 comment `5856501803`. - **After:** T035 (#51, landed as `80acead1`) and T038 (#48, landed). This branch merged that `main` at `56d51edc`, with no force-push. ## What changes **`.github/workflows/validate.yml`.** The three pytest steps are gone, with their file lists, their comment blocks and every line that named the flag that switched the conftest chain off. The one required job now does four things: 1. It installs `.[runtime,test]` under the lock, with `--only-binary :all:`. That is R1Q8 (a)'s install, the one the `runtime` job used. 2. It runs a `postgres:16` service. 3. It runs `python -m pytest -q --junitxml=pytest-report.xml` with the DSN exported. No file list: `testpaths` is the suite. 4. It pins the triple from that one report. **The `runtime` job is folded in**, which T036 allows ("may then be folded in"). It was advisory under RULED Q-R3 (`5701772032`) "until a separate DECLARED act", and R1Q8 (a) is that act. Keeping it would run every DB-backed case twice, once required and once not. Under `CI` those cases fail rather than skip (`tests_runtime/conftest.py`), so a job whose service did not start is red, not green. **`pyproject.toml`.** - `testpaths = ["tests", "tests_runtime"]`. - The `test` extra gains `opendox[runtime]`. F9.1 installs `.[test]` alone, so without the runtime packages half of `tests_runtime/` would fail under `CI` and skip elsewhere. The extra is named rather than copied, so the runtime's list is still declared once. - The runtime extra's comment now says why the required job may install it. `tests_runtime/test_runtime_surface.py` measures the import-weight contract in a fresh interpreter by what lands in `sys.modules`, so a leak is named with the extra installed and fails to import without it. **`Pin the triple`.** - It reads one report. A missing report now stops the step with one refusal that names the file, instead of failing a zero read from nothing against every floor. - The skip refusal's message names no test file, which F9.1's second assertion requires. It also no longer lists "an edit to one of the three explicit lists", because there are none. - **The floors are CI's own reading: `2481` / `2468`, and SKIPPED exactly `13`.** Each move names its run: | head | run (job) | CI printed | why it moved | |---|---|---|---| | `56d51edc` | 36333569456 (108660020012) | `selected=2459 passed=2446 skipped=13` | T035's merge. Its 289 cases are the whole difference from the pre-T035 local replica (2170 / 2157) | | `485e085a` | 36334996991 (108664042314) | `selected=2471 passed=2458 skipped=13` | twelve run-count cases (below) | | `db3e8a4f` | 36337919108 (108672216615) | `selected=2481 passed=2468 skipped=13` | ten more, for runs hidden inside a wrapper | | `13383a6f` | 36338192590 (108672985586) | `selected=2481 passed=2468 skipped=13`, `margin 0` | the floors at that reading | | `1808146a` | 36339036146 (108675365224) | `selected=2481 passed=2468 skipped=13`, `margin 0` | this head; since `13383a6f`, comments, docstrings and one assertion message only | **The pins that held the old shape**, rewritten for this one: - `tests/test_triple_pin.py` covers one report. It gains `test_the_pin_reads_the_report_the_pytest_step_writes`, which holds the `--junitxml` target and `REPORTS` equal, so a rename of either cannot leave the pin reading a file nothing writes. - `tests_runtime/test_deploy_shape.py`: - `test_the_workflow_declares_the_required_job_and_its_steps`: one job, and one pytest run across every step, with no positional argument after it. - The run count is `_pytest_runs`. It splits each script on every shell separator (`&&`, `||`, `;`, a pipe, a background `&`, a newline, a subshell and a command substitution). It counts the word `pytest` wherever it stands in a command, so `env`, `timeout`, `uv run`, `xargs`, `sh -c`, `bash -c` and `pytest.main(` cannot hide a second run. It errs toward counting, and says so. `test_the_run_count_sees_every_shell_separator` drives the count over 22 scripts, including the two that pin that direction. - `test_the_required_job_supplies_a_postgres_service_and_the_extras`. - `test_the_required_job_installs_the_runtime_and_test_extras`, which replaces `…installs_only_the_test_extra`. Its docstring gives the measured reason the old premise no longer holds. - The lock case counts one workflow install instead of two. **Prose the fold made false:** - `tests_runtime/conftest.py`'s header, and its `_skip_or_fail` text and message; - `docs/runtime.md`: the tree line, the § 8 table, and § 9's two residue bullets, now CLOSED; - the header of `constraints-cpython312-linux.txt`, comments only, with no pin moved; - every statement that the required job installs `.[test]` and not `.[runtime]`, or that the case runs in "BOTH jobs". These are in `src/opendox/runtime/__init__.py`, `config.py`, `db.py`, `identity.py`, `migrations.py` (twice) and `cli.py`, and in `tests_runtime/test_runtime_cli.py`, `test_runtime_surface.py`, `test_migration_shape.py`, `test_schema_shape.py`, `test_oidc_verifier.py`, `test_deploy_shape.py` and `test_local_git_adapter.py`. There are two more in `tests/test_consumer_reach.py`, and one in a `pyproject.toml` comment. The import-weight contract itself is unchanged; - the three DB-backed modules' headers, which said they run in the `runtime` CI job: `tests_runtime/test_api_endpoints.py`, `test_migrations_apply.py` and `test_repository_act.py`. They run in `validate`, and under `CI` they fail rather than skip without a database; - the lock test's missing-lock message, which named "the three installs". There are two: the required job's and the image's. **T031, `README.md`:** box 2.6. The paragraph gave the narrowing's reason as the openDox → openXdox dependency. It now says what `validate` runs (the whole suite, no exclusion), and that the live cause of the old narrowing was the carved code's reaches into `ideation_dashboard`. The dependency itself was inverted at import time first. ## The falsifier: F9.1 (openDox-code), both assertions, with the database DSN exported This is F9.1 verbatim from #1144's `tasks.md`, after one line that exports the DSN, quoted, the way the job does. The database is a private `postgres:16` container. The run is at this head, `1808146a`: ``` export OPENDOX_TEST_DATABASE_URL='postgresql://opendox:opendox@host.docker.internal:55471/opendox' set -euo pipefail W=$(mktemp -d) python -m venv --clear "$W/v9" . "$W/v9/bin/activate" pip install ".[test]" python -m pytest -q # NOT --noconftest, NOT a file list test "$(grep -c -- --noconftest .github/workflows/validate.yml)" -eq 0 python - <<'EOF' … EOF # the named-file check, verbatim ``` It exits 0: ``` 2468 passed, 13 skipped, 1 warning in 313.37s (0:05:13) ``` It exited 0 at `13383a6f` too, with the same counts. That was before the last two commits, which change comments, docstrings and one assertion message only. `pip install ".[test]"` brings FastAPI, psycopg, PyJWT and httpx through `opendox[runtime]`. The flag count is `0`. The named-file check finds no `tests/test_*.py` or `tests_runtime/test_*.py` path outside a comment. The 13 skips are all in `tests/`: - 2 in `test_binding_stylesheets.py`: T037's pair, the two that need openXdox's modules or its sheets; - 8 in `test_doxbench_bridge_live.py`: no `omp` harness; - 3 in `test_openprofiler_broker_e2e.py`: no broker binary. `tests_runtime/` skips none with the database up. ## Planted mutations, each caught Each plant is one change to a scratch copy of the head. A control run of the targets passes first. **T036's seven:** 1. The pytest step writes its report under another name: the join case fails. 2. The pytest step names a test file: the shape case fails. 3. A second pytest run chained onto the step: the shape case fails. 4. The job installs `.[test]` alone: both extras cases fail. 5. The service is renamed away: the service case fails. 6. The pytest step names a bare `tests_runtime`: the shape case fails. 7. The pin sums on past a missing report: the missing-report case fails. **Nine more, for the run count.** A second run is added after the step with each of these, and each turns the shape case red: - `||` - `|` (into `xargs pytest`) - a bare `pytest` - `env CI=true pytest` - `timeout 600 pytest` - `uv run pytest` - `sh -c "python -m pytest …"` - `bash -c 'pytest -q'` - `python -c '… pytest.main([]) …'` The first version of the count read `||` as one run, and the second read the `env` form as one. ## Copilot's reviews | head | overview | what it found | where it went | |---|---|---|---| | `4e0056d4` | Changes recommended | `collect_ignore` still listed the seven | T035 landed and was merged at `56d51edc`; answered with CI's reading, resolved | | `83fb977e` | Changes recommended | the count missed `\|\|`; two stale "`.[test]` alone" statements | fixed at `485e085a`; the same claim swept everywhere else (comment `5857867635`); resolved | | `485e085a` | Needs a closer look | runs hidden in a wrapper | fixed at `db3e8a4f` | | `b8623bf9` | Needs a closer look | `env CI=true pytest`; this body's floors did not match the file | fixed at `db3e8a4f`; this body now carries the table above | | `13383a6f` | Changes recommended | this body still carried the pre-T035 figures; a note above the separators still described the first count | this body rewritten; the note corrected at `ab862032` | | `ab862032` | Needs a closer look | three DB-backed headers still named the `runtime` job; two statements in `test_deploy_shape.py` | fixed at `1808146a`, with the rest of that claim's instances | | `1808146a` | **Approval recommended** | no findings | | ## Two timing-sensitive cases, seen red once each on this machine Neither case is new, and neither file is changed here. T036 brings both into the required job for the first time. CI ran both green at every head above. - `tests_runtime/test_migrations_apply.py::test_the_draft_page_budget_does_not_read_the_bodies_it_sizes` asserts a timing ratio above 4x. It read 3.87x once, under a full local run against a Docker Postgres. It passes alone 3 of 3. It was in the advisory `runtime` job before. - `tests/test_model_provider_broker.py::test_a_token_past_its_declared_expiry_is_discarded_and_re_minted` (T035's module) gives a token a wall-clock expiry one second in the past, at whole-second precision. It failed once in an F9.1 run. One of five module runs right after also went red, and I did not capture which case; the next 42 module runs were all green. The code compares `now >= expires_at`, so a red needs the wall clock to step back more than a second, which this WSL2 host can do. A follow-up could widen the margin (`time.time() - 3600`); that file is not this task's. ## Left as it is, and why - **Test docstrings that call a module "`--noconftest` safe, like every file `validate` runs today"** (about 25 files under `tests/`). Each file is still safe to run with no conftest, so the claim about the file holds. Only the "`validate` runs today" framing is dated. A sweep through 25 carved files is not this task's to make, and F9.1 counts `validate.yml` alone. - **`src/opendox/cli.py:1120`** names the flag about openXdox-code's own `validate`, not this one's. ## Landing - T037 follows this PR, and P1-R (the openDox root pin) waits on T037. - Squash or merge, never rebase. Each commit carries both trailers, and so does this body. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) 🤖 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>
… guarded unittest runner (#1195) Lane: openxfactory-4 (openXfactory-4-openDox_extraction) ## Update — review round 1 (commit `2ba81209`) Copilot found a real bug: a bare `find_spec("opendox.workbench")` ERRORS (doesn't skip) on a checkout where the openDox/openXdox gitlinks are genuinely uninitialized, because `carved_reach.install()`'s `_LegMissing` finder raises `CarveReachUnavailable` for a carved root name instead of returning `None`. Fixed with `try/except ImportError` around both lookups (`opendox.session_pr` and `opendox.workbench`), mirroring `runner_seams()`'s own guard exactly — reproduced with both legs hidden before and after (now skips cleanly instead of erroring). That fix exposed a second, separate, pre-existing bug in the recovered `tests/domain_profile/test_hermeticity_probe_routes.py`'s own negative control: its bare-unittest child inherits the OUTER pytest session's own hermeticity-guard PATH shim via `subprocess.run`'s default environment inheritance (this file's own 3 tests are collected under `tests/`, so that guard is already active). Previously masked because the OTHER bug above always made that same child report FAILED regardless. Fixed with `_bare_environ()` (PATH minus any entry under the system temp directory). Full details, including re-measurement of both fixes together across three directories, are in the commit message. Both CI (all 12 checks, including `pytest-suite` at 19m59s) and Copilot's next review round (`Findings: None`, prior finding marked "Resolved since last review") are green at this head. ## What was broken `tests/notebooklm/test_hermeticity_guard.py:87`'s layer-2 case probed `find_spec("ideation_dashboard.workbench")` to decide whether the dashboard package had arrived yet (pre-shed, self-healing design). The § 5.2 shed moved `workbench.py` and `session_pr.py` to the pinned openDox leg and repointed `tests/hermeticity.py`'s own `runner_seams()` to `find_spec("opendox.*")` accordingly — but this probe, one file over, was not repointed with it. It has answered `None` FOREVER since the shed instead of self-healing, so the case has been **skipping silently** rather than asserting anything: one of `pytest-suite.yml`'s `EXPECT_SKIPPED` skips (P1-G decision 5, "the find_spec probe goes silent"; surfaced concretely by plan 034 T047's re-measurement, which held the recovered route-cases test rather than land it, per T007 batch E's finding that it belongs in its own, separate, non-Arc PR — this one). ## The repair (4 commits) 1. **Repoint the probe** — `find_spec("ideation_dashboard.workbench")` → `find_spec("opendox.workbench")`, the same name the two imports three lines down already use and the same name `runner_seams()` itself already patches. 2. **Install the same carved reach in `tests/hermetic_unittest.py`.** `runner_seams()` can't find `opendox.workbench`/`opendox.session_pr` to patch unless the openDox leg's `src/` is already on `sys.path`. The pytest route gets that for free from `tests/conftest.py` (`carved_reach.install(tests=True)`, run before any test module imports anything); the guarded-`unittest` runner had no conftest to load it from, so it silently guarded **less** than the pytest route over the identical tree — measured before this fix: `python3 tests/hermetic_unittest.py tests/notebooklm/` **ERRORED** (`ModuleNotFoundError: No module named 'opendox'`) on exactly the case that needs it, rather than running it or skipping cleanly. `install_guard()` now calls the identical `carved_reach.install(tests=True)` before building the binary shim or reading `runner_seams()`. 3. **Add the recovered hermeticity route-cases test** (three cases, held at `p1/P1-K/held/test_hermeticity_probe_routes.py`, carried out of `tests/test_hermeticity.py` when that file moved to openDox-code by T035 — opensoft/openDox-code#51, landed `80acead1`). See "Where it landed, and why" below for the one adaptation from #51's text. 4. **Move `EXPECT_SKIPPED` 6 → 5** in `.github/workflows/pytest-suite.yml`, with the full accounting (including the two sibling files explicitly left alone) recorded beside the pin. ## Where the recovered test landed, and why Not at the pre-shed `tests/ideation-dashboard/`: that directory is a declared `moved_paths:` prefix in `docs/opendox-carve-manifest.yaml`, and `scripts/validate-carve-manifest.py` refuses (`carve-file-undeclared`) any file under a `moved_paths:` prefix that carries no manifest row — the same reason T034/T035's four sibling relocated cases land under `tests/domain_profile/` instead (T007 batch E finding 5). I measured this directly (committed the file at the original location first, in a scratch check, re-ran the validator, got the refusal; moved it, re-ran, got `OK`) and placed it at `tests/domain_profile/test_hermeticity_probe_routes.py` instead. That directory has no manifest row and no conftest of its own, so `REPO_ROOT` is computed locally (`Path(__file__).resolve().parents[2]`, the same pattern `tests/domain_profile/test_openxfactory_profile.py` already uses in this same directory) rather than imported `from conftest import REPO_ROOT` as #51's text does — that import resolved through `tests/ideation-dashboard/conftest.py`, which this directory doesn't have. The three test bodies are otherwise verbatim. It is **not** added to `docs/opendox-carve-manifest.yaml`'s `COMPOSITION_TESTS` — T007 batch E (openxFactory#1183) already reversed this file's provisional membership there after a Copilot finding (it pins nothing about the composition, and that set is a permanent allow-list) — and it is not an F11.1 surface. ## Scope discipline: two siblings left alone, on purpose While measuring, I found `tests/notebooklm/test_workbench_sweep_wiring.py` and `tests/notebooklm/test_sync_notebooklm_books.py` carry the **identical** stale-name defect (`find_spec("ideation_dashboard.workbench")` / `find_spec("ideation_dashboard.branch_session")`, both raised as a module-level `unittest.SkipTest` at import time). Both target modules (`opendox.branch_session`, `opendox.session_git`, `opendox.workbench`) exist at the pinned leg — I checked. Fixing them is real, valuable, low-risk follow-up work (each file's several test methods currently collapse into a single silent module-level skip), but it's outside this task's declared scope ("the hermeticity-probe repair" — the one file, the one runner, the one pin), so I left them alone and am flagging them here explicitly rather than quietly expanding the diff. This is also *why* `EXPECT_SKIPPED` moves to exactly 5 and not further: those two skips are still present in the new total. ## Measured (all three routes; no background runs left going) Isolated probe file, before → after (pytest route): ``` # before .s 1 passed, 1 skipped in 0.06s # after .. 2 passed in 0.04s ``` `tests/notebooklm/` (full directory), before → after (pytest route): ``` # before: 107 passed, 3 skipped, 30 subtests passed # after: 108 passed, 2 skipped, 30 subtests passed ``` (the 2 remaining skips are the two sibling files above, unchanged) `tests/hermetic_unittest.py` route, before → after, same directory: ``` # before: FAILED (errors=1, skipped=2) [ModuleNotFoundError: No module named 'opendox'] # after: OK (skipped=2) ``` Bare `python3 -m unittest discover` (the negative control), unchanged by design — still correctly detects the unguarded route: ``` FAILED (failures=1, errors=1) ``` The recovered test file itself, at its final location: ``` $ python3 -m pytest tests/domain_profile/test_hermeticity_probe_routes.py -q ... 3 passed in 2.48s ``` `scripts/validate-carve-manifest.py` at the final commit: `OK ... 456 file(s) in the declared surface with none undeclared`. Full local suite, all three routes, at HEAD (no background runs left going): - **pytest** (`python3 -m pytest tests/ -q -m "not postgres" --junitxml=pytest-report.xml`, matching `pytest-suite.yml` exactly): `selected=9238 passed=9216 skipped=20 failures=2 errors=0` in 1435s. Both numbers that aren't `5`/`0` are accounted for, not hand-waved: - **2 failures**, both in `test_dashboard_source_seal.py` ("reads nothing outside the render/serve unit"), both citing `.venv-hermetic/lib/.../yaml` — my own venv sits *inside* this scratch clone (CI's Python comes from `actions/setup-python`, outside the checkout). Reproduced **identically on `origin/main`** with none of this PR's 4 commits applied (`git checkout --detach origin/main`, same venv, same 2 failures, same file). Not this PR's doing. - **20 skipped, not 5** — 15 of the 20 are two more artifacts of running outside real CI, not of this PR: 13 are `find_openxfactory_validator`/ `find_cross_reference_validator` walking up for a directory literally named `openxFactory` (this scratch clone is named `repo`; confirmed by re-running the same lookups from a `git worktree` literally named `openxFactory` — both resolve non-`None` there), and 2 are `review_lane_pin`'s `TheFreshnessVerifier`/`TheVectorReplay` skipping for lack of `PINNED_CORE_CHECKOUT` (I have no token for the private `codeXfactory/codexFactory` cross-org checkout CI mints; both are documented in `pytest-suite.yml` itself as skipping under exactly this condition). The remaining **5** are real and match the pin exactly: the 2 conformance-gate self-gate tests that always skip in openxFactory's own checkout (`DOMAIN_SHAPED = (REPO_ROOT / "stack.yaml").is_file()` — always `False` here by construction), the 1 `test_set_domain_openxfactory_pin` LedgerxFactory guard this pin's own history already names as the surviving post-shed skip, and the 2 known `tests/notebooklm/` siblings from the section above. - **`tests/hermetic_unittest.py`**, run per-directory (its own documented usage — the whole `tests/` tree in one process hits pre-existing, unrelated `unittest.discover()` cross-package collisions with mixed package/non-package directories; verified identical with and without this PR's changes via `git stash`): 48/48 directories completed; the 6 directories with non-zero results (`avatar_runtime` and its two subpackages, `hermes_runtime_contracts` and its `postgres` subdirectory, `intent-compliance`) fail identically on `origin/main` with none of this PR's changes applied (`ModuleNotFoundError: No module named 'xfactory'` for the `avatar_runtime` case, checked directly) — this runner's own pre-existing gap in replicating pytest's import-path setup, not something this PR touches or changes. - **bare `python3 -m unittest discover`** (negative control), same per-directory method: most directories report `NO TESTS RAN` (this repo's suite is overwhelmingly pytest-style, not `unittest.TestCase`-style, which bare `unittest discover` simply can't see); `tests/notebooklm` is the one directory where the negative control matters and it fails as designed. ## Constraints honored - Fresh clone under scratch, never `/workspace/projects/xFactory/*`. - Checked `git diff --stat origin/main...` against the T047 branch (`p1/P1-K/oxf`, `build/034-p1k-t045-t046-host-wiring`) before editing: zero file overlap with any of the 25 files it touches. - No force-push; no closing keywords anywhere; explicit pathspecs on every commit; never `git add -A`. - Opened as **DRAFT**. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Lane: openxfactory-4 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…(plan 034, for T049) (#1203) Lane: openxfactory-4 (openXfactory-4-openDox_extraction) **T035's held aggregation ignore-file case lands, and `EXPECT_SKIPPED` moves 5 → 6.** This is a prerequisite of plan 034's phase-1 checkpoint, T049. It is not an arc landing, so it carries no `Arc:` trailer, and F11.1 never reads it. It touches no `openspec/changes/` path, so it needs no Rule 6 window. Claim: #656 comment `5891975603`. ## Why now T049 checks that every case T034 and T035 moved out of openDox-code arrived where its PR sent it, "so none is dropped from both suites (requirement 9, second scenario)". It found 18 of 19. The missing one was opensoft/openDox-code#51's (T035) `test_worktree_container_is_gitignored_in_the_aggregation_repo`. T035 moved it out of openDox-code, where a lone checkout had only ever skipped it. T007 batch E (#1144's `tasks.md`) then held it out of #1181 so that `pytest-suite`'s `EXPECT_SKIPPED` could stay put: "Held, not decided against; a later task takes it up." `git grep` found its `def` in none of openxFactory `e81eed62`, openXdox-code `6158151e` and openDox-code `2d116415`. The holder's decision (2026-09-29), relayed to T049's writer, is option (b). A moved case that exists in no suite breaks requirement 9's second scenario, and "a later task" is now. It only skips on a runner, so nothing risky lands with it. T049's own PR follows this one, and its evidence quotes all 19 cases found. ## The change (2 files, against `main` `e81eed62`) - **`tests/domain_profile/test_session_worktree_book_scan.py`**, on F11.1's `HOST_TESTS` surface, beside T035's other two session cases: - the case, with `find_aggregation_root` and `_check_ignore`, verbatim from openDox-code `68be484a` `tests/test_session_harness.py:229-260`, and the two imports they need (`subprocess`, `pytest`); - the module docstring's hold note, which now records the landing, why the case skips on a runner, and where its synthetic half stayed (`test_the_worktrees_pattern_covers_the_sessions_sub_path`, still in openDox-code's `tests/test_session_harness.py`). - **`.github/workflows/pytest-suite.yml`**: `EXPECT_SKIPPED` `"5"` → `"6"`, with a `MOVED 5 -> 6` paragraph beside the pin, in the form of the entries above it. `MIN_SELECTED` and `MIN_PASSED` are floors and do not move: the case adds one selected test and no passed one. ## Measured **On a runner's layout** (this checkout beside the pinned decision core, and no `.gitmodules` above it), the case SKIPS with the guard string `pytest-suite.yml`'s header names. `pytest tests/domain_profile -q -m "not postgres" -rs`: | tree | result | |---|---| | `main` `e81eed62` | `80 passed` | | this change | `80 passed, 1 skipped`: `SKIPPED [1] tests/domain_profile/test_session_worktree_book_scan.py:90: no aggregation checkout reachable from this tree` | **Inside a real aggregation checkout it PASSES.** The checkout was a fresh clone of opensoft/xFactory (`main` `6c4032fc`), with this change as its `openxFactory` submodule and that submodule's `openXwallet`, `openXdox` and `openDox` initialized as `pytest-suite` initializes them. The aggregation was only read, never written: its `git status` was ` M openxFactory` (the submodule HEAD set up for the run) before and after. `python3 -m pytest tests/domain_profile/test_session_worktree_book_scan.py -v -rA`: ``` tests/domain_profile/test_session_worktree_book_scan.py::test_worktree_container_is_gitignored_in_the_aggregation_repo PASSED [ 33%] tests/domain_profile/test_session_worktree_book_scan.py::test_session_worktrees_never_reach_a_lifecycle_book PASSED [ 66%] tests/domain_profile/test_session_worktree_book_scan.py::test_pinned_factory_paths_never_admits_a_worktree_container PASSED [100%] ============================== 3 passed in 0.16s =============================== ``` What the case reads there, and it is exactly the finding it encodes (research R7: the existing `*-worktrees/` pattern covers the container): ``` git check-ignore -v xFactories/codexFactory-worktrees/ -> .gitignore:9:*-worktrees/ xFactories/codexFactory-worktrees/ git check-ignore -v xFactories/codexFactory-worktrees/sessions/draft__demo-topic/ -> .gitignore:9:*-worktrees/ xFactories/codexFactory-worktrees/sessions/draft__demo-topic/ git check-ignore -v xFactories/codexFactory-worktrees/sessions/draft__demo-topic/a.md -> .gitignore:9:*-worktrees/ xFactories/codexFactory-worktrees/sessions/draft__demo-topic/a.md git check-ignore -v openxFactory-worktrees/sessions/draft__demo-topic/ -> .gitignore:9:*-worktrees/ openxFactory-worktrees/sessions/draft__demo-topic/ ``` **It can fail.** In that same throwaway clone, with the aggregation's `*-worktrees/` line deleted, the case fails: `AssertionError: xFactories/codexFactory-worktrees/ is NOT gitignored — FR-005 broke` (`1 failed, 2 deselected`). The file was then restored, and its sha256 (`9790ff86…`) was the same as before. **The whole suite, as `pytest-suite` runs it.** Both trees were in the job's layout: `openxFactory/` with `openXwallet` initialized, `openXdox` and `openDox` initialized recursively, and the decision core `b21f0100` beside it as `PINNED_CORE_CHECKOUT`. The suite ran from the lock's venv, with the pinned OpenSpec CLI 1.12.0 on `PATH`, under `python3 -m pytest tests/ -q -m "not postgres" --junitxml=…`: | tree | pytest's summary line | JUnit totals | |---|---|---| | `main` `e81eed62` | `8907 passed, 5 skipped, 338 deselected, 9 warnings, 412 subtests passed in 1910.89s (0:31:50)` | `tests=9324 failures=0 errors=0 skipped=5` | | this change (`a41bd6d5`, see the note below) | `8907 passed, 6 skipped, 338 deselected, 9 warnings, 412 subtests passed in 1842.47s (0:30:42)` | `tests=9325 failures=0 errors=0 skipped=6` | | this change, pushed head `bfcc50b3` | `8907 passed, 6 skipped, 338 deselected, 9 warnings, 412 subtests passed in 1551.79s (0:25:51)` | `tests=9325 failures=0 errors=0 skipped=6` | `main`'s five skipped nodes, as JUnit `classname::name` with each skip's message: ``` tests.notebooklm.test_sync_notebooklm_books [collection skipped] tests.notebooklm.test_workbench_sweep_wiring [collection skipped] tests.conformance-gate.test_conformance_checks::test_inventory_real_repo_is_consistent [publisher checkout is not a domain repo; the self-gate runs in domain repos] tests.conformance-gate.test_conformance_checks::test_parity_all_real_pairs_pass [publisher checkout is not a domain repo; the self-gate runs in domain repos] tests.domain_pin_setter.test_set_domain_openxfactory_pin::test_the_fixture_still_matches_the_live_ledgerx_shape [no sibling LedgerxFactory checkout reachable from this tree] ``` `diff` of the skipped lines, `main` → this change. Node for node, it is `main`'s 5 and this case: ``` 5a6 > SKIP tests.domain_profile.test_session_worktree_book_scan::test_worktree_container_is_gitignored_in_the_aggregation_repo [no aggregation checkout reachable from this tree] ``` Across every testcase node in the two reports, this change adds exactly one (8912 → 8913), and none is found only in `main`. `passed` stays at 8907, so neither floor moves. *Note on the head.* `a41bd6d5` was this branch's first cut, and it was never pushed. The pushed head `bfcc50b3` differs from it in `pytest-suite.yml` only: two comment passages that summarize the runner number (the file header's, and the pin's first comment line) now end at 6 as well. A grep finds no test that reads either passage. The whole suite was run again at `bfcc50b3`, from a fresh clone of this branch (the table's third row), and it skipped the same six nodes as `a41bd6d5`. The held case was also re-run inside the aggregation with its submodule at `bfcc50b3`, fetched from this branch: `3 passed`, with the same four `check-ignore` lines. **This PR's own `pytest-suite` run at `bfcc50b3`** (run `36585369006`, green in 22m48s) prints the same test line, and the pin step reads: ``` selected=9325 passed=9319 skipped=6 failures=0 errors=0 floors: selected>=7050 (margin 2275) passed>=7044 (margin 2275) skipped==6 ``` ## Checks - `.github/workflows/pytest-suite.yml` parses as YAML, and its pin step's env reads `EXPECT_SKIPPED=6`, `MIN_SELECTED=7050`, `MIN_PASSED=7044`. The floors are unchanged. - Every added line in the diff is at most 80 columns. - The diff and the commit message contain no host path. The commit message has no closing keyword. - `lane-line`: the body's first non-empty line is the Lane line. No closing keyword appears in this body or in the commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Lane: openxfactory-4 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>




Plan 034, task T035, slice P1-G (the whole suite in CI). The plan is
specs/034-opendox-standalone-operation/tasks.mdat opensoft/openxFactorymain133e37d9. This PR realizes boxes 9.1 (part) and 9.3 (part) of the ratifiedadd-neutral-product-standalone-operability.5817152735and5850003126. All seven modules are carved rows, and none needs a declared-edit act.5856501803.71b631bc. T032 landed as T032: 2.3, the sweep -- no reach into a sibling at import time, none into openxFactory at all #49 →68be484a, and this branch was cut from it.mainat71b631bcis merged in at81f93777(no force-push). Three review rounds followed, each in its own section at the end. Every figure below is re-measured at this head,b173a970.What changes
The root
conftest.py'scollect_ignoreis empty. It held seven modules under RULED Q-L3 (b). Requirement 9 (FR-006) asks this leg for no exclusion, so an entry there now would be an undeclared one, and the block's comment says so.Each of the seven is rewritten in place as a neutral openDox test that imports no sibling. No module leaves whole. Fifteen cases test another repository's tree, contract or verb. They leave this suite, and the next section lists each one with its destination. One case is added.
test_subcommand_extension.pyCORE_COMMANDSstill listedgate, which the host profile contributes since the carve (research R8)test_model_provider_broker.pyscripts/ideation_dashboard/.__import__("ideation_dashboard.doxbench_bridge"), a string the carve's import rewrite could not see.from test_doxbench_model import FORBIDDEN_PORT_MEMBERS, a test module that stayed in openxFactory.src/opendox/paths;opendox.doxbench_bridge; the 16-name set carried in verbatim, with its provenancetest_doxbench_entrypoint.pyopenxdox.corpus_root(ConsumerReachUnavailable)cmd_generate_and_openruns for real, with the six phase-1 reaches stood in (below)test_hermeticity.pytest_doxbench_chat_view.pycontracts/schemas/xfactory-workbench-chat-turn.schema.yaml, which the carve sent to openDox-spectest_workbench.pytest_session_harness.pyscripts/sync-notebooklm-books.pyat import time"Before" is
main71b631bc, each file named on the command line, which pytest collects despitecollect_ignore. "After" is81f93777. Since then the review rounds added one case totest_hermeticity.py(27 passed at this head) and one assertion to atest_doxbench_chat_view.pycase. Python 3.12.3,.[runtime,test]underconstraints-cpython312-linux.txt.Three findings fixed on the way
tests/hermeticity.py'srunner_seams()probedfind_spec("ideation_dashboard.session_pr"). This leg has no such package, so the probe returned no seams, andworkbench._default_runnerandsession_pr.SubprocessCommandRunner.runstayed real in every test. Layer 1 (thePATHshim) was still on. But a non-zero exit is the very degradation the notebook adapter swallows, so an escape through the default runner would have passed green. The carve manifest's row for the helper records the probe resolving "to nothing at a destination that lacks them". The seams now nameopendox.workbenchandopendox.session_pr, with no probe. With the layer on, the wholetests/directory stays green, so no test was escaping.BaseExceptionhandler scan read nothing. It walkedscripts/ideation_dashboard/, which does not exist here, and passed on zero files. It now readssrc/opendox/(58 modules, 9BaseExceptionhandlers, all re-raising), and it fails if it reads no module.rootdir: <repo>also matchesrootdir: <repo>/tests. Planted: atests/pyproject.tomlwith a pytest table makestests/the rootdir, which cuts the root conftest out, and it still printsconfigfile: pyproject.toml. Both of the old checks pass on that. The case now matches the whole value.And the P1-E hand-off. The open-session-notebook case registers a home corpus first. Without one, the worktree listing refuses
ADAPTER_NOT_REGISTEREDbefore the runner is reached. Whether a registration was present depended on test order, becausecli.build_parser()registers openDox's default process-wide. The case now registers that default itself, over a one-document scratch worktree instead of this checkout, andmonkeypatchrestores the previous registration.The entrypoint's stand-ins
test_doxbench_entrypoint.pytests what the entrypoint DECLARES: the model port (doxbench_install.declared_model_port_factory), its one process-lifetime adapter, and the session root. It never reads the snapshot. Plan 034's phase-1 limit (plan.md; research R7) is thatgenerate-and-openstill reaches openXdox for the snapshot and its generator, so exactly these are stood in:cli:corpus_root_refusal,generate_snapshotandsnapshot_mod.write_snapshot.SCANNED_ROOTSis read only for a snapshot with no document, and the stand-in snapshot has one.serve: T011's three (tests/test_route_handler_contribution.py, section 6).build_server's ownsnapshot_source=seam. The fixture asserts that the entrypoint passes none, so when phase 2 gives it one the fixture fails instead of standing in over it._checkout_realanswers true, where T011's answers false. The model port is gated on thesessionverdict (loopback, a real checkout, a resolved actor), and the carve'sbase-repofixture these cases served was a real checkout.For T007's batch E, T041 and T047: the fifteen cases this PR moves
Each destination task lands exactly its part of this list, and T049 checks that every case arrived. The links are line ranges at
main68be484a, so the cases' own text needs no archaeology.Thirteen become NAMED openxFactory composition tests (T047; R1Q2 (a)). T007's batch E adds each destination path to F11.1's named set before T047 lands. The paths are proposals. If T047's writer chooses others, batch E records what T047 lands. openxFactory's
tests/ideation-dashboard/conftest.pyalready reaches each moved file at the pin, throughcarved_reach.68be484a)test_saved_manifest_validates_clean_against_the_pinned_validatortests/ideation-dashboard/test_workbench_manifest_validation.pyfind_openxfactory_validator→doxbench_contracts._composed_validator), so there these cases run instead of skipping.test_recipe_seeded_manifest_carries_the_recipe_block_and_validatestest_committed_manifest_is_rejected_by_the_pinned_validator--repomodetest_scoped_doc_health_runs_real_machinery_over_the_fixturetests/ideation-dashboard/test_workbench_scoped_doc_health.pydoc_healthcheck registered with T026's seam (T046, in T047's PR), and itsbase-repofixturetest_scoped_doc_health_finds_a_real_missing_statustest_scoped_doc_health_ignores_out_of_scope_docsall(...).test_worktree_container_is_gitignored_in_the_aggregation_repo, withfind_aggregation_roottests/ideation-dashboard/test_session_worktree_book_scan.pytest_session_worktrees_never_reach_a_lifecycle_bookscripts/sync-notebooklm-books.py, loaded by spec as the module did (lines 37–45)test_pinned_factory_paths_never_admits_a_worktree_containertest_the_browser_ceiling_is_pinned_to_the_RELEASED_maxLengthtests/ideation-dashboard/test_doxbench_chat_ceiling.pyxfactory-workbench-chat-turn.schema.yaml, which the carve sent to openDox-spec (moved_verbatim→opendox_spec), anddoxbench-chat-model.js, both throughcarved_source(...)at the pintest_a_pytest_run_started_inside_a_conftestless_directory_is_guarded, with_probe_runtests/ideation-dashboard/test_hermeticity_probe_routes.pytests/notebooklm/test_hermeticity_guard.pyandpytest.ini, bothnot_movedand both present at133e37d9test_the_unittest_fallback_route_installs_the_same_guardtests/hermetic_unittest.py(not_moved, present)test_the_bare_unittest_route_is_detected_as_unguardedTwo join openXdox-code's declared
doc_healthexclusion (T041; R1Q6 (d)).68be484a)tests/integration/test_an_unguarded_cli_scoped_create_is_refusedtests/test_hermeticity_gate_verbs.py, listed in T041's exclusiongate create-document.gateis the host profile's verb (openXdox'scli_gate.GateSubcommands), so this suite's empty profile has none to parse.cli_gateimportsgate_console, which doesfrom doc_health import corpusat module level (:63), so F9.2 could not run them intests/integration/.test_the_cli_seam_with_a_fake_port_reaches_no_binaryThe guard itself is still proved here, through the default adapter and through
open_session_notebook.Notes for the destinations (none blocks this PR)
tests/hermeticity.pyhas the samefind_specprobe. Whenscripts/ideation_dashboard/leaves openxFactory, its layer 2 goes off just as silently as it was off here.tests/test_doxbench_knowledge_service.py::test_the_serve_side_ceiling_is_pinned_to_the_RELEASED_maxLengthreadsREPO_ROOT/contracts/schemas/xfactory-workbench-chat-turn.schema.yaml, which openXdox-code does not carry. It is hidden today because that file is in T041'sdoc_healthexclusion. The pair pin added here,test_the_browser_ceiling_equals_the_servers_ceiling, holds one side of the triangle whatever happens to that one.133e37d9, openxFactory'stests/ideation-dashboard/has none of the four source files (test_workbench.py,test_session_harness.py,test_hermeticity.py,test_doxbench_chat_view.py); they moved at the carve.The falsifier:
python -m pytest -q tests/, with the root conftest in play andcollect_ignoreemptyAt this head,
b173a970,.[runtime,test]:main71b631bcgives1571 passed, 13 skipped. A test-by-test JUnit diff at81f93777(1859 passed): 288 cases go from not collected to passed, all in the seven modules, and no other outcome changes. This head adds the 289th. The 13 skips aremain's:test_binding_stylesheets.py(T037's pair);test_doxbench_bridge_live.py(noomp);test_openprofiler_broker_e2e.py(no broker).In a
.[test]-only venv the same run gives1 failed, 1859 passed, 13 skipped. The one failure istest_imports_standalone.py::test_every_module_imports_with_no_sibling, T030's. It needs theruntimeextra and fails in that venv onmaintoo (#46 recorded it). T036 cures it by giving thetestextra those packages. (At81f93777there were two failures in that venv. The second was the two-directory case, and Copilot's third round below took it out.)Fourteen planted mutations, each caught
Each plant is one change to a scratch copy of this head, and each fails the cases it targets. A control run of all 17 targets passes first.
runner_seams()returns no seams again: the four layer-2 cases fail.scripts/ideation_dashboard/: it fails, having read no module.except BaseException: pass: the scan names it.tests/test_hermeticity.pystops collecting, withcannot import name 'REPO_ROOT' from 'conftest'naming the root conftest.tests/conftest.pystops claiming: the two-directory case fails, and so does the source pin.pytest --co tests tests_runtimegives 34 collection errors, eachcannot import name 'REPO_ROOT' from 'conftest' (tests_runtime/conftest.py).pyproject.tomlloses its pytest table: the anchor case fails.tests/pyproject.tomlwith a pytest table: the anchor case fails, on the whole-value match alone.generate: the forbidden-member case fails.doxbench_binding.pyimportsyamlat module scope: the lazy-import case fails.shell=True: the shell case fails.cligains a sixth core verb: the core-command case fails.One correction the plants forced. pytest 8.4.2 still falls back to a
pyproject.tomlwith no pytest table, when it finds no other config file above it (_pytest/config/findpaths.locate_config). The helper's comment and the anchor case's docstring say so, and say why the table is still checked: without it, apytest.iniin any enclosing directory would take the rootdir.Copilot's review at
81f93777: two cases addedThe review found nothing and asked for two cases ("Add an independent released-contract assertion and a nested-rootdir regression case"), with no thread. Both are in
4e5c89a9, and each was planted against first:maxLength, 500, carried with its source (xfactory-workbench-chat-turn.schema.yamlin openDox-spec, read at openDox-specmain8fe8c4c7). Planted: both constants at 600. The pair still passes, and this line fails.test_a_nested_rootdir_is_refused_by_the_whole_value_matchis the negative control for the anchor case's match, on a scratch tree. A nestedtests/pyproject.tomlwith a pytest table makestests/the rootdir, and the header still printsconfigfile: pyproject.toml. The substring match and the configfile check both accept that header, and the whole-value match refuses it. With the nested file gone, the whole-value match accepts the tree's own root. Planted: the substring match put back, and the control fails.Copilot's review at
4e5c89a9: no leak, measuredThe review said the open-session case "leaks the registered home factory because the monkeypatch does not restore the original state". It does not.
monkeypatch.setattr(ca, "_home_factory", ca._home_factory)records the current value for teardown, and teardown restores it afterregister_homereplaces it. Measured with a probe that readscorpus_adapter._home_factorybefore setup and after teardown of that one case:The answer is on this PR as a comment.
4100cee8puts a comment on the line and changes nothing else.Copilot's review at
4100cee8: one finding, fixed"The cross-suite hermeticity check fails in the declared test-only environment." That is true of a
.[test]-only venv, wheretests_runtime/test_oidc_verifier.pycannot importhttpxuntil T036. The required workflow at this head does not run the case, so CI was green, but the case did turn a missing package into a slot failure. Sinceb173a970it compares the whole collection outcome of the two orders: the count, and the files that failed to collect.tests/conftest.py's claim removed, it fails in both venvs.The thread is answered with this evidence and resolved.
The repository's own check
validate.ymlis unchanged. Its steps name none of the seven modules, and they run with--noconftest, so the root conftest's list never reached them. The triple ismain's. T036 re-pins it for the whole suite.Landing
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with Claude Code