Repository navigation
T098: display harnesses (A), and the server's scope labels from the served facet (plan 038, T094's R2-INV-R9) - #51
Conversation
…erved facet (R9-R1 (a)) Plan 038 T098, a slice of T094's map R2-INV-R9 (opensoft/openxFactory#656 6021830607), on the holder's rulings 6021830531 (R9-R1 (a); W1 (A″)). - src/openxdox/doxbench_scope.py: every section label and note is built from the display facet the browser reads (the /capabilities display under the registered host), word for word as openDox's staging model builds them since section 3.4 slice S7. With no host registered, openDox's neutral words. - tests/test_doxbench_scope.py: the browser harness copies display.js beside the models and installs the served display; two new parity cases (a host declaring its own stage words; no host). - tests/test_canvas.py, tests/test_explorer_viewer.py: the harnesses copy display.js (W1 (A″)) and are handed the served display (VR); the gap kind and the explorer's group labels respelled to the served words; the explorer's import pin and wheel pin respelled to S7's design (CP). Lane: openXfactory-3 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openXfactory-3 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewer's GuideThis draft aligns server scope metadata and browser projections around the served display facet, lazily resolving host vocabulary with neutral fallback, and updates the Node harnesses and assertions to validate display propagation, role-based labels, and parity across hosted and hostless cases. Sequence diagram for served display vocabulary during scope resolutionsequenceDiagram
participant Caller
participant Scope as doxbench_scope
participant Registry as domain_profile
participant Display as display_profile
Caller->>Scope: resolve_scope(...)
Scope->>Registry: is_registered()
alt host registered
Scope->>Display: host_display()
Display-->>Scope: host display facet
else no host
Scope->>Display: display_manifest(None)
Display-->>Scope: neutral display facet
end
Scope->>Display: display_manifest(host display)
Display-->>Scope: served display
Scope->>Scope: _section_meta(served display)
Scope-->>Caller: scope sections with facet-derived labels
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
Required prerequisite #46 remains unmerged, and composed validation must be repeated after integration.
Review effort: Balanced
Findings: None
What changed in this PR
Aligns openXdox’s scope metadata and browser test harnesses with the served display vocabulary.
Changes:
- Derives scope labels from host display settings, with neutral fallback.
- Supplies display dependencies and vocabulary to browser harnesses.
- Updates terminology assertions and adds host-specific and no-host parity coverage.
| File | Description |
|---|---|
tests/test_explorer_viewer.py |
Updates display-aware harnesses and dependency assertions. |
tests/test_doxbench_scope.py |
Adds host-specific and neutral vocabulary parity tests. |
tests/test_canvas.py |
Supplies served display and checks draft-state parity. |
src/openxdox/doxbench_scope.py |
Derives section metadata from the display facet. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Lane: openXfactory-3 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
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 21 hours and 53 minutes by commenting |
|
|
READY at 55dc1ee Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Holder, automatic READY on Brett's word "land lane 3's PRs when green" (2026-10-06). At the head: |
Lane: openXfactory-3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n 038, T094's map R2-INV-R9) (#54) Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Authored by lane openXfactory-3, delegated by lane openxfactory-4 (#656 6021862323) Arc: neutral-product-standalone-operability ## T100: the repo selector's declared tests, respelled to the carve (plan 038, T094's map R2-INV-R9) **Contract.** There is no `tasks.md` entry yet. Lane 4 records T095 to T104 after T002. The contract is T094's slice-outline row for T100 and the holder's rulings on the map, opensoft/openxFactory#656 comment 6021830531. - **Realizes:** the requirement 9 declared composed tests (T073, F9.1), for `tests/test_repo_selector.py`. It owns 24 composed reds, and its 7 host-registration nodes arrive with T095. - **Falsifier:** the composed run of the file, alone, goes from red to green. The unchanged set stays node-for-node unchanged, and `tests/test_declared_exclusion.py` stays green lone. - **After:** T095 (#46), LANDED as `e2340bb6`. main is merged in. **Ruled (#656 6021830531), as applied here:** - **R9-W1 (A″):** the three Node harnesses copy `display.js` beside the model, with `package.json`, as T026's harnesses do. 17 nodes. - **R9-R1 (a):** the sparse-station node is handed the display `/capabilities` serves under the registered host, and asserts the served words. 1 node. - **MN:** `SNAPSHOT_INDEX_ROUTE` is read from `openxdox.serve_projection`. 2 nodes. - **R9-W4:** the plain-script and module subprocess tests register the host from THIS checkout before `opendox.serve` runs. 2 nodes. The child, in order: 1. puts this checkout's `src/` first and imports openXdox's governed columns from it; 2. checks that `openxdox` resolves to this checkout; 3. registers openXdox's governed projection (`projection_contributions.register()`, the call openxFactory's host makes, plan 034 T064); 4. builds openxFactory's composite with `sys.path` saved and put back; 5. runs T020's `_refuse_an_openxdox_from_elsewhere`, the very function (its source, run in the child); 6. registers the composite. - **R9-R2 (a):** re-scoped to openDox with no host (`python -m opendox.serve`, a PyYAML blocker as its only path entry). The refresh is refused as `unknown_action`, and no `yaml` is loaded. 1 node. - **R9-W3:** `test_serve_module_uses_no_relative_imports` is RETIRED. 1 node. **Two notes for the holder (measured; no ruling taken):** 1. **R9-R2: openDox's serve tries `import yaml` at START, not on a POST.** - Measured: `build_server()`, then `_probe_nlm`, then `real_notebook_adapter`, then `opendox.workbench:52`, which imports PyYAML. - The blocker refuses it, and the probe reads that as no notebook support. - None of the three POSTs tries it. So the blocker counts every import attempt, and the test asserts that the count after the POSTs equals the count once the serve is up. - Mutant M11 (below) shows the count catches a POST that reaches for `yaml`. 2. **R9-W3's scope: the regex retires together with its self-test.** - The pin was the scan, the pattern it scanned with (`RELATIVE_IMPORT_RE`), and that pattern's 7-case self-test (`test_the_relative_import_guard_catches_every_dot_and_segment_depth`). The file's own comment named the three as one pin. - All three are retired: 1 red node and 7 green. - Say if you want the self-test kept. **R9-R2's lone consequence: none.** - Run alone lone, the re-scoped node does not run. The file still fails at COLLECTION on `doc_health` (`openxdox.generator`): `ModuleNotFoundError: No module named 'doc_health'`, `1 error in 0.39s`. - So `tests/declared_exclusion.yaml` is unchanged, and the entry keeps `[doc_health]`. ## Falsifier, quoted **The composed form (R1Q23 (a)):** - openxFactory `92010d3e` (`tests/composed_host_pin.yaml`), with `openDox`, `openXdox` and `openXwallet` recursive, and its `scripts/` on `PYTHONPATH`; - openDox-code `84f8ed83`, installed; - T022's runbook placement made before the run and removed after; - the colour variables unset, with `TERM=dumb`; - each file run ALONE: `python -m pytest -q -p no:cacheprovider -rfE --junitxml=… <file>`. Measured over REAL main, after T095 (#46) landed: - **base:** main `e2340bb6`; - **head:** this PR's head `ba0c3446`, which is main `e2340bb6` plus this PR's one file. | | `tests/test_repo_selector.py` | |---|---| | base, main `e2340bb6` | `18 passed, 24 failed` | | head `ba0c3446` | `34 passed, 0 failed` | The 24 at the base are DJ 17, DJ+VR 1, MN 2, W4 2, W3 1 and R9-R2 1. T095's 7 host-registration nodes are already green there. 42 nodes become 34: W3 retires 1 red and 7 green. **Unchanged set, composed, each file alone, at base and head: node-for-node identical, 974 nodes, 0 red at both.** - 12.5's 16 governed suites: the same 16 at both. - F5.2's 5: `test_generator` 45, `test_session_snapshot` 23, `test_snapshot_determinism` 6, `test_snapshot_registry` 40, `test_snapshot_validation_launch` 9, all passed. - `test_column_contributions_governed.py`: `9 passed`. - Over all 23 files: base `992 passed, 24 failed`; head `1008 passed, 0 failed`. **Lone (CI venv, openDox `dede32b4` by the pin), at `ba0c3446`:** - `tests/test_declared_exclusion.py`: `207 passed`. - The R9-R2 node alone: `1 error`, `ModuleNotFoundError: No module named 'doc_health'` at collection. Its entry stays as it is. - The CI form (`python -m pytest -q --deselect "$LEFT_OUT"`): `1161 passed, 4 skipped, 1 deselected`. That is selected 1165, against the floors 1099 / 1095 / 4. The floors are untouched. ## Mutants (one exact edit each, the file run composed alone) Measured at the earlier integration of main `f70bc9c3` + #46 `c2192e3e`. This PR's file is byte-identical at `ba0c3446`. | id | mutation | result | |---|---|---| | M1 | `display.js` not copied | KILLED, 18 red | | M2 | no `package.json` | survived: equivalent on Node 24, whose syntax detection reads `display.js` as a module; kept for parity with T026's harnesses | | M3 | the harness ignores the display it is handed | KILLED | | M4 | `sparseNotice` not given the display | survived: equivalent at this pin, since the served words for the four empty stations are openDox's neutral ones (the ruled overlay changes only `completion` and the values). M3 guards the hand-off | | M5 | this checkout's `src/` not put first | KILLED, both W4 nodes. Locally, the editable install is another clone; in CI it is the checkout itself, so there this edit is equivalent | | M6 | openXdox's columns not imported from this checkout first | KILLED, both W4 nodes, by T020's guard | | M7 | M6, with the guard call removed too | survived: the control, showing that the guard is what kills M6 | | M8 | the governed projection not registered | KILLED, both W4 nodes | | M9 | `sys.path` not put back | survived: no `openxdox` import after the composite is read reaches the pinned leg in these two tests. The in-process harness has the same posture | | M10 | the composite not registered | KILLED, both W4 nodes | | M11 | R9-R2 on loopback, with the notebook asserts dropped, so a POST reaches `yaml` | KILLED, by the attempt count | ## Files changed - `tests/test_repo_selector.py` (only). ## Gates at `ba0c3446` - **CI:** - `validate` passed (run 37548690247): `1161 passed, 4 skipped, 1 deselected`, and `triple: selected=1165 passed=1161 skipped=4 failures=0 errors=0` against the floors 1099 / 1095 / 4. - SonarCloud Code Analysis passed. - **Copilot:** review 5435813621 at `ba0c3446` reads "Findings: None". Its "Needs a closer look" note concerns the then-unlanded #46, which has since LANDED as `e2340bb6` and is merged into this head. The earlier review, 5435251251 at `0c0f8bc8`, also read "Findings: None". - **Review threads:** 0, so 0 unresolved. ## What remains - Nothing for the writer. The PR is final and frozen. - It is behind main `fc1115d6`. Lane 4's autoland loop runs update-branch and re-requests Copilot. - `main` since `e2340bb6` (#48 T101, #51 T098) does not touch `tests/test_repo_selector.py`. 🤖 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-3 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Brings T101 (#48), T098 (#51), T103 (#49), T096 (#53), T100 (#54), T099 (#47), T021's follow-on (#55), T102 (#52), T022 (#41, landed as aefd109), T097 (#50) and T096's follow-on (#56). Conflicted: scripts/composed_placements.py and tests/test_composed_placements.py, both T022's files, which this branch carried from #41 through #44. Main's landed side is kept for both. tests/declared_exclusion.yaml merged clean (T101's entry edits beside T073's header and open_until). Lane: openXfactory-3 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>



Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Authored by lane openXfactory-3, delegated by lane openxfactory-4 (#656 6021862323)
Arc: neutral-product-standalone-operability
T098: display harnesses (A), and the server's scope labels from the served facet (plan 038)
This is a slice of T094's map R2-INV-R9 (opensoft/openxFactory#656
6021830607).tasks.mdhas no entry for it yet: lane 4 records the T095 to T104 entries after T002 (#1251). Until then, its contract is the map's slice-outline row plus the holder's rulings,6021830531.Realizes: 21 of the composed reds outside 12.5's set in the declared exclusion, toward requirement 9's declared composed tests (T073, F9.1):
Falsifier (the outline row): the composed run of the three files, each alone, at
main+ T095, takes the named 21 to 0 red. These read unchanged:test_column_contributions_governed.py(9 passed).tests/test_declared_exclusion.pyreads green when run lone.Ruled:
doxbench_scope.py's labels and notes derive from the facet the browser reads, and every pin that asserts words is respelled through VR to the SERVED words.display.jsbeside the module they copy, as T026, U-7: the allow-list for 12.5's governed suites, with R-1 (a)'s span kind (plan 038, H-2) #43 does.6021830531. They conform to the ruled overlay (5784683830,5801057769) and to the served-display rule for the staging suite (6016648451).After: T095 (T095: the composed harness for the declared integration tests (plan 038, T094's R2-INV-R9) #46), LANDED as
e2340bb6. The served display needs the governed host that T095'sDECLARED_HOST_SUITESregisters for these three files when the run is composed. This branch mergesmaine2340bb6, and every number below is measured over it.What changes
src/openxdox/doxbench_scope.pyis this slice's under R9-R1 (a), as claim6021862323names it._section_meta(_served_display())once perresolve_scopecall.views/staging-workbench-model.jsSECTION_META)._served_display()is thedisplayblock that/capabilitiesserves:display_manifest(host_display()).opendox.canvas_draftsreads its one shared sentence.tests/test_doxbench_scope.pydisplay.jsbeside the two models and writes apackage.jsonwith"type": "module"(DJ). It installs the display throughsetDisplay(readDisplay(...)), as the shell does at mount.completionand thevalues. So parity cannot tell a server that reads the facet from one that always speaks neutral words. The new cases can:tests/test_canvas.py_run_nodecopiesdisplay.jsand writes thepackage.json(DJ). It hands the harness the served display, so every canvas derivation runs under the words the page is served (VR).unsupported-candidate, where they readunsupported-possiblebefore (R9-R1).test_js_and_python_draft_constants_agreealso cross-checks the seed state of a new draft. Both halves read it off one facet: the composer plan'sstateagainstcanvas_drafts.register_state("captured"). This assertion is what makes the served-display hand-off observable (mutant H4 below).tests/test_explorer_viewer.pydisplay.jsand writes thepackage.json._EXPLORER_HARNESSis handed the served display.proposal.mdandtasks.md;proposal.md,design.md,tasks.md,Spec deltas,Supporting docs,other../display.js;opts.wheelKey === SOURCE, withSOURCEheld to beSTAGE_ROLES[0].The falsifier (composed, each file alone; quoted)
The composed form, R1Q23 (a):
92010d3e(tests/composed_host_pin.yaml), withopenDox,openXdoxandopenXwalletinitialized recursively, and itsscripts/onPYTHONPATH;main84f8ed83(force-reinstalled);TERM=dumb;python -m pytest -q -p no:cacheprovider -rfE --junitxml=<file>.xml tests/<file>.py < /dev/null.T022's
scripts/composed_placements.py(taken from #44's tree) refuses to place in these checkouts: its.gitignoreentry is not onmainuntil #41 lands. None of these files reads the runbook it places. Every checkout read clean after every run.Measured over real
main(e2340bb6, carrying T095 #46 and T026 #43): the base ismainitself, and the head is this PR'sc935f2a0(this branch merged withmain).maine2340bb6c935f2a0Before T095 landed, the same 21 were measured at a local integration that was never pushed (
mainf70bc9c3+ #46c2192e3+ this branch): 21 red at its base and 0 at its head. Atmaind45a0939, before T095 existed, these files read 19, 9 and 1 red.The 21 nodes that flipped:
test_member_pane_is_exactly_the_topics_document_edges,test_downstream_artifacts_are_in_the_lineage_strip_never_members,test_evidence_board_carries_section_ref_and_passage_hash,test_missing_cluster_degrades_to_null,test_gap_unclaimed_member,test_gap_unsupported_possible,test_gap_both_kinds_on_one_cluster,test_option_set_grouping,test_js_and_python_draft_constants_agree,test_esc_escapes_markup,test_model_passes_prose_through_as_data_not_html;test_explorer_js_exists_and_is_importable_standalone,test_staged_tile_lists_the_topic_folder_with_headers,test_aggregate_folder_entry_keeps_its_member_source_key,test_aggregate_folder_entry_disambiguates_same_repository_refs,test_aggregate_wheel_navigation_threads_the_owning_member_key,test_proposal_tile_groups_proposal_and_tasks,test_realized_tile_lists_the_archived_change_folder,test_unresolvable_tile_and_kind_degrade_to_null,test_change_file_classification;test_server_and_actual_browser_projection_are_byte_shape_equivalent.Two nodes are new:
test_the_server_labels_follow_the_facet_a_host_declaresandtest_with_no_host_registered_the_labels_are_openDoxs_neutral_words. No node regressed.The unchanged set was compared node for node, base against head over
main: 974 nodes, 10 red at both, 0 nodes changed outcome.session_runbook9 andsession_notebook1, which read the runbook T022 places)test_column_contributions_governed.pyMutants
Each mutant was applied at the integration (
mainf70bc9c3+ T095c2192e3+ this branch), its file run alone composed, and the file restored byte for byte. 11 of 12 killed:test_the_server_labels_follow_the_facet_a_host_declarestest_with_no_host_registered_the_labels_are_openDoxs_neutral_wordsdisplay.jsdisplay.jstest_js_and_python_draft_constants_agreedisplay.jstest_proposal_tile_groups_proposal_and_tasks,test_change_file_classificationpackage.jsonH7 is an equivalent mutant on the measured runtime. Node v24 detects module syntax in a
.jsfile with no"type"declared, sopackage.jsonchanges nothing there. It is kept for runtimes without that detection, as #43's harness keeps it. T097 measured the same survivor.The lone CI form (
validate.yml's exact step, atc935f2a0)python -m pytest -q --junitxml=pytest-report.xml --deselect "$LEFT_OUT", run locally, read:tests/test_declared_exclusion.pyrun alone: rc 0. Each of the three files still fails lone on its declared reason (doc_health, at collection).CI and Copilot at
c935f2a0validate: success, run37548181742. The triple isselected=1165 passed=1161 skipped=4 failures=0 errors=0, with pinsselected>=1099(margin 66),passed>=1095(margin 66) andskipped==4.5435780547atc935f2a0:composed.ymllands (T029 DRAFT: T029, U-9: the composed run, permanent: composed.yml and its openxFactory pin (plan 038) #44, then T073 DRAFT: T073: the composed declarations (ARC-Q2 (a)): every declared entry runs composed, the rail files get the host's rail (plan 038) #45). The composed validation over realmaine2340bb6is the local run quoted above: 21 to 0 red, and the unchanged set identical node for node.588d4c15(5435186246) gave the same verdict, with no findings, for the then-unmerged T095: the composed harness for the declared integration tests (plan 038, T094's R2-INV-R9) #46.Files changed
src/openxdox/doxbench_scope.pytests/test_canvas.pytests/test_explorer_viewer.pytests/test_doxbench_scope.pyNo protected suite is edited: none of the four is in 12.5's 16 or F5.2's 7. No allow-list entry is needed, and
tests/declared_exclusion.yamlis untouched.Not done
composed.ymlis not onmainyet (T029 DRAFT: T029, U-9: the composed run, permanent: composed.yml and its openxFactory pin (plan 038) #44, then T073 DRAFT: T073: the composed declarations (ARC-Q2 (a)): every declared entry runs composed, the rail files get the host's rail (plan 038) #45), so this PR's CI isvalidateand SonarCloud. The composed numbers above are local runs, quoted.🤖 Generated with Claude Code
Summary by Sourcery
Use the served display facet consistently across server and browser projections so labels, classifications, and derived values remain aligned.
New Features:
Bug Fixes:
Enhancements:
Tests: