Skip to content

B-4 as ruled (a): the adapter column reads output_boundary directly instead of the boundary shim — four import lines (split-opendox § 3.1) - #855

Merged
brettheap merged 3 commits into
mainfrom
change/opendox-b4-boundary-shim-repoint
Sep 9, 2026
Merged

brettheap merged 3 commits into
mainfrom
change/opendox-b4-boundary-shim-repoint

Conversation

@brettheap

@brettheap brettheap commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Refs #656

The ruling realized

RULING — Brett Heap, 2026-09-09 ~15:3xZ, verbatim "rule B-4 a". The three
boundary-shim reaches into openDox from the adapter column —
human_seen.py:45, dashboard_refresh_lane.py:121, nightly_lane.py:88 (→
scripts/ideation_dashboard/boundary.py, the 62-line re-export of the
already-neutral scripts/output_boundary.py) — plus
tests/notebooklm/test_workbench_sweep_wiring.py:97 are repointed
PRE-CARVE at output_boundary directly (option a)
, one import line each,
no behaviour change; the boundary.py shim stays for its openDox-side
readers. Authoring by this lane as B-4, sequenced after #843 lands (it
edits the lines beside human_seen.py:45). With B-2 (i′) and B-4 landed,
the adapter column's only remaining openDox reaches are the ruled import rewrites at the carve (lens_submission.py:51-52, tests/notebooklm/'s
namespace imports).

Base: main after #843 (OQ-B part 1, merged c6ae684d) — this branch's own
base was 256b1950 (#848, also merged), and picked up 14 further unrelated
main commits via a catch-up merge before push (none touch
scripts/ideation_dashboard/, scripts/output_boundary.py, or the affected
test files).

Reader table (whole-tree, five spellings, pre-repoint)

file:line spelling column
scripts/ideation_dashboard/human_seen.py:45 from .boundary import OutputBoundary openxFactory's own adapter (stays)
scripts/ideation_dashboard/dashboard_refresh_lane.py:121 from ideation_dashboard.boundary import OutputBoundary stays
scripts/ideation_dashboard/nightly_lane.py:88 from ideation_dashboard.boundary import OutputBoundary stays
tests/notebooklm/test_workbench_sweep_wiring.py:97 from ideation_dashboard.boundary import OutputBoundary (function-local, inside _live_manifest) test tree

All four import only OutputBoundary, which scripts/output_boundary.py
defines under the same name (the shim's __all__ re-exports it, not a copy —
from output_boundary import (... OutputBoundary ...)). No rename, no
behaviour change.

The four diffs

--- a/scripts/ideation_dashboard/human_seen.py
+++ b/scripts/ideation_dashboard/human_seen.py
@@ -42,7 +42,7 @@
-from .boundary import OutputBoundary
+from output_boundary import OutputBoundary

--- a/scripts/ideation_dashboard/dashboard_refresh_lane.py
+++ b/scripts/ideation_dashboard/dashboard_refresh_lane.py
@@ -118,7 +118,7 @@
-from ideation_dashboard.boundary import OutputBoundary  # noqa: E402
+from output_boundary import OutputBoundary  # noqa: E402

--- a/scripts/ideation_dashboard/nightly_lane.py
+++ b/scripts/ideation_dashboard/nightly_lane.py
@@ -85,8 +85,8 @@
-from ideation_dashboard.boundary import OutputBoundary  # noqa: E402
 from ideation_dashboard.generator import generate_snapshot  # noqa: E402
+from output_boundary import OutputBoundary  # noqa: E402

--- a/tests/notebooklm/test_workbench_sweep_wiring.py
+++ b/tests/notebooklm/test_workbench_sweep_wiring.py
@@ -94,7 +94,7 @@
     boundary_root = repo
-    from ideation_dashboard.boundary import OutputBoundary
+    from output_boundary import OutputBoundary

nightly_lane.py's line also moved (85→88 sorted alphabetically against
ideation_dashboard.generator, absolute import ordering preserved) — one line
changed per file, everything else byte-identical.

Edge scan — BEFORE (merge-base 256b1950) / AFTER (this branch's head)

AST-parsed (not grepped) over all five spellings the tree can reach the shim
by (from .boundary import X, from . import boundary, from ideation_dashboard.boundary import X, from ideation_dashboard import boundary, import ideation_dashboard.boundary, plus the scripts.-prefixed
absolute forms), whole scripts/ + tests/ tree, module-level and
function-local:

BEFORE AFTER
total shim (ideation_dashboard.boundary) reaches 48 45
output_boundary (neutral) reaches 4 9

Delta: stays→oD −3 (human_seen.py, dashboard_refresh_lane.py,
nightly_lane.py) + test-tree edge −1 (test_workbench_sweep_wiring.py)
= −4 shim reaches; +4 stays→neutral (the same four lines now import
output_boundary) + one new test-only edge (this PR's own
test_b4_boundary_repoint.py imports both output_boundary and
ideation_dashboard.boundary itself, to compare the shim's re-exports for
identity — not a production reach). Net shim-reach change: 48 → 45 (−3, since
the new test adds back one from ideation_dashboard import boundary to
verify the shim's own re-export contract). No new forbidden-direction
edge
— the diff between the BEFORE/AFTER edge lists is exactly: the four
lines removed, and the new test file's own two verification imports added.

Remaining stays→oD edges after this PR (out of scope for B-4, named for
the record): scripts/ideation_dashboard/lens_submission.py:57-58 (from .lens import PENDING_PROPOSAL_NOTE; from .workbench import ACTION_ADD_AS_CLUSTER, OutputBoundary, Workbench, save — ruled import rewrites at the carve, the file's own docstring names these as its two
stays -> openDox reaches; line numbers drifted from the brief's :51-52 to
:57-58 since #848's docstring edit) and
scripts/ideation_dashboard/serve_openxfactory_lanes.py:52 → serve_wire.py
(B-2 (i′) has not landed yet — it is in flight per a continuation author per
the ruling thread on #656 — so this reach is still open, tracked separately).

Guard test

New tests/ideation-dashboard/test_b4_boundary_repoint.py (242 lines, 6
tests): parses (not greps) the four ruled files for all five spellings and
asserts none remain; asserts each of the three module-level names is
output_boundary.OutputBoundary; asserts the shim's own re-exports are the
same objects (proving the repoint was a no-op); a non-vacuity check that the
sweep-wiring test still imports OutputBoundary from output_boundary
specifically; a check that the shim is still present and still read by other
package modules; and a negative control that feeds a restored from .boundary import X (all five spellings) through the identical scanner
function to prove it would still catch a regression. Does not touch
test_import_direction.py, test_oqb_replumb.py or test_oqb_replumb_2.py.

Tests + parity

  • python3 -m pytest -q tests/ideation-dashboard tests/notebooklm tests/doc-health: 7005 passed, 31 skipped, 40 subtests passed, 1
    failed — test_find_validator_locates_pinned_checkout — reproduced
    byte-for-byte on a clean worktree checked out at the merge-base
    (256b1950, no changes from this PR applied), so it is the known
    environmental failure (the test expects a sibling-checkout path layout an
    isolated worktree doesn't have), not a regression from this change.
  • python3 scripts/proposal-support.py . verify: proposal support verification ok.
  • python3 scripts/doc-health.py --single-repo .: 10 critical / 7 error /
    57 warning / 16 info
    at this head vs 10 / 8 / 57 / 16 at the
    merge-base — findings diffed line-by-line (repo-identity label aside): the
    one fewer error is bump-openspec-cli-pin-to-1.12/review/ratification-2026- 09-05.md's missing-status-header finding, which disappeared only because
    the unrelated 14-commit main catch-up (picked up before push) archived
    that file to a new path; canon share moved 39.6%→39.7% for the same reason
    (words the catch-up merge brought in). Zero findings changed by this PR's
    own five files.
  • CI: all 10 check-runs SUCCESS at 4c72fb2d, including the required pytest-suite (24m24s) and merge-master-approval — judged on their own results (the estate freeze ended with GATED (runbook Phase 1 COMPLETE, step 1.6 INCLUDED) — slice B1: the decision-core pin, the workflows, the operator tools (42/15) #801).

NOT DONE

boundary.py is kept, unedited — it stays for its remaining in-package readers (five openDox-column and, per design D3, four openXdox-column: snapshot_registry.py, gate_routes.py, gate_console.py, cli_gate.py; openXdox→openDox is an allowed direction and pre-existing — verifier's note)
(roughly ten package modules, thirty test modules) per the shim's own
docstring. No carve manifest, no openspec/**, contracts/** or
.github/** edit. No behaviour, signature or public-name change anywhere.

Asking for Brett Heap's separate word to land this.

🤖 Generated with Claude Code

brettheap and others added 3 commits September 9, 2026 12:36
…ches at output_boundary directly

Brett Heap ruled on #656 (2026-09-09, "rule B-4 a"): the three
openxFactory-adapter scripts (human_seen.py, dashboard_refresh_lane.py,
nightly_lane.py) and the one test-tree caller
(tests/notebooklm/test_workbench_sweep_wiring.py) that reached
OutputBoundary through the ideation_dashboard.boundary re-export shim
now import it from its neutral home, scripts/output_boundary.py,
directly. One import line each; no behaviour, signature or public-name
change — the shim re-exports the same objects, so this is a pure
import-path repoint. boundary.py itself is untouched and stays for its
openDox-column readers.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…s, and the scanner would catch a regression

New tests/ideation-dashboard/test_b4_boundary_repoint.py, parsed (not
grepped) over all five spellings the tree can reach
ideation_dashboard.boundary by (both relative forms, both absolute
forms including the scripts.-prefixed one, and a bare import
statement), walking module-level and function-local imports alike:

  * the four ruled files (human_seen.py, dashboard_refresh_lane.py,
    nightly_lane.py, tests/notebooklm/test_workbench_sweep_wiring.py)
    reach the shim in none of the five spellings;
  * each of the three module-level repointed names `is` the neutral
    module's own OutputBoundary object, and the shim's own re-exports
    are proven to be the same objects (never copies), which is why the
    repoint could be mechanical;
  * a negative control feeds a restored `from .boundary import X` (and
    every other spelling) through the identical scanner function to
    prove it would still catch the edge if reintroduced;
  * the shim itself is proven still present and still read by other
    package modules, so a later change cannot quietly retire it here.

Does not touch test_import_direction.py, test_oqb_replumb.py or
test_oqb_replumb_2.py, which police different edges.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ipts/output_boundary.py, or the affected test trees) into change/opendox-b4-boundary-shim-repoint

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 9, 2026 16:49

@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.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

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.

🟢 Approval recommended

The changes are mechanically scoped to import-path repoints, and the added tests directly enforce the ruling’s import-edge constraints without altering runtime behavior.

Pull request overview

This PR implements ruling B-4 (a) for the split-openDox work: it removes the adapter-column’s dependency on the ideation_dashboard.boundary (openDox-column) re-export shim by importing OutputBoundary directly from the neutral output_boundary module, and adds a guard test to prevent regressions.

Changes:

  • Repointed four OutputBoundary import sites from ideation_dashboard.boundary / .boundary to output_boundary (no behavior change intended).
  • Added a new AST-based test suite to assert the ruled files no longer import the shim in any supported spelling and that the shim remains a pure re-export.
File summaries
File Description
scripts/ideation_dashboard/human_seen.py Switches OutputBoundary import to the neutral output_boundary module to remove a stays→openDox edge.
scripts/ideation_dashboard/dashboard_refresh_lane.py Switches OutputBoundary import to output_boundary (still after sys.path bootstrap).
scripts/ideation_dashboard/nightly_lane.py Switches OutputBoundary import to output_boundary and keeps import ordering consistent.
tests/notebooklm/test_workbench_sweep_wiring.py Updates function-local import to output_boundary to remove the test-tree shim reach.
tests/ideation-dashboard/test_b4_boundary_repoint.py Adds regression tests verifying the repoint, identity equality, and continued shim readership elsewhere.
Review details
  • Files reviewed: 5/5 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

Copy link
Copy Markdown
Contributor Author

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

INDEPENDENT VERIFICATION of head 4c72fb2dc193e24c64f2972698b2c46f5b1b8864 — PASS WITH NOTES

Independent adversarial verification of PR #855 (B-4 as ruled, option (a): repoint the four boundary-shim reaches at scripts/output_boundary.py). Own worktrees at PR head (origin/pr-855) and at git merge-base HEAD origin/main = 183d1b43 (the branch's actual shared ancestor with current main, which already contains the 14-commit main catch-up the author's own branch merged in — this is a stricter/cleaner base than the author's own "merge-base 256b1950" comparison, see item 7).

# Item Verdict Evidence
1 Scope PASS git diff --numstat 183d1b43...HEAD = exactly the 5 declared files (human_seen.py 1/1, dashboard_refresh_lane.py 1/1, nightly_lane.py 1/1, test_workbench_sweep_wiring.py 1/1, new tests/ideation-dashboard/test_b4_boundary_repoint.py 242/0). One merge commit (4c72fb2d), declared in the body as the 14-commit main catch-up. Nothing under openspec/**, contracts/**, .github/**. boundary.py and output_boundary.py both absent from the diff (untouched).
2 Import identity + AST-minimal diff PASS Fresh-interpreter check: ideation_dashboard.boundary.OutputBoundary is output_boundary.OutputBoundary → True (both __module__ == "output_boundary"). Wrote an independent docstring-stripped-AST differ (ast.dump) for all 4 files, base vs head: each diff is confined to the single ImportFrom node (module name + level); nightly_lane.py additionally reorders that node relative to ideation_dashboard.generator (still only the import node moving/changing) — no other AST node differs anywhere in any of the 4 files.
3 Reader table / only-4-repointed PASS (with a terminology correction) grep+AST scan of all 5 spellings across scripts/ + tests/ (no web/ dir exists) found 61 raw hits; after excluding the new guard test's own string-literal scanner-fixtures and test_import_direction.py's existing negative-control string, the real remaining importers are 9 production modules (notebook_action.py, snapshot_registry.py, gate_routes.py, cli_project.py, cli_gate.py, gate_console.py, authoring.py, workbench.py, cli.py) + ~30 test modules + the shim's own test (test_boundary.py) + the new guard test. No stays-column (adapter) production file besides the 3 already repointed reaches the shim — confirmed doxbench_packet.py/doxbench_contracts.py/intent_apply_lane.py (the other 3 stays-column files per design D3) do not import it at all. Correction to the brief's predicate: "every remaining reader is openDox-column" is not literally true — snapshot_registry.py, gate_routes.py, gate_console.py (per D3) and cli_gate.py (per its own docstring, "Design § D2 puts gate console and verbs in the openXdox column") are openXdox-column, not openDox. This doesn't affect the PR's correctness (an oXd→oD edge is an allowed pre-existing edge per item 4, and both the ruling and the PR body use "openDox" loosely — the carve hasn't happened yet, so oD/oXd both still live in one package) — noted as a NOTE, not a defect.
4 Edge scan (independent) PASS Wrote my own whole-tree AST edge scanner (not reused from the author). Results, BASE (183d1b4) → HEAD (4c72fb2): shim (ideation_dashboard.boundary) reaches 48 → 45 (exactly reproduces the body's numbers); output_boundary (neutral) reaches 4 → 9 (exactly reproduces the body's numbers). Removed: human_seen.py:45, dashboard_refresh_lane.py:121, nightly_lane.py:88 (stays→oD, −3) + test_workbench_sweep_wiring.py:97 (test-tree, −1). Added to NEUTRAL: the same 4 lines (+4 stays/test→neutral) + the new guard test's own import output_boundary (+1, test-only) and its own from ideation_dashboard import boundary (+1 back into SHIM, netting shim to −3 overall). No new stays→oD / oD→oXd / oD→stays edge anywhere. Remaining stays→oD edges confirmed present at head exactly as the body names them: lens_submission.py:57-58 (.lens/.workbench imports) and serve_openxfactory_lanes.py:52 → serve_wire.py (confirmed B-2 (i′) has NOT landed: def hosted_ref_refused is still defined in serve_wire.py:1359, not serve_projection.py).
5 Guard test PASS Revert experiment A: restored from .boundary import OutputBoundary in human_seen.py in the worktree → test_the_four_ruled_files_reach_the_guard_at_its_neutral_home FAILED, reporting exactly that offending line; reverted, suite green again. Experiment B: restored the function-local from ideation_dashboard.boundary import OutputBoundary in test_workbench_sweep_wiring.py → 2 tests FAILED (the four-files scan, plus the sweep-wiring-specific non-vacuity test); reverted, suite green again. Identity non-vacuity: monkeypatched human_seen.OutputBoundary to a decoy class object — the is assertion correctly flips to False, proving it is not a tautology.
6 Tests PASS pytest -q tests/ideation-dashboard/test_b4_boundary_repoint.py tests/notebooklm tests/doc-health at head: 1893 passed, 40 subtests passed, 0 failed (317s). Independently confirmed the known environmental failure by running pytest -k test_find_validator_locates_pinned_checkout on the clean base worktree: reproduces byte-for-byte (assert None is not None, a sibling-checkout path-layout issue), i.e. not something my narrower command even hit but confirmed as pre-existing/environmental as claimed. CI at head: all 10 check-runs completed/success (pytest-suite, merge-master-approval, openspec-cli-pin, openreposhape-pin, release-tag-gate, clearing-dispatch-gate, signed-execution-chain-gate, wallet-validation, lane-line, copilot-pull-request-reviewer) — the estate-freeze pytest-suite red the brief warned about is NOT in effect at this head; fully green.
7 Parity PASS proposal-support.py . verify → proposal support verification ok at both head and base. doc-health.py --single-repo . full output (not truncated) at head: 10 critical / 7 error / 57 warning / 16 info (90 total); at base (183d1b4, the actual merge-base with current main — i.e. it already contains the 14-commit catch-up): 10/7/57/16 (90 total), and a line-by-line diff (repo-label normalized) is byte-identical. This is a stronger result than the PR body's own comparison, which used the branch's pre-catch-up base (256b1950) and had to explain away a 1-error difference from an unrelated main archival; comparing head against its actual current merge-base shows zero doc-health drift attributable to this PR's 5 files.
8 Hygiene PASS Body first line Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox); **Refs #656**, no closing keyword (grep clean); GraphQL closingIssuesReferences.totalCount == 0. All 3 non-merge-relevant commits (2 feature + 1 declared merge) carry the exact 2-line trailer (Lane: openxfactory-4-opendox-extraction / Co-Authored-By: Claude Fable 5.1 <[email protected]>), verified byte-exact with cat -A (nothing trailing). autoMergeRequest: null. reviewDecision: REVIEW_REQUIRED — no approving review; Copilot's "🟢 Approval recommended" is state: COMMENTED (a review comment, 0 comments generated), not an approval, confirmed via GraphQL. reviewThreads.totalCount == 0.

Defects found:

  • SHOULD-FIX: PR body line 146 reads - CI: **PLACEHOLDER_CI_LINE** — a literal unfilled template placeholder left in the merged prose, never replaced with the actual (green) CI disclosure. Cosmetic only (does not affect correctness), but the body is otherwise meticulous and this stands out; recommend a one-line edit before landing.
  • NOTE: item 3's predicate "every remaining reader is openDox-column" is imprecise — 4 of the 9 remaining production readers are openXdox-column by design D3 / their own docstrings (snapshot_registry.py, gate_routes.py, gate_console.py, cli_gate.py). Substantively harmless (an oXd→oD edge is pre-existing and allowed, not a new forbidden-direction edge), and both the ruling and the PR body use "openDox" loosely pre-carve — but worth flagging precisely for the record.

No BLOCKING defects. Edge numbers: SHIM 48→45, NEUTRAL 4→9 (independently reproduced, matches PR body exactly). CI: all 10 required/advisory checks green, pytest-suite conclusion success. Shared checkout /home/brett/projects/xFactory/openxFactory: 6612d323/0 staged at start and end (unchanged).

🤖 Generated with Claude Code

@brettheap

Copy link
Copy Markdown
Contributor Author

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

Body corrections from the independent verification (comment above): the unfilled CI placeholder replaced with the actual green disclosure (10/10 check-runs at 4c72fb2d), and the boundary.py readers sentence made precise (five openDox-column + four openXdox-column remaining readers; openXdox→openDox is an allowed direction). No code change; head unchanged.

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