Repository navigation
tests/conftest.py: take the declared depth fix — REPO_ROOT is one level above tests/, not two - #19
Conversation
…el above tests/, not two (carve-manifest row :25, runbook § 5.5) The carve flattened tests/ideation-dashboard/conftest.py to tests/conftest.py one directory shallower, but line 25 still read `REPO_ROOT = HERE.parent.parent`, resolving outside this repository. Every `REPO_ROOT / "src" / ...` read then raised FileNotFoundError. openxFactory's docs/opendox-carve-manifest.yaml already declares this single- line edit for the conftest.py replica row (RULING Q-L7 (a), Brett Heap, 2026-09-10, #656 comment 5618683833): `REPO_ROOT = HERE.parent`. This commit takes that declared edit, and only that line — nothing else in the file changes. Before: full suite run showed 391 FileNotFoundError errors traceable to this depth bug (matching Q-L7 (a)'s own citation) plus 14 further "Failed" entries — 405 tests total, matching the leg-1 landing census figure cited in the same ruling. After: those 0 FileNotFoundErrors remain; the same ~405 tests now surface a further, separate, already-documented blocker instead (ModuleNotFoundError: 'ideation_dashboard', awaiting the BUILD arc / the openXdox-code leg, per this repo's own root conftest.py collect_ignore commentary) or an unrelated fixture-path defect in test_doxbench_view.py — neither in scope for this declared edit. Collection (1073 tests) and the narrowed `validate` workflow command (81 passed, 3 xfailed, --noconftest) are unaffected before and after, since --noconftest never loads this file. Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR applies the declared post-carve path correction in tests/conftest.py: because the file now resides directly under tests/, REPO_ROOT must use HERE.parent. The focused validation preserves collection and narrowed-test results, eliminates the depth bug’s FileNotFoundErrors, and confirms the carve verifier recognizes the declared edit; remaining suite and admissions issues are explicitly unrelated. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
There was a problem hiding this comment.
🟢 Approval recommended
The scoped path fix is correct and no blocking issues were identified.
Pull request overview
Fixes repository-root resolution in tests/conftest.py after flattening the tests directory.
Changes:
- Sets
REPO_ROOTto the parent oftests/. - Restores correct repository-relative path resolution.
File summaries
| File | Summary |
|---|---|
tests/conftest.py |
Fixes REPO_ROOT path depth. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 7 hours and 27 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
…e-core-arm Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Two conflicts, both resolved keeping this branch's own content over main's pre-S6 snapshot of the same text (main's side contributed nothing this branch did not already carry further forward): - `.github/workflows/validate.yml`: main has no S6 addition at all (its comment block + the `tests/test_source_core_arm.py` pytest-list line); kept this branch's version whole. - `tests/test_web_boundary.py` (assertion 2's xfail reason on `test_no_ownership_violation_outside_class_b`): main's text is the post-S3/pre-S6 snapshot (20 sites); this branch's text is the RE-DERIVED post-S6 count (16, the four /source sites cleared) and already accounts for S3's own contribution (the CORE_VIEWS `gate.bar` entry, +2, cited by name) inside its own narrative. Kept this branch's version; verified `app.js` (the file both texts cite line numbers into) is byte-identical between this branch and origin/main, so the citations still hold. `tests/conftest.py` auto-merged to main's #19 depth fix (this branch had inherited the pre-fix `HERE.parent.parent`, touched by neither slice). Everything else (view_extension.py/.js, app.js, test_view_registry.py, test_doc_surfaces.py, test_bullseye_widget.py) merged clean — this branch never edited those lines. Narrowed validate (branch's own list, 7 files): 174 passed, 3 xfailed, 0 failed. `git diff origin/main --stat`: only this slice's own files (S6's serve.py/consumer_reach.py/test_source_core_arm.py + the shared web_boundary_census.yaml/test_consumer_reach.py/test_web_boundary.py/ validate.yml edits already on this branch before the merge) — no S3 residue. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tails Resolves conflicts limited to S4's own additions layered on S3's landed content: validate.yml's S4 pytest entry, view_extension.py/.js REGIONS (lens-gate, repo-projects), app.js's two new gate mounts, and the census/ xfail narratives. Also collapses a duplicate views/view_extension.js census row (S3's pre-merge 455-loc row vs S4's reconciled 463-loc row) introduced by the add/add conflict on that file, updating its note to chain the S3->S4 loc growth; totals now re-derive exactly (A 25/16293, B 7/2174, C 14/11854, ? 1/1435 = 47 files/31756 loc). tests/conftest.py's REPO_ROOT depth fix (#19) arrives from main unchanged. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…and the vocabulary by ROLE (#21) Lane: openxfactory-4 Refs opensoft/openXfactory#656 (stays OPEN). CLAIM: 5649148461. RULED Q1/Q2/Q7 by Brett Heap, 2026-09-12, at opensoft/openXfactory#656 comment `5648049748` (alongside `5648044785` and `5648065587`). **§ 3.4 slice S7 — parameterize class C.** openDox-spec `docs/front-end-package-boundary.md` § 5 row S7 and § 4.3 @ `7d12428c`: *every governance word in the fourteen class-C files and the four declared class-A tails becomes a read of the registered domain's DISPLAY facet BY ROLE.* **Paired with opensoft/openXfactory#1030, the row annotation RULING Q-L1 requires, which landed FIRST** — 48 declared-edit entries, 782 lines, 33 rows, 17 of them converting `moved_verbatim` → `moved_with_declared_edit`, plus the three admissions this leg's created files need. Every edit in this PR falls inside a line that annotation declares; the arrival verifier was re-run against THIS head from the landed manifest and answers OK. **THE MECHANISM, § 4.3's five steps.** `serve.py` publishes the profile's DISPLAY facet on the `/capabilities` payload the shell already fetches — no new route and no second fetch — beside S5's `capabilities["views"]`; `app.js` reads it once per render and adds ONE key, `display`, to the ctx object every core view and every contributed binding receives; a class-C module resolves BY ROLE through `views/display.js` (`label`/`one`/`many`/`short`/`gate`/`status`/`area`/`token`/ `act`/`artifact`/`items`), never by string; and refusal is not a default — a DECLARED facet that is malformed raises `DisplayFacetError` where the server is built, an unknown role raises `DisplayRoleError` in the browser. **AN ABSENT FACET GIVES openDox's OWN NEUTRAL WORDS, and that is a stated departure from § 4.3 point 5.** The note's argument for "refusal, not a default" is that a fallback to TODAY'S WORDS is how the literals survive the refactor invisibly. `NEUTRAL_DISPLAY` is the opposite of today's words — `sources → groups → candidates → selections → submissions → completions` — so a shell with no host facet comes up VISIBLY un-domained rather than invisibly re-domained, which is § 2.1's own test for class C performed by the product rather than asserted about it. The absence is NAMED on the payload (`host_facet: "absent"`, with the profile named through the helper and not a dunder), and `test_a_student_install_renders_no_openxfactory_word` is the assertion. **§ 4.5 ASSERTION 4 IS GREEN AND ITS `xfail(strict=True)` MARKER IS GONE**, removed in the commit that closed it — which is what `strict=True` is for. **THE FOUR ARRIVED SUITES NOBODY HAD RUN SINCE THE CARVE** (`#656` comment `5650335573` § 4) are repaired here, in one commit, with ZERO product-file changes: `test_doc_surfaces.py`, `test_doxbench_tile_verbs.py`, `test_doxbench_view.py`, `test_bullseye_widget.py`. In each one the assertion is re-stated as the RULE it was always making rather than as the word or the path it happened to spell — the stat tile found BY ROLE, the inert Save's refusal read from the module's own declared constant, `WHEEL_ACTIONS` read by STATION INDEX, the create dialog opened through the CONTRIBUTED column. Measured green at this head: 11 · 22 · 136 · 52 = 221, the same counts `main` gives. They are DECLARED EDITS on this slice's row annotation, not incidental repairs, because the three classes cannot tell a test file from a product file. **S8's two path constants are deliberately NOT TAKEN here.** `PREVIEW_CASES_PATH` and `test_bullseye_widget.py`'s `serve.py` path are declared on openxFactory#1025 and realized on openDox-code#23/#19; taking them would double-declare the lines and make a landing-first annotation false. They were applied to a THROWAWAY worktree to measure the four suites and left alone, so the one residual red at this head is `test_the_serve_declares_the_repository_it_can_ write_to`, which #23 repairs. **THE FORWARD MERGE OF `main` IS A GRAPH MERGE ONLY.** S5's leg B landed as a SQUASH, so `main` and this branch shared only the pre-leg-B base and git reported nine conflicts in files where this slice edited a region leg B also edited — every one the squash artefact, none a real divergence. Resolved in two provable steps rather than by hand: merge the real leg-B tip first (`git diff 5c6f762 origin/main` is EMPTY — main's squash has that exact tree), which gives the merge its true base and yields ONE genuine conflict, `tests/fixtures/web_boundary_census.yaml`; then merge `main`, whose result is byte-identical to its first parent (`git diff --cached HEAD` empty at the resolution). The census conflict is resolved as the UNION and RE-MEASURED with the suite's own census tool: both notes take leg B's, PROVED a strict superset (this branch's note is a literal PREFIX of it); `app.js` `loc` 1618 → 1719, `views/view_extension.js` 850 → 877, `totals.A` {25, 16961} → {26, 17883}, the 26th class-A file being this slice's admitted `views/display.js`. Both arithmetics cross-check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…date for the web suites (283 → 694 tests) (#23) Lane: openxfactory-4 Refs opensoft/openXfactory#656 (stays OPEN). CLAIM: #656 comment 5649985838. RULED 2026-09-13 at #656 comment 5656343213 (Brett Heap, by interactive multi-choice) — "the path constant moves, the file does not". Spec: openDox-spec docs/front-end-package-boundary.md § 5 row S8 and § 1.2(d) @ 7d12428c. LEG B of § 3.4 slice S8, the receive half, and the last of the three. Lands AFTER openxFactory#1025 (which declares every line these edits touch), after openXdox-code#19, and after S7 (#21, landed 1e46971), which this branch carries. FOUR CARVE PATH CONSTANTS REPAIRED, all one defect class — the carve's import rewrites edit class rewrote most path literals and missed these, and each is the reason a whole suite could not run: tests/test_outline_model.py:22 parents[2] -> parents[1] 48 failed -> 47 passed tests/test_doxbench_view.py:303 tests/ideation-dashboard/fixtures/ -> tests/fixtures/ 73 errors -> 124 passed tests/test_doxbench_knowledge.py:31 scripts/ideation_dashboard/... -> src/opendox/... 21 failed -> 56 passed tests/test_doxbench_document_abstract.py:44 same 2 failed -> 54 passed tests/test_doxbench_memory_gateway.py:32 same 12 failed -> 3 failed tests/test_bullseye_widget.py:1674 scripts/ideation_dashboard/serve.py -> src/opendox/serve.py 5 failed -> 4 failed test_outline_model.py:22 is the openDox-code#19 defect one file over: #19 fixed REPO_ROOT depth in tests/conftest.py, and this is the only other module in the tree that computes its own. Every edited line is DECLARED on its own row in #1025, class path constants, which is why the annotation lands first. VALIDATE UN-NARROWED FOR THE WEB SUITES. RULED Q-L5 (b') narrowed this leg's validate to its shape assertions until the BUILD arc inverts the openDox -> openXdox dependency; the note's S8 row lifts it for the web suites, and the S2 paragraph already standing in this workflow says of the DOM probes that "un-narrowing that class of test is slice S8's job, not S2's". The list goes from 10 files to 27 and from 283 tests to 694 passed. Seventeen carved suites join the ten shape assertions, each run ALONE under the workflow's own invocation before it was named — the point of the rule being that adding a red file puts a required check red for a defect the slice does not own. WHAT IS NOT CLAIMED, measured rather than inferred: pytest -q over the tree is 1188 errors / 0 passed, 1126 of them the single line src/opendox/serve.py:192 from ideation_dashboard import serve_openxfactory_lanes, reached from the autouse declared_human_console fixture. tests/test_consumer_reach.py's STILL_REACHING records that reach by name and asserts it still fails, so repairing it here would turn test_the_reaching_modules_are_recorded_as_reaching red. RULED Q-L5 (b') waits on the BUILD arc. TWO SUITES RULED TO RETIRE, NOT REPAIRED AND NOT DELETED. tests/test_intent_tray_dom.py (23 tests) and tests/test_wheel_verbs_dom.py (8) drive views/intent-feed.js — a RULED OQ-F not_moved row present at neither leg, whose surface S2 replaced with views/intent-binding.js. re_destined: to: openxfactory is not expressible (to is held to the CLOSED destinations: keys; openxFactory is the SOURCE), re_destined: on a not_moved row refuses carve-re-destined-not-moved, and deleting an arrived row has no form at all. RULED 5656343213: both RETIRE at this leg as a declared act citing OQ-F, under a retired: row form registered as the NEXT carve-floor act (CLAIMED at #656 comment 5656690570). They land here untouched and narrowed out of validate, named RETIRING. THE BASE LANDED BY SQUASH, which is not the merge a stacked branch expects: this branch carried #21's older head d672f0c, and the squash put ONE commit on main re-applying #21's whole change with no shared history. Merging origin/main straight in conflicts in FIVE files, four of which this PR does not author. Merging #21's real head c7a216c FIRST is clean, and main after it conflicts in ONE - .github/workflows/validate.yml, both blocks with an EMPTY theirs side, a purely positional conflict exactly like openXdox-code#19's. The resolution keeps this branch's side and then PROVES nothing was lost: the narrowed list is read out of both index stages and the result required to be a superset of each. Still 27 files, main's own 10 all present, YAML parses, no marker left. THREE COPILOT ROUNDS AT THE MERGED HEAD, FIVE FINDINGS, ALL ACCURATE AND ALL FIXED - none answered away, and not one of them moved the pytest list, which is the same 27 files throughout. 0606625, one thread (comment 5690530437 answers the round): the audit block said three of the six repaired suites are named below and three omitted, while the list names TWO and omits FOUR. Both sets are now enumerated by filename with the measured reason each is omitted. -> fa6b951 fa6b951, three suppressed comments: (1) the block said 691 where the merged head runs 694 - and the figure moved TWICE, both steps the BASE's, +8 from test_display_facet.py in the S7 base 706b533 and +3 from test_gate_loop_contributed.py, which grew 128 lines when the merge-forward brought origin/main in (31 test functions at a7b7ac2, 34 now); (2) RULED Q-L5 (b')'s head paragraph said validate runs only shape assertions while this same block lifts the narrowing - now marked the PRE-S8 baseline with the half that still stands named; (3) the S2 paragraph said tests/test_intent_binding_dom.py "stays off this list" and S8 names it - the paragraph records S2's state and the list today's, the two omitted DOM probes kept distinct and MEASURED (23 failed and 8 failed alone at this head, and neither among the six suites this slice repairs). -> 142da66 142da66, approval with one suppressed comment (comment 5690590859): that same test file's own module header still said it was NOT in validate.yml, and still described tests/conftest.py as carrying HERE.parent.parent - it reads HERE.parent since openDox-code#19 3954d78, the RULED Q-L7 (a) :25 depth fix this manifest declares. Both recorded. -> ce0f28b The PR title's 283 -> 683 is corrected to 283 -> 694 in the same pass, for the same reason the block's was. Plain gate: validate run 35043791850 SUCCESS at ce0f28b; 4 review threads / 0 unresolved. Reproduced locally under the workflow's own invocation at the merged head: 694 passed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>



What
Takes the declared depth fix for
tests/conftest.pyline 25:The carve flattened
tests/ideation-dashboard/conftest.pytotests/conftest.pyone directory shallower, but line 25 kept resolving two levels up instead of
one, so every
REPO_ROOT / "src" / ...read pointed outside this repository.Why this exact edit, on this exact line
opensoft/openxFactory'sdocs/opendox-carve-manifest.yaml, rowsource_path: tests/ideation-dashboard/conftest.py(dispositionnot_moved,reason
replicated_at_destination), already declares this single-line editunder RULING Q-L7 (a) (Brett Heap, 2026-09-10,
#656comment5618683833,verbatim "rule Q-L7 (a)"):
docs/opendox-cutover-runbook.md§ 5.5 assigns this repo (not the carve leg)to take the fix in a later declared act — this PR is that act. No
openxFactory-side change accompanies this PR; the manifest already carries
the declaration.
Only line 25 changes.
:24'sTESTS_ROOT = HERE.parentis deliberately nottouched — the same ruling explains why pytest's default import mode already
puts
tests/onsys.pathwithout it. The file's docstring (lines 1-15)still describes the pre-carve nested location (
tests/ideation-dashboard/)and is stale for reasons unrelated to this edit (the carve's flattening, not
this line); left as is, per the declared edit's own line-25 scope — flagged
for whoever next touches this file's header.
Measurements
Collection (
python -m pytest -q --co): unchanged, 1073 tests collected,0 collection errors, before and after.
Full suite (
python -m pytest -q, informational, not a required check):ideation_dashboard, awaits the BUILD arc / openXdox-code leg — see this repo's own rootconftest.pycollect_ignorecommentary)test_doxbench_view.py'sPREVIEW_CASES_PATH, pre-existing, out of scope here)The depth bug's own error class (
FileNotFoundError) drops to zero. Totalerror count is unchanged because the same ~405 tests (391 + 14) that were
blocked by the depth bug now surface a further, separate, already-documented
blocker instead — not something this declared edit is scoped to fix. This
repo's suite is not expected to be green yet (it awaits the BUILD arc /
openXdox-code leg landing, per
validate.yml's own comments).Narrowed
validatecommand (--noconftest, so it never loads thisfile):
81 passed, 3 xfailed, identical before and after, confirmed bystashing the edit and re-running.
Carve-arrival verification
Ran
scripts/verify-carve-arrival.py --destination opendox_code --phase Bfrom a fresh read-only
opensoft/openxFactoryclone against this branch:With
--replica-at tests/ideation-dashboard/conftest.py=tests/conftest.pydeclared, the conftest.py row now reports as a diffed declared-edit
replica (not
unapplied), and no refusal namestests/conftest.py.Reaching a full
"result": "ok"additionally required two ad-hoc--allow-createdadmissions for files this destination already carriesthat are not yet in
docs/opendox-carve-admissions.yaml'sopendox_codelist — both belong to the separate, already-landed § 3.4 slice S1 work
(
docs/front-end-package-boundary.md, openDox-spec Level the leg scaffold, round 4: ship the two extension-point seams in the wheel (RULED Q-L8 (a)) #8 →a44ac06d), notto this PR:
tests/test_web_boundary.pytests/fixtures/web_boundary_census.yamlThese are a pre-existing admissions-file gap, verbatim from the verifier,
recorded here rather than fixed — out of this PR's declared scope (which is
line 25 of
tests/conftest.pyalone).Final summary:
declared_edits_diffed: 64(includes this row),declared_edits_unapplied: 1(a different, unrelated row),replicas_declared: 1,replicas_verified: 1.Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction
🤖 Generated with Claude Code
Summary by Sourcery
Fix the test configuration's repository root path to restore correct repository-relative file resolution.
Bug Fixes:
Tests: