Skip to content

View registry: refuse a malformed contributed-routes column instead of coercing it (S3 follow-up; fails closed per § 4.1) (retarget of #18) - #22

Merged
brettheap merged 1 commit into
mainfrom
fix/view-registry-fail-closed-retarget
Sep 12, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/view-registry-fail-closed-retarget

Conversation

@brettheap

@brettheap brettheap commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4-opendox-extraction

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

Corrects a landing error on #18, no new content. #18 (fix/view-registry-fail-closed) was created stacked on #17 (build/s4-split-route-tails, "not main" per its own description) and, per this lane's brief, was re-merged with origin/main after #17 landed so its diff would collapse to its own files — but its GitHub base branch was never retargeted from build/s4-split-route-tails to main before the destination-gate script squash-merged it. gh pr merge honored the PR's actual configured base, so #18 squash-merged into build/s4-split-route-tails (now sitting at 7466d619) instead of main; main still ends at #17 (69d27602) and never received #18's fix. GitHub correctly reports #18 as MERGED — but merged builds that were never eligible to reach main through a closed PR (base can't be edited post-merge), so this PR carries the identical change forward.

This branch is git cherry-pick 7466d619 (that exact merged commit) onto current origin/main — same tree, same message, same three files (src/opendox/web/views/view_extension.js, tests/fixtures/web_boundary_census.yaml, tests/test_view_registry.py; 107 insertions, 10 deletions, applied with zero conflicts since #17's squash commit and #18's stacked base carry an identical tree). Census totals re-derive exactly (A 25/16329, B 7/2174, C 14/11854, ?/1435, 47 rows) and the narrowed pytest list passes 207/3 xfailed, both re-verified on this branch.

What #18 fixed (unchanged from its own description)

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) and ownershipBreach() — 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. tests/test_view_registry.py extends the malformed-manifest test with two entry-level cases and adds a new ownership-check case.

🤖 Generated with Claude Code

Summary by Sourcery

Fail closed when contributed route entries do not have a valid pattern and boolean prefix classification.

Bug Fixes:

  • Reject contributed route entries with missing or non-string patterns and non-boolean is_prefix values instead of silently coercing or ignoring malformed data.
  • Ensure malformed contributed routes are refused both when the manifest is read and during ownership checks.

Tests:

  • Add coverage for malformed contributed-route entries and non-boolean is_prefix values, while preserving valid boolean behavior.

Chores:

  • Update the web boundary census to reflect the client-side validation changes.

…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.
Copilot AI lite review requested due to automatic review settings September 12, 2026 23:45

@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 1 day and 17 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

Carries the previously merged view-registry fix onto main: contributed route entries are now validated for a string pattern and real boolean is_prefix at both manifest-read and ownership-check boundaries, refusing malformed payloads instead of coercing or silently ignoring them, with focused tests and census updates.

Sequence diagram for fail-closed contributed-route validation

sequenceDiagram
    participant Manifest as manifestRoutes
    participant Shape as requireRouteShape
    participant Ownership as ownershipBreach
    participant Refuse as refuse

    Manifest->>Shape: requireRouteShape(claimed)
    Shape->>Shape: Check pattern is string
    Shape->>Shape: Check is_prefix is boolean
    alt malformed route entry
        Shape->>Refuse: refuse(...)
    else valid route entry
        Shape-->>Manifest: { pattern, isPrefix }
    end

    Ownership->>Shape: requireRouteShape(claimed)
    Shape-->>Ownership: { pattern, isPrefix }
    Ownership->>Ownership: Compare route with pattern
    alt malformed route entry
        Shape->>Refuse: refuse(...)
    else valid route entry
        Ownership-->>Ownership: Return matching pattern or null
    end
Loading

File-Level Changes

Change Details Files
Centralize contributed-route entry validation and enforce fail-closed behavior at both manifest ingestion and ownership checking.
  • Add a shared validator requiring a string pattern and boolean is_prefix.
  • Validate every manifest entry immediately in manifestRoutes().
  • Reuse the validator in ownershipBreach() before route matching.
src/opendox/web/views/view_extension.js
Expand JavaScript registry coverage for malformed route entries and preserve valid boolean semantics.
  • Test missing pattern and non-boolean is_prefix entries during manifest parsing.
  • Test missing and string is_prefix values during ownership checks.
  • Verify true and false boolean values retain expected behavior.
tests/test_view_registry.py
Update the boundary census to reflect the implementation's increased source size and documentation.
  • Increase the recorded view_extension.js line count and aggregate class-A total.
  • Document the new fail-closed route-shape validation.
tests/fixtures/web_boundary_census.yaml

Tips and commands

Interacting with Sourcery

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

Customizing Your Experience

Access your dashboard to:

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

Getting Help

@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

Address the two moderate test coverage gaps in tests/test_view_registry.py.

Pull request overview

This PR hardens the JavaScript view registry to reject malformed contributed routes instead of coercing or ignoring them.

Changes:

  • Adds strict validation for route patterns and is_prefix.
  • Applies validation during manifest parsing and ownership checks.
  • Adds regression coverage and updates census totals.
File summaries
File Summary
tests/test_view_registry.py Adds malformed-route tests; two moderate coverage issues remain.
tests/fixtures/web_boundary_census.yaml Updates boundary census measurements.
src/opendox/web/views/view_extension.js Validates contributed route shapes.
Review details

Suppressed comments (2)

tests/test_view_registry.py:821

  • The falseIsPrefix case does not exercise the false classification: the route /actions/gate/ratify neither equals nor starts with /actions/gate/ratify-other, so this assertion would still pass if is_prefix were incorrectly treated as true. Use a matching prefix such as /actions/gate/ so the test proves that false suppresses a real prefix breach.
out.falseIsPrefix = collectViewBindings([{{ views: () => [spec] }}],
  {{ contributedRoutes: [
    {{ pattern: "/actions/gate/ratify-other", is_prefix: false }}] }}).length;

tests/test_view_registry.py:764

  • The manifest-level coverage only exercises pattern being absent. A truthy non-string such as 123 is the coercion case the typeof pattern guard must reject; without it, a presence/truthiness-only implementation could still pass these tests and feed a non-string into route matching.
  ["entryMissingPattern", [{{ is_prefix: false }}]],
  ["entryNonBooleanIsPrefix", [{{ pattern: "/x", is_prefix: "true" }}]],
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@brettheap
brettheap merged commit 05bbde8 into main Sep 12, 2026
4 checks passed
brettheap added a commit that referenced this pull request Sep 13, 2026
openDox-code#18 was retargeted and landed as #22 (`05bbde80`), so `main` now
carries the S3 fail-closed follow-up in its own right. This leg already carried
that work — it merged the `fix/view-registry-fail-closed` branch at `486930d` —
so the merge is a bookkeeping join rather than a content one, and the tree does
not move: `git diff --cached` against this branch is EMPTY after the resolution.

ONE CONFLICT, in `tests/fixtures/web_boundary_census.yaml`, and both halves of
it are this slice's own measurements against main's pre-S5 ones: the class
totals (main still counts the six gate-loop modules as class B; they left this
bundle at S5, so B is one file and A/C carry the loc this slice measured) and
the `views/view_extension.js` row's loc chain. HEAD's side is kept in both,
because it is the one that describes the tree that exists.

Re-measured after the merge, not assumed: narrowed validate 250 passed,
1 xfailed, and `test_no_ownership_violation_outside_class_b` — assertion 2,
unmarked at the previous merge — is still green at ZERO violations.

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 13, 2026
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 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.
brettheap added a commit that referenced this pull request Sep 17, 2026
… binding's own sheet (#27)

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

RULED Q7 (`opensoft/openXfactory#656` comment `5648049748`): *"a contributed
binding's CSS lives WITH THE BINDING, in its own sheet."* Slice S5 recorded the
extraction as owed and blocked (`openxdox.view_extensions.STYLE_RESIDUE`); the
S7 LANDED note (`5688498049`) register item 1 records it still owed. This is
openDox's half. Its declared-edit window landed first as openxFactory #1068.

THE SEAM. `ViewBinding` gains an optional `styles` slot — one bundle-relative
`./….css` specifier, validated by `_SHEET` (`_MODULE`'s grammar with `.css`,
a second pattern rather than one widened: a `<link>` fetches without
`type="module"`'s CORS rules). `as_manifest_entry()` carries it, so
`/capabilities` publishes it with no new route. `views/view_extension.js`
validates the same field with the same refusal — `null` included, because the
Python seam refuses `None` and § 4.1 asks one vocabulary of both halves — and
`resolveBinding` injects ONE `<link rel="stylesheet">` into `document.head`
(never `document.body`, RULED Q8), deduped by resolved href, before the module
import and after RULED Q4's verdict. The generic mount pass forwards its own
`document`, so the sheet follows the panel into an iframe or a test document.
A sheet that fails to load is a NAMED console refusal and the panel mounts
unstyled: a binding's contract is its manifest entry, not its appearance.

WHAT LEFT `styles.css`: 59 rule blocks, 99 lines — 98 verbatim into the four
sheets and one selector list SPLIT in place so openDox keeps `.filterpop
[hidden]`. The census is re-derived at openDox-code `0b4e8bbf` / openXdox-code
`0a0265f7`: 54 gate-exclusive classes, 18 shared. (18, and the record says why it moved twice: Copilot's round 3 stopped the census counting a bare literal in a non-class position, and rounds 5-6 bounded an assignment to a class-named target and a `.token` to a literal SHAPED like a selector with the dot in selector POSITION -- so 24 -> 22 -> 21 -> 18 as `why`, then `g`, `lens` and `topic` stopped being read as named by the gate. WHAT LEAVES NEVER MOVED: 54 gate-exclusive classes, 59 blocks at the same extents, 89 lines) `STYLE_RESIDUE`'s `51 / 24`
reproduces EXACTLY at `cb343ae8` under a literal-only scan — and the 51 was
three short, because `.dispose-accepted`, `.dispose-rejected` and
`.dispose-deferred` are built by `"disposebtn dispose-" + v.outcome`
(`dispose.js`:275). Every `--st-*` token in all four theme blocks, all 22
shared selectors and the six orphaned `.intentchip*` rules STAY.

THE PROOF. `tests/test_binding_stylesheets.py`, `--noconftest` safe and on
`validate.yml`'s explicit list: the slot refused at both halves, the absent case
carried, the injector driven under `node` against the real registry (one link
for two bindings naming one sheet, none for a binding declaring none, `head` and
never `body`, the failed-sheet warning, and the mount pass's own document), and
the extraction measured against the file three ways — no gate-exclusive selector
survives, the complete shared set (18 today) and all four tokens do, and an ORPHAN
REGISTER of 30 classes that runs with NO assembly catches a gate-only selector
the declared tuple never heard of. A comment is not ownership evidence: the scan
blanks comments quote-aware, which is what put `divider` and `ghost` in the
register.

COPILOT, ELEVEN REVIEWS, 4 threads and all of them resolved, every finding
taken with the mutation that proves the repair or refuted by measurement:
`styles: null` refused, the mount pass's document forwarded, the `--st-*` guard
matching a declaration after `{`/`;`, the extraction proof made able to fail
without an assembly, comments excluded from ownership, the shared set made
complete rather than sampled, the sheet scan recursive, the no-assembly orphan
proof no longer sweeping the six gate modules into openDox's own corpus, and the
census `note:` provenance brought current for both files this act moves. ONE
REFUTED BY MEASUREMENT: JavaScript's `$` does NOT match before a final newline —
that is Python's, which is why this act's Python half anchors with `\Z`;
measured on this branch's own regex under Node v24.21.0, `"./views/gate.css\n"`,
`"...\r\n"` and `"... "` are all false, and the client harness asserts
`["refused"] * 7`. The LAST review at this head enumerates nothing — "Comments
generated: 0 new", no suppressed section — which is the gate's Copilot clause
met, read from the BODY and not from the thread count.

`validate.yml`'s exact invocation at this head, read out of the `validate` run's
own log: **712 passed, 2 skipped**. SonarCloud advisory FAILURE, as on #21.

WHAT THIS DOES NOT DO. It ships no sheet: the four land at openXdox-code #22
with the bindings that own them (RULED Q5's package data). It touches neither
`app.js` nor `index.html`.


RULED openxFactory#656 comment `5700475319` (Brett Heap, 2026-09-16, by
interactive multi-choice) answers the two questions this act put to him, both as
it already does them, and both are cited where the decision is stated: FOUR
sheets for six bindings with a single `styles` specifier and href de-duplication
LOAD-BEARING; and the 13 non-`--st-` custom properties MOVED VERBATIM with the
coupling REGISTERED BY MEASUREMENT in `STYLE_RESIDUE["open_coupling"]`, asserted
by openXdox-code's own suite.

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


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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants