Skip to content

§ 3.4 S2: the intent chips become an optional contributed binding (RULED Q5; OQ-F kept) - #15

Merged
brettheap merged 7 commits into
mainfrom
build/s2-intent-chips-optional-binding
Sep 12, 2026
Merged

brettheap merged 7 commits into
mainfrom
build/s2-intent-chips-optional-binding

Conversation

@brettheap

@brettheap brettheap commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)

Refs opensoft/openXfactory#656

RULED Q5 (opensoft/openXfactory#656 comment 5642758731, Brett Heap, 2026-09-12): keep RULED OQ-F (views/intent-feed.js stays not_moved, docs/opendox-carve-manifest.yaml:1807-1810 unchanged — the committed-intent feed is openxFactory's own apply lane made visible) and fix the importers instead. split-opendox-two-layer-product § 3.4 slice S2 makes the intent-feed chips an OPTIONAL contributed binding, so dispose.js and wheel.js render without them when a deployment does not contribute the real module.

Lands after S1 (already landed, openDox-code e86deb2d) and after openxFactory #1002 (the Q-L1 row-annotation PR that declares this leg's two import-rewrite lines and its three new-file admissions; #1002 is open, not yet merged, at the time this PR was opened — the lane lands it first, then this PR).

The seam

src/opendox/web/views/intent-binding.js (new, 114 lines): a single top-level-awaited dynamic import("./intent-feed.js"), caught if it rejects. Every name dispose.js/wheel.js need (emitIntent, renderIntentChips, feedActor, intentCapable, refusalLine, startIntentFeed, statesByTarget) forwards to the real module when a deployment contributes it beside this one, and answers the same way an unregistered hosted plane already does (no chips, no thrown error, no dead import) when it does not.

  • src/opendox/web/views/dispose.js:26 — the one changed import line: from "./intent-feed.js" → from "./intent-binding.js" (declared by openxFactory #1002 against docs/opendox-carve-manifest.yaml).
  • src/opendox/web/views/wheel.js:75-76 — the same rewrite, two-line import { … } from "…"; statement (line 75 unchanged, only line 76's from clause differs; declared as [75, 76] by #1002 since both lines are one statement).
  • styles.css:1278-1295 needs no change — its "intent-feed chips" heading is a comment and the .intentchips/.intentchip* rules are inert-but-harmless CSS when the binding is absent.

Deliberately not the note's § 4.1 ViewBinding registry — that is slice S3's job. This is the smaller, narrower late-lookup S3 can fold in later.

Tests, and what they prove

  • tests/test_intent_binding_shape.py (added to validate.yml's explicit list, --noconftest safe): pure text/regex shape assertions — no static import of intent-feed.js survives in dispose.js/wheel.js, both import the seven names from intent-binding.js, intent-binding.js's own reference to intent-feed.js is exclusively the dynamic import(), and every static relative import across the three touched files resolves to a real file.
  • tests/test_intent_binding_dom.py (Node, pytest.mark.skipif when node is absent; not added to validate.yml, on the same footing as the narrowed test_intent_tray_dom.py/test_wheel_verbs_dom.py this pair of views already carries, RULED Q-L5 (b′)): drives the real dispose.js/wheel.js module graph and the mounted dispose tray under node, both with intent-feed.js absent (this leg, today) and contributed (a fake fixture standing in for openxFactory's real module) — proving the graph resolves and the tray renders with no chips when absent and real forwarded chips when contributed.

Merge from main (S1 e86deb2, then #12 78d5e7a) and the follow-up commit

Merging origin/main onto 330cf81 conflicted only in .github/workflows/validate.yml (both S1 and S2 appended their own comment block + pytest line at the same spot); resolved by keeping both blocks (S1's test_web_boundary.py line first, S2's test_intent_binding_shape.py line second) and both pytest arguments. A second origin/main commit (#12, 78d5e7a, unrelated docstring re-description inside the ASK-7 declared-edit window) merged clean with no conflicts.

S1's census (tests/fixtures/web_boundary_census.yaml) was measured at a99eba03, before S2 added views/intent-binding.js — so after the merge, assertion 1 (test_every_web_file_is_classified_exactly_once, unmarked) was genuinely red: a new file with no census row, exactly the ratchet's stated purpose. Follow-up commit e1fcd34 adds the row (class A — no governance word, no owned route, no class-B import — 114 lines).

While computing assertion 3's violation set to confirm S2 does not accidentally XPASS the still-open test_every_relative_import_resolves_and_stays_in_class xfail, found that intent-binding.js's own explanatory comment quoted the old import verbatim (`import … from "./intent-feed.js"`) — and assertion 3's regex does not distinguish a real import from one merely named inside a // comment, so the file was misreporting itself as still carrying the very static import it exists to remove. Reworded the comment to describe the old specifier in prose instead of quoting it (no behavior change); census loc updated 107 → 114 for the reworded comment's extra lines.

Verified at head ceb69f3 (validate.yml's exact invocation)

$ python -m pip install -e ".[test]"
$ python -m pytest -q tests/test_leg_shape.py tests/test_consumer_reach.py \
    tests/test_profile_registration.py tests/test_web_boundary.py \
    tests/test_intent_binding_shape.py --noconftest
81 passed, 3 xfailed

S1's three xfail(strict=True) markers all still XFAIL — none XPASSed:

  • test_no_ownership_violation_outside_class_b — untouched by S2, still red (18 sites, S4–S6 work).
  • test_no_class_c_file_carries_a_governance_literal — untouched by S2, still red (S7 work).
  • test_every_relative_import_resolves_and_stays_in_class — this is the one S2 touches. Its xfail reason= text already predicted this: S2 closes only the 2 intent-feed.js UNRESOLVED sites, leaving 5 CLASS-BOUNDARY sites (S3/S5 work) standing, so the assertion "stays red after S2 alone." Confirmed directly (_import_violations()): before the census/comment follow-up, 6 violations (the 5 documented class-boundary sites + the comment false-positive above); after, exactly the 5 sites the xfail reason names (app.js→gate.js, app.js→swb-session.js, staging-workbench.js→swb-create.js/swb-session.js, wheel.js→dispose.js). No xfail marker needed changing.

tests/test_leg_shape.py tests/test_consumer_reach.py tests/test_profile_registration.py tests/carve_manifest tests/carve_arrival: unaffected by this diff (not re-run beyond the explicit validate list above; tests/carve_conformance needs the openDox submodule over SSH, not available in this environment).

🤖 Generated with Claude Code

Summary by Sourcery

Make the intent-feed integration optional so dispose and wheel views remain functional when the contributed module is unavailable.

New Features:

  • Add an optional intent-feed binding that allows deployments to contribute intent chips without requiring the module to be present locally.

Bug Fixes:

  • Prevent the web view module graph from failing when the intent-feed module is absent, while preserving intent functionality when it is contributed.

Enhancements:

  • Route dispose and wheel intent integrations through the optional binding with safe fallbacks when unavailable.
  • Add web-boundary census coverage for the new binding module.

CI:

  • Run intent-binding shape validation in the required validation workflow.

Tests:

  • Add static shape tests for optional binding imports, exports, and relative-import resolution.
  • Add Node-based module-graph and DOM behavior tests for absent and contributed intent-feed deployments, including binding forwards and fallbacks.

brettheap and others added 4 commits September 11, 2026 22:30
…; OQ-F kept)

docs/front-end-package-boundary.md (openDox-spec main a44ac06d) RULED Q5,
2026-09-12 comment 5642758731: `views/intent-feed.js` stays `not_moved`
(RULING OQ-F, docs/opendox-carve-manifest.yaml:1807-1810 unchanged) — the
committed-intent feed is openxFactory's own apply lane made visible. What was
wrong is that `dispose.js`:26 and `wheel.js`:75-76 imported it
UNCONDITIONALLY, so the whole static module graph (app.js -> wheel.js ->
the absent file) failed to resolve at this leg (note § 1.2(b)).

New `views/intent-binding.js` makes the chips an OPTIONAL contributed
binding: a dynamic `import()` of "./intent-feed.js", top-level-awaited so it
is always settled before dispose.js or wheel.js finish evaluating, forwarding
to the real module when a deployment contributes it and answering the same
way an unregistered hosted plane already does (no chips, no error, no dead
import) when it does not. dispose.js and wheel.js now import the same seven
names from "./intent-binding.js" instead of "./intent-feed.js" directly —
one line changed in each file, nothing else.

Deliberately NOT the note's § 4.1 ViewBinding registry: that is slice S3's
job. This is the smaller, narrower late-lookup S3 can fold in later.

styles.css:1278-1295 needs no change — its "intent-feed chips" heading is a
comment, and the .intentchips/.intentchip* rules are inert-but-harmless CSS
when the binding is absent (no import statement in CSS to fail to resolve).

Tests:
- tests/test_intent_binding_shape.py (added to validate.yml's explicit list):
  pure text/regex shape assertions, --noconftest safe — no static import of
  intent-feed.js survives in dispose.js/wheel.js, both import the seven
  names from intent-binding.js, intent-binding.js's own reference to
  intent-feed.js is exclusively the dynamic import(), and every static
  relative import across the three touched files resolves to a real file.
- tests/test_intent_binding_dom.py (Node, pytest.mark skip when node is
  absent; NOT added to validate.yml, on the same footing as the narrowed
  test_intent_tray_dom.py / test_wheel_verbs_dom.py this pair of views
  already carries, RULED Q-L5 (b')): drives the real dispose.js/wheel.js
  module graph and the mounted dispose tray under node, both with
  intent-feed.js absent (this leg, today) and contributed (a fake fixture
  standing in for openxFactory's real module), proving the graph resolves
  and the tray renders with no chips when absent and real forwarded chips
  when contributed.

Q-L1: dispose.js and wheel.js are moved_verbatim rows with no declared
edits, so this pairs with an openxFactory row-annotation PR
(chore/s2-intent-feed-declared-edits) that declares dispose.js:26 and
wheel.js:75-76 as declared import-rewrite lines, plus admissions for the
three new files. That PR lands first.

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

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

# Conflicts:
#	.github/workflows/validate.yml
…eep the seam's own comment from misreporting itself

S1's census (`tests/fixtures/web_boundary_census.yaml`) was measured at
`a99eba03`, before S2 added `views/intent-binding.js`. Merging main onto S2
(330cf81) therefore leaves `test_every_web_file_is_classified_exactly_once`
(assertion 1, unmarked) genuinely red -- a new file with no row, exactly the
ratchet's own stated purpose. Adds the row: class A (no governance word, no
owned route, no class-B import), 114 lines, with provenance back to 330cf81.

While computing assertion 3's violation set to confirm S2 does not
accidentally XPASS the still-open `test_every_relative_import_resolves_and_
stays_in_class` xfail, found a second, more interesting defect: the new
file's own explanatory comment (`... used to \`import ... from
"./intent-feed.js"\` UNCONDITIONALLY ...`) quotes the OLD import verbatim,
and assertion 3's regex does not distinguish a real import from one named
inside a `//` comment -- so intent-binding.js was misreporting itself as
still carrying the very static import it exists to remove. Reworded the
comment to describe the old specifier in prose instead of quoting it, which
drops assertion 3's violation count from the expected 6 (5 real
class-boundary sites + this false positive) to the documented 5, with no
change to the file's behaviour. Census `loc` updated 107 -> 114 for the
reworded comment's extra lines.

Verified: `python -m pytest -q tests/test_leg_shape.py
tests/test_consumer_reach.py tests/test_profile_registration.py
tests/test_web_boundary.py tests/test_intent_binding_shape.py --noconftest`
(validate.yml's exact invocation) -- 81 passed, 3 xfailed (strict), same
three markers as S1 landed, none XPASSing: `test_every_relative_import_
resolves_and_stays_in_class`'s own violation set is now exactly the 5
class-boundary sites its xfail reason names (app.js->gate.js,
app.js->swb-session.js, staging-workbench.js->swb-create.js/swb-session.js,
wheel.js->dispose.js) -- the 2 intent-feed sites S2 closes are gone, as
expected, and no new violation survives.

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

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 12, 2026 15:04
@sourcery-ai

sourcery-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR preserves the ruled-in-place intent-feed module while replacing dangling static consumer imports with a top-level-awaited optional binding, allowing dispose.js and wheel.js to load and render normally without chips when the contributed module is absent and to forward real behavior when it is present. Required shape tests, optional Node DOM probes, workflow coverage, and census metadata document and verify the seam.

File-Level Changes

Change Details Files
Introduces an optional binding seam so the intent-feed module can be absent without breaking the web view module graph.
  • Adds a top-level-awaited dynamic import with rejection fallback.
  • Forwards the seven intent-feed APIs when contributed and supplies no-op or refusal behavior otherwise.
  • Routes dispose and wheel consumers through the binding while preserving the existing intent-feed location and manifest ruling.
src/opendox/web/views/intent-binding.js
src/opendox/web/views/dispose.js
src/opendox/web/views/wheel.js
Adds static shape coverage for the optional binding and makes it part of the required validation workflow.
  • Checks that consumers no longer statically reference intent-feed.js.
  • Checks binding exports, dynamic-import shape, import resolution, and the absent-module invariant.
  • Adds the shape test to validate.yml's explicit pytest invocation.
tests/test_intent_binding_shape.py
.github/workflows/validate.yml
Adds Node-based behavioral coverage for both deployment configurations and updates the web boundary census.
  • Exercises the module graph with intent-feed.js absent and contributed.
  • Verifies dispose-tray behavior and intent capability gating in both configurations.
  • Classifies the new binding file in the census and records its measured line count.
tests/test_intent_binding_dom.py
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

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

Moderate review findings remain in forwarding coverage and static-import validation, alongside minor cleanup items.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Makes the intent-feed integration optional so dispose.js and wheel.js work without the contributed module.

Changes:

  • Adds optional dynamic binding with safe fallbacks.
  • Routes view imports through the binding.
  • Adds shape, DOM, census, and CI coverage.
File summaries
File Summary
tests/test_intent_binding_shape.py Validates the optional binding’s static structure.
tests/test_intent_binding_dom.py Probes module loading and DOM behavior.
tests/fixtures/web_boundary_census.yaml Registers the new web binding file.
src/opendox/web/views/wheel.js Uses the optional intent binding.
src/opendox/web/views/intent-binding.js Provides optional intent-feed forwarding and fallbacks.
src/opendox/web/views/dispose.js Uses the optional intent binding.
.github/workflows/validate.yml Runs the required shape validation.
Review details

Suppressed comments (1)

tests/test_intent_binding_shape.py:50

  • _STATIC_IMPORT_RE only matches named imports with double-quoted specifiers. A regression such as import feed from './intent-feed.js', a namespace import, or a side-effect import would make not _static_imports(text) pass while still creating the same dangling static dependency, so this required seam invariant is not fully enforced. Add a generic static-relative-import matcher for the binding guard while retaining the named-import parser for the importer assertions.
_STATIC_IMPORT_RE = re.compile(
    r'import\s*\{([^}]*)\}\s*from\s*"(\./[^"]+)"\s*;', re.MULTILINE)
  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • 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/views/intent-binding.js Resolved
Comment thread tests/fixtures/web_boundary_census.yaml Resolved
Comment thread tests/test_intent_binding_shape.py Resolved
@brettheap
brettheap marked this pull request as ready for review September 12, 2026 15:12

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

- tests/test_intent_binding_dom.py: add a direct forwarding probe for the
  five exports the existing tests never exercise (feedActor, refusalLine,
  startIntentFeed, statesByTarget, emitIntent) — only intentCapable and
  renderIntentChips were previously reached, so a wrapper could forward one
  of the other five wrong and every test here would still pass. Two new
  tests cover both the absent-binding fallback and the contributed-module
  forward for all five; the fake statesByTarget is made to depend on `rows`
  so its contributed answer is distinguishable from the absent case's own
  empty-Map fallback (an unconditional empty Map on both sides would let
  the new test pass without proving anything).
- tests/fixtures/web_boundary_census.yaml: the S2 amendment paragraph still
  said "107 lines" after the loc column below it was corrected to 114 —
  fixed the stale prose figure.
- tests/test_intent_binding_shape.py: renamed
  test_the_absent_module_still_exists_on_disk_as_a_check to
  test_the_absent_module_is_still_absent_from_disk_as_a_check — the old
  name said the opposite of what the assertion checks.

Verified: the explicit validate.yml pytest list (81 passed, 3 xfailed,
unchanged) and tests/test_intent_binding_dom.py --noconftest (8 passed,
including the two new forwarding tests, node v22.22.2 locally).

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 15:18

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

Moderate test coverage and import-validation issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (3)

Previously missed (2) — in code that hasn't changed since the last review.

src/opendox/web/views/dispose.js:26

  • This import changes the dependency closure used by the existing Node DOM probes: tests/test_intent_tray_dom.py:_run (lines 310-311) and tests/test_wheel_verbs_dom.py:_run (lines 310-311) still copy intent-feed.js but not intent-binding.js, so importing dispose.js from either temporary tree now fails with MODULE_NOT_FOUND. Although those probes are currently narrowed out of validate, they are the hand-runnable/future DOM coverage described in the repository; add the new binding to both copied-file lists while retaining the contributed feed fixture.
    tests/test_intent_binding_shape.py:50
  • _STATIC_IMPORT_RE only matches named imports of the form import { ... } from ...; it misses default and side-effect relative imports. A future import feed from "./intent-feed.js" in this binding would make the optional module mandatory while both shape checks still pass, so extend the scanner to cover every static relative-import form (or use a parser).

tests/test_intent_binding_dom.py:54

  • This closure description is inaccurate: settings.js is not an import-free leaf; it imports wheel-model.js and helpers.js at settings.js:26-27. Keep the dependency-closure documentation aligned with the actual graph so future updates do not omit a dependency based on this explanation.
# file's own `^import` lines: wheel-model.js, helpers.js, notebook.js and
# settings.js are import-free leaves; dispose.js imports only helpers.js and
# (after this slice) intent-binding.js. A file added to this set by a future
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread tests/test_intent_binding_dom.py Resolved
…lot)

tests/test_intent_binding_dom.py: the round-1 fakes for feedActor and
startIntentFeed ignored their own caps/opts argument, so the new
contributed-path forwarding test could not have caught intent-binding.js
dropping or substituting either argument on its way to the real module --
it would pass no matter what was actually forwarded. Both fakes now carry
a caller-supplied marker (caps.marker / opts.marker) into their answer, and
the probe/assertions check it; refusalLine/statesByTarget/emitIntent were
already argument-dependent in round 1 and are unchanged.

Verified: tests/test_intent_binding_dom.py --noconftest, 8 passed (node
v22.22.2); the required validate.yml list unaffected, 81 passed/3 xfailed.

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 15:28

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

Critical harness and boundary-check issues remain, along with a moderate test gap and documentation nit.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (2)

tests/test_intent_binding_dom.py:54

  • The closure explanation is inaccurate: settings.js is not an import-free leaf; it statically imports both wheel-model.js and helpers.js (src/opendox/web/views/settings.js:26-27). The copied closure is currently complete, but this comment will mislead anyone updating it after another dependency change.
# file's own `^import` lines: wheel-model.js, helpers.js, notebook.js and
# settings.js are import-free leaves; dispose.js imports only helpers.js and
# (after this slice) intent-binding.js. A file added to this set by a future

tests/test_intent_binding_shape.py:114

  • This assertion does not actually enforce the optional-import contract for all static import forms: _STATIC_IMPORT_RE only matches double-quoted named imports (import { … } from …). A regression to a default, namespace, or side-effect static import of ./intent-feed.js would still pass this test and fail the module graph; test_web_boundary.py cannot catch it here because its assertion remains an expected failure for the five unrelated class-boundary violations. Add a check covering every static import form (or parse the import syntax) for this binding.
def test_intent_binding_reaches_intent_feed_only_dynamically() -> None:
    text = BINDING.read_text(encoding="utf-8")
    assert not _static_imports(text), (
        "intent-binding.js carries a static `import { … } from \"./…\"` "
        "clause; the whole point of this file is that its ONE reference to "
        "the possibly-absent module is a dynamic import() a missing file "
        "cannot make fail to resolve"
    )
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread src/opendox/web/views/dispose.js Resolved
Comment thread src/opendox/web/views/intent-binding.js Resolved
…m" in intent-binding.js's own comment

Verified against the actual assertion-3 regex (`_IMPORT_FROM` in
tests/test_web_boundary.py) that this specific phrase — "from" at the end
of one // line, the quoted path at the start of the next — does NOT
bridge across the "// " comment-marker prefix and was not producing a
sixth violation (5 violations, exactly the documented class-boundary
sites, both before and after this edit). Rewording anyway, defensively,
to remove any textual read of "from \"./intent-feed.js\"" from this file
regardless of how a reviewer (bot or human) scans it, on the same
rationale as the round-1 comment fix a few lines above this one. No line
count change (114, unchanged); no behavior change.

Verified: required validate.yml list 81 passed/3 xfailed;
tests/test_intent_binding_dom.py --noconftest 8 passed.

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 15:43
@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

Three moderate findings remain, including missing harness setup and incomplete import/forwarding coverage.

Review details

Suppressed comments (4)

src/opendox/web/views/dispose.js:26

  • This import adds a dependency that the existing Node DOM harnesses do not copy into their isolated views/ directory: tests/test_intent_tray_dom.py and tests/test_wheel_verbs_dom.py still copy dispose.js, helpers.js, and intent-feed.js only. With Node available, loading dispose.js now fails with ERR_MODULE_NOT_FOUND for intent-binding.js before those probes exercise the tray; update those harness copy lists (and their setup comments) for the new module.
import { emitIntent, renderIntentChips } from "./intent-binding.js";

src/opendox/web/views/intent-binding.js:102

  • The contributed-path probe only checks that renderIntentChips left a marker, not that this wrapper forwarded targetId, rows, and error correctly. A binding that passes substituted values would still pass, so this new forward is not actually covered; expose those fields from _TRAY_PROBE and assert them for the contributed case.
export function renderIntentChips(container, targetId, rows, error) {
  return MODULE
    ? MODULE.renderIntentChips(container, targetId, rows, error)
    : container;

tests/test_intent_binding_dom.py:54

  • The closure description is factually wrong: settings.js is not an import-free leaf; it statically imports wheel-model.js and helpers.js (src/opendox/web/views/settings.js:26-27). The copied closure happens to include those dependencies, but this comment should describe the actual graph so future updates do not omit them.
# file's own `^import` lines: wheel-model.js, helpers.js, notebook.js and
# settings.js are import-free leaves; dispose.js imports only helpers.js and
# (after this slice) intent-binding.js. A file added to this set by a future

tests/test_intent_binding_shape.py:50

  • The shape test's _STATIC_IMPORT_RE recognizes only named imports with double-quoted specifiers. A side-effect import such as import './intent-feed.js';, or a single-quoted named import, would make _static_imports(text) empty while the dynamic-import assertion still passes, so the required suite could miss a static dependency on the optional module. Extend the matcher or add an explicit assertion covering bare and both quote styles.
_STATIC_IMPORT_RE = re.compile(
    r'import\s*\{([^}]*)\}\s*from\s*"(\./[^"]+)"\s*;', re.MULTILINE)
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit c7ab3d8 into main Sep 12, 2026
3 checks passed
brettheap added a commit that referenced this pull request Sep 12, 2026
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>
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