Skip to content

T097, display harnesses (B): display.js beside the copied module, S7's role keys and the served words (plan 038) - #50

Merged
brettheap merged 9 commits into
mainfrom
r2/t097-display-harnesses-b
Oct 7, 2026
Merged

brettheap merged 9 commits into
mainfrom
r2/t097-display-harnesses-b

Conversation

@brettheap

@brettheap brettheap commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Authored by lane openXfactory-3, delegated by lane openxfactory-4 (#656 6021862323)

Arc: neutral-product-standalone-operability

T097, display harnesses (B): display.js beside the copied module, S7's role keys, the served words (plan 038)

  • Contract: there is no tasks.md entry yet; lane 4 records T094's slices after T002 (T002: release 2's base and plan 038's bookkeeping, items 1 to 15 (plan 038) openxFactory#1251). Until then the contract is the slice outline row of T094's map (R2-INV-R9, posted as openDox + openXdox: two open-source layers, an installable app with users, projects and a database; domain descendants pin openXdox (Brett's ruling 2026-09-04) openxFactory#656 comment 6021830607) and the holder's rulings (comment 6021830531). The row reads: T097, display harnesses (B): DJ (A″) + VR keys; files tests/test_wheel_model.py, tests/test_grouping.py, tests/test_project_aggregates.py; depends on R9-W1; 87 reds (wheel_model 76, grouping 7, project_aggregates 4).
  • Realizes: requirement 9's declared composed tests (#1144, through T073's composed step 5a, F9.1). This slice repairs 87 of the composed reds T094 mapped.
  • Falsifier: the composed run of the three files, each alone, red at the base and green at the head; plus the unchanged set (12.5's 16 governed suites, F5.2's 5 protected files, test_column_contributions_governed.py at 9 passed, tests/test_declared_exclusion.py green run lone).
  • Ruled:
    • R9-W1 (A″) (comment 6021830531): each harness copies display.js beside the module it copies, 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. No openDox module is made import-free.
    • R9-R1 (a) (same comment): "every word-asserting pin is respelled, through VR, to the SERVED words". It is given under Brett Heap's served-display ruling for the staging suite (comment 6016648451: "the helpers … hand each harness the SERVED governed display"). The holder's record line for this slice (comment 6023517122): "T097's served-display respelling is R9-R1 (a) applied (6021830531 ...). It needs no new ruling."
  • Decisions: none of this slice's own. No After dependency; it needs nothing from T095.

What this PR does

DJ, R9-W1 (A″). Since § 3.4 slice S7, wheel-model.js and grouping.js import ./display.js. Each harness copied its module ALONE, so node failed with ERR_MODULE_NOT_FOUND … display.js. That is the cause of every one of the 87 reds at the base, and of nothing else. Each harness now copies display.js beside its module, under its own name (display.js imports nothing), and writes a package.json so that node reads .js as a module, as #43's harness does. test_wheel_model.py's ten copy sites go through one helper, _copy_wheel_model.

VR, the keys.

  • The model's wheel keys are S7's six stage roles (WHEEL_KEYS = STAGE_ROLES). The old wheel names map to them as follows: documents → source, clusters → grouping, possibles → candidate, staged → selection, active → submission, archived → completion.
  • Every wheel key the cases pass in or the assertions read is respelled: the deck order, edge endpoints, the second-degree and gather cases, the expand events, the 48 action cases, and test_project_aggregates.py's three actionsFor calls.
  • grouping.js keys its tallies "tally:" + role, so the tally keys are respelled to tally:source, tally:grouping, tally:candidate, tally:submission and tally:completion.
  • Snapshot FIELD names (documents, clusters, staged_topics, …) are schema and are unchanged, and so are the action cases' ids.

VR, the words, under R9-R1 (a): the SERVED words.

  • What reads the facet. Since S7, three things the expanded tile's cases assert come from the display facet:
    • a verb row's label is display.act(role);
    • the possibles wheel's promotability matches display.registerState(...);
    • the packet flyout's labels and its ordered front matter are the facet's artifact axis.
  • Where the display comes from. The page hands every one of them the served display: wheel.js puts display: vocab in each action env and passes vocab to packetGroups. So the two harnesses whose cases assert those words or values, the expand harness and the staged harness, are handed the display the GOVERNED host serves. They install it with readDisplay({ display: cases.display }), 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's harnesses do.
    • The helper _served_display() reads the host from the conftest's governed_host() (T020), through display_profile.host_display's injected-profile seam.
    • Nothing is registered, and no conftest or host-plane file is touched.
    • Composed, the host is openxFactory's composite (OpenxFactoryProfile, host_facet: declared, host_profile: openxfactory-engineering). A probe measured the manifest read this way as equal to the one served when the governed host is registered.
    • A case that supplies no env keeps none.
  • The respelled words, as measured:
assertion was served
the staged tile's propose row ▶ draft proposal ▶ Propose
the four commission verbs ▲ promote to staging, ✻ research brief, ✦ derive possibles, ◀ demote ▲ Promote to staging, ✻ Research brief, ✦ Derive possibles, ◀ Demote
the packet flyout's group labels packet, spec deltas packet files, Spec deltas
  • The values. The served register_state values (latent is the captured role) keep the live-captured possibles fixtures promotable. The served packet order (proposal.md, design.md, tasks.md) keeps the review-order claim.

OQ-R9-3, after T095 (#46). test_landed_parses_a_real_archived_change_delta read REPO_ROOT.parent.parent / "openxFactory", which a runner's layout never holds, so it skipped there. It now reads the composed tree through T095's openxfactory_root() (OQ-R9-4) and skips only where the run is not composed. Composed it passes, reading this run's own openxFactory checkout. The skip's mutant is not killable: lone, the module stops at collection on doc_health before the case runs.

The falsifier, composed (R1Q23 (a)), each file alone

The composed form:

  • openXdox-code at the commit named;
  • openDox installed from openDox-code main 84f8ed83 (pip install -e ".[test]", then that commit force-reinstalled);
  • openxFactory at 92010d3e (tests/composed_host_pin.yaml), with openDox, openXdox and openXwallet initialized recursively and its scripts/ on PYTHONPATH;
  • the colour variables unset and TERM=dumb;
  • each run: python -m pytest -q -p no:cacheprovider -rfE --junitxml=… <file> < /dev/null from the checkout root;
  • Python 3.12, pytest 8.4.2, Node v24.21.0.

T022's placement script is not on main (#41 is open). Run from #41's bytes, it refuses at main for want of its .gitignore line, so nothing was placed. It places only the session runbook, which none of these files reads.

Base, main fc1115d6:

tests/test_wheel_model.py rc=1 77 failed, 3 passed
tests/test_grouping.py rc=1 7 failed, 4 passed
tests/test_project_aggregates.py rc=1 4 failed, 8 passed
  • 88 failed: the map's 87, every one of them on ERR_MODULE_NOT_FOUND … display.js, plus test_wheel_model.py::test_landed_parses_a_real_archived_change_delta.
  • That 88th node reads REPO_ROOT.parent.parent / "openxFactory". It runs only because the local clone's layout happens to hold an openxFactory checkout two levels up; on a runner it skips (OQ-R9-3).

Head, c16c05eb (the T097 commits b401bc0e and 9a0704a6, with main merged in):

tests/test_wheel_model.py rc=0 80 passed
tests/test_grouping.py rc=0 11 passed
tests/test_project_aggregates.py rc=0 12 passed

The 87 read 0 red. The 88th now reads the composed tree (below) and passes; it no longer skips on a runner.

Mutants (each applied alone, run composed, file restored byte-identical)

mutant result
no display.js copy, test_wheel_model.py killed: 77 failed
no display.js copy, test_grouping.py killed: 7 failed
no display.js copy, test_project_aggregates.py killed: 4 failed
the neutral display in place of the served one ("display": None) killed: 8 failed (the word and value nodes)
no package.json, each of the three files killed with node's module-syntax detection off (NODE_OPTIONS=--no-experimental-detect-module): 77, 7 and 4 failed. The unmutated head passes in that mode (80, 11, 12). Node 24's detection otherwise reads display.js as a module unaided.
the expand harness hands the display to a case with NO env too survives, and it is equivalent: with no env, actionsFor offers only rows with no visible predicate, and every one of those carries a literal label

The unchanged set, composed, base fc1115d6 against head c16c05eb

Node-for-node identical: 974 nodes at both, the same 10 failed at both, and diff empty.

  • 12.5's 16 governed suites: 14 green at both (branch_session 132, doxbench_mutation_boundary 80, doxbench_share 34, gate_loop_views 74, gateway_provenance 24, hosted_actor 5, session_commits 22, session_confinement 53, session_gates 81, session_lifecycle 53, session_records 29, session_transaction 57, session_verbs 65, staging_workbench 83 passed); failing identically at both (open slices own these, not this one): session_notebook 1 and session_runbook 9.
  • F5.2's 5: generator 45, session_snapshot 23, snapshot_determinism 6, snapshot_registry 40 and snapshot_validation_launch 9 passed, at both.
  • test_column_contributions_governed.py: 9 passed, at both.
  • Run lone (no openxFactory): tests/test_declared_exclusion.py 207 passed at both. Each of the three files still stops at collection on its declared reason, ModuleNotFoundError: No module named 'doc_health', at both.
  • The lone CI form: validate.yml collects the suite less the declared exclusion, and all three files are declared. So its floors cannot move.

Files changed

  • tests/test_wheel_model.py
  • tests/test_grouping.py
  • tests/test_project_aggregates.py

CI and review at c16c05eb

  • validate: run 37554225217, success.
  • Copilot: review 5440546734 at c16c05eb, "Needs a closer look", Findings: None. Its one note is the merge of current main and the composed run after it, which the next section covers. 0 review threads, 0 unresolved. Earlier heads read the same: b3c2d04e and 489081e2, Findings: None, 0 threads.

NOT done

  • Nothing in this slice's scope.
  • main has moved past the measured base fc1115d6. The branch is not merged again here: the holder's landing loop brings each lane-3 PR up to date (update-branch) before it lands. This PR changes only the three declared test files above, and none of the commits since fc1115d6 touches them.

🤖 Generated with Claude Code

Summary by Sourcery

Bring the display-model test harnesses and assertions in line with the module dependencies, stage-role keys, and served vocabulary used by the current composed application.

Bug Fixes:

  • Repair JavaScript test harnesses so copied wheel and grouping modules resolve their display dependency and run consistently as ES modules.
  • Update composed archived-delta coverage to read from the configured openxFactory tree instead of relying on a runner-specific checkout layout.

Enhancements:

  • Align wheel, grouping, action, aggregation, and packet assertions with S7 stage-role keys and the governed host’s served display vocabulary.
  • Use the governed served display in word- and value-sensitive harness cases while preserving snapshot schema field names and packet ordering expectations.

Tests:

  • Update the three declared JavaScript-backed test files to cover role-keyed wheels, served labels, tally keys, and composed archived-delta parsing.

brettheap and others added 2 commits October 6, 2026 17:52
…s role keys, the served words (plan 038, R9-W1 (A″), R9-R1 (a))

Three test files, 87 composed reds (wheel_model 76, grouping 7,
project_aggregates 4), each a declared-exclusion entry under doc_health.
T094's map (R2-INV-R9) owns them to this slice; the holder's rulings are
openxFactory#656 comment 6021830531.

DJ under R9-W1 (A″). Since slice S7, wheel-model.js and grouping.js import
./display.js, and each harness copied its module alone, so node read
ERR_MODULE_NOT_FOUND. Each harness now copies display.js beside the
module under its own name, with a package.json so node reads .js as a
module, as T026's harness in test_staging_workbench.py does (#43).
test_wheel_model.py routes its ten copy sites through one helper.

VR, the keys. The wheel keys are S7's stage roles (source, grouping,
candidate, selection, submission, completion), and grouping.js keys its
tallies "tally:" + role. The cases and assertions are respelled to them.
Snapshot field names are schema and are unchanged.

VR, the words, under R9-R1 (a): the SERVED words. The expand and staged
harnesses are handed the display the governed host serves
(governed_host(), read through display_profile.host_display's injected
profile seam; nothing is registered), as the page hands it down. So a
verb label is display.act(role) ("▶ Propose", "▲ Promote to staging",
"✻ Research brief", "✦ Derive possibles", "◀ Demote"), promotability
matches the served register_state values, and the packet flyout reads
the served artifact axis ("packet files", "Spec deltas", with the
proposal/design/tasks order).

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>
@brettheap
brettheap requested a balanced review from Copilot October 6, 2026 19:11
@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates the three composed JavaScript-model test files for S7 role-key contracts, makes their copied harnesses resolve display.js as ES modules, and changes display-sensitive expectations to use the governed host's served vocabulary and artifact ordering.

File-Level Changes

Change Details Files
Make copied Node.js test harnesses self-contained with imported display dependencies and explicit ESM configuration.
  • Copy display.js alongside each copied model module.
  • Write package.json with type module for .js resolution.
  • Centralize wheel-model copying across the ten wheel-model harness sites.
tests/test_wheel_model.py
tests/test_grouping.py
tests/test_project_aggregates.py
Migrate composed-test expectations from legacy wheel names to S7 stage-role keys while preserving snapshot schema fields.
  • Replace wheel keys with source, grouping, candidate, selection, submission, and completion across fixtures, events, edges, gathers, actions, and assertions.
  • Update grouping tally assertions to use tally: keys.
  • Update project aggregate action calls to pass role keys while retaining legacy case IDs and snapshot field names.
tests/test_wheel_model.py
tests/test_grouping.py
tests/test_project_aggregates.py
Align display-derived assertions with the governed host's served display vocabulary and values.
  • Load the governed display manifest through the injected host-display seam and pass it to expand and packet harnesses.
  • Assert served action labels and packet group labels, while preserving served register-state promotability and packet front-matter ordering.
tests/test_wheel_model.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The draft’s required main merge and final-head composed validation remain unverified.

Review effort: Balanced
Findings: None

What changed in this PR

Updates three composed test suites to match openDox’s role-based models and governed display vocabulary.

Changes:

  • Copies display.js alongside harness modules and enables ES modules.
  • Replaces legacy wheel and tally keys with stage-role keys.
  • Supplies the governed display to action and packet assertions.
File Description
tests/​test_wheel_model.py Centralizes harness setup and updates role keys and display assertions.
tests/​test_project_aggregates.py Repairs module dependencies and updates action keys.
tests/​test_grouping.py Repairs module dependencies and updates tally keys.

💡 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The PR documents an outstanding merge with current main and a required rerun of the composed validation checks.

Review effort: Balanced
Findings: None

brettheap and others added 4 commits October 6, 2026 23:28
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>
…enxfactory_root() (OQ-R9-3, after T095)

test_landed_parses_a_real_archived_change_delta read
REPO_ROOT.parent.parent / "openxFactory", which a runner's layout never
holds, so it skipped there (T094's OQ-R9-3; the map's default respells it
so it runs). T095 (#46) now provides openxfactory_root(), composed-only
(OQ-R9-4), so the case reads the composed openxFactory tree's archive
and skips only where the run is not composed.

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The documented merge from current main and composed revalidation remain outstanding.

Review effort: Balanced
Findings: None

@brettheap brettheap changed the title DRAFT: T097, display harnesses (B): display.js beside the copied module, S7's role keys and the served words (plan 038) T097, display harnesses (B): display.js beside the copied module, S7's role keys and the served words (plan 038) Oct 7, 2026
@brettheap
brettheap marked this pull request as ready for review October 7, 2026 09:50
@sourcery-ai

sourcery-ai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days and 11 hours by commenting @sourcery-ai review. Upgrade to get a review now.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused test-only changes preserve behavioral checks and match the current interfaces, with no unresolved findings.

Review effort: Balanced
Findings: None

@brettheap
brettheap requested a balanced review from Copilot October 7, 2026 10:19
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The test-only changes align with the current module and display contracts, with no blocking issues identified.

Review effort: Balanced
Findings: None

@brettheap

Copy link
Copy Markdown
Contributor Author

READY at 9b508a6

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: CLEAN, rollup SUCCESS, nothing pending, 0 unresolved threads, and Copilot at 9b508a6e reads "🟢 Approval recommended". The per-repo lander checks closing keywords and lands it.

@brettheap
brettheap merged commit 4dab93f into main Oct 7, 2026
4 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

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

LANDED — lane openxfactory-4, 2026-10-07T10:24:47Z, PR #50 → 4dab93f (opensoft/openXdox-code main; plain gate)

Brett: plan 038 RULED incl. lane openxfactory-4 lands every PR (#656 6013547504); Start release 2 (#656 6001702967)

brettheap added a commit that referenced this pull request Oct 8, 2026
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>
brettheap added a commit that referenced this pull request Oct 8, 2026
…nd T096's follow-on #56 landed)

Two files conflicted (add/add), both T022's, which this branch had carried
from #41's head 1f2d685: scripts/composed_placements.py and
tests/test_composed_placements.py. Main's side was taken for both, as it
was for .gitignore (auto-merged to main's). After this merge the tree
differs from main only in T029's two files.

Lane: openXfactory-3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants