Skip to content

T034: repair the nine files that go red once 2.1 lands (research R3; 16.6's phase-1 repair) - #50

Merged
brettheap merged 9 commits into
mainfrom
build/034-p1f-t034-nine-file-repair
Sep 27, 2026
Merged

brettheap merged 9 commits into
mainfrom
build/034-p1f-t034-nine-file-repair

Conversation

@brettheap

@brettheap brettheap commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Plan 034, task T034, slice P1-F (the sweep and the nine-file repair). The plan is specs/034-opendox-standalone-operation/tasks.md at opensoft/openxFactory main 468863d1, where round 2 (#1176) has landed. The T034 entry there is byte-identical to 0d48231b's, which this record was first written against. This PR realizes box 9.1 (part) and 16.6 (the phase-1 repair) of the ratified add-neutral-product-standalone-operability.

For T007's batch E and T047: what this PR moves to openxFactory

Four test cases leave openDox-code and become NAMED openxFactory composition tests (R1Q2 (a)). T007's batch E adds each destination path to F11.1's named set (COMPOSITION_TESTS) before T047 lands. T047's openxFactory PR lands the cases there, and T049 checks that they arrived. tests/test_session_harness.py is not moved here. It is in collect_ignore, and it is T035's.

The holder's decision on the three memory-gateway cases: accepted under R1Q2 (a) (relayed to this lane's writer, 2026-09-27). T034's text names only the outline case. The memory-gateway cases take the same route because the spec they read exists only in openxFactory.

moved case from (openDox-code) to (openxFactory), proposed why it cannot stay
test_the_model_and_the_doc_health_family_agree_on_the_contract tests/test_outline_model.py tests/ideation-dashboard/test_outline_template_agreement.py It holds views/outline-model.js's REQUIRED_SECTIONS and QUESTION_SUBFIELDS equal to openxFactory's doc_health.families (_TEMPLATE_SECTIONS, _QUESTION_SUBFIELDS). It imports doc_health, which openDox can never install. openDox has no checker of its own until Group 6 (release 2), so there is no openDox contract to rewrite it against.
test_the_roster_is_exactly_the_promoted_capabilitys_requirements tests/test_doxbench_memory_gateway.py tests/ideation-dashboard/test_memory_gateway_roster.py It reads openspec/specs/memory-gateway/spec.md, the promoted capability that doxbench_memory_gateway.CAPABILITY_REQUIREMENTS is transcribed from. That spec is openxFactory's, and no openDox repository carries a copy (checked in openDox-spec, openDox, openXdox-spec, openXdox and openXdox-code). It failed on FileNotFoundError.
test_the_tier_column_is_TRANSCRIBED_not_invented same same the same spec's tier block
test_the_untiered_requirement_really_is_absent_from_the_tier_block same same the same spec's tier block

Both destinations compose openDox at openxFactory's pin, which scripts/carved_reach.py already puts on the path for tests/ideation-dashboard/. The outline case then reads openDox/code/src/opendox/web/views/outline-model.js from the pin, and the memory-gateway cases import opendox.doxbench_memory_gateway. The paths are proposals. If T047's writer chooses others, batch E records what T047 lands. The cases' own text, verbatim from main 19370adc, is below, so no archaeology is needed.

The outline-template agreement case (from tests/test_outline_model.py)
def test_the_model_and_the_doc_health_family_agree_on_the_contract():
    """The surface and the checker must mean the same thing by conformance."""
    import sys
    sys.path.insert(0, str(REPO_ROOT / "scripts"))
    from doc_health import families

    js = MODEL_JS.read_text(encoding="utf-8")
    for _needle, label in families._TEMPLATE_SECTIONS:
        assert f'label: "{label}"' in js, f"model omits required section {label}"
    for field in families._QUESTION_SUBFIELDS:
        assert f'"{field}"' in js, f"model omits sub-field {field}"

MODEL_JS was REPO_ROOT / "src/opendox/web/views/outline-model.js". At openxFactory it is the pinned leg's copy of that file.

The three memory-gateway roster cases (from tests/test_doxbench_memory_gateway.py)
SPEC_PATH = REPO_ROOT / "openspec" / "specs" / "memory-gateway" / "spec.md"


# ===========================================================================
# THE ROSTER — transcribed, and asserted against the capability itself
# ===========================================================================


def test_the_roster_is_exactly_the_promoted_capabilitys_requirements():
    """The declaration is only complete if the roster it is complete OVER is
    the capability's own. Read from the promoted spec, so a requirement added
    upstream fails here rather than becoming a silent gap in the declaration."""
    published = {
        line[len("### Requirement: "):].strip()
        for line in SPEC_PATH.read_text(encoding="utf-8").splitlines()
        if line.startswith("### Requirement: ")
    }
    assert published == set(mg.CAPABILITY_REQUIREMENTS)


def _published_tiers() -> dict[str, str]:
    """The spec's OWN tier block, parsed: requirement name -> the tier line it
    is named on."""
    spec = SPEC_PATH.read_text(encoding="utf-8")
    block = spec.split("```text", 1)[1].split("```", 1)[0]
    published: dict[str, str] = {}
    for match in re.finditer(r"(M\d):((?:.|\n)*?)(?=\nM\d:|\Z)", block):
        tier, body = match.group(1), " ".join(match.group(2).split())
        for name in body.split(";"):
            published[name.strip().rstrip(".")] = tier
    return published


def test_the_tier_column_is_TRANSCRIBED_not_invented():
    """RE-PINNED (adversarial review, F7). The roster test checked NAMES only,
    so two wrong tier values sat in the column unchallenged: one requirement
    carried `M0` although the spec's tier block never tiers it at all, and
    `Expert Memory And Knowledge DBs Are Gateway-Governed` was FLATTENED to
    `M4` although the spec says in as many words that it follows the tier of
    the operation it mirrors. Both are now transcribed, and this test reads the
    spec's own block so neither error can recur silently."""
    published = _published_tiers()
    for requirement, declared in mg.CAPABILITY_REQUIREMENTS.items():
        named = [line for line in published
                 if line.lower().startswith(requirement.lower())]
        if not named:
            # Not tiered by the spec at all -- which the column must SAY.
            assert declared == mg.TIER_UNTIERED, requirement
            continue
        line = named[0]
        if line != requirement:
            # The spec qualifies this row rather than tiering it outright.
            assert declared == mg.TIER_MIRRORS_OPERATION, requirement
            assert "follows the tier of the operation it mirrors" in line
            continue
        assert declared == published[line], requirement


def test_the_untiered_requirement_really_is_absent_from_the_tier_block():
    published = _published_tiers()
    untiered = [name for name, tier in mg.CAPABILITY_REQUIREMENTS.items()
                if tier == mg.TIER_UNTIERED]
    # TWO since 2026-08-22: add-doxbench-editing-phase-b's archive promoted
    # `Subject-Free Local Consumers…` into the capability, and the spec's tier
    # block does not tier it either. The list stays EXACT rather than becoming
    # a membership check — an untiered requirement is a fact about the spec, so
    # a third one appearing should fail here and be looked at.
    assert untiered == [
        "Derived memory bindings validate against the neutral schema",
        "Subject-Free Local Consumers Declare Their Inapplicable Rails"]
    for name in untiered:
        assert not any(line.lower().startswith(name.lower())
                       for line in published)

mg is opendox.doxbench_memory_gateway, and the helper needs import re. At openxFactory, REPO_ROOT is openxFactory's own root, where the spec is (22 requirements at 0d48231b, and CAPABILITY_REQUIREMENTS holds 22).

The nine files (research R3), at main 68be484a and at this head

With the root conftest in play, Python 3.12.3, -c constraints-cpython312-linux.txt -e ".[test]". The nine files give the same results on main at 68be484a as at 19370adc:

file main this head cause repair
test_doxbench_abstract_pane.py 18 passed, 28 errors 46 passed § 3.4 slice S5 moved the workbench gate column out of the bundle, so a shell mounted with no column withholds the canvas, and the generate control with it The harness is the host, so it contributes the column app.js resolves. It imports _CONTRIBUTED_GATE from test_doxbench_view.py, whose S7 note gives the reason, the way it already imports the DOM shim. The column answers createGateLive off the same caps, so the ungated and hosted mounts still have no gate.
test_outline_tab.py 3 passed, 25 errors 28 passed the same the same, and the pre-template sentence reads the SELECTION role's word from NEUTRAL_DISPLAY. It spelled openxFactory's "staged" before S7 parameterized it.
test_doxbench_composition.py 13 errors 13 passed the same the same
test_provider_boundary.py 16 passed, 12 failed 24 passed 16.6's three stale reasons See below.
test_doxbench_memory_gateway.py 36 passed, 3 failed 36 passed read openxFactory's openspec/specs/memory-gateway/spec.md the three cases move to openxFactory (above)
test_consumer_reach.py 31 passed 36 passed none left after T011, whose bullet says "T034 re-derives the rest of the file" re-derived: see below
test_boundary.py 27 passed, 1 failed 28 passed the surface scan kept names whose __module__ was the literal "output_boundary", so after the carve every class fell out of the census the guard's home is read off output_boundary.__name__
test_doxbench_mcp.py 23 passed, 1 failed 24 passed the child was started as -m ideation_dashboard.doxbench_mcp with PYTHONPATH=scripts/ -m opendox.doxbench_mcp with PYTHONPATH=src/
test_outline_model.py 47 passed, 1 failed 47 passed imported doc_health the case moves to openxFactory (above)
total 201 passed, 18 failed, 66 errors 282 passed

test_provider_boundary.py, for 16.6's three reasons. None of the twelve failures was a crossing. The file's docstring now records each reason.

  1. It read snapshot_registry.py, its second HTTP-client holder, which the carve sent to openXdox-code. It is no holder in this package now, and the claim about it is not this leg's to make.
  2. It pinned seven per-module scan suites by filename. The carve manifest sent five to openXdox-code (test_doxbench_turns.py, test_doxbench_packet.py, test_doxbench_threads.py, test_doxbench_bridge.py and test_doxbench_mutation_boundary.py) and left two in openxFactory (test_doxbench_model.py and test_doxbench_status_exemption.py, stays_openxfactory_adapter). PRESERVED_SCANS now pins the three this checkout carries. PRESERVED_ELSEWHERE records the seven with their homes, and a case asserts that none of them is here, so the record cannot go stale.
  3. Its sweep reached the runtime (§ 3.5). runtime/app.py spells Authorization and Bearer for the identity broker's token, which it checks on the way in. runtime/oidc.py, which verifies that token, spells Authorization in prose. Both are named as tier-two holders in place of snapshot_registry.py, and the provider tier is asserted absent from each, as it was from that module. The named list is an exemption, so it is not its own authority. Since review round 5, test_the_identity_surface_is_the_runtimes_two_modules holds it to exactly these two modules, and a third holder has to be argued on its own PR. runtime/config.py names access_token in SECRET_PARAMETER_KEYS, the credential names the runtime refuses and redacts. It gets one permit: that needle, in that module, only while that tuple still names it (read with ast), and no other provider-tier spelling there. Since review round 1, the permit covers only the tuple and the module's prose. The sweep asks _spelled_in_code, which reads every identifier, attribute name and string literal off the syntax tree outside the declaration and the documentation. A spelling there fails with its line. A case also holds the table to that one entry, not only to its size, so a second permit, or one moved to another module or needle, has to be argued on its own PR.

The boundary is still one module wide for anything that holds a provider credential. 16.6's own measurement agrees: only doxbench_provider.py reaches a model provider.

test_consumer_reach.py, re-derived over the whole package. T011 emptied STILL_REACHING by moving its only two entries.

  • test_the_record_is_the_whole_packages_own now derives the record on every run. It imports every module the package's files define, in one interpreter, with all four siblings blocked. It follows the exception chain, because a stand-in resolved at import time raises ConsumerReachUnavailable with the ModuleNotFoundError as its cause. The modules that fail on a sibling must be exactly the record. Before this, a module outside NEUTRAL_MODULES, which names nine, could start needing openxdox at import time and pass the whole file. At this head none fails.

  • Every other failure is classified, not dropped. The one read past is a module of opendox.runtime missing a package of the runtime extra, where the extra is not installed. In a .[test]-only venv, that is app, db and oidc, on fastapi, psycopg and httpx. Anything else fails the test by name: a syntax error, a broken module of openDox's own, an undeclared dependency, or a runtime package needed outside opendox.runtime. RUNTIME_EXTRA tables the extra's distributions with their import names, and test_the_runtime_extra_is_the_one_pyproject_declares holds its keys to pyproject.toml's runtime list. test_the_runtime_extras_modules_are_the_runtimes_own holds the import names to two independent authorities, the runtime's own imports and the installed metadata. Each tabled name is one that a module of opendox.runtime imports. Every third-party package the runtime imports is tabled, or comes from one of the package's required dependencies. Where a tabled distribution is installed, each of its names is installed by it or by a distribution it requires.

  • CONVERTED_SITES had fallen behind the tree by five names in two files: branch_session.py's gate_console, the module whose nine default-argument reads the guard is named for, and cli.py's corpus_root_refusal, generate_snapshot, is_rfc3339_datetime and SCANNED_ROOTS. They join the table. test_every_name_bound_to_the_seam_is_guarded holds the table equal to the names each module binds to the seam. None of the five is read at import time. The census reads every spelling of the seam:

    • Y = <seam>.X, its annotated form, and Y = <seam>.module(...);
    • <seam> spelled as an alias of the module, as opendox.consumer_reach after import opendox or import opendox.consumer_reach, or through from .. import consumer_reach in a subpackage;
    • each of these wherever the module runs it at import time, a module-level if or try included.

    A wildcard import from the seam fails with its own message.

Thirty-seven mutations, each a copy of this tree with one planted change, and each fails the assertion it targets. One more runs in the .[runtime,test] venv. The first thirteen:

  • an unlisted module gains a module-level from openxdox import …;
  • an unlisted module resolves a stand-in at import time, which is caught through the exception chain;
  • a new name is bound to the seam;
  • branch_session.py reads gate_console at import time;
  • a provider endpoint appears in a non-provider module;
  • a Bearer header appears in an unnamed module;
  • the identity surface gains MintedToken;
  • SECRET_PARAMETER_KEYS stops naming access_token;
  • the redaction module gains client_secret;
  • a carved-away scan suite comes back;
  • the guard gains a public class the shim does not re-export;
  • the pre-template sentence goes back to "staged topic";
  • the abstract-pane harness loses its contributed column.

The twelve added in review round 1:

  • an import-time import doc_health where a doc_health is installed;
  • a module importing a missing module of openDox's own;
  • a module that raises while importing;
  • an undeclared dependency;
  • import fastapi outside opendox.runtime;
  • a runtime module importing a package the extra does not declare;
  • a distribution added to pyproject's runtime extra and not tabled;
  • Y: T = consumer_reach.X;
  • Y = consumer_reach.module(...);
  • runtime/config.py spelling access_token in a dict key, in an attribute read, and in an f-string.

Eight more came from review rounds 2 and 3:

  • import opendox.consumer_reach then opendox.consumer_reach.module(...);
  • import opendox then opendox.consumer_reach.snapshot;
  • an alias of the seam module;
  • a subpackage's from .. import consumer_reach;
  • the seam imported inside a module-level try;
  • a stand-in bound inside a module-level if;
  • a wildcard import from the seam;
  • a second redaction permit.

Two came from review round 4, and one more runs in the .[runtime,test] venv:

  • an invented module in a RUNTIME_EXTRA row;
  • a runtime module importing a package nothing declares, read statically;
  • in .[runtime,test], a module tabled under a distribution that does not install it.

Two came from review round 5:

  • a third identity holder listed, with Authorization in its code;
  • the one redaction permit moved to another needle, with runtime/config.py spelling that name instead.

Two controls pass, as they must: a new comment and a new docstring in runtime/config.py that name access_token.

The falsifier: python -m pytest -q over the nine files

$ python -m pytest -q tests/test_doxbench_abstract_pane.py tests/test_outline_tab.py tests/test_doxbench_composition.py tests/test_provider_boundary.py tests/test_doxbench_memory_gateway.py tests/test_consumer_reach.py tests/test_boundary.py tests/test_doxbench_mcp.py tests/test_outline_model.py
282 passed in 22.93s

It also passes under --noconftest, file by file, and in a .[runtime,test] venv.

The repository's own check

.github/workflows/validate.yml's three report-producing steps, run as the file writes them and summed as Pin the triple sums them, in the .[test] venv above:

triple: selected=1160 passed=1157 skipped=3 failures=0 errors=0
pins:   selected>=1114 (margin 46) passed>=1111 (margin 46) skipped==3

main at 68be484a gives 1155/1152/3. The five new cases are test_consumer_reach.py's, which the required job runs by name. test_provider_boundary.py's new cases are not on the job's list. No skip was added.

The whole suite, with the root conftest. A test-by-test JUnit diff against main in the same venv:

venv main this head
.[test] 19 failed, 1489 passed, 13 skipped, 66 errors 1 failed, 1570 passed, 13 skipped
.[runtime,test] (F2.1's install) 18 failed, 1490 passed, 13 skipped, 66 errors 1571 passed, 13 skipped
  • 69 cases go from red to passed, all in the nine files.
  • 15 are gone: the 4 moved cases, and 11 of test_provider_boundary.py's old ids. Nine were PRESERVED_SCANS rows for files this checkout does not carry, one was the renamed tier-two case, and one was the snapshot_registry.py case.
  • 12 are new, all passing: 5 in test_consumer_reach.py and 7 in test_provider_boundary.py.
  • No other outcome changed.
  • The .[test] venv's one failure is T030's test_every_module_imports_with_no_sibling, which needs the runtime extra there, as Remove serve.py's two import-time reaches into openxFactory (plan 034 T011, with T030) #46 recorded. T036 gives the test extra those packages.

Review round 1 (Copilot, at 6898748a)

Each finding was planted at 6898748a first, and every plant passed there. Each is fixed in 86b8f522, where every plant fails, and each thread is answered with its evidence and resolved.

  • The derivation blocked only openxdox. With a doc_health on the path, a module gaining import doc_health dropped out of the census. The derivation, and the record entry check that reads the same failure, now block all four.
  • The derivation dropped every failure that named no sibling. They are classified now (above).
  • The access_token permit covered the whole of runtime/config.py. It covers the declaration and the prose now (above).
  • The review's overview also named annotated assignments in the seam census, with no thread. That is done too (above).

Review rounds 2 and 3 (Copilot, at 86b8f522 and 9d52122b), no threads

  • Round 2: one previously missed finding. import opendox.consumer_reach binds opendox, so a stand-in bound through opendox.consumer_reach went unseen. Three sibling forms were unseen the same way. All four are read since 9d52122, and each passed as a plant at 86b8f52.
  • Round 3: a summary line only, "seam-alias and wildcard-import gaps, and the single provider-boundary permit invariant." Since 9a9b21a:
    • the census reads a module-level if or try, where both plants passed at 9d52122;
    • a wildcard import fails with its own message;
    • the permit table is held at one entry.
  • At 9a9b21ae Copilot reports "Needs a closer look", with no finding and no thread.

Review round 4 (Copilot, at 7867614c, the first merge of main)

  • RUNTIME_EXTRA's import names were checked only through its keys. Adding "planted" to fastapi's row left the whole of test_consumer_reach.py green at 7867614, and a missing planted import in opendox.runtime would then have been read past as an absent extra. Fixed in 383b3232 by the new case above, which holds the names to the runtime's imports and to the installed metadata. The thread is answered with that evidence and resolved.
  • At 383b3232 Copilot reports "Needs a closer look", with no finding and no thread.

Review round 5 (Copilot, at 7e3dc9ff, the merge of T032)

  • IDENTITY_MODULES was its own authority. holders_seen == permitted proves only that each listed module holds a needle. Planted at 7e3dc9ff, runtime/db.py added to the tuple, with an Authorization string in its code, passed the whole file (24 passed). The thread also names line 318, the permit table's pin, which held REDACTION_PERMITS by its size only. Planted there, the permit moved to refresh_token, with runtime/config.py spelling that name in place of access_token, passed too (23 passed). Fixed in bc6b168d: each table is held to the surface it names (above), and both plants fail. The thread is answered with that evidence and resolved. All five threads on this PR are resolved.

Landing

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

🤖 Generated with Claude Code

Summary by Sourcery

Repair the standalone openDox test inventory and package-boundary checks after the carve so the affected suites accurately validate the new repository ownership and runtime behavior.

Bug Fixes:

  • Repair the nine post-carve test files so the targeted suite passes across the standalone package layout.
  • Correct browser harness setup, module paths, neutral display wording, boundary scans, provider-boundary exemptions, and consumer-reach census behavior.

Enhancements:

  • Re-derive consumer reach and seam bindings across the complete package, including runtime dependency classification and mutation-resistant coverage.
  • Align provider-boundary checks with the carved repository structure and explicitly track identity-surface and credential-redaction exceptions.
  • Move cross-repository specification-integration checks out of openDox tests for validation in openxFactory.

Tests:

  • Update and strengthen boundary, consumer-reach, provider-boundary, and browser composition tests for the standalone package.

Chores:

  • Record carved test suites and integration cases that now belong to openxFactory or openXdox-code.

Research R3's nine files, each red for a stale harness, a stale record or a
reach the carve left behind in a test, and none for a product defect:

- test_doxbench_abstract_pane, test_outline_tab, test_doxbench_composition:
  the harnesses mount the shell as its host, so they contribute the
  workbench gate column app.js resolves (slice S5 moved it out), imported
  from test_doxbench_view's _CONTRIBUTED_GATE with the DOM shim. The outline
  tab's pre-template sentence reads the SELECTION role's neutral word (S7).
- test_provider_boundary, for 16.6's three reasons: snapshot_registry.py
  went to openXdox-code; the seven carved-away per-module scans are
  recorded with their homes and asserted absent; the runtime's identity
  surface is named for tier two, and config.py's redaction key is a permit
  held to its declared reason.
- test_boundary: the census reads the guard's home off the module.
- test_doxbench_mcp: the child runs as opendox.doxbench_mcp from src/.
- test_consumer_reach: STILL_REACHING is derived over the whole package on
  every run, and CONVERTED_SITES is held equal to the names the tree binds
  to the seam (branch_session.py's gate_console and cli.py's four other
  aliases join it).
- Moved out, as named openxFactory composition tests (R1Q2 (a)):
  test_outline_model's doc_health agreement case and
  test_doxbench_memory_gateway's three spec-reading cases. T007's batch E
  names their paths; T047 lands them.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 27, 2026 04:24
@sourcery-ai

sourcery-ai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR repairs the nine post-2.1 red test files by aligning harnesses and subprocess imports with the carved openDox layout, moving openxFactory-owned integration checks out of openDox, and replacing stale hand-maintained boundary/import inventories with package-wide derived assertions and explicit carve records.

File-Level Changes

Change Details Files
Re-derived standalone import and seam-guard inventories across the entire package.
  • Enumerate every package-defined module in a consumer-blocked subprocess and compare sibling failures with STILL_REACHING.
  • Derive top-level names bound to the consumer-reach seam and require an exact match with CONVERTED_SITES.
  • Expand the consumer-reach census with corrected module-level aliases and mutation-focused safeguards.
tests/test_consumer_reach.py
Repaired package-wide provider-boundary checks for the post-carve repository layout.
  • Replace stale snapshot and missing per-module scan assumptions with runtime identity holders and explicit elsewhere records.
  • Permit and validate runtime/config.py's refusal-only access_token spelling while keeping provider-tier scans strict.
  • Use package-relative paths and AST inspection for subpackage modules and redaction permits.
tests/test_provider_boundary.py
Updated browser and composition test harnesses to provide the post-carve workbench gate contract.
  • Import the shared contributed gate column alongside the DOM shim.
  • Mount the contributed column so canvas and generate-control behavior is exercised under the host contract.
  • Read the neutral selection display term instead of the obsolete staged wording.
tests/test_doxbench_abstract_pane.py
tests/test_doxbench_composition.py
tests/test_outline_tab.py
Removed cross-repository integration assertions from openDox tests and relocates them to openxFactory composition coverage.
  • Delete the doc-health agreement case and three memory-gateway spec roster/tier cases from this repository.
  • Document the proposed named openxFactory destinations and preserve openDox-local behavior checks.
tests/test_outline_model.py
tests/test_doxbench_memory_gateway.py
Fixed the MCP child-process test for the carved package and import root.
  • Launch opendox.doxbench_mcp with src/ on PYTHONPATH instead of the pre-carve ideation_dashboard module.
tests/test_doxbench_mcp.py
Made boundary re-export discovery independent of the package's hard-coded module name.
  • Derive the guard's home from output_boundary.name when identifying public definitions and reporting missing re-exports.
tests/test_boundary.py

Tips and commands

Interacting with Sourcery

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

Customizing Your Experience

Access your dashboard to:

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

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Four unresolved moderate findings remain in the consumer-reach and provider-boundary checks.

Review effort: Lite
Findings: 3 Medium severity

Open (3)
What changed in this PR

Repairs post-carve standalone validation tests and relocates openxFactory-specific assertions.

Changes:

  • Updates browser, MCP, provider-boundary, and package-boundary tests.
  • Re-derives consumer-reach and seam-binding inventories.
  • Removes cross-repository tests from OpenDox coverage.

Four unresolved moderate findings remain.

File Summary
tests/​test_provider_boundary.py Updates provider/runtime boundary scans. Moderate finding (2 votes): restrict the access_token exemption to its declaration.
tests/​test_outline_tab.py Adds contributed gate support and updated vocabulary checks.
tests/​test_outline_model.py Removes the cross-repository checker agreement test.
tests/​test_doxbench_memory_gateway.py Removes openxFactory spec-dependent tests.
tests/​test_doxbench_mcp.py Uses the standalone package module path.
tests/​test_doxbench_composition.py Adds contributed gate support.
tests/​test_doxbench_abstract_pane.py Adds contributed gate support.
tests/​test_consumer_reach.py Re-derives package reach and seam inventories. Moderate findings: block all sibling roots (3 votes), reject unclassified import failures (2 votes), and include annotated assignments (1 vote).
tests/​test_boundary.py Derives the boundary module name dynamically.

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

Comment thread tests/test_consumer_reach.py Resolved
Comment thread tests/test_consumer_reach.py Resolved
Comment thread tests/test_provider_boundary.py Resolved
… and hold the access_token permit to its declaration (plan 034 T034)

Four review findings on the repair, each planted at 6898748 first, where
all eleven plants passed, and each failing now.

The record's derivation blocked only openxdox. With a doc_health on the
path, a module gaining `import doc_health` imported, and dropped out of the
census. The derivation, and the record entry check that reads the same
failure, now block all four SIBLINGS.

The derivation dropped every failure that named no sibling: a missing
module of openDox's own, a module that raises while importing, an
undeclared dependency. Each is now a failure of the test, by name. It reads
past one failure only: a module of opendox.runtime that cannot find a
package of the runtime extra, where that package is not installed. That is
what validate.yml's .[test] install meets, for app, db and oidc.
RUNTIME_EXTRA tables the extra's distributions with the modules each puts
on the path. A new case holds its keys to pyproject.toml's own list (PEP
503 names), so the one exemption cannot drift from what the package
declares.

The access_token permit covered the whole of runtime/config.py. It now
covers the SECRET_PARAMETER_KEYS declaration and the module's prose. A
spelling in code anywhere else fails the sweep with its line: a dict key,
an attribute read, or an f-string. A comment or a docstring does not (two
controls).

The seam census now also reads `Y: T = consumer_reach.X` and
`Y = consumer_reach.module(...)`. The tree binds neither today, so the
table is unchanged.

Falsifiers: the nine files, 279 passed; validate.yml's triple
1147/1144/3, PASS; the whole suite under .[test], 1 failed (T036's
test_imports_standalone, as before) / 1526 passed / 13 skipped, with one
new passing case and no other change; 25 of 25 mutations bite.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 05:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

A moderate gap remains in bare-import seam-binding detection and requires coverage.

Review effort: Lite
Findings: None

Resolved since last review (3)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Track bare package imports in the seam binding census

tests/​test_consumer_reach.py:952

The binding census only recognizes import opendox.consumer_reach as alias; a normal import opendox.consumer_reach binds the name opendox, so a later top-level assignment such as X = opendox.consumer_reach.module(...) is not included in derived. A future module can therefore introduce an import-time seam binding in a valid Python form while test_every_name_bound_to_the_seam_is_guarded still passes. Track the bare-import package alias and its nested consumer_reach attribute (and add a mutation for this form).

Review round 2 named a form the census missed, as a previously missed
finding with no thread. `import opendox.consumer_reach` binds `opendox`,
so `X = opendox.consumer_reach.module(...)` bound a stand-in that
`test_every_name_bound_to_the_seam_is_guarded` never saw. Three more forms
were missed the same way: `import opendox`, then
`opendox.consumer_reach.snapshot`; an alias of the seam module
(`cr = consumer_reach`); and a subpackage's `from .. import
consumer_reach`, because the relative level was fixed at one. Each of the
four, planted at 86b8f52, passed. Each fails now.

The census now tracks the names bound to the `opendox` package, reads
`opendox.consumer_reach` as the seam, follows an assignment of the seam
module in statement order, and reads the relative level from the file's
depth under the package. The tree binds none of these forms today, so the
table is unchanged.

Falsifiers: the nine files, 279 passed; the triple 1147/1144/3, PASS;
29 of 29 mutations bite, and both prose controls still pass.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 05:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Address the unresolved seam-alias and wildcard-import gaps, and enforce the single provider-boundary permit invariant.

Review effort: Lite
Findings: None

… and hold the permit to one (plan 034 T034)

Review round 3 left three hints, with no thread and no finding.

The census read only a module's top-level statements. So an import of
the seam inside a module-level `try`, and a stand-in bound inside a
module-level `if`, went unread, and both run at import time. Planted at
9d52122, both passed. It now walks every statement the module runs at
import time, through if/try/with/for/while/match and their handlers,
but not a function's or a class's body.

A wildcard import from the seam binds stand-ins the guard cannot read
name by name. It already failed the census as a mismatch, with a message
that invited adding "*" to the table. It now fails with its own message.

`REDACTION_PERMITS` is ONE spelling in ONE module, as its comment says.
A new case holds the count at one, so a second permit has to be argued
on its own PR.

Falsifiers: the nine files, 280 passed; the triple 1147/1144/3, PASS
(test_provider_boundary.py is not on validate.yml's list); 33 of 33
mutations bite, and both prose controls still pass.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 05:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Three moderate issues remain in the consumer-reach and provider-boundary validation logic.

Review effort: Lite
Findings: None

T022 has landed, so this takes main at 255514d and re-verifies the nine
files, the triple and the whole suite over it. T034 stays after T032
(#49), and takes main again once T032 lands.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 06:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Four unresolved moderate findings weaken the consumer-reach and provider-boundary safeguards.

Review effort: Lite
Findings: 1 Medium severity

Open (1)

Comment thread tests/test_consumer_reach.py Resolved
… to the installed metadata (plan 034 T034)

Review round 4's thread. The pyproject check held RUNTIME_EXTRA's
distributions, but not the module names the exemption reads. So adding
"planted" to a row exempted a missing `planted` import from
opendox.runtime. Planted at 7867614, the whole file stayed green. It
fails now.

A new case, `test_the_runtime_extras_modules_are_the_runtimes_own`,
holds the names three ways:
1. each tabled name is imported by a module of opendox.runtime, read with
   tests/import_scan.py's shared scanner, so an invented entry fails;
2. every third-party package opendox.runtime imports is tabled, or comes
   from one of the package's required dependencies (read from its
   installed metadata), so an undeclared dependency fails too, wherever
   it sits in the import order;
3. where a tabled distribution is installed, each of its names is
   installed by it or by a distribution it requires, per the metadata.
   In `.[runtime,test]` that places pydantic under fastapi and
   psycopg_pool under psycopg. Moving pydantic to httpx's row fails
   there.

Falsifiers: the nine files, 281 passed in both venvs; the triple
1159/1156/3, PASS; 35 of 35 mutations bite, plus the runtime-venv one;
both prose controls pass.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Three moderate findings remain in the consumer-reach and provider-boundary checks.

Review effort: Lite
Findings: None

Resolved since last review (1)

brettheap and others added 2 commits September 27, 2026 14:35
T038 landed after T022, so this takes main at 796838e and re-verifies
the nine files, the triple and the whole suite over it, in both venvs.
T034 stays after T032 (#49), and takes main again once T032 lands.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
T032 has landed, so T034's After is met. This takes main at 68be484,
which adds only the sweep and its reader, and re-verifies the nine
files, the triple and the whole suite over it, in both venvs. The sweep
itself passes on this tree, and its import inventory is the one the
re-derived censuses hold.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate findings remain in the boundary and consumer-reach checks.

Review effort: Lite
Findings: 1 High severity

Open (1)

Comment thread tests/test_provider_boundary.py Resolved
…y name (plan 034 T034)

Review round 5's thread, at the merged head. `IDENTITY_MODULES` was its
own authority: `holders_seen == permitted` proves only that each listed
module holds a needle. Planted at 7e3dc9f, `runtime/db.py` added to the
tuple, with an `Authorization` string in its code, passed the whole of
`tests/test_provider_boundary.py` (24 passed).

`test_the_identity_surface_is_the_runtimes_two_modules` holds the tuple
to the runtime's identity surface, `runtime/app.py`, which takes the
caller's bearer token, and `runtime/oidc.py`, which verifies it. A third
holder has to be argued on its own pull request.

The same thread names the permit table's pin. It held
`REDACTION_PERMITS` to one entry by its size only. Planted at 7e3dc9f,
the permit moved to `refresh_token`, with `runtime/config.py` spelling
that name in place of `access_token`, passed too (23 passed). The case
now holds the table to its one entry.

Falsifiers: the nine files give 282 passed in both venvs; the triple is
1160/1157/3; both plants fail now; 37 of 37 mutations bite, plus the
runtime-venv one, and both prose controls pass.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot Bot review requested due to automatic review settings September 27, 2026 15:11
@sonarqubecloud

ghost commented Sep 27, 2026

Copy link
Copy Markdown

ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Four moderate review findings remain unresolved.

Review effort: Lite
Findings: None

Resolved since last review (1)

@brettheap
brettheap marked this pull request as ready for review September 27, 2026 15:17

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

@brettheap

ghost commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

READY at bc6b168 — Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

@brettheap
brettheap merged commit 71b631b into main Sep 27, 2026
@brettheap

ghost commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

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

LANDED — lane openxfactory-4, 2026-09-27T15:22:52Z, PR #50 → 71b631b (opensoft/openDox-code main; plain gate)

Brett: land the phase 1 PRs when green

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