Skip to content

§ 3.4 S4: split the three RULED SPLIT files — thirteen route tails to the bindings that call them - #17

Merged
brettheap merged 18 commits into
mainfrom
build/s4-split-route-tails
Sep 12, 2026
Merged

brettheap merged 18 commits into
mainfrom
build/s4-split-route-tails

Conversation

@brettheap

@brettheap brettheap commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

§ 3.4 slice S4 — split the three RULED SPLIT files

STACKED ON #14 (slice S3) and lands after it. The branch is cut from build/s3-view-registry and re-merged from it as that branch moves (last at e176947, the Copilot re-review round), so this diff shows S4's own work; once #14 lands the lander merges main in and the stack collapses.

SPEC: openDox-spec docs/front-end-package-boundary.md § 5's S4 row, § 3.2's three SPLIT rows, § 4.5 assertions 1 and 2, § 6 Q3.
RULING: Q3 — opensoft/openXfactory#656 comment 5642758731 (Brett Heap, 2026-09-12): "a route constant travels with the binding that calls it, never with the model that happens to declare it."

S4 is the PRECONDITION for S5, not its sequel. Only 3 of the 13 gate-route constants were declared in class-B files; the other 10 sat in lens-model.js, repo-selector.js and staging-workbench-model.js, and swb-create.js / swb-session.js imported theirs from the last of those. The gate loop cannot be contributed until its route table stops living outside class B. It does now.


The thirteen route tails

file:line (census tree) constant → destination class
views/lens-model.js:1036 LENS_SAVE_ROUTE views/gate-lens.js (new) B
views/lens-model.js:1037 LENS_CLUSTER_ROUTE views/gate-lens.js (new) B
views/repo-selector.js:33 SNAPSHOT_INDEX_ROUTE views/projection-index.js (new) B
views/repo-selector.js:34 ACTIONS_REFRESH_ROUTE stays views/repo-selector.js A
views/repo-selector.js:39 ACTIONS_CREATE_PROJECT_ROUTE views/gate-projects.js (new) B
views/repo-selector.js:43 ACTIONS_EDIT_PROJECT_ROUTE views/gate-projects.js (new) B
views/repo-selector.js:46 ACTIONS_APPLY_REGISTER_EDITS_ROUTE LEFT THE BUNDLE (see below) —
views/staging-workbench-model.js:543 CREATE_ROUTE views/swb-create.js B
views/staging-workbench-model.js:817 EDIT_DOCUMENT_ROUTE views/swb-session.js B
views/staging-workbench-model.js:818 OPEN_PR_ROUTE views/swb-session.js B
views/staging-workbench-model.js:821 FIRST_EDIT_ROUTE views/swb-session.js B
views/staging-workbench-model.js:822 ABANDON_SESSION_ROUTE views/swb-session.js B
views/staging-workbench-model.js:826 SHARE_SESSION_ROUTE views/swb-session.js B

/actions/refresh is measured to have stayed class A (§ 3.3 lists it under openDox, and § 3.2's Q3 row says "picker + refresh stay class A") — a slice that swept every route out of the selector would have passed every other assertion here, so that one is asserted too. /project-register.json :38 is openDox's own and never moved.

:46 — what depended on /actions/apply-register-edits, and what replaced it

RULING DQ-1 keeps openxFactory's adapter lanes at openxFactory, and § 2.2 rule 1 says that is the one owner no class here can ever own. Q3 therefore has it leave the bundle entirely rather than move to a class. Removed with it:

  • the "⟳ apply N pending" button in the header selector, rendered under gateCapable(caps) && o.projects whenever pendingProjects.length + pendingEdits.length > 0;
  • its click handler (POST, the applied / skipped status line, and the apply.disabled re-arm on refusal);
  • its one call of o.onRefreshed(data) — that callback now has exactly one caller again, a successful refresh;
  • the constant, and the applybtn class on the control.

What replaced it: nothing in this bundle, deliberately. Commissions still record and still badge as pending exactly as before (buildPendingProjects / buildPendingEdits and the D-e two-plane posture are untouched); what no longer exists here is the button that ran openxFactory's fulfilment lane. openxFactory runs its own lane, and if it wants the affordance back it contributes one through the S3 registry, the way slice S2's intent chips return. The .applybtn CSS rule in styles.css is left in place: styles.css is class C, S7's file, and an ARRIVED moved_verbatim row — a dead rule costs nothing and a declared edit for it would cost a manifest line.

How the three surfaces reach their bindings

Through S3's registry, never an import. app.js resolves gate.lens and gate.projects once per render exactly as it resolves gate.bar, and hands each view an already-bound mount or null. Null is what a student install is: the lens plan panel stays plan-only and the selector renders picker + refresh — no gate form, no add row, no trash control, no 404. Each view ANDs that with the capability probe (gateLive(caps) && o.mountLensGate), which is the same conjunction views/intent-binding.js already states for its own optional binding.

views/projection-index.js is not a ViewBinding, and § 4.2 is why: "§ 4.1 binds at the region grain — a whole tab or overlay — not a fragment a view renders internally". An index fetch mounts no panel and occupies no region, so it takes the narrower guard S2 established — a dynamic import() inside fetchIndex, resolved once and cached, null when absent. fetchIndex already promised exactly that degradation for a route nothing serves.

Two new "shell" regions, lens-gate and repo-projects, are declared in both halves of the registry in the same order, so test_view_registry.py's drift test holds them together; both are hosts the view builds at mount time and hands over, exactly like viewer-gatebar.

views/projection-index.js is classed B with the caveat stated, not by silence. § 2.1 names class B "the gate loop" and this is a GET of a projection — but what assertion 2 exempts is class B's last clause, "its BINDING belongs to openXdox-code through the seam § 4 describes", which is exactly true here and is what makes the old site a breach in the first place (§ 3.3's ownership table). The census has no fourth letter for the projection column, so the row takes the class whose exemption it earns and says so on its face. REGISTERED for the note's owner: § 2.1's class-B headline is narrower than the property § 4.5 assertion 2 actually exempts on — either class B should be stated over the contributed column, or the projection column should get a letter of its own.

The census and the assertions

  • the three SPLIT rows → A with their real post-split line counts: lens-model.js 1070 → 1075, repo-selector.js 889 → 814, staging-workbench-model.js 1949 → 1943. The last carries tail: STATUS_BRAINSTORM, which is § 3.2's own reading of the row ("plus STATUS_BRAINSTORM / BRAINSTORM_AREA / STAGING_AREA (class-C)") — a tail rather than a reclassification, so it enters assertion 4's scope for S7 instead of escaping the sweep unremarked.

  • three new rows, class B: views/gate-lens.js 204, views/gate-projects.js 241, views/projection-index.js 73. loc refreshed on every file this slice touched; per-class totals: now declared in the fixture and re-derived from the rows by a new test, so the header arithmetic every slice quotes cannot drift from the data under it.

  • views/lens.js stays ? and its S1 note is corrected: it read "splits at S4", which contradicted § 5's own S4 row ("lens.js is OUT OF SCOPE … it stays ? as assertion 1's one declared, ruled-later exception").

  • ASSERTION 1 gains its post-S4 cutoff — the half of § 4.5 point 1 S1 could not yet enforce. Any row still ? or SPLIT fails, except what declared_transitional_rows names, with the ruling gap that causes it and an until: naming what would discharge it. Declared data, never a literal in the module: "a permanent UNDECLARED 'undecided' is an escape hatch, not a boundary; a permanent DECLARED one, cited to the ruling gap that causes it, is how this census stays honest."

  • ASSERTION 2 — all twelve SPLIT-file sites are CLEAN. views/lens.js's two openxFactory-lane sites become the standing declared exception § 4.5's last paragraph states ("they never entered it"), keyed by (path, route) and never by line — a line number in a declared exception rots the first time anything above it moves.

    The arithmetic, re-derived and written into the marker: 18 at S1 → 20 at S3 → 12 measured after S4 → 10 in scope once lens.js's pair is excluded by declaration.

    what is left n where closes at
    gate prefix 6 app.js CORE arm only — :589/:601 S3's gate.bar, :624/:625/:630×2 S4's two S5
    openXdox projection (/source/) 4 app.js:195/196, viewer.js:314, wheel.js:97 S6
    (declared, not counted) 2 views/lens.js's two lane sites a future ruling

    Each of the six gate sites is a class-B binding's routes: declaration in app.js's core arm — which view_extension.py calls the thing that makes Q3 "checkable instead of aspirational" — and each is a real breach by this assertion's own rule only while the entry sits in app.js (class A) rather than in the class-B module it names. S4 adds four of them on exactly the footing S3's gate.bar entry already stands on, and all six leave together at S5 when the class-B files move behind a host-supplied contribution and the three entries become contributedViewBindings(). Stated plainly rather than engineered around: keeping the declaration out of app.js would have meant a second collection arm, and the brief's instruction is to use S3's registry and not invent a second one.

  • the three xfail markers gain raises=AssertionError (S1 register nit 1). This is not theoretical. At the pre-S4 base, running pytest tests/test_web_boundary.py with the suite conftest reported all three as XFAIL — while what actually happened was a setup ModuleNotFoundError: No module named 'ideation_dashboard' from the carve's own § 1.2(d) breakage. A strict xfail with no raises tolerates any exception. With raises=, those runs now report the error as an error. (validate runs --noconftest, so neither run is what the required check sees.)

  • assertion 3's count re-measured 6 → 4: the stale figure was written on the S3 branch before the S2 merge closed the two intent-feed imports. S4 adds none — its three new modules are reached through resolved mounts and one late dynamic import, never a static from clause.

  • the other two S1 register nits are left to S7 and said so in place: the exemption test checking text presence rather than a declaration, and the fixture's row-level exempt: not being cross-checked against declared_exemptions. Both are assertion 4's own, and S7 is the slice that discharges it.

Tests

tests/test_split_route_tails.py is new and is named on validate's explicit list in the same commit, on S1's own precedent. tests/test_web_boundary.py would stay just as green if all thirteen constants had been deleted and the three surfaces silently stopped working; this file measures the other half — each constant declared in the class-B file that calls it and gone (not copied) from where it left; /actions/apply-register-edits absent from every file of the bundle; app.js's two binding entries and the modules they name declaring the same routes (the declaration is necessarily written twice, since app.js may not import a class-B module to read them); the ten moved gate routes present as a set in some class-B module beside the three already there; no class-A/C file reaching the new modules through a static import — and, under node against the real bundle files by absolute path, never a copy: the lens gate posting the route its plan kind names (organizer evidence collected first for add-as-cluster), rendering the engine's refusal verbatim and re-arming; the project commissions posting both gate routes with the project id, retiring the create form on a landed commission and restoring the control on a refused edit; the snapshot-index read degrading to null for a 404 and for a thrown fetch; and the selector's own fetchIndex still reaching the route it no longer names.

validate's narrowed list (--noconftest)   180 passed, 3 xfailed
tests/test_split_route_tails.py            29 passed  (node present)

The un-narrowed runs are unchanged by this slice and still broken by the carve (§ 1.2(d) / § 5's S8): pytest tests/test_view_registry.py tests/test_web_boundary.py errors in the suite conftest, and the node-driven suites over the moved modules (test_bullseye_widget.py, test_lens_labels_at_scale.py, test_doc_wheel.py, test_outline_tab.py) resolve REPO_ROOT one level above this repository — the carve's import rewrites pointed them at the wrong leg. Measured at this branch and at its base e176947: 66 failed, 2 passed, 85 errors, byte-identical both sides. S8 re-homes them.

Two dead parameters did not travel

mountCreateProject's projects and commissionEdit's control were passed by every caller and read by neither body. Carrying an unread parameter across a package boundary would freeze a mistake into the contributed contract.

Q-L1

Seven ARRIVED files are edited here (app.js, lens-model.js, lens.js, repo-selector.js, staging-workbench-model.js, swb-create.js, swb-session.js) and four files are created (gate-lens.js, gate-projects.js, projection-index.js, tests/test_split_route_tails.py). The paired openxFactory row-annotation PR lands first, per Q-L1 and § 5's closing paragraph; it is blocked behind openxFactory#1001 (slice S3's annotation), which is still open.

Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction

🤖 Generated with Claude Code

Summary by Sourcery

Split the ruled route tails into binding-owned modules while preserving optional gate behavior and strengthening boundary validation.

New Features:

  • Add optional lens execution, project commissioning, and membership-edit bindings for gate-capable installations.
  • Add a projection-index module that provides a late, failure-tolerant snapshot-index fetch.

Bug Fixes:

  • Remove route ownership from model and selector files so route constants reside with the bindings that invoke them.
  • Remove the in-bundle apply-pending control and fulfilment call for the external openxFactory lane.

Enhancements:

  • Split route constants and their calling UI logic from the three ruled model/selector files into class-B modules.
  • Resolve optional gate bindings through the view registry and degrade cleanly when those bindings or projection services are unavailable.
  • Keep the repository picker and refresh behavior in class A while preserving pending commission badges and refusal recovery.
  • Tighten census transitional and route-ownership assertions, declare and verify census totals, and refresh boundary measurements.

CI:

  • Run the new split-route-tail tests as part of the narrowed validation workflow.

Tests:

  • Add route-tail, binding consistency, optional import, and Node-driven behavioral coverage for the moved lens, project, and projection functionality.
  • Require strict expected exception types for remaining boundary-test xfails and verify declared census exceptions remain valid.

brettheap and others added 15 commits September 11, 2026 23:01
… halves of one seam

openDox-spec `docs/front-end-package-boundary.md` § 4.1 asks for the front-end
analogue of `route_extension.collect_bindings`, and this is it — the AUTHORITY
in Python, its MIRROR in the language the shell is written in, and one
vocabulary held across both.

THE PROBLEM, in the note's own measurement: `src/opendox/web/` is "42 blobs,
30,585 lines, and NO package boundary at all", while the Python side has
answered the same question three times — a contributed ROUTE
(`route_extension`), a late REACH into the consumer (`consumer_reach`), and a
registered PROFILE (`domain_profile` + `profile_proxy`). § 4.1's instruction is
to reuse those shapes rather than invent a fourth, so:

    route_extension.RouteBinding      ->  ViewBinding
    route_extension.collect_bindings  ->  collect_view_bindings
    consumer_reach.route_column       ->  resolveView / requireView
    profile_proxy.profile_openxfactory -> host_view_extensions

`src/opendox/view_extension.py` is the authority. `ViewBinding` is frozen and
validated where it is CONSTRUCTED, `RouteBinding.__post_init__`'s discipline;
`ViewExtension` is a `runtime_checkable` Protocol and NOT an ABC, for
`RouteExtension`'s reason — an extension authored in the repository that PINS
this one must conform WITHOUT inheriting from anything here, since nominal
conformance would make the seam the dependency it was drawn to remove.
`collect_view_bindings()` flattens contributed bindings into ONE mount order and
refuses four things: a non-conforming extension, a `views()` that yields
anything else, two bindings claiming one (region, id) slot, and a non-class-B
binding declaring a route another column contributed.

THE FOURTH REFUSAL IS RULED Q3 MADE EXECUTABLE (#656 comment 5642758731): "a
route constant travels with the binding that calls it, never with the model that
declares it". It is derived from the assembly rather than asserted about it — the
caller passes the `RouteBinding`s another column actually CONTRIBUTED, because a
literal ownership table here would be a second copy of the routing that drifts
the moment a column adds a route. Class B is exempt BY CONSTRUCTION: a gate-loop
binding naming a gate route is the boundary working (§ 4.5 assertion 2).

ORDER IS DECLARATION ORDER, FLAT, and the difference from `collect_bindings` is
argued rather than inherited: that function re-orders exact before prefix
because an HTTP dispatcher consults its table until something matches. Nothing
here is consulted that way — a panel mounts into the ONE region it names, and
two panels in one region are a refused collision rather than a race — so
re-ordering would only take away the one thing declaration order is good for.

THE HOST FACET, AND TWO ABSENCES WITH TWO ANSWERS. `host_view_extensions()`
reads `VIEW_EXTENSIONS` off the ONE registered profile through the SAME lazy
proxy `build_server()` reads `ROUTE_EXTENSIONS` through (RULED ASK-2 option (2)).
NO HOST AT ALL REFUSES: `ProfileNotRegistered` is a `RuntimeError` and passes
through untouched, which is ASK-2's "refusal, not a default". A HOST WITHOUT THE
FACET gets an EMPTY CONSUMER COLUMN: `ProfileFacetMissing` subclasses
`AttributeError` precisely so `getattr(..., default)` answers, and the empty
answer is correct where an empty `ROUTE_EXTENSIONS` would be a defect — a server
missing its contributed ROUTES looks fine until a path 404s, whereas a shell
with no contributed PANELS is the shell this leg ships today. Refusing there
would impose a flag day on every host that has not yet grown the facet, which is
every host, today. AND THE ABSENCE IS NAMED, NEVER SILENT: `view_manifest()`
carries `host_facet` = "declared" | "absent" with the facet and profile names,
which is § 4.3 point 5's "renders its region empty WITH A NAMED REASON" applied
to a facet.

`src/opendox/web/views/view_extension.js` is the mirror, named by the note's own
S3 row (every other module in that folder is kebab-case; this one is spelled
like the two Python files it mirrors, because three files and one seam should
have one spelling). It reads the manifest back out of `/capabilities` and
applies the SAME four refusals to it, so both halves check the same thing
against the same facts. `lookupView` is the OPTIONAL reach (null, and the caller
decides what absence means); `requireView` is the REQUIRED one (a refusal that
names the layering, `consumer_reach`'s posture); `resolveView` loads the
binding's module at first use and refuses a binding whose named export is
missing, because a binding that cannot be mounted must not look registered.
A malformed manifest REFUSES while an absent one is an empty column: failing
closed is the only safe answer for a payload that decides which code the shell
imports, and § 4.4's vendor policy is why the module specifier is held to a
bundle-relative './…js' — a contributed binding is exactly the hole "no CDN, no
remote script" would otherwise leak through.

BOTH FILES ARE CREATED, NOT ARRIVED: neither has a row in openxFactory's
`docs/opendox-carve-manifest.yaml`, which is what Q-L1 means by "new files are
created, not arrived". The census row in `tests/test_consumer_reach.py` lands in
this same commit because it is a claim about this module — `opendox.view_extension`
imports NOTHING from `openxdox` and reads the host's facet through the proxy, so
it belongs in `NEUTRAL_MODULES` and not in `STILL_REACHING`, and the lawful
direction is that the column CONTRIBUTING a view imports this module rather than
the other way round.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… a registry lookup

§ 4.1 names this edit by line number: "app.js stops importing class-B modules
directly. Its line 43 becomes a lookup in the collected bindings, and a shell
built with no gate binding registered renders the tab strip WITHOUT the gate bar
rather than failing to load." That is what this commit does, and nothing else.

THE HARDCODED `TABS` TABLE BECOMES THE CORE ARM OF THE REGISTRY. `CORE_VIEWS`
holds the same seven views as `ViewBinding`s and is collected through
`collectViewBindings()` alongside whatever the consumer column contributed —
the same order and the same SINGLE collection `serve.build_server()` uses for
routes, and for the same reason: a collision between a contributed panel and one
of the shell's own must be refused before anything mounts, rather than
discovered as a panel that silently never rendered. A core binding declares its
`module` and `entry` truthfully even though it also carries a `mount` closure,
because a CONTRIBUTED binding carries only those two and is loaded through
`resolveView()` — the core arm always holds its own view modules statically,
since they are the product.

THE TAB STRIP IS DERIVED FROM THE REGISTRY, not declared beside it. A tab is
simply a binding that declared a `control`; a binding with no control — the gate
bar, and every overlay binding after it — is in the collected order and is not a
tab, which is why the filter is one expression in `initTabs` and not a second
list to keep in step.

THE GATE BAR IS A BINDING NOW: class B, `optional: true`, declaring
`/actions/gate/ratify` as RULED Q3's "a route constant travels with the binding
that calls it". Three things are true that were not true before. A shell
assembled without it renders the viewer with NO GATE BAR instead of failing to
load — `views/viewer.js` already tolerates a null `mountGate`
(`const mountGate = o.mountGate || null`), so the absence was always
representable downstream and was simply unreachable from here, and no second
file is touched. `gate.js`:120's route says in one checkable place whose it is.
And the entry sits in the CORE arm TRANSITIONALLY: slice S5 moves the four
class-B files behind a binding openXdox supplies, at which point this entry is
deleted and the identical binding arrives through `contributedViewBindings()`
with nothing else in this file changing — which is the test of whether the seam
was drawn in the right place.

`routes` IS DELIBERATELY UNDECLARED ON EVERY CORE TAB BINDING and that is not an
omission. Q3 makes `routes` a declaration of OWNERSHIP, not a transitive
inventory of every path a module's import graph happens to touch. Exactly one
core binding owns a route that way today: `gate.bar`. The census's eighteen
remaining route-ownership breaches are FILE-level facts (§ 4.5 assertion 2),
measured by slice S1's `tests/test_web_boundary.py` and cleared by S4 and S6;
declaring them here would encode S4's answers before S4 has done its work, and
would refuse this very assembly, since `/source/` is a contributed prefix today.

THE COLLECTED REGISTRY IS HANDED TO EVERY VIEW as the context key `views`, so an
OPTIONAL contributed panel is asked for by id — `lookupView(ctx.views, "…")`,
null when the column that supplies it is not installed. Slice S2's intent chips
are the first such reader: `wheel-intent` and `dispose-intent` are declared
regions already, so S2 adds an optional binding and two `lookupView` calls and
touches nothing here.

The consumer column is read out of the `/capabilities` payload this render
already fetched (§ 4.3's "no new route and no second fetch"). It is EMPTY at
this slice and on every static image, so the shell renders exactly as it did
before — the note's S3 row in its own words: "nothing is contributed yet, so the
shell renders exactly as today with an empty extension tuple". The server-side
line that publishes a manifest (`capabilities["views"] = view_manifest(...)`) is
slice S5's, inside `serve.py`'s own declared-edit window, which the in-flight
ASK-7 act owns this hour.

`index.html` IS NOT TOUCHED. A `data-region` attribute would be a second
spelling of an id the shell already carries, and an added attribute is in none
of the RULED `edit_classes` (`import rewrites | path constants | adapter calls`),
so declaring it would mean inventing an edit class rather than using one. The id
is the declaration; the registry's `REGIONS` table plus a drift test against the
shell's existing ids is what makes it a contract.

Q-L1: `src/opendox/web/app.js` is an ARRIVED file. Its 37 edited lines are
declared on its row of openxFactory's `docs/opendox-carve-manifest.yaml` by
openxFactory PR #1001, which lands FIRST — one `import rewrites` line (43) and
36 `adapter calls` lines. `verify-carve-arrival.py`'s `_check_declared_lines`
over all 123 `opendox_code` rows against this branch: app.js DECLARED, 60
verbatim rows byte-identical, 0 refusals.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ommit

50 assertions over the seam, and the file is added to `validate`'s explicit
`--noconftest` list in THIS commit rather than a later one — the discipline
§ 4.5 states for slice S1 ("added to that list in the SAME commit") and the one
its three neighbours already keep: `test_leg_shape.py`, `test_consumer_reach.py`
and `test_profile_registration.py` each arrived that way. A test that is not in
the list is not run, and a seam nobody runs is a description.

WHAT IS ASSERTED, in six groups.

1. A malformed binding refuses WHERE IT IS DECLARED and the message says why —
   parametrized over every field: the id grammar, an undeclared region, a module
   specifier that is root-relative / absolute / climbs out of the bundle with
   `..`, an entry that is a callable rather than the NAME of an export, an
   unknown class, non-tuple routes, a route not rooted at '/'.
2. Collection: a non-conforming extension names the member it lacks; two
   bindings in one (region, id) slot refuse and the message names BOTH modules;
   one id in two different regions is NOT a collision; the core arm comes
   through an EMPTY consumer column unchanged; and collecting nothing at all is
   an empty tuple rather than a refusal, which is this slice's own case and
   every static image's.
3. RULED Q3, executable: a class-A binding declaring a gate route another column
   contributed is REFUSED, and the refusal quotes the rule. Class C and the
   transitional `?` are in scope too (§ 4.5 assertion 2's "class A, class C AND
   the transitional `?`, which is where most of the breaches actually sit"); a
   class-B binding declaring the SAME route is allowed, because a gate-loop
   binding naming a gate route is the boundary working. With no contributed
   routes nothing can breach — there is nothing to breach.
4. The host facet through the ONE registered profile: the facet comes off it; a
   host WITHOUT the facet contributes an empty column; NO host at all REFUSES
   rather than answering empty (ASK-2's "refusal, not a default"); and importing
   the registry resolves no profile at all, which is the whole value of the lazy
   proxy. The manifest declares its `schema_version` and `kind` and NAMES the
   absence rather than being silent about it.
5. Drift, so the two halves cannot diverge: both declare the same regions in the
   same order and the same classes; every "dom" region is an element
   `index.html` actually carries (the id IS the declaration — this is what makes
   the unedited shell a contract rather than an assumption); no "shell" region
   pretends to have one; every core tab binding names a dom region, or it would
   be a blank tab; `app.js` no longer imports the gate module, declares the gate
   bar as an OPTIONAL class-B binding, and wires the doc list through the
   registry.
6. The JavaScript half driven by the REAL file under `node`, skipped and never
   failed where node is absent: the core arm collects with an empty consumer
   column; a slot collision and a contributed gate route both refuse; a
   malformed `/capabilities` manifest refuses while an absent one is an empty
   column; ONE VIEW WIRED END TO END — `resolveView` loads the real
   `views/docs.js` from its binding and hands back the `renderDocs` export; a
   contributed panel mounts into its region under a minimal DOM; an absent
   OPTIONAL binding is null and an absent REQUIRED one refuses; and a "shell"
   region asked for a standing element refuses rather than returning a null the
   caller would read as "the column is not installed".

One of the drift assertions is a REAL DEFECT kept as a test rather than a
memory: the client's slot key joins a binding's region and id with a separator
neither can contain, and that separator was first written as a LITERAL NUL BYTE
in the source instead of as the six-character escape sequence a JavaScript
string literal spells it with. Everything parsed and every
other assertion passed — but `git`, `grep`, `file(1)` and every diff viewer
classify a file containing a NUL as BINARY, so the module would have reached
review as an unreadable blob. A separator that cannot occur in a region or an id
is right; spelling it as a raw byte is not. The check reads BYTES, because
reading the file as text is exactly what hides it.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…at could inject a tab, an entry that could not be called

Copilot's review of PR #14, all three accepted and each kept as a test.

1. A DECLARATION DEFECT MUST NOT DEPEND ON THE TYPE OF WHAT IT REFUSES.
   `REGIONS` is a dict, so `<unhashable> not in REGIONS` raised `TypeError` out
   of the hash BEFORE `ViewBinding.__post_init__` could raise the
   `ViewBindingError` this module promises for every declaration defect — a
   caller written to catch the one refusal class would have met an exception it
   never agreed to handle. The type is now checked before the membership, on
   `region` and on `view_class` both; the second cannot raise today (a tuple
   membership test does not hash) and is guarded anyway, because relying on
   `VIEW_CLASSES` staying a tuple is exactly the quiet dependency this work
   exists to end.

2. A CONTRIBUTED ENTRY MAY NOT CARRY THE CORE ARM'S OWN TWO FIELDS.
   `contributedViewBindings` passed manifest entries straight to `viewBinding`,
   which accepts and preserves `mount` and `control`. `control` is what makes a
   binding a TAB, and a contributed entry arrives as JSON and cannot carry the
   `mount` FUNCTION the tab router calls — so a manifest declaring a `control`
   would have put an entry in the tab strip whose `mount` is `undefined`: the
   tab renders, and the click that selects it throws. Refused where the payload
   is READ rather than ignored, because ignoring it is a crash with a delay on
   it, and `view_manifest()` emits neither field, so no honest payload is
   refused by this. Malformed REFUSES while absent is an empty column — the
   rule that already governs the rest of the manifest.

3. PRESENT IS NOT MOUNTABLE. `resolveView` checked only that the entry NAME
   existed on the module's namespace, so a module exporting it as a string, an
   object or a `null` handed back a binding that looked resolved and threw a raw
   `TypeError` from inside whatever tried to mount it — the "dangling import a
   thousand lines from the call" this seam exists to replace. The entry must now
   be a function, and the refusal distinguishes "not exported" from "exported as
   something that cannot be called", because those are different defects in the
   contributing column.

Five new assertions, in the groups they belong to: an unhashable `region` (as a
list and as a dict) and an unhashable `view_class` refuse as `ViewBindingError`;
a contributed entry carrying `control` or `mount` refuses while the same entry
without them is collected; and an entry exported as a non-function refuses at
resolution. `tests/test_view_registry.py` is 55 assertions; `validate`'s four
files are 127.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…uter's field names

`tests/test_bullseye_widget.py` asserts `app.js`'s shape by QUOTING ITS LINES
BACK, so the view registry's `view` -> `region` rename invalidates three of its
quotations the moment it lands. They are migrated in the SAME act that
invalidated them, which is the only time anyone can be sure the migration is a
rename and not a behaviour change:

  :900   classList.toggle("lensfull", target.view === "view-lens")
  :1781  storeTab(target.view);
  :1785  const remembered = TABS.find((t) => t.view === storedTab());

`.view` -> `.region` in all three, and nothing else on any line. The assertions'
MEANING is unchanged: the lens still takes the whole page, the tab is still
remembered on every activation, and it is still restored only to a view this
plane actually has. The tab router simply calls the field `region` now, because
a binding's mount point is what that string always was.

THE SUITE IS RED TODAY FOR AN UNRELATED REASON — it imports through
`src/opendox/serve.py`, which still reaches `ideation_dashboard`, a module the
§ 3 carve removed — and it is not in `validate`'s narrowed list. Neither fact
makes a stale assertion acceptable: slice S8 re-homes these 48 test files and
un-narrows `validate`, and an assertion describing a shape that no longer exists
is precisely the rot that slice would then have to discover and date. Copilot
found two of the three on PR #14; a sweep of every assertion in the leg that
quotes `app.js` found the third, and found no others anywhere in the suite.

Q-L1: `tests/test_bullseye_widget.py` is an ARRIVED file, already
`moved_with_declared_edit` for its `path constants` line 40. The three lines are
declared as `adapter calls` on the same row by openxFactory PR #1001 — the same
act that declares `app.js`'s 37 — and each is a single-line REPLACE at the carve
numbering, so exactly three lines are declared and no neighbour is.
`verify-carve-arrival.py`'s `_check_declared_lines` over all 123 `opendox_code`
rows: both rows DECLARED, 60 verbatim rows byte-identical, 0 refusals.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
S1 landed tests/test_web_boundary.py, tests/fixtures/web_boundary_census.yaml
and an explicit-test-list addition to .github/workflows/validate.yml on main
while this leg was in flight. The only textual conflict is validate.yml's
pytest invocation; resolved as the UNION of both slices' comment blocks and
both new test files (tests/test_web_boundary.py then tests/test_view_registry.py),
in landing order S1 then S3. S1's census fixture and test module arrive
unmodified from main in this commit; the semantic follow-up they need (a
census row for S3's new file) is the next commit, not this one.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
S1's census could carry no row for views/view_extension.js because the note
measured the tree before S3's file existed; the merge alone left
test_every_web_file_is_classified_exactly_once failing. Classified A: no
import (so it cannot trip assertion 3), no governance literal (out of
assertion 4's class-C/tail scope regardless), and its one route-shaped
string -- 'gate.bar' in a doc comment -- is an id, not a /actions/... path,
so assertion 2's patterns do not match it. app.js's own row `loc` moves
1155 -> 1282 with the registry wiring; the header totals move with both
rows (43 files, 31,134 lines).

Assertions 2 and 3's xfail `reason=` strings are corrected to the counts
this tree actually measures post-merge, on the module's own stated
"fidelity over tidiness" convention rather than left to cite a shape that
no longer exists:
  * assertion 3 (relative import / class boundary): 7 sites -> 6. S3 closes
    app.js:43 -> views/gate.js, the shell's one direct class-B import and
    exactly the edge slice S3 exists to close. The other 4 class-boundary
    sites and the 2 unresolved intent-feed sites are untouched, so the
    assertion stays red and the marker stays valid.
  * assertion 2 (route ownership): 18 sites -> 20. S3's CORE_VIEWS
    `gate.bar` entry declares `routes: ["/actions/gate/ratify"]` (RULED Q3:
    a route constant travels with the binding that calls it) -- a real
    breach by this assertion's own rule while that entry sits in app.js
    (class A) rather than views/gate.js (class B, exempt by construction).
    Transitional by the same design the CORE arm itself is: slice S5
    deletes this entry from app.js when the binding moves behind a
    host-supplied contribution. app.js's other two projection-route sites
    shift line number (183/184 -> 195/196) with the file's growth; same two
    `/source/` literals, untouched otherwise.

Neither assertion XPASSes -- both stay xfail(strict=True), which is the
thing this commit exists to keep true. Full leg validate invocation
(tests/test_leg_shape.py, tests/test_consumer_reach.py,
tests/test_profile_registration.py, tests/test_web_boundary.py,
tests/test_view_registry.py --noconftest): 129 passed, 3 xfailed, 0 failed.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
view_extension.js
  * manifestRoutes(): a PRESENT manifest whose contributed_routes is not an
    array (or missing) now refuses instead of silently reading back [] --
    view_manifest() always emits this field as an array, so anything else
    there cannot be trusted for the ownership check it exists to carry.
    Absence of the WHOLE manifest is still an empty column, unchanged.
  * resolveView(): a rejected `await import(...)` (missing file, syntax
    error) is now caught and refused as a ViewBindingError naming the
    binding id and module path, instead of leaking a native error with
    neither.

view_extension.py
  * ViewBinding.entry is now held to the same ASCII identifier grammar
    views/view_extension.js's viewBinding() checks (_ENTRY), not Python's
    own str.isidentifier() -- the two disagreed in both directions
    ("$mount" valid JS, invalid Python identifier; "café" valid Python
    identifier, invalid per the client's ASCII-only regex), so a binding
    could be constructed on one side and refused on the other.
  * collect_view_bindings() now checks views is callable and views() a
    list/tuple before entering the loop. isinstance(extension,
    ViewExtension) is a runtime_checkable Protocol check and verifies only
    that the name exists; `views = 1` or `views()` returning None both
    passed it and then raised a raw TypeError, never the ViewBindingError
    every other declaration defect in this module promises.

Ten new tests (2 Python parametrized + 2 single + 2 JS, tests/test_view_-
registry.py), the census loc for views/view_extension.js corrected for its
growth (422 -> 455) with the header totals moving the same amount. Full
leg validate invocation: 139 passed, 3 xfailed, 0 failed -- the three S1
xfails unaffected (app.js untouched this round; both created files this
commit touches carry no manifest row, RULED OQ-C).

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…e scope

The one remaining PR #14 thread (tests/test_view_registry.py:132): this
repository ships no `package.json`, so `_run_node`'s harness and the real
`view_extension.js`/`docs.js` (native `export`/`import`, no bundler) have no
declared module format. Node decides ambiguous `.js` files via
`--experimental-detect-module` (default ON since Node ~20.10, unflagged by
Node 22+): it reparses a file as ESM the moment it sees module syntax, and
warns `To eliminate this warning, add "type": "module" to .../package.json`.

Verified by hand and does not reproduce today: neither locally (Node
v22.22.2) nor in the actual `validate` run for this head (34702880356, Node
24 per the runner's own deprecation notice) does any node-based test fail --
both pass because the heuristic is on by default there. It is still a real
gap, not a false positive: importing the unmodified `view_extension.js` with
`--no-experimental-detect-module` (simulating an older Node, or the flag
disabled) fails outright, proven both by hand and by the new regression test
below (confirmed red on the pre-fix tree, green after).

Fix: an explicit `package.json` (`"type": "module"`) at the repository root
-- an ancestor of `src/opendox/web/**/*.js` for Node's module-scope lookup,
but deliberately NOT inside `src/opendox/web/`, which
`tests/fixtures/web_boundary_census.yaml` classifies file-by-file (verified
`test_every_web_file_is_classified_exactly_once` still passes unchanged) --
plus one written into every `_temp_bundle()` copy, since `tmp_path` sits
outside the repository tree and the root file is not its ancestor.

New test `test_js_module_scope_holds_without_node_s_detection_heuristic`
imports both the real registry and a `_temp_bundle` copy under
`--no-experimental-detect-module` and asserts a clean import -- the positive
assertion that the module format is now a stated fact rather than a Node
default that a future version, downgrade or flag could change again.

Verified: full `validate` invocation (5 files, --noconftest) 140 passed, 3
xfailed -- same xfail set as before (S1's three strict xfails, untouched by
this change).

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
S2 (#15, "the intent chips become an optional
contributed binding") landed on main while this leg was in flight and
flipped PR #14's mergeStateStatus to DIRTY/CONFLICTING. Two textual
conflicts, both resolved as the UNION of both slices' content rather than
by picking a side:

- `.github/workflows/validate.yml`: both the comment block (S2's paragraph
  then S3's, plus a one-line note that S3's registry test now carries its
  own package.json fix) and the pytest file list (`test_intent_binding_shape.py`
  then `test_view_registry.py`) keep both slices' additions.
- `tests/fixtures/web_boundary_census.yaml`: both slices' own "a 43rd file"
  paragraphs are kept verbatim (each counts its own addition against the
  shared a99eba0 base, independently, and neither claim was wrong on its
  own branch), plus a new RECONCILED paragraph giving the combined total now
  that both land in one tree -- A 22 files/12,398 lines, B 4/1,597, C
  14/11,854, ? 4/5,432, total 44/31,281 -- verified against the merged
  file's own rows (`sum(row["loc"] ...)` by class), not hand-arithmetic left
  unchecked. `views/dispose.js` and `views/wheel.js` (S2's two other touched
  files) are unchanged in `loc` on both branches, so B/C totals carry over
  unmodified.

All other files (src/opendox/cli.py, src/opendox/serve.py,
src/opendox/web/views/dispose.js, src/opendox/web/views/wheel.js, the new
views/intent-binding.js, tests/test_intent_binding_dom.py,
tests/test_intent_binding_shape.py) arrive unmodified from main.

Verified: full `validate` invocation (6 files, --noconftest) 148 passed, 3
xfailed -- the same three S1 strict xfails, same reasons, confirmed still
XFAIL rather than flipped XPASS by S2's edits.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… mount, view-registry isolation

tests/test_doc_surfaces.py
  * test_the_doc_tab_is_wired_to_the_one_cross_view_jump located the docs
    tab's block by the pre-S3 `{ tab: "tab-docs"` shape, which no longer
    exists in app.js now that the binding is `{ id, control, region }`
    (§ 3.4 S3). `app.split(...)[1]` on the absent literal raised IndexError
    before the renderDocs assertion ever ran. Migrated to split on the
    registry shape (`{ id: "docs.list", control: "tab-docs",
    region: "view-docs",`) -- the same one-token-class migration the three
    test_bullseye_widget.py `.view` -> `.region` quotations already took in
    this PR (09b42f5).

src/opendox/web/app.js
  * The viewer's `mountGate` adapter called a hard-coded
    `gateView.exports.mountGateBar` instead of the RESOLVED binding's own
    declared `entry` export. `resolveView()` already validates that
    `binding.entry` names a callable export of `binding.module`; a
    contributed `gate.bar` binding declaring a different entry name would
    pass that validation and then either mount the wrong function or throw
    on `undefined` here, because validation and mounting consulted two
    different names. Now
    `gateView.exports[gateView.binding.entry](host, gctx, { caps })` --
    one token changed. New
    test_app_js_mounts_the_gate_bar_through_its_declared_entry
    (tests/test_view_registry.py, S3-created) pins the new expression and
    asserts the old hard-coded call is absent, as a regression guard.

tests/test_view_registry.py
  * Normal (non-`--noconftest`) pytest loads the root conftest.py, which
    registers an empty `_SuiteProfile` at collection time -- a test process
    is a host like any other. This module never cleared that ambient
    registration before asserting against a clean slate:
    `registered()`'s `domain_profile.register()` raised AlreadyRegistered
    against the suite's own profile (reproduced in isolation running
    test_the_facet_comes_off_the_one_registered_profile alone), and
    test_no_host_at_all_refuses_rather_than_answering_empty's
    `assert not domain_profile.is_registered()` saw it registered and
    failed (also reproduced in isolation; the full-file run happened to
    pass it only as a side effect of the PRECEDING test's fixture teardown
    unregistering the conftest profile after its own registration attempt
    raised). New autouse `_empty_registry`, mirroring
    test_profile_registration.py's fixture of the same name: save whatever
    profile is registered (or None), unregister, yield, restore in
    teardown. Both tests now pass standalone and in any order.

Verified: narrowed validate (5 files, --noconftest) 82 passed, 3 xfailed,
unchanged. `node --check src/opendox/web/app.js` clean.

Normal invocation of both touched files still cannot reach any of these
three assertions: `ideation_dashboard` is genuinely absent from this leg by
design (pyproject.toml's own dependency note -- it is a cross-column reach
the BUILD arc removes), and the root conftest's autouse
`declared_human_console` fixture imports `opendox.cli` -> `opendox.serve`,
which imports it at module level. Every test in both files errors at
fixture setup on that ModuleNotFoundError before reaching either file's
body, unchanged by this commit (78 errors before and after -- the
pre-existing 77 plus one new test, same reason). Verified instead with a
scratch-only, uncommitted `ideation_dashboard` stub that satisfies the
import chain with no behavioural stand-in beyond existing, plus isolated
per-test and per-line checks against the real files; the PR thread replies
give the exact commands and tallies.

Also found, NOT fixed here (out of this round's scope and reported to the
orchestrator separately): tests/conftest.py's
`REPO_ROOT = HERE.parent.parent` is off by one directory now that the carve
flattened `tests/ideation-dashboard/` to `tests/` -- it resolves one level
above this repository's own root. That is a second, independent reason
most of test_doc_surfaces.py (and, by the same `REPO_ROOT` import, roughly
three dozen other test files) cannot reach a green normal invocation right
now; it masks nothing this commit fixes, and none of this commit's new or
changed assertions depend on it.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… the bindings that call them

RULED Q3 (opensoft/openXfactory#656 comment 5642758731, Brett Heap,
2026-09-12): "a route constant travels with the binding that calls it, never
with the model that happens to declare it." openDox-spec
`docs/front-end-package-boundary.md` § 5's S4 row is the PRECONDITION for S5:
only 3 of the 13 gate-route constants were declared in class-B files; the
other 10 sat in `views/lens-model.js`, `views/repo-selector.js` and
`views/staging-workbench-model.js`, and the gate loop cannot be contributed
until its route table stops living outside class B.

THE THIRTEEN TAILS, and where each went:

  views/lens-model.js  "?" -> A (1070 -> 1075)
    LENS_SAVE_ROUTE :1036, LENS_CLUSTER_ROUTE :1037 -> views/gate-lens.js
    (NEW, class B) with the execute affordance, the organizer-evidence form
    and the outcome panel that call them. The model is pure and import-free
    again and names no route another column declares.

  views/repo-selector.js  "?" -> A (889 -> 814)
    :33 /snapshot-index.json        -> views/projection-index.js (NEW, class B),
                                       reached LATE by a dynamic import inside
                                       `fetchIndex` (§ 4.2's own guard, not a
                                       ViewBinding — an index fetch mounts no
                                       panel and occupies no region)
    :34 /actions/refresh            stays class A: BOTH legs declare a handler
    :38 /project-register.json      stays class A: openDox's own
    :39 create-project, :43 edit-project
                                    -> views/gate-projects.js (NEW, class B),
                                       ONE binding carrying the create form and
                                       the membership-edit commission
    :46 /actions/apply-register-edits
                                    -> LEFT THE BUNDLE ENTIRELY, with the
                                       "⟳ apply N pending" button that reached
                                       it. RULING DQ-1 keeps that lane at
                                       openxFactory and § 2.2 rule 1 says no
                                       class here can ever own it. Commissions
                                       still record and still badge as pending;
                                       what is gone from this bundle is the
                                       button that ran the fulfilment.

  views/staging-workbench-model.js  "?" -> A (C tail) (1949 -> 1943)
    :543 CREATE_ROUTE -> views/swb-create.js; :817/:818/:821/:822/:826 with the
    SESSION_ROUTES table and sessionRoute() -> views/swb-session.js. No new
    file: both are class B already and were always the only callers.

REACHED THROUGH THE S3 REGISTRY, NEVER AN IMPORT. `app.js` resolves `gate.lens`
and `gate.projects` once per render exactly as it resolves `gate.bar`, and
hands each view an already-bound mount or null. Null is what a student install
is: the lens plan panel stays plan-only and the selector renders picker +
refresh, with no 404 and no dead control. Two new "shell" regions (`lens-gate`,
`repo-projects`) are declared in BOTH halves of the registry, in order, so the
drift test holds them together.

CENSUS AND ASSERTIONS (tests/fixtures/web_boundary_census.yaml,
tests/test_web_boundary.py):
  * the three SPLIT rows are re-classified A with their real post-split line
    counts; three new class-B rows; `loc` refreshed on every file this slice
    touched; per-class `totals:` now declared and re-derived from the rows.
  * ASSERTION 1 gains its post-S4 cutoff (§ 4.5 point 1): any row still "?" or
    "SPLIT" fails, except what `declared_transitional_rows` names —
    views/lens.js alone, with the ruling gap and what would discharge it.
  * ASSERTION 2: all twelve SPLIT-file sites are CLEAN. views/lens.js's two
    openxFactory-lane sites become the standing DECLARED exception § 4.5's own
    last paragraph states ("they never entered it"), keyed by route and never
    by line. Measured residue 10, re-derived and written into the marker: 6
    gate-prefix sites, every one of them a class-B binding's `routes:`
    declaration in app.js's CORE arm (:589/:601 S3's gate.bar, :624/:625/:630
    S4's two), all transitional and closing together at S5 when those entries
    leave for contributedViewBindings(); plus the 4 /source/ sites RULED Q4
    re-homes at S6.
  * the three xfail markers gain `raises=AssertionError` (S1 register nit 1) —
    a strict xfail with no `raises` tolerates any exception, so a malformed
    fixture would have read as the expected failure. Assertion 3's stale count
    (6, measured on the S3 branch before the S2 merge) is re-measured to 4; S4
    adds none. The other two S1 nits — the exemption test checking text
    presence rather than a declaration, and the row-level `exempt:` not being
    cross-checked — are assertion 4's own and are left to S7.

Two dead parameters did not travel with the code they were passed to:
`mountCreateProject`'s `projects` and `commissionEdit`'s `control` were never
read by either body.

Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…te's list

`tests/test_web_boundary.py` alone cannot tell this slice apart from a slice
that DELETED the thirteen route constants: its census assertion measures that
no file outside class B names another column's route, which is equally true of
a bundle whose gate verbs no longer work. `tests/test_split_route_tails.py` is
the other half, in the same `--noconftest` shape as its five neighbours:

  * every one of the eleven moved constants declared in the class-B file that
    CALLS it, and the literal gone — not copied — from the file it left, with
    no surviving `export const` that a re-export shim could hide behind;
  * `/actions/refresh` measured to have STAYED class A (§ 3.3 puts it under
    openDox; a slice that swept every route out of the selector would pass
    every other assertion here);
  * `/actions/apply-register-edits` measured absent from EVERY file of the
    bundle, with the apply button's own class, because "leaves the bundle
    entirely" is a statement about all of it;
  * app.js's `gate.lens` / `gate.projects` entries and the modules they name
    declaring the SAME routes — the declaration is necessarily written twice,
    since app.js is class A and may not import a class-B module to read them,
    and this is what keeps the two copies honest through S5's move into
    contributedViewBindings();
  * the ten moved gate routes present as a SET in some class-B module, beside
    the three that were already there — which is § 5's S4 precondition for S5
    stated as an assertion;
  * no class-A/C file reaching the three new modules through a static import,
    measured on the three files this slice rewired (assertion 3 is xfail today
    and could not have reported a new breach);
  * and under node, against the REAL bundle files by absolute path rather than
    a copy: the lens gate posting the route its plan kind names (with the
    organizer evidence collected first for add-as-cluster), rendering the
    engine's refusal verbatim and re-arming; the project commissions posting
    both gate routes and carrying the project id, retiring the create form on
    a landed commission and restoring the control on a refused edit; the
    snapshot-index read degrading to null for a 404, a thrown fetch and never
    throwing; and the selector's own `fetchIndex` still reaching the route it
    no longer names, through the late import(), resolved once.

Named on `validate`'s explicit list in the SAME commit, on slice S1's own
precedent — a test file this leg does not name is a test file it does not run.

Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…to build/s4-split-route-tails

Lane: openxfactory-4-opendox-extraction

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ready does

S3's Copilot re-review (#14, `e176947`) replaced
`gateView.exports.mountGateBar(...)` with
`gateView.exports[gateView.binding.entry](...)`: a contributed binding NAMES
its entry in the manifest, and reading a hardcoded export name here would
silently ignore the name it declared — the binding would resolve, the mount
would be `undefined`, and the panel would fail at the click rather than at
assembly. The same is true of S4's two mounts, so they read the declared entry
too. Census `loc` for app.js refreshed with the change (1331 -> 1337) and the
declared totals re-derived.

Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 12, 2026 17:36

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.

🟡 Changes recommended

Four unresolved moderate findings must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR implements S4 by moving frontend route ownership into the class-B bindings that call those routes, preparing registry-based contributions for S5.

Changes:

  • Adds lens, project, and projection binding modules.
  • Relocates gate and session route declarations.
  • Updates registry wiring, census assertions, tests, and CI validation.

Review findings: Four unresolved moderate findings remain: seam validation for gate.projects, isGateBearing validation for gate.bar, rejected-fetch handling in gate-lens.js, and validation of route ownership exceptions.

File summaries
File Reviewed change
tests/test_web_boundary.py Enforces census and route ownership assertions.
tests/test_view_registry.py Tests registry contracts and resolution.
tests/test_split_route_tails.py Verifies route relocation and runtime behavior.
tests/test_doc_surfaces.py Updates frontend surface checks.
tests/test_consumer_reach.py Tracks registry import neutrality.
tests/test_bullseye_widget.py Updates frontend test expectations.
tests/fixtures/web_boundary_census.yaml Records classifications, totals, and exceptions.
src/opendox/web/views/view_extension.js Mirrors registry regions on the client.
src/opendox/web/views/swb-session.js Owns session route declarations.
src/opendox/web/views/swb-create.js Owns the create route.
src/opendox/web/views/staging-workbench-model.js Removes relocated session routes.
src/opendox/web/views/repo-selector.js Retains picker/refresh behavior and late index loading.
src/opendox/web/views/projection-index.js Provides optional snapshot-index loading.
src/opendox/web/views/lens.js Uses the resolved lens gate mount.
src/opendox/web/views/lens-model.js Removes relocated gate route declarations.
src/opendox/web/views/gate-projects.js Adds project commission binding and routes.
src/opendox/web/views/gate-lens.js Adds lens gate binding and routes.
src/opendox/web/app.js Resolves and wires optional gate bindings.
src/opendox/view_extension.py Adds registry authority and shell regions.
package.json Enables ES modules for Node tests.
.github/workflows/validate.yml Runs boundary and route-tail validation.
Review details

Suppressed comments (2)

src/opendox/web/app.js:1319

  • resolveView validates only that the manifest's declared entry is callable, but this adapter then assumes its return value has both openCreateForm and commissionEdit (dereferenced by repo-selector.js). A valid contributed gate.projects binding can therefore resolve successfully and crash during the first render if its entry returns a different controller shape—the exact replacement this core entry is meant to support at S5. Make that controller contract explicit and validate it at the seam (with a refusal), or define a generic mount-result contract before moving this binding to contributedViewBindings().
      mountProjectGate: projectGateView
        ? (host, pctx) =>
            projectGateView.exports[projectGateView.binding.entry](host, pctx)
        : null,

src/opendox/web/views/gate-lens.js:188

  • If the fetch itself rejects (for example, the loopback service goes away after the capability probe), dispatch never reaches renderOutcome or the re-arm branch: the execute button remains disabled and the click creates an unhandled rejection. Catch transport errors here, render the refusal/error text, and re-enable the button just as the project commission binding does.
  async function dispatch(body, route) {
    run.disabled = true;
    const payload = await postPlan(route, body, o.fetcher);
    renderOutcome(result, payload);
    if (!(payload && payload.ok)) run.disabled = false;  // let a refused plan be retried
  • Files reviewed: 21/21 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/opendox/web/app.js Resolved
Comment thread tests/test_web_boundary.py Resolved
brettheap and others added 2 commits September 12, 2026 15:13
…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>
…al (Copilot)

Copilot review round on PR #17: assertion 2's declared exception list
(route_ownership_exceptions) was consumed by _excepted_routes without any
check that an entry names a real census row, carries a reason/until, or
that its routes are still actually present in the file -- unlike
declared_transitional_rows, which already has
test_the_declared_transitional_rows_are_real_and_still_transitional. The
fixture's own comment above route_ownership_exceptions already claimed
"each route is checked to be really present in the file it exempts"; this
was aspirational until now.

Adds test_the_route_ownership_exceptions_are_real_and_still_present, on
the same pattern as its assertion-1 sibling. Verified it catches a stale
route (mutation test: renamed a declared route to a nonexistent literal,
confirmed the new assertion fails, restored the fixture byte-identical).
Narrowed validate: 181 passed, 3 xfailed (was 180/3).

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 12, 2026 19:16
@brettheap
brettheap marked this pull request as ready for review September 12, 2026 19:19

@sourcery-ai sourcery-ai Bot 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.

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 5 days and 6 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.

🔵 Needs a closer look

Unresolved controller return-contract validation and export-from re-export test coverage findings remain.

Review details

Suppressed comments (3)

src/opendox/web/app.js:1318

  • resolveView() only validates that the declared export is callable; it does not constrain what that function returns. This wrapper passes that result to mountRepoSelector, which immediately dereferences controller.openCreateForm and controller.commissionEdit, so a contributed gate.projects entry that is callable but returns null or another mount result makes the render fail with a TypeError. Define and validate the controller return contract at the registry/seam (or refuse/handle an invalid result) before this dereference, especially since S5 is intended to replace this core binding with a contributed one.
      mountProjectGate: projectGateView
        ? (host, pctx) =>
            projectGateView.exports[projectGateView.binding.entry](host, pctx)

src/opendox/web/views/repo-selector.js:743

  • resolveView() only guarantees that the binding's declared entry is callable; it does not guarantee that the entry returns an object with these two methods. A valid contributed gate.projects binding can therefore mount successfully and then make the initial selector render throw at controller.openCreateForm/controller.commissionEdit. Define this controller shape as part of the binding contract and validate it, or treat an invalid return as an unavailable binding before enabling the controls.
      const controller = o.mountProjectGate(wrap, {
        roster, status, fetcher: o.fetcher, addPendingOption,
      });
      openCreateForm = controller.openCreateForm;
      projectGate.commissionEdit = controller.commissionEdit;

tests/test_split_route_tails.py:139

  • This check only looks for export const. An origin can therefore regress to export { LENS_SAVE_ROUTE } from "./gate-lens.js" (or the equivalent for any moved name), keeping the old import path and static cross-boundary reach while this test still passes. Extend the predicate to reject export-from re-exports as well so the no-shim guarantee in the docstring is actually enforced.
        lingering = sorted(
            constant for constant, _route, o, _d in MOVED_TAILS
            if o == origin and re.search(rf"\bexport const {constant}\b", source)
        )
  • Files reviewed: 16/16 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

brettheap added a commit that referenced this pull request Sep 12, 2026
…egistry-fail-closed

Reconciles the one conflict, in tests/fixtures/web_boundary_census.yaml's
views/view_extension.js row: #17's branch had just gained the missing
"455 -> 463 on S4" narrative sentence (a duplicate-row cleanup fix) while
this branch had already appended its own "463 -> 499 on this fix
(Copilot, PR #16)" continuation from the pre-cleanup 463 note. Spliced
both narrative additions into one chained note (422->455->463->499) and
kept loc: 499, which matches the file's actual line count. Re-verified:
totals re-derive exactly (A 25/16329, B 7/2174, C 14/11854, ?/1435).

Lane: openxfactory-4-opendox-extraction

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tails

# Conflicts:
#	.github/workflows/validate.yml
#	tests/test_web_boundary.py
Copilot AI review requested due to automatic review settings September 12, 2026 22:19
@sonarqubecloud

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.

🔵 Needs a closer look

Handle lens POST failures and validate the contributed project controller shape before approval.

Review details

Suppressed comments (2)

src/opendox/web/views/gate-lens.js:188

  • If the POST's fetch rejects (for example, a server restart or network interruption), postPlan rejects here before renderOutcome runs, leaving the execute button disabled permanently and producing an unhandled promise rejection. Catch transport failures, render a failure message, and re-arm the control as gate-projects.js does for its commissions.
  async function dispatch(body, route) {
    run.disabled = true;
    const payload = await postPlan(route, body, o.fetcher);
    renderOutcome(result, payload);
    if (!(payload && payload.ok)) run.disabled = false;  // let a refused plan be retried

src/opendox/web/views/repo-selector.js:743

  • This seam assumes every resolved gate.projects entry returns an object with both callable openCreateForm and commissionEdit; resolveView() only validates that the entry export itself is callable. A malformed contributed binding therefore throws a raw TypeError during selector mount instead of being refused with binding context (or treated as absent), taking down the render. Validate the returned controller shape before assigning these methods, or make the binding contract validate it explicitly.
      const controller = o.mountProjectGate(wrap, {
        roster, status, fetcher: o.fetcher, addPendingOption,
      });
      openCreateForm = controller.openCreateForm;
      projectGate.commissionEdit = controller.commissionEdit;
  • Files reviewed: 16/16 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit 69d2760 into main Sep 12, 2026
4 checks passed
brettheap added a commit that referenced this pull request Sep 12, 2026
…f coercing it (S3 follow-up; fails closed per § 4.1) (#18)

Lane: openxfactory-4-opendox-extraction

Refs opensoft/openXfactory#656 (stays OPEN). CLAIM: 5647338637.

Stacked on § 3.4 S4 (#17, landed at `69d27602`) — an S3
follow-up fixing a Copilot finding on #16: `manifestRoutes()` validated only
that `contributed_routes` was an array, and `ownershipBreach()` read a
contributed entry's `is_prefix` with a truthy check, so neither refused a
single malformed entry (missing string `pattern`, or `is_prefix` anything
other than a real boolean, including simply absent). A new shared
`requireRouteShape(claimed)` in `view_extension.js` validates one contributed
route entry and is now called from both `manifestRoutes()` (at manifest-read
time, before any binding's route reaches `ownershipBreach()`) and
`ownershipBreach()` itself — `app.js` is untouched. The Python mirror
(`view_extension.py`) stays safe by construction: `RouteBinding.__post_init__`
already refuses a non-bool `is_prefix` before `_route_ownership_breach` runs,
so this JS-only fix is deliberately stricter than its Python line, matching
what construction-time validation already guarantees server-side.
`tests/test_view_registry.py` extends the existing malformed-manifest test
with two entry-level cases and adds a new ownership-check case, node-driven
per the file's existing `_run_node` pattern.

Gate evidence: destination gate; `validate` SUCCESS at `c57bd1f6` (run
34725295226, after re-merging `origin/main` post-#17-landing so the diff
collapses to this PR's own 3 files: `view_extension.js`,
`web_boundary_census.yaml`, `tests/test_view_registry.py`); narrowed pytest
207 passed / 3 xfailed locally against the merged tree; 0 review threads (0
unresolved). CLEAN/MERGEABLE, not draft.
brettheap added a commit that referenced this pull request Sep 12, 2026
…ed follow-up) into leg B

openDox-code#17 (S4) landed to main as a SQUASH and #18 (the fail-closed
follow-up) merged into `build/s4-split-route-tails` after it, so this leg takes
`origin/fix/view-registry-fail-closed` — which has already merged
`origin/main` into itself — rather than `origin/main` directly. That is a
superset of main and it carries the base branch's OWN resolution of the squash,
instead of re-resolving eight add/add conflicts against a history with no
shared ancestor.

THREE CONFLICTS, all where this slice and the merge-mains touched the same
bookkeeping, and both sides are kept in each:

* `.github/workflows/validate.yml` — S6's `tests/test_source_core_arm.py` and
  S5's `tests/test_gate_loop_contributed.py` are both on the narrowed list now,
  with both narration blocks.
* `tests/fixtures/web_boundary_census.yaml` — the `views/view_extension.js` and
  `views/wheel.js` rows carry the full loc chain from both lineages. The wheel's
  note is rewritten rather than merged: it said "imports dispose.js (class B)",
  and as of this slice it does not.
* `tests/test_web_boundary.py` — assertion 2.

AND ASSERTION 2 IS GREEN. The `xfail(strict=True)` that has stood on
`test_no_ownership_violation_outside_class_b` since slice S1 comes off here,
and it comes off because the count is ZERO, measured — 18 at S1 -> 20 at S3 ->
10 in scope after S4 -> 6 in scope with S6 also applied -> 0. The last six were
one family in one place: `app.js`'s CORE arm, the `gate.bar` / `gate.lens` /
`gate.projects` entries, each a class-B binding's `routes:` declaration sitting
in a class-A file. They closed the way the census row predicted they would —
the modules left, and their bindings arrive through `contributedViewBindings()`.
`views/lens.js`'s two openxFactory-lane sites stay out of scope by declaration,
as they always were.

Narrowed validate: 246 passed, 1 xfailed.

Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
brettheap added a commit that referenced this pull request Sep 12, 2026
…f coercing it (S3 follow-up; fails closed per § 4.1) (retarget of #18) (#22)

Lane: openxfactory-4-opendox-extraction

Refs opensoft/openXfactory#656 (stays OPEN). CLAIM: 5647338637.

Corrects a landing error: #18 (`fix/view-registry-fail-closed`) was stacked
with base `build/s4-split-route-tails` and was never retargeted to `main`
before the destination gate squash-merged it, so #18 landed into that
now-orphaned feature branch (`7466d619`) instead of `main` — `main` stayed at
#17 (`69d27602`) and never received #18's fix. This PR is `git cherry-pick
7466d61` (byte-identical tree, same 3 files, 107/10 +/-) onto current
`origin/main`, re-verified: census totals re-derive exactly (A 25/16329, B
7/2174, C 14/11854, ?/1435, 47 rows) and narrowed pytest 207 passed / 3
xfailed. Same fix as #18: a shared `requireRouteShape(claimed)` in
`view_extension.js` refuses a contributed-routes entry with a missing string
`pattern` or a non-boolean `is_prefix`, called from both `manifestRoutes()`
and `ownershipBreach()`; `app.js` untouched.

Gate evidence: destination gate; base confirmed `main` @ `69d27602` before
merging (the error class this PR corrects); `validate` SUCCESS at `d6748081`
(run 34726223644); 0 review threads. CLEAN/MERGEABLE, not draft.
brettheap added a commit to opensoft/openXfactory that referenced this pull request Sep 13, 2026
…in bump

Lane: openxfactory-4-opendox-extraction

Refs #656 (stays OPEN). CLAIM: 5647338637.

The full pytest-suite run (round 1's fix only patched collection; the suite
itself then ran to completion and found these) named three more places where
openxFactory's own tests characterized code that S4/S6 legitimately moved:

1. `tests/ideation-dashboard/test_lens.py`'s `_REQUEST_HARNESS` imported
   `LENS_SAVE_ROUTE`/`LENS_CLUSTER_ROUTE` from `./lens-model.mjs` — S4
   (opensoft/openDox-code#17) moved both to the new `gate-lens.js` (RULED
   Q3: "a route constant travels with the binding that calls it";
   `recipeRequest`/`clusterRequest` themselves did not move and are still
   read from `lens-model.mjs`). Fixed by also copying `gate-lens.js` and its
   own `helpers.js` dependency into the node harness's tmp_path (verbatim,
   under their real names, since `gate-lens.js` imports both by exact
   relative path) with a minimal `package.json` so Node parses the
   plain-`.js` copies as ESM, and importing the two route constants from
   `./gate-lens.js` instead. `gate-lens.js` is a CREATED file with no carve-
   manifest row, so it is addressed via `carved_reach.MOUNTS` directly
   rather than `carved_source()`.

2. `tests/ideation-dashboard/test_serve_column_split.py` characterized
   `/source`+`/source/` as part of the CONTRIBUTED dispatch table
   (`CONTRIBUTED_BINDINGS`, `MOVED_HANDLERS`) and pinned their exact-before-
   prefix consult order as a property of `collect_bindings`. S6 (RULED Q4)
   moved both back to a FIXED core arm in `opendox/serve.py` — a second,
   later move than the one this file's own docstring describes ("PR 3 moved
   four read arms and five write arms"). `CONTRIBUTED_BINDINGS` drops to
   seven, `MOVED_HANDLERS` drops the three source methods, and
   `test_the_exact_source_binding_is_consulted_before_the_prefix_one` is
   removed — its subject left this file's domain for
   `opensoft/openDox-code`'s own `tests/test_source_core_arm.py`, which
   proves the identical ordering/unshadowability property at the repository
   that can now break it.
   `test_a_bare_source_request_still_answers_the_same_refusal` needed no
   assertion change (the wire-level answer is unchanged by design — a
   route-ownership correction, not a behaviour change) and only had its
   docstring's self-reference repointed.

3. `tests/ideation-dashboard/test_extension_point_parity.py`'s `ROUTE_ARMS`
   pins `_route`'s fixed core dispatch "narrowed once, by § 2.4 PR 3." S6 is
   a second, later narrowing it did not yet know about: two new core arms,
   `path == BARE_SOURCE_ROUTE` and `path.startswith(SOURCE_PREFIX)`, both
   the new LAST arms before the § 2.4 contributed consult (measured directly
   via this file's own `core_arms("_route")` AST walk, not typed by hand).
   `DO_POST_ARMS` is unchanged — S6 added no POST arm.

Verified: the three files' own tests (46 passed combined); the whole
`tests/ideation-dashboard/` directory (1124 passed, 13 skipped — same skip
count as before, no new skips); full-tree `--collect-only` (7095/7433, 0
errors); `verify-opendox-pin.py` / `verify-openxdox-pin.py` (both OK);
`pytest tests/opendox_pin tests/openxdox_pin` (105 passed);
`validate-carve-manifest.py` (OK).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
brettheap added a commit that referenced this pull request Sep 13, 2026
…odules leave, the registry mounts, requires acts, ViewBindingError surfaces (RULED Q1–Q12) (#20)

Lane: openxfactory-4-opendox-extraction

Refs opensoft/openXfactory#656 (stays OPEN). CLAIM: 5648073924.

**§ 3.4 slice S5, leg B — the shell loses the gate loop and reaches what it keeps
of it through the registry.** openDox-spec `docs/front-end-package-boundary.md`
§ 5 row S5 @ `7d12428c`: *"The four class-B files and all 13 route constants — now
all declared in class-B files — move behind a binding openXdox supplies; a student
install comes up with no gate bar, no dispose tray, no session verbs, and no 404."*
The contract is openXdox-spec `docs/gate-loop-view-contract.md` @ `d73767b7`, whose
§ 8 Q1–Q12 were RULED by Brett Heap on 2026-09-12 at opensoft/openXfactory#656 —
`5648044785` (Q5, Q1, Q3), `5648049748` (Q2, Q4, Q7, Q8), `5648065587` (Q9–Q12).

**Paired with opensoft/openXdox-code#18, which supplies what this removes. It landed
first, moments before this, as `c1ad341a930b69052b4c32f04ef3c762c033561c`** — the
shell stops shipping these six modules in the same act that the column starts
shipping them.

Six class-B modules leave (S4's `views/gate-lens.js` and `views/gate-projects.js`
among them — their own headers say "AT S5 THIS FILE LEAVES THE BUNDLE"), and what
the shell keeps of them it reaches through the registry: RULED Q1's generic mount
pass runs **per region, after that region's core render** and through the tab
router's `onRegionRendered` hook, because every `dom` region is a root its core
renderer CLEARS and a non-initial tab renders lazily; RULED Q2's `resolveView` hands
back a namespace BOUNDED by the declaration; RULED Q4's `requires` are probed as
dotted `/capabilities` paths and ACTED on; RULED Q8's `page-overlay` host is built by
the shell, because `index.html` is a `moved_verbatim` carve row that cannot grow an
element; RULED Q10's static `app.js:57` import is gone, `firstEditTransport` reached
off `gate.workbench.session` with a `refusalTransport()` — a refusal in the shape
`runSave` understands — when the column is absent; RULED Q11 catches `ViewBindingError`
separately ("The snapshot is fine — the assembly is not"); RULED Q12's concatenation
left with `dispose.js` and **no gate route literal survives anywhere in this bundle**.

**The line slice S3 built both ends of and deliberately did not write is written here:**
`serve.build_server()` now sets `capabilities["views"] = view_extension.view_manifest(…)`,
collected from the host's `VIEW_EXTENSIONS` facet against the routes THIS assembly
contributed. No new route and no second fetch.

**Both boundary assertions reach zero at the slice their own markers named, and both
markers are removed** (leaving either would be an XPASS that turns the check red):
assertion 2 — no file outside class B names another column's route — 18 at S1 → 20 at
S3 → 10 in scope after S4 → 6 once S6 landed → **0**, the last six being `app.js`'s
CORE-arm `gate.bar` / `gate.lens` / `gate.projects` entries, each a class-B binding's
`routes:` declaration sitting in a class-A file; assertion 3 — every relative import
resolves, no class-A/C file imports class B — 7 → 6 → 4 → **0**, each closed by the
module LEAVING. `views/lens.js`'s two openxFactory-lane sites remain assertion 2's
declared exception, untouched.

The student-install proof is four separately-measured facts, so a failure names which
one broke: no gate bar / tray / session verbs; the module graph resolves without them
(§ 1.2(b)'s blank-page failure mode closed); no 404, because no gate route literal
survives; and unoffered-not-undefined — `NO_DISPOSE_COLUMN`, `NO_CREATE_COLUMN`,
`NO_SESSION_COLUMN`, each answering `false` to its capability predicate.

**The annotation this leg was owed LANDED FIRST, as RULING Q-L1 requires:**
opensoft/openXfactory#1023 → `ee251d6c54b7e16728f2648c71faa90d6be76496`, carrying the
four RE-DESTINATIONS under the form RULED Q6, the declared edits on `serve.py`,
`web/app.js`, `views/wheel.js`, `views/staging-workbench.js` (moved_verbatim →
moved_with_declared_edit) and `test_bullseye_widget.py`, the `created:` admission for
`tests/test_gate_loop_contributed.py`, and the removal of the two admissions that went
STALE here when S4's created files moved to the other destination. Measured from that
landed main against this head: `verify-carve-arrival.py --destination opendox_code
--phase B` answers **OK — 119 rows arrived, 52 digests verified, 66 declared-edit rows
within their lines, 146 files with NONE undeclared, 0 rows re-destined HERE and 4
re-destined AWAY and VERIFIED VACATED (RULED Q6), 18 declared admissions used**
(plus the one pre-existing ad-hoc `tests/conftest.py`, openDox-code#19's declared depth
fix, which this slice did not create).

**The caveat this PR carried about riding in with unlanded content is RESOLVED.** The
S3 fail-closed follow-up (`requireRouteShape`) was merged into the old stack after #17
had been squashed; it has since landed on `main` on its own as #22 (`05bbde80`), and
`git show origin/main:src/opendox/web/views/view_extension.js | grep -c
requireRouteShape` answers 3. This branch merged that main in.

Copilot rounds 1–6, twenty-one threads, none unresolved. Round 2 took eight: a `requires`
probe reading INHERITED members (`requires: ["toString"]` met a requirement no payload
carries); a declared export checked present but not callable; the pass re-resolving by
`binding.id` when bindings are unique by SLOT; the pass running once before every core
mount; `VIEW_EXTENSIONS` truthiness read as presence, so a host declaring `()` looked
like a host that never grew the facet; `wheel.js` and `staging-workbench.js` holding
their columns in module-level `let`s, so two live renders shared one column; and two
arrived test files still reading modules that left. Round 3 took three more — the lazy
profile proxy refusing every dunder, so `host_profile` could only ever be `null`; the
per-region pass having no cancellation once it could start from a tab's first render
and await an import; and a late refusal having nowhere to be written, since `render()`
ends with `status.remove()` — and refuted two with executed evidence (`mountProjectGate`
does pass the outer snapshot in Q3's order; recursive `**` in `package_data` arrived in
setuptools 62.3.0 and this leg declares `setuptools>=68`, with a real `python -m build`
packaging 40 entries under `opendox/web/`).

**Round 4, found at this head and taken rather than deferred**, is the same defect
round 3 fixed one layer in: the six contributed resolves each await a dynamic import,
and EVERYTHING below them mounts — the declared namespaces are handed down,
`ensurePageOverlayHost()` builds RULED Q8's host, the dispose panel is mounted into it,
and every region's core render follows. A repository switch during one of those imports
aborts this render's scope, but the old render still resumed after the awaits and mounted
its stale snapshot into the page the newer render owns; `mountContributedViews`'s own
signal check guards the generic pass and cannot undo a shell mount that already happened.
The render that lost its scope now stops between the last resolve and the first mount, and
its ERROR path stops with it — `reportAssemblyFailure` is a closure of ONE render, handed
rejections by the per-region pass that can arrive minutes later, so a refusal from a render
the user has already switched away from would have been written over the live render's own
surface. The new test pins the guard's POSITION rather than its presence, since the ordering
is the whole finding, and the boundary census's `app.js` row moves 1584 → 1602 loc (class-A
total 16918 → 16936) with the reason in its note. The destination gate was re-run on the
fixed tree BEFORE the push and answers OK with identical figures: the guard falls inside
`web/app.js`'s already-declared edit lines, so no amendment to the landed annotation is owed.

**Round 5, likewise found and taken at the landing**, is this bundle's registry
contradicting its own contract. RULED Q1's generic pass read `const unmet =
capabilities === undefined ? null : unmetRequirement(...)`, so a caller that omitted
the payload skipped RULED Q4's gate entirely: a REQUIRED binding with an unmet
requirement was imported and MOUNTED — the one outcome the ruling says must refuse —
and an OPTIONAL one mounted where it owed an empty region and a named reason. Fifteen
lines into this file's own Q4 block stands the sentence it broke: "A MISSING PAYLOAD
IS AN UNMET REQUIREMENT, NOT AN ERROR … `undefined` at the end of the path is the
honest answer 'this plane does not offer it'." `undefined` for the whole payload says
that about every path at once, and it is the same fail-closed posture
`probeCapabilityPath` was rewritten into at round 2. `unmetRequirement` is now
evaluated unconditionally. Production behaviour is unchanged — `mountContributedInto`
has always passed `{ capabilities: probedCaps, regions, signal }` — so what closes is
the seam a later caller, a probe or a contributed column's own harness would have
found open. The new node-driven test was run against the OLD read and FAILS there, so
it pins the behaviour rather than restating it; `views/view_extension.js` is slice
S3's CREATED file, so no amendment is owed for it either.

**Round 6 is round 4's finding one and two awaits further down, and it was taken the
same way.** RULED Q1's generic mount pass is itself AWAITED twice at the top level of
`render()` — after `mountExplorer()` and after `mountStagingWorkbench()`, which is
where round 2 put it — and each await is a dynamic `import()` per contributed binding.
`mountContributedViews`'s own signal check (round 3) stops only ITS mounts; it cannot
stop the CALLER that resumes after it, and below those two lines the render keeps
writing to the page: the staging workbench overlay, the tab strip, the repository
selector, `initAbout`, the global search listener — and finally `status.remove()`,
which on a repository switch strips the NEWER render's `#loadstatus` while the stale
render's workbench and tab strip land on top of the new one's. `if (signal.aborted)
return;` now sits immediately after each. There is deliberately no fifth guard: the
third call of the same pass, the tab router's `onRegionRendered` hook, is not awaited
(it runs from a synchronous click handler, round 2), so its scope check is its
rejection path's — the guard round 4 put at the top of `reportAssemblyFailure`. Four
sites is the whole census, and the tests now say so: the new test pins each stop
BETWEEN its own pass and the next thing this render writes and both above
`status.remove()`, while round 4's test pins the census at four rather than two and
names each one; both were run against the OLD read and FAIL there. The boundary
census's `app.js` row moves 1602 → 1618 loc (class-A total 16945 → 16961) with the
reason in its note, and the destination gate re-run on the fixed tree before the push
answers OK with identical figures — both guards fall inside `web/app.js`'s
already-declared edit lines, so again no amendment to the landed annotation is owed.

**Round 7 (`5c6f762`) posted ZERO new comments** — 22/22 files reviewed, 21 threads, none unresolved, `validate` green — and its check completed success. Its verdict line reads "Needs a closer look" on the strength of three SUPPRESSED comments, which Copilot declines to post as threads and which have been a standing class in every round of this review (3-7 per round since `fd7160d`). They are REGISTERED here rather than silently passed over, and none is a regression of the round-6 fix: (a) `view_extension.py:657` — the `_NO_FACET` sentinel comment says `VIEW_EXTENSIONS = None` is a MALFORMED declaration while `host_view_facet()` returns `("absent", ())` for it and its own docstring says a profile "is entitled to spell 'I contribute no views' as `None`"; READ AND CONFIRMED ACCURATE — a comment/implementation contradiction, no behaviour defect, and a one-line comment fix owed as a later declared act. (b) `app.js:1092` — a binding whose manifest names an entry but omits a second export (`isGateBearing`) passes the resolve and is reached later from the async `renderViewer` path, outside `render()`'s `try`, so the proxy's `ViewBindingError` would become an unhandled rejection instead of reaching RULED Q11's surface. (c) `views/view_extension.js:692` — the Q2 namespace proxy's `then` pass-through lets an undeclared `then` export cross the boundary. (b) and (c) are RAISED AND NOT YET ADJUDICATED: each is a fail-closed question about the registry seam rather than about what this slice moved, and each is registered on openxFactory#656 for a later declared act rather than taken at the landing.

Register, carried forward: RULED Q7's contributed CSS is NOT realized and not skipped —
`styles.css` is a `moved_verbatim` row and "a stylesheet block leaves for another leg"
is in none of RULING OQ-1's three classes (measured: 51 classes exclusive to the six
modules, 24 shared). The two intent-feed suites (`test_intent_tray_dom.py`,
`test_wheel_verbs_dom.py`) copy `views/intent-feed.js`, RULED `not_moved` under OQ-F, so
both have failed since the CARVE COMMIT and removing `views/dispose.js` from their copy
lists would not make either run — they are slice S8's, and `.github/workflows/validate.yml`
records that by name. RULED Q4 produces one named behaviour change: now that the shell
ACTS on `requires`, `gate.bar`, `gate.workbench.create`, `gate.workbench.session` and
`gate.dispose` declare NO requirement, because requiring `actions.gate` would delete the
read-only gate surface — and, for `gate.dispose`, the refusal tray — on every HOSTED
plane. Five node probes moved with their modules to openXdox-code#18 rather than being
deleted.

Landing authority: **Brett Heap's word, 2026-09-13 — "merge #1023, #18 and #20 when
green"** (relayed by the orchestrator, session openXfactory-4).

Gate evidence: destination gate above, re-run from openxFactory main `ee251d6c` against
this head (whose carve manifest, admissions and verifier are byte-identical to
openxFactory `origin/main` `04340d77`); `validate` SUCCESS at `5c6f762` (run 34787811773, check run 103806385253), the one
required check in this repository's ruleset; 21 review threads / 0 unresolved; Copilot
re-reviewed at every head after `gh pr ready` and after each of the round-4, round-5
and round-6 fixes; Sourcery review skipped (budget) = advisory; SonarCloud success and
advisory either way. The narrowed `validate` list was also run locally exactly as CI
runs it (`--noconftest`): 253 passed, 1 xfailed, 0 failed.
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