Skip to content

OQ-B re-plumb 1: slug into a neutral module beside output_boundary; intent_apply_lane reaches sessions through the openXdox surface (split-opendox § 3.1) - #843

Merged
brettheap merged 9 commits into
mainfrom
change/opendox-oqb-replumb-1-slug-and-sessions
Sep 9, 2026
Merged

brettheap merged 9 commits into
mainfrom
change/opendox-oqb-replumb-1-slug-and-sessions

Conversation

@brettheap

@brettheap brettheap commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Refs #656 — OQ-B pre-carve re-plumb, part 1 of 2 (B-1 and B-3). Mechanical, inside openxFactory. No behaviour, signature or public-name change.

The ruling this realizes

Brett Heap, 2026-09-09, verbatim "rule all OQs as recommended":

OQ-B (ruled): every openxFactory→openDox import edge is re-plumbed BEFORE the carve, none is filed as an edit class: (B-1) slug (26 lines, workbench.py:245-270) moves to a neutral module beside output_boundary and human_seen.py:46 reads it there; (B-2) the four serve_wire names serve_openxfactory_lanes.py:52 reads (three strings and a predicate) get the same treatment; (B-3) intent_apply_lane.py:472's bootstrap_sessions reach goes through openXdox, which already imports branch_session; tests/notebooklm/'s three importing files are openxFactory tests and follow the same rule.

Why the edges cannot survive: RULING OQ-2 pins openDox only by openXdox, and § 5.1 (RULING F) pins openxFactory to the openXdox assembly root and nothing else. So openxFactory's retained engineering adapter column (design D3) may not import openDox at all — not narrowly, not lazily.

B-2 is NOT in this PR (see NOT DONE).

B-1 — slug into a neutral module beside output_boundary

New file scripts/path_slug.py (118 lines): 52 lines of header and imports in output_boundary.py's idiom — neutral, imported by every column, not_moved / replicated_at_destination at the carve (RULED OQ-A/OQ-C), created by OQ-B B-1 — followed by the relocated text at :53-118.

The relocation is byte-identical. workbench.py:203-268 at base 56e69a11 — 66 lines, 3,584 bytes — sha256 ac32a12259437600b56bfedc4d212491b1034def8cd2338789ece052d560662b before and after (path_slug.py:53-118), zero differing lines.

The ruling names slug (:245-270, 26 lines). The moved block is a superset because slug READS four module-level names — MAX_SLUG_CHARS (:219), _SLUG_KEY_SEPARATOR/_SLUG_KEY_DIGEST_CHARS (:224-225), _slug_key_digest (:228-242) — and the bound's 16-line comment is that constant's reason. Moving the function alone would have made the "move" a rewrite; the unit that relocates verbatim is the slug family, and :203-268 is exactly it.

workbench.slug keeps resolving. workbench.py re-exports all five names from path_slug — the SAME objects, not copies (boundary.py's precedent). Every importer of slug found in the tree, and what happened to each:

importer column disposition
human_seen.py:46 from .workbench import slug stays REPOINTED to from path_slug import slug — the ruled edge
authoring.py:60 from .workbench import slug oD left on workbench.slug
gate_console.py:689,700 from .workbench import slug (lazy) oXd left on workbench.slug
gate_routes.py:887 from . import workbench as wb, used at :925,967 oXd left on workbench.slug
tests/ideation-dashboard/test_gate_failure_diagnostics.py wb.slug, wb.MAX_SLUG_CHARS, wb._SLUG_KEY_SEPARATOR test left on workbench
tests/ideation-dashboard/test_lens.py:624 wb.slug(...) test left on workbench.slug (test / oD-side string)
tests/ideation-dashboard/test_gate_failure_diagnostics.py:209 from ideation_dashboard.workbench import slug (subprocess SOURCE STRING, run in a fresh interpreter) test left on workbench.slug (test / oD-side string)
web/views/lens-model.js:959-960 (comment naming workbench.MAX_SLUG_CHARS as its twin) oD untouched — still true

Only the stays-column importer had to move. The oD and oXd importers are left on workbench.slug deliberately: oD -> neutral and oXd -> oD are both edges the carve permits, and repointing the remaining openDox/openXdox call sites would be a large mechanical diff inside a change whose point is the two edges it removes — the same reasoning boundary.py's header already records for the ten package modules and thirty test modules that name IT. authoring.py travels to openDox with workbench.py, so its import never crosses a boundary at all.

B-3 — the apply lane reaches sessions through an openXdox surface

Decision: a NEW module, scripts/ideation_dashboard/openxdox_surface.py (44 lines), not an existing one. Three openXdox modules already import branch_session — cli_gate.py:46, gate_routes.py:70, doxbench_scope.py:729 — and none is a natural home. gate_routes.py is off-limits in this PR (#836's file) and is a 3,552-line route table; doxbench_scope.py is the ownership authority and reaches branch_session lazily to keep its own import graph flat; cli_gate.py is the gate CLI, and making openxFactory's apply lane import the gate CLI to get a session bootstrap would be a worse edge than the one being removed. design.md names no in-tree "assembly root" or "surface" concept to reuse — assembly root there is a REPOSITORY-level term (D12/§ 5.1: openXdox's own repo is the assembly root openxFactory pins), so borrowing the word for a module would collide with a ruled one. Hence a plainly-named new file.

It is a named re-export and nothing else: no wrapper, no adaptation, no policy. openxdox_surface.bootstrap_sessions is branch_session.bootstrap_sessions (asserted). intent_apply_lane._live_session_registry imports it function-locally, exactly as it imported branch_session before, so branch_session is still loaded at the same moment it always was.

At the carve the file travels to openXdox-code with its column and the lane's import becomes a package-path rewrite — one line, the import rewrites class.

Edges, measured BEFORE and AFTER with my own AST scan

Method (memo § 2.3, re-implemented for this PR — scanner kept at $SP/oqb1_edge_scan.py): every .py in scripts/ideation_dashboard/, whole-tree walk so lazy function-local imports count, resolving all five spellings (from .X import, from . import X, from ideation_dashboard.X import / from scripts.ideation_dashboard.X import, import ideation_dashboard.X) plus bare-name imports of the neutral modules at scripts/. Columns are design D3's assignment as memo § 2.2 tabulates it, with doxbench_scope_types (oD) and lens_submission (stays) from the three splits that landed while this was authored.

BEFORE = origin/main 46059b77 (this branch was merged onto it, never rebased); AFTER = this head.

pair before after delta
stays → oD 8 6 −2
stays → oXd 15 16 +1
stays → neutral 1 2 +1
oD → neutral 4 5 +1
oXd → oD 34 35 +1
oD → oXd 33 33 —
oD → stays 6 6 —
oXd → stays 4 4 —
oXd → neutral 2 2 —
total 107 109 +2

Removed (2), each named file:line at the base:

  • scripts/ideation_dashboard/human_seen.py:46 human_seen → workbench (stays → oD) — B-1
  • scripts/ideation_dashboard/intent_apply_lane.py:472 intent_apply_lane → branch_session (stays → oD) — B-3

Added (4), all in the permitted classes:

  • human_seen.py:50 human_seen → path_slug (stays → neutral)
  • workbench.py:62 workbench → path_slug (oD → neutral)
  • intent_apply_lane.py:477 intent_apply_lane → openxdox_surface (stays → oXd)
  • openxdox_surface.py:42 openxdox_surface → branch_session (oXd → oD)

NO new stays → oD, oD → oXd or oD → stays edge.

The six stays → oD edges that remain, and why none is mine to fix here:

  • human_seen.py:45, dashboard_refresh_lane.py:121, nightly_lane.py:88 → boundary — the 62-line re-export of the already-neutral scripts/output_boundary.py. Memo § 2.3 files these as already solved: repointing at output_boundary is an import rewrites edit and the edge disappears. Outside OQ-B's ruled set and outside this PR's file set (two of the three files are not mine to touch).
  • serve_openxfactory_lanes.py:52 → serve_wire — B-2, which waits for its own PR.
  • lens_submission.py:51,52 → lens, workbench — pre-existing on main at my base, introduced by Split lens: add_as_cluster and its human_seen reach into lens_submission.py (pre-carve S-2, § 3.1) #836 (89148583) as the deliberate trade its verifier recommended: removing openDox's reach INTO openxFactory put the adapter verb where it belongs, and the verb still calls openDox core. This is OQ-B's fourth item, ruled import rewrites at the carve, and explicitly not mine — untouched.

tests/notebooklm/ — DEFERRED, with the measurement

Memo § 3.6 names three files as OQ-B in the test tree. Measured by AST (distinct attribute names reached on each namespace import, and total reaches):

file module column distinct names reaches
test_sync_notebooklm_books.py:47 branch_session oD 11 (CONTAINER_SUFFIX, NOTEBOOK_PREFIX, Tile, attach_session_notebook, bootstrap_sessions, flatten_branch, notebook_alias, open_session, retire_session_notebook, sessions_root, worktree_path) 30
test_sync_notebooklm_books.py:49 workbench oD 5 (NOTEBOOK_PREFIX, NotebookAdapter, SESSION_NOTEBOOK_PREFIX, WorkbenchError, managed_source_title) 23
test_sync_notebooklm_books.py:48 session_git oD 1 (SessionGit) 1
test_workbench_sweep_wiring.py:52 workbench oD 5 (NOTEBOOK_PREFIX, NotebookAdapter, WORKBENCH_DIR, Workbench, save) 9
test_hermeticity_guard.py:90,91 session_pr, workbench oD 2 (SubprocessCommandRunner, _default_runner) 2

Not a handful of names: 22 distinct names over four openDox modules (branch_session 11, workbench 9, session_git 1, session_pr 1), 65 attribute reaches, every one of them through import module used as a NAMESPACE (bs.X, wb.X). Per the brief's own rule I did not contort the tests. Three further reasons it is the right call: test_hermeticity_guard.py reaches workbench._default_runner, a private name a public surface must not re-publish; both large files gate themselves on importlib.util.find_spec("ideation_dashboard.branch_session") string literals, which a re-export does not satisfy and which are not import statements at all; and repointing two of the three files would leave the tree half-plumbed while removing no edge from the third.

Recommendation for the orchestrator to rule: tests/notebooklm/ is import rewrites at the carve, like lens_submission. Its snapshot_registry import (test_sync_notebooklm_books.py:1273) is already stays → oXd and was left alone as the brief directs. The tree's 8 edges are unchanged by this PR (7 stays → oD, 1 stays → oXd).

Every non-relocation line change

  1. scripts/path_slug.py — new: 46-line header docstring + from __future__ import annotations + import re, then the byte-identical block.
  2. scripts/ideation_dashboard/workbench.py — the block deleted at :203-270 (66 lines + its two blank separators); an 8-line comment and a 5-name from path_slug import (...) re-export added beside from .boundary import OutputBoundary (isort order: absolute before relative). re is still used at five other sites (:135,136,150,386,627 post-edit), so no import became dead.
  3. scripts/ideation_dashboard/human_seen.py — from .workbench import slug → 4 comment lines + from path_slug import slug.
  4. scripts/ideation_dashboard/openxdox_surface.py — new: header, one re-export import, __all__. Its header cites the three openXdox modules that already import branch_session; the doxbench_scope.py citation was refreshed :801 → :729 in its own commit after the merge-from-main, because Split doxbench_scope: the scope TYPES into doxbench_scope_types.py (pre-carve S-1, § 3.1) #837 moved the five scope types out from above it.
  5. scripts/ideation_dashboard/intent_apply_lane.py — inside _live_session_registry: 5 comment lines added, from ideation_dashboard import branch_session as branch_session_mod → from ideation_dashboard.openxdox_surface import bootstrap_sessions, and the call branch_session_mod.bootstrap_sessions(...) → bootstrap_sessions(...). Same object, same arguments, same report handling. branch_session_mod had no other use in the file.
  6. tests/doc-health/test_import_direction.py — NEUTRAL_SLUG constant + one new test. The brief named tests/ideation-dashboard/test_import_direction.py; the file does not exist there. The repository's only test_import_direction.py — the one whose :116-133 proves output_boundary's neutrality, exactly as the brief describes — is under tests/doc-health/, and output_boundary.py's own header points at that path. Extended there. Its three existing tests are untouched.
  7. tests/ideation-dashboard/test_oqb_replumb.py — new.

Nothing in openspec/**, contracts/**, .github/**. docs/opendox-carve-manifest.yaml does not exist and was not created. None of #835/#836/#837's files (doxbench_scope*.py, lens.py, lens_submission.py, gate_routes.py, serve_wire.py, serve_projection.py, serve.py) is touched.

Tests

tests/ideation-dashboard/test_oqb_replumb.py (new, 7 tests) proves what a review cannot: both re-plumbings are one line each and are undone by one line each, with no behaviour change to make anything else go red.

  • human_seen and intent_apply_lane import NOTHING from branch_session, session_git or workbench in any of the five spellings, module-level and function-local alike.
  • Non-vacuity for B-3: the lane still DOES import openxdox_surface, so a lane that had simply stopped rehydrating sessions fails too.
  • openxdox_surface.bootstrap_sessions is branch_session.bootstrap_sessions.
  • workbench.slug is human_seen.slug is path_slug.slug, plus MAX_SLUG_CHARS, _SLUG_KEY_SEPARATOR, _SLUG_KEY_DIGEST_CHARS and _slug_key_digest, all by identity.
  • The four behaviours the moved text promises (under-bound unchanged, degenerate → untitled, long truncated AND keyed, never over the bound).
  • The surface defines no function or class of its own and __all__ == ["bootstrap_sessions"] — the "named re-export, not a facade" claim its header makes.
  • A negative control feeding a restored edge in all five spellings back through the SAME scanner, not a copy of it.

The scanner is local rather than tests/import_scan.py's because that module deliberately SKIPS relative imports — it polices a direction between top-level packages, where a relative import cannot reach, while from .workbench import slug is precisely the edge B-1 removed.

tests/doc-health/test_import_direction.py gains test_the_neutral_path_slug_imports_neither_package, a sibling of the guard's own neutrality test rather than a widening of it: the guard's neutrality is D2's claim about the write path, path_slug's is OQ-B's about a filename component; they can be lost independently and one looped assertion would report only the first.

python3 -m pytest -q tests/ideation-dashboard tests/notebooklm tests/doc-health at this head: 1 failed, 6998 passed, 31 skipped, 40 subtests passed in 18:52.

The one failure is the environmental one: tests/ideation-dashboard/test_snapshot.py::test_find_validator_locates_pinned_checkout asserts that a sibling openxFactory/ checkout is reachable by walking up from the repo root, which is false in any worktree that does not sit inside an aggregation checkout. Reproduced on a clean origin/main 46059b77 worktree (1 failed in 2.97s) — not this change. Nothing else fails, and no test was skipped that was not skipped on main.

The three files I touched or added tests for, run alone: tests/ideation-dashboard/test_oqb_replumb.py + tests/doc-health/test_import_direction.py + tests/ideation-dashboard/test_gate_failure_diagnostics.py — 20 passed.

The whole suite is well over the 15-minute bar (these three trees alone take 19 minutes), so the rest rides CI.

python3 scripts/proposal-support.py . verify → proposal support verification ok (exit 0).

doc-health parity: IDENTICAL. python3 scripts/doc-health.py --single-repo . at base 46059b77 and at this head both report 92 findings — 10 critical / 9 error / 57 warning / 16 info — and the two reports are byte-identical once the worktree directory name (which appears in every repo= field) is masked. Family-by-family counts diff clean too. No finding added, removed, or reclassified.

Verifier round 1

Brett Heap's independent verification of 03bc0fb7 (PASS WITH NOTES) drove this round: the test strengthened above (Copilot round 2's suppressed comment on :126-128 — is on the three interned constants is not evidence of a re-export; fixed with a source-level AST assertion that workbench.py binds none of the five slug-family names itself, proved non-vacuous against a scratch redefinition), plus the openxdox_surface.py:43→42 citation fix and the two importer rows above. Three further notes are not this PR's to fix and are recorded here for later PRs rather than left to drift:

  • lens_submission.py:36-38's docstring is now FALSE — it says human_seen.py:46 still reaches workbench.slug the same way and files the edge under OQ-B as unruled; B-1 removed that reach and OQ-B is ruled. The file is Split lens: add_as_cluster and its human_seen reach into lens_submission.py (pre-carve S-2, § 3.1) #836's, off-limits here; the correction goes with B-2's own citation refresh, whose PR is already in flight.
  • human_seen.py:45 → boundary, and the two other boundary-shim reaches (dashboard_refresh_lane.py:121, nightly_lane.py:88), are stays → oD edges outside OQ-B's ruled set. They are disclosed above (§ "The six stays → oD edges that remain") and await Brett's ruling rather than a contortion here.
  • Carve bookkeeping the memo inherits, not a defect in this PR: openxdox_surface.py is created here and will LEAVE at the carve, so it needs a moved row to openXdox-code; path_slug.py needs its not_moved / replicated_at_destination row. Memo § 2.2's module table and totals are stale by two modules until that housekeeping lands.

NOT DONE

  • B-2 (serve_openxfactory_lanes.py:52, four serve_wire names) — a later PR appending to this same neutral module. Re-home serve_wire.hosted_index into serve_projection.py (pre-carve S-3, § 3.1) #835 has landed, so it is unblocked, but it is deliberately not folded in here: it is the second half of the ruled item and the brief scopes this PR to B-1 + B-3.
  • tests/notebooklm/ — deferred with the measurement above; wants a ruling, not a contortion.
  • No carve, no docs/opendox-carve-manifest.yaml, no openspec/**, contracts/** or .github/** edit, no owed prose line-citation refresh (that rides B-2 — the single citation refreshed here is inside my own new file, openxdox_surface.py), no behaviour change.
  • The four → boundary edges and the two lens_submission edges are left exactly as main has them.

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

🤖 Generated with Claude Code

https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv

brettheap and others added 6 commits September 9, 2026 07:59
`human_seen.py:46` did `from .workbench import slug` — openxFactory's own
retained engineering adapter (design D3) importing an openDox module, which
RULING OQ-2 forbids after the carve (openDox is pinned ONLY by openXdox) and
§ 5.1 (RULING F) forbids one level up. Brett Heap ruled on #656 (2026-09-09,
"rule all OQs as recommended") that OQ-B's edges are re-plumbed BEFORE the
carve, none filed as an edit class; B-1 is this one.

`slug` is neutral text machinery, so it moves out of both packages to the one
place both already resolve from — beside `scripts/output_boundary.py`, whose
header idiom, neutrality property and parsing test this file copies. At the
carve it is `not_moved` with reason `replicated_at_destination` (RULED
OQ-A/OQ-C): openDox gets a replica rather than a shared module across a
repository boundary with no pin.

The relocated text is BYTE-IDENTICAL (`workbench.py:203-268` at base
`56e69a11`, 66 lines / 3,584 bytes, sha256
ac32a12259437600b56bfedc4d212491b1034def8cd2338789ece052d560662b before and
after): the bound's comment, `MAX_SLUG_CHARS`, `_SLUG_KEY_SEPARATOR`,
`_SLUG_KEY_DIGEST_CHARS`, `_slug_key_digest` and `slug` itself. The three
constants and the digest travel with the function because `slug` reads all
four; leaving them behind would have made the "move" a rewrite.

`workbench.py` RE-EXPORTS all five — the same objects, not copies — so
`workbench.slug`, `workbench.MAX_SLUG_CHARS` and `workbench._SLUG_KEY_SEPARATOR`
keep resolving for every existing reader: `authoring.py:60` and
`gate_console.py:689,700` (openDox and openXdox, which may keep importing it
from there), `gate_routes.py:925,967` via `wb.slug`,
`test_gate_failure_diagnostics.py`, and `web/views/lens-model.js`'s comment,
which names `workbench.MAX_SLUG_CHARS` as the twin
`test_lens.py::test_js_and_python_persistence_constants_agree` locks it against.

No behaviour, signature or public-name change.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
`intent_apply_lane.py:472` rehydrated the live branch sessions with
`branch_session.bootstrap_sessions` — the openxFactory adapter column reaching
into a 5,290-line openDox module (design D3), the second edge RULING OQ-2
cannot tolerate. Ruled by Brett Heap on #656 (2026-09-09): the honest shape is
that openxFactory's lane reaches sessions THROUGH openXdox, which already
imports `branch_session` in its own right (`cli_gate.py:46`, `gate_routes.py:70`,
`doxbench_scope.py:801`).

`openxdox_surface.py` is that reach given a name: an openXdox-column module,
one re-export line plus its reason, no wrapper and no policy.
`surface.bootstrap_sessions is branch_session.bootstrap_sessions`, so the
signature, the behaviour and the object are the module's own. The remaining
edge is `oXd -> oD`, which the carve permits, instead of `stays -> oD`, which
it does not. At the carve this file travels to openXdox-code with the rest of
its column and the lane's import becomes a package-path rewrite — the
`import rewrites` edit class, one line.

No existing module imports the new one at import time (the lane's import is
function-local, as it was before), so `branch_session` is loaded exactly when it
was loaded before. No behaviour, signature or public-name change.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
Two one-line import edits are undone by two one-line edits, and because the
behaviour is identical by construction nothing else in the suite would go red.
The edge is the property, so something has to measure it.

`tests/ideation-dashboard/test_oqb_replumb.py` (new): `human_seen` and
`intent_apply_lane` import NOTHING from `branch_session`, `session_git` or
`workbench` in any of the five spellings the package uses (`from .X import`,
`from . import X`, `from ideation_dashboard.X import`,
`from scripts.ideation_dashboard.X import`, `import ideation_dashboard.X`),
module-level and function-local alike; the lane still DOES import
`openxdox_surface`, so a lane that had simply stopped rehydrating sessions
fails too; `surface.bootstrap_sessions is branch_session.bootstrap_sessions`;
`workbench.slug is human_seen.slug is path_slug.slug` with the two bound
constants and the digest; the four behaviours the moved text promises; and the
surface defines nothing of its own, which is the "named re-export, not a
facade" claim its header makes. The negative control feeds a restored edge back
through the SAME scanner rather than a copy of it.

`tests/doc-health/test_import_direction.py`: a sibling of
`test_the_neutral_guard_imports_neither_package` for the second neutral module.
Separate rather than widened — the guard's neutrality is D2's claim about the
write path, `path_slug`'s is OQ-B's about a filename component; they can be
lost independently, and one looped assertion would report only the first. The
existing three tests are untouched.

The scanner is local rather than `tests/import_scan.py`'s because that module
deliberately SKIPS relative imports: it polices a direction between top-level
packages, where a relative import cannot reach, while `from .workbench import
slug` is exactly the edge B-1 removed.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
Catch-up onto the three landed pre-carve splits (#835 -> 9fa79cf, #836 ->
8914858, #837 -> 352f2d9) so the edge table is measured against the true main.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
Both headers said "the two bound constants" where five names travel: `slug`,
`MAX_SLUG_CHARS`, `_SLUG_KEY_SEPARATOR`, `_SLUG_KEY_DIGEST_CHARS` and
`_slug_key_digest`. Comment text only; no code change.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
`doxbench_scope.py`'s lazy `branch_session` import was `:801` at this branch's
base `56e69a11` and is `:729` on `main` after #837 (`352f2d9b`) moved the five
scope types out. The surface header cites it as evidence that openXdox already
imports `branch_session` in its own right; the citation now names the line the
merged tree has. Comment text only.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
Copilot AI lite review requested due to automatic review settings September 9, 2026 12:33

@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 re-plumbing is mechanically scoped, preserves object identity via re-exports, and is backed by targeted tests; remaining feedback is a minor test brittleness improvement.

Pull request overview

This PR implements the first part of the OQ‑B “pre-carve re-plumb” inside openxFactory, removing two specific openxFactory→openDox import edges ahead of the openDox/openXdox carve while keeping runtime behavior and public names stable via re-exports and a minimal openXdox-facing surface module.

Changes:

  • Introduces a new neutral module scripts/path_slug.py and repoints the stays-column adapter (human_seen.py) to import slug from that neutral home while workbench.py re-exports the same objects for existing openDox/openXdox callers.
  • Adds scripts/ideation_dashboard/openxdox_surface.py as a named re-export of branch_session.bootstrap_sessions and updates intent_apply_lane._live_session_registry to reach sessions through that openXdox surface.
  • Adds targeted tests to assert the removed edges stay removed and to enforce neutrality of the new path_slug module.
File summaries
File Description
tests/ideation-dashboard/test_oqb_replumb.py New AST-based test asserting the two forbidden edges stay removed and that re-exports preserve object identity.
tests/doc-health/test_import_direction.py Extends neutrality assertions to cover the new neutral module scripts/path_slug.py.
scripts/path_slug.py New neutral module containing the relocated “slug family” used by both sides without crossing package seams.
scripts/ideation_dashboard/workbench.py Re-exports slug-family names from path_slug to preserve workbench.* resolution for existing callers.
scripts/ideation_dashboard/openxdox_surface.py New openXdox surface module providing a named re-export of bootstrap_sessions.
scripts/ideation_dashboard/intent_apply_lane.py Replaces direct import of branch_session with an import of bootstrap_sessions via openxdox_surface.
scripts/ideation_dashboard/human_seen.py Repoints slug import to the new neutral module path_slug.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

The negative control's non-vacuity guard required each scanned file to import
at least one SIBLING module. Copilot is right that this couples the guard to an
import this arc is already scheduled to remove: `human_seen.py`'s only
remaining sibling reach is `.boundary`, the 62-line re-export of the already
neutral `scripts/output_boundary.py` that memo § 2.3 files as *already solved*.
Repoint it — an `import rewrites` edit somebody will make — and the file
legitimately imports no sibling at all, while both live assertions go on
proving exactly what they were written to prove. A guard that fails on the very
edit the packet exists to make is a guard that gets deleted.

It now requires each file to parse to at least one import statement of any
kind, which keeps the property the guard exists for (a scan over a missing,
empty or unparseable file cannot pass as a proof of absence) and drops the
coupling. The two forbidden-edge assertions are untouched.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
Copilot AI review requested due to automatic review settings September 9, 2026 12:45

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

One new test uses is for int/string comparisons, which can yield false positives due to interning/caching and weakens the regression guarantee.

Review details

Suppressed comments (1)

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

tests/ideation-dashboard/test_oqb_replumb.py:128

  • These assertions use is for ints/strings. Because small integers and some strings may be cached/interned, is can still pass even if workbench redefines the constants instead of re-exporting them, making the test less reliable (and potentially implementation-dependent). Use value equality for the constants, while keeping is for the function objects where identity matters.
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

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

INDEPENDENT VERIFICATION of head 03bc0fb76582e0155460614f4925264b66adadf7 — PASS WITH NOTES

Not the author. Own worktrees off refs/pull/843/head and off the merge base 46059b77 (plus a third at the head for the revert experiments, so the running suite was never edited under itself). Every number below is my own measurement; the author's scanner was not reused. Shared checkout 6612d323 / 0 staged at start and at end.

# item verdict
1 Scope — 7 files, nothing off-limits, one declared merge PASS
2 B-1 byte identity + the superset judgment PASS
3 B-1 surface, importer table, workbench re-export PASS (2 NOTEs)
4 B-3 surface module and module-choice reasoning PASS
5 Edge scan, my own AST, base vs head PASS
6 tests/notebooklm/ deferral, re-measured PASS (1 NOTE)
7 Tests, revert-detection, Copilot-round-1 fix PASS
8 Parity — proposal-support, doc-health, CLI pin PASS
9 Hygiene — body, trailers, threads, citation refresh PASS, 1 SHOULD-FIX
10 Over-reach PASS

1. Scope — PASS

git diff --name-status 46059b77..HEAD is exactly the seven files the body lists (+459 / −71): human_seen.py, intent_apply_lane.py, openxdox_surface.py (A), workbench.py, scripts/path_slug.py (A), tests/doc-health/test_import_direction.py, tests/ideation-dashboard/test_oqb_replumb.py (A). Empty diff for openspec/**, contracts/**, .github/**, docs/**, and for every one of #835/#836/#837's files (doxbench_scope*.py, lens.py, lens_submission.py, gate_routes.py, serve_wire.py, serve_projection.py, serve.py). docs/opendox-carve-manifest.yaml still does not exist. One merge commit, 728ad156, second parent 46059b77 = merge-base(origin/main, pr-843), so the branch content is main@46059b77 plus those seven files and nothing else. Per-commit --name-status is clean — no stray file in any of the six non-merge commits.

2. B-1 byte identity — PASS

Extracted by SYMBOL boundaries, not by the body's line numbers: parsed each file, found the MAX_SLUG_CHARS assignment, walked back over the contiguous comment block above it, and ended at slug's end_lineno.

  • base 46059b77 workbench.py 203–268 — 66 lines, 3,584 bytes, sha256 ac32a12259437600b56bfedc4d212491b1034def8cd2338789ece052d560662b
  • head path_slug.py 53–118 — 66 lines, 3,584 bytes, same sha256; diff of the two extracts is empty.

The superset decision is right, and minimal. The block defines exactly five names, and slug reads all four others (MAX_SLUG_CHARS, _SLUG_KEY_SEPARATOR, _SLUG_KEY_DIGEST_CHARS, _slug_key_digest); _slug_key_digest reads none of them. So nothing in the moved text is unneeded by slug, and the block's ONLY free name is re — nothing slug needs was left behind. path_slug.py's import list, by AST, is from __future__ import annotations and import re: neutral by construction. The new neutrality test proves it rather than asserting it — I broke it three ways in a scratch worktree (from ideation_dashboard import boundary, import ideation_dashboard.workbench, from doc_health import lines) and each fails test_the_neutral_path_slug_imports_neither_package.

3. B-1 surface — PASS (two NOTEs)

Fresh interpreter, scripts/ on the path: workbench.slug is path_slug.slug is human_seen.slug → True, and MAX_SLUG_CHARS, _SLUG_KEY_SEPARATOR, _SLUG_KEY_DIGEST_CHARS, _slug_key_digest all identical by is. AST of workbench.py at head: it defines NONE of the five names — import only, so the "same objects, not copies" claim is true at the source level.

workbench.py's diff is exactly the 66-line block removed (plus its two blank separators) + the 8-line comment + the 5-name from path_slug import (...). human_seen.py's is exactly one import repointed + 4 comment lines. re survives at :135, :136, :150, :386, :627 — the five sites the body names, no more, no fewer.

Importer sweep (AST over every *.py in the repo for the five names, plus grep for namespace reaches): authoring.py:60 (oD), gate_console.py:689,700 (oXd lazy), gate_routes.py:882/925/967 wb.slug (oXd), human_seen.py:50 (repointed), workbench.py:62 (re-export). Only the stays-column importer moved; the dispositions are correct and the oD/oXd ones are lawful post-carve directions. web/views/lens-model.js:959-960's comment naming workbench.MAX_SLUG_CHARS / _SLUG_KEY_SEPARATOR / _SLUG_KEY_DIGEST_CHARS is still TRUE — all three re-export.

  • NOTE 3a. The importer table is complete for import statements but misses two namespace reaches: tests/ideation-dashboard/test_lens.py:624 (wb.slug) and — the more interesting one — tests/ideation-dashboard/test_gate_failure_diagnostics.py:206, where from ideation_dashboard.workbench import slug lives inside a subprocess SOURCE STRING that a re-export happens to satisfy but no AST scan would ever see. Both still resolve (20 passed, below); worth listing because a string literal is the one reach that would have broken silently.
  • NOTE 3b. Cosmetic ordering inconsistency: workbench.py places the absolute from path_slug import (...) BEFORE the relative imports (isort order), human_seen.py places it AFTER from .boundary import OutputBoundary. There is no pyproject.toml/setup.cfg/.flake8/.isort.cfg in the repo and no lint job in .github/workflows/, so nothing gates on it.

4. B-3 — PASS

openxdox_surface.py parses to [Expr, ImportFrom, ImportFrom, Assign] — docstring, __future__, one from .branch_session import bootstrap_sessions, __all__. No def, no class. __all__ == ["bootstrap_sessions"], and openxdox_surface.bootstrap_sessions is branch_session.bootstrap_sessions → True.

intent_apply_lane.py's diff is confined to _live_session_registry: the function-local import repointed, branch_session_mod.bootstrap_sessions(...) → bootstrap_sessions(...), 5 comment lines. Arguments identical (registry, repository=repository or "", checkout_root=root), report handling untouched. At base branch_session_mod had exactly two occurrences (:472 import, :476 call) and both are gone; branch_session survives in the file only as a word inside the new comment.

Module choice — sound. All three cited modules do import branch_session at head: cli_gate.py:46 (module level), gate_routes.py:70 (module level), doxbench_scope.py:729 (lazy, "keeps this module's import graph flat"). gate_routes.py is 3,552 lines and is #836's file. And design.md uses "assembly root" only as a REPOSITORY-level term throughout (project.yaml, the release cut, the two gitlink pins — D12 / § 5.1); it names no in-tree "surface" concept, so a plainly-named new module does not collide with a ruled word. No import cycle: openxdox_surface, intent_apply_lane, human_seen, workbench and path_slug each import cleanly in a fresh interpreter, and the lane/surface pair imports cleanly in both orders. Column: oXd is what the ruling itself says ("reaches sessions THROUGH openXdox") and it is load-bearing — a stays surface would simply reinstate the stays → oD edge. D3 gives no reason to put it elsewhere.

5. Edge scan — PASS (my own scanner, own column map)

Column map built from D3's three-column assignment + memo § 2.2's per-module table + the three landed splits (doxbench_scope_types oD, doxbench_scope oXd, lens_submission stays, serve_projection oXd) + memo § 4 S-4 (workbench whole to oD). Whole-tree ast.walk, so function-local imports count; five spellings resolved (from .X import, from . import X, from ideation_dashboard.X import / from scripts.ideation_dashboard.X import, import ideation_dashboard.X, and bare imports of the scripts/-level modules).

Every load-bearing row reproduces the body exactly:

pair base 46059b77 head delta
stays → oD 8 6 −2
stays → oXd 15 16 +1
oXd → oD 34 35 +1
oD → oXd 33 33 —
oD → stays 6 6 —
oXd → stays 4 4 —

Removed (exactly the two named): human_seen.py:46 → workbench, intent_apply_lane.py:472 → branch_session. Added (exactly the four named): human_seen.py:50 → path_slug (stays→neutral), workbench.py:62 → path_slug (oD→neutral), intent_apply_lane.py:477 → openxdox_surface (stays→oXd), openxdox_surface.py:42 → branch_session (oXd→oD). No new stays → oD, oD → oXd or oD → stays edge.

One line-citation slip in that list: the body writes openxdox_surface.py:43 for the re-export; the from .branch_session import bootstrap_sessions statement is at :42 (:43 is the blank line, :44 the __all__). Every other cited line I re-checked is exact — human_seen.py:50, workbench.py:62, intent_apply_lane.py:477, gate_routes.py:887, gate_console.py:689/700, authoring.py:60, the removed :46/:472, workbench.py's re sites :135,136,150,386,627, and the path_slug.py:53-118 / workbench.py:203-270 spans.

The six remaining stays → oD are precisely as the body lists: human_seen.py:45, dashboard_refresh_lane.py:121, nightly_lane.py:88 → boundary; serve_openxfactory_lanes.py:52 → serve_wire (B-2); lens_submission.py:51,52 → lens, workbench (pre-existing on main from #836, ruled import rewrites). None was this PR's to fix — with the qualification in NOTE 5b.

  • NOTE 5a (definition, not a defect). My totals are 101 → 103 against the body's 107 → 109. The whole gap is the width of "neutral": I counted only output_boundary and path_slug, the body also counts the other bare scripts/-level modules. I measured those separately — 7 such imports at base, 9 at head (authoring:317 corpus_adapter, boundary:24 output_boundary, cli:65 subcommand_extension, serve:120/serve_gate:44/serve_openxfactory_lanes:49/serve_projection:51 route_extension, + the two new path_slug ones) — and they reconcile the body's neutral rows row for row (oD→neutral 4→5, oXd→neutral 2→2, stays→neutral 1→2). The body's table is correct under its own stated definition; no cross-column row of consequence differs.
  • NOTE 5b. human_seen.py:45 → boundary is a stays → oD edge in a file this PR already edits; one line (from output_boundary import OutputBoundary) would take the count to 5. The body declines it and gives the memo § 2.3 "already solved" reason, and the new test's comment (lines 220–227) is explicitly written to survive that future edit — so the decision is disclosed and coherent. But OQ-B's own preamble reads "every openxFactory→openDox import edge is re-plumbed BEFORE the carve, none is filed as an edit class", and the three boundary edges are exactly an edge filed as an edit class. That tension wants an explicit orchestrator/Brett line, not a memo cross-reference.
  • NOTE 5c. generator.py:70 from . import GENERATOR_VERSION, ...`` imports a package ATTRIBUTE, not a module; my scanner drops it and the body's evidently does too. Counting it would add one oXd → oD at base and at head alike — no delta effect.

6. tests/notebooklm/ deferral — PASS (one NOTE)

My AST re-measurement reproduces the body's table name for name and count for count: test_sync_notebooklm_books.py:47 branch_session 11 names / 30 reaches, :49 workbench 5 / 23, :48 session_git 1 / 1; test_workbench_sweep_wiring.py:52 workbench 5 / 9; test_hermeticity_guard.py:90,91 session_pr + workbench 1 + 1 / 2. Union: 22 distinct names over four openDox modules (branch_session 11, workbench 9, session_git 1, session_pr 1), 65 reaches, every one through import module used as a namespace. workbench._default_runner is indeed private. The find_spec gates are string literals ('ideation_dashboard.branch_session' :44, 'ideation_dashboard.workbench' :49, :87) — not import statements, so no re-export satisfies them. The tree's 8 edges (7 stays → oD, 1 stays → oXd) are identical at base and head: the PR changed nothing there.

The author's brief told it to STOP on a large surface rather than contort, and it did: it measured, stopped, named the decision in the body, and asked for a ruling. The recommendation is sound — the only re-export shape that would serve these files is a wide facade re-publishing 22 names including a private one, which is precisely what openxdox_surface.py's header (and item 4's "not a facade" test) forbids, and it still would not satisfy the find_spec strings. import rewrites at the carve, like lens_submission, is the right class.

  • NOTE 6a. One reach is missing from the names table (though counted in the "8 edges"): test_workbench_sweep_wiring.py:97 from ideation_dashboard.boundary import OutputBoundary — a fifth oD reach and a fourth oD module. It is also the one CHEAP alternative in that tree: a one-line repoint to from output_boundary import OutputBoundary removes a stays → oD edge with no contortion at all. Same boundary class as NOTE 5b, so deferring is defensible, but it belongs in the ruling request rather than unmentioned.

7. Tests — PASS

  • pytest -q tests/ideation-dashboard/test_oqb_replumb.py tests/doc-health/test_import_direction.py → 11 passed in 1.17s.
  • The three touched/tested files together (+ test_gate_failure_diagnostics.py) → 20 passed, matching the body.
  • Revert-detection, proved by experiment in a third worktree at the same head (restored after each, git status clean):
    1. from path_slug import slug → from .workbench import slug in human_seen.py: test_the_adapter_reaches_the_slug_at_its_neutral_home FAILS — 'human_seen.py:50 imports .workbench'. 1 failed, 6 passed.
    2. surface import → from ideation_dashboard import branch_session as branch_session_mod in the lane: test_the_lane_reaches_sessions_only_through_the_openxdox_surface FAILS — 'intent_apply_lane.py:477 imports .branch_session'. 1 failed, 6 passed.
    3. three separate package/doc_health imports injected into path_slug.py: the new neutrality test FAILS each time.
  • Copilot round 1's brittleness objection, both halves checked. The 03bc0fb7 fix is correct: (a) I repointed human_seen.py's .boundary import at output_boundary — the exact edit Copilot said the old guard would have broken on — and all 7 passed; (b) I emptied human_seen.py and the non-vacuity assert still FIRED (parses to no import statement at all). The guard kept the property and dropped the coupling. Not brittle.
  • Environmental failure reproduces at base. On my 46059b77 worktree, test_snapshot.py::test_find_validator_locates_pinned_checkout → 1 failed in 0.68s, find_validator(<worktree>) is None. Not this change.
  • Full tests/ideation-dashboard tests/notebooklm tests/doc-health at this head: 1 failed, 6998 passed, 31 skipped, 40 subtests passed in 19:06 — the body's counts to the test. The one failure is the environmental test_snapshot.py::test_find_validator_locates_pinned_checkout; I ran that file alone at this head (1 failed, 16 passed) and at base 46059b77 (1 failed), same assertion, same cause. tests/notebooklm alone is 251 passed, 40 subtests at BOTH base and head — the deferred tree is byte-for-byte unaffected. test_lens.py (the cross-language slug pin) 25 passed / 1 skipped; test_human_seen.py + test_intent_apply_lane.py 55 passed / 1 skipped.
  • CI at this head: 9 checks SUCCESS (lane-line, openspec-cli-pin, openreposhape-pin, release-tag-gate, wallet-validation, clearing-dispatch-gate, merge-master-approval, signed-execution-chain-gate, copilot-pull-request-reviewer); pytest-suite SUCCESS (run 34352933866, completed 13:12:10Z) — its own summary line reads selected=10635 passed=10614 skipped=21 failures=0 errors=0 against the pinned floors selected>=7090 / passed>=7070 / skipped==21. That exact skipped pin is the independent proof of the body's "no test was skipped that was not skipped on main": eight added tests moved selected/passed up and skipped not at all.

8. Parity — PASS

  • python3 scripts/proposal-support.py . verify → proposal support verification ok, exit 0, at head AND at base.
  • python3 scripts/doc-health.py --single-repo .: 92 findings at both — 10 critical / 9 error / 57 warning / 16 info, and the two reports are byte-identical once the worktree directory name is masked (diff = 0 lines). The new scripts/path_slug.py moved no inventory count.
  • python3 scripts/validate-openspec-cli-pin.py --all --strict: exit 0 at both, output identical after masking (the same 2 accepted exceptions).

9. Hygiene — PASS, with one SHOULD-FIX

Body first line is the Lane line; **Refs #656**; a case-insensitive (close[sd]?|fix(e[sd])?|resolve[sd]?) #N scan of the body finds nothing; GraphQL closingIssuesReferences.totalCount == 0; autoMergeRequest null; no APPROVED review (sourcery-ai COMMENTED — the private-repo upsell stub; copilot COMMENTED ×2; brettheap COMMENTED; reviewDecision REVIEW_REQUIRED). All seven commits, the merge included, carry Lane: openxfactory-4-opendox-extraction, Co-Authored-By: Claude Fable 5.1 <[email protected]> and Claude-Session: …session_0139swz8Tq3FjNveDRR2SNPv verbatim. The one review THREAD is resolved, and the reply is correct on the substance and names the fix commit. The citation refresh checks out: doxbench_scope.py:801 at 56e69a11 and :729 at this head are the same from . import branch_session # lazy: keeps this module's import graph flat line.

SHOULD-FIX — Copilot round 2 carries an unaddressed FACTUAL finding. A second copilot-pull-request-reviewer review landed at 12:48:52Z on this head (🔵 Needs a closer look) and delivered it as a suppressed comment ("previously missed") rather than a thread — so it created no review thread, nothing gates on it, and it has no reply. Its content, which I confirm independently: test_oqb_replumb.py:126-128 asserts workbench.MAX_SLUG_CHARS is path_slug.MAX_SLUG_CHARS, … is …_SLUG_KEY_SEPARATOR, … is …_SLUG_KEY_DIGEST_CHARS on the values 200, "-k" and 16 — all interned — so those three assertions pass EVEN IF workbench.py redefined the constants instead of re-exporting them. They are not evidence of a re-export. The claim they are meant to protect is nevertheless TRUE at this head (AST: workbench.py defines none of the five names), and the two assertions that matter — slug and _slug_key_digest, both function objects — are real identity checks. So: a guard weakness, not a defect. Note that Copilot's proposed remedy (value equality for the constants) is weaker still, since a redefinition would also be value-equal; the sound fix is a source-level assertion that workbench.py carries no own assignment of the family names. Either way, the round wants a reply.

10. Over-reach — PASS

Nothing outside the seven files, in the diff or in any commit: no workflow, no ruleset, no openspec/**, no contracts/**, no carve manifest. No approve, no merge, no auto-merge, no dispatch by the author on this PR.

Two further NOTEs for the orchestrator

  • NOTE A — a docstring this PR falsifies, in a file it may not touch. lens_submission.py:36-38 says "…because human_seen.py:46 already reaches workbench.slug the same way and the scout memo files all of them under § 7 OQ-B, unruled." At this head human_seen.py:46 reaches nothing of the kind (B-1 removed it) and OQ-B is RULED. The file is Split lens: add_as_cluster and its human_seen reach into lens_submission.py (pre-carve S-2, § 3.1) #836's and off-limits here, so leaving it is right — but the body does not name it, and B-2 already carries a prose line-citation obligation that this belongs with.
  • NOTE B — bookkeeping the carve inherits. openxdox_surface.py is created in openxFactory and will LEAVE to openXdox-code, so it needs a moved row (dest oXd) even though OQ-C says a file created at a destination gets none; path_slug.py needs its not_moved / replicated_at_destination row. Memo § 2.2's module table and totals are now stale by two modules. Nothing in-repo breaks on that: no test outside the two new files names either module, the packet's tasks.md has no OQ-B item owed a tick, and the CI test-count floor is a lower bound on selected/passed with an exact skipped==21 — all three satisfied. Orchestrator bookkeeping, not a defect here.
  • NOTE C. main has advanced to 245ee85a (Archive add-openspec-cli-pin on met realization evidence: the fleet OpenSpec-CLI pin reaches canon in neutral-product-pin #841) since this branch's merge-from-main; the PR is still MERGEABLE and every measurement above is against the merge base 46059b77, so it holds — but this head has not been measured against current main.

Shared checkout

Start: 6612d323, git diff --cached --name-only | wc -l = 0. End: 6612d323, staged = 0. Both verifier worktrees and the revert worktree removed.

brettheap added a commit that referenced this pull request Sep 9, 2026
The module's "WHAT STAYED BEHIND" paragraph made two claims that are no longer
true. It said the scout memo "files all of them under § 7 OQ-B, unruled" —
OQ-B was RULED by Brett Heap on 2026-09-09 (`#656`, "rule all OQs as
recommended") — and it justified leaving this module's two `stays -> openDox`
reaches alone on the grounds that `human_seen.py:46` "already reaches
`workbench.slug` the same way", which stops being the reason the moment B-1
lands: `human_seen` reads `slug` from the neutral `scripts/path_slug.py`
(PR #843), so the sibling reach this paragraph leaned on is being re-plumbed
while these two are not.

The reworded paragraph states the ruling's actual disposition for THIS module:
`add_as_cluster` is adapter->core by construction, so the carve reaches it
THROUGH openXdox as an `import rewrites` edit and it is kept in-tree until then
— the verifier's recommendation on #836, which the ruling adopted. It then names
where the two re-plumbed siblings went (B-1 = `slug` to `path_slug.py`, PR #843;
B-2 = the four `serve_wire` names) so the next reader is not sent back to a
memo's open-question list for an answer that exists.

DOCSTRING ONLY. No import, no name, no signature, no behaviour. The paragraph
grows by six lines, which moves this module's two `stays -> openDox` import
statements from `:51-52` to `:57-58`; nothing in the tree cites those line
numbers (grepped: zero `lens_submission.py:<n>` citations), so the growth stales
no citation. The RULING comment on #656 cites `:51-52` and, as a record of what
was measured when it was written, is left as it stands.

Refs #656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ported, not redefined, by source

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

Copy link
Copy Markdown
Contributor Author

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

Fix round taken from the independent verifier's SHOULD-FIX and Copilot round 2's suppressed comment on test_oqb_replumb.py:126-128 (is on interned constants is not evidence of a re-export).

Test fix — 5b624b02. test_oqb_replumb.py gains test_workbench_source_re_exports_the_slug_family_rather_than_redefining_it: parses workbench.py's own source and asserts none of the five slug-family names (MAX_SLUG_CHARS, _SLUG_KEY_SEPARATOR, _SLUG_KEY_DIGEST_CHARS, _slug_key_digest, slug) is bound there by Assign/AnnAssign/FunctionDef/ClassDef — only by the from path_slug import (...). Proved non-vacuous against a scratch copy of the source (never the real file): appending MAX_SLUG_CHARS = 200 makes the same check catch exactly {"MAX_SLUG_CHARS"}. The two function-identity checks (slug, _slug_key_digest) are untouched — real evidence, since functions are never interned. Checked openxdox_surface.py's existing "defines nothing of its own" test too: it already proves that claim by AST (no FunctionDef/AsyncFunctionDef/ClassDef), so left as is. python3 -m pytest -q tests/ideation-dashboard/test_oqb_replumb.py tests/doc-health/test_import_direction.py → 12 passed (was 11).

Body corrections (gh pr edit --body-file):

  • openxdox_surface.py:43 → :42 for the branch_session re-export line.
  • Importer table: added tests/ideation-dashboard/test_lens.py:624 (wb.slug(...)) and tests/ideation-dashboard/test_gate_failure_diagnostics.py:209 (a subprocess SOURCE-STRING from ideation_dashboard.workbench import slug), both dispositioned "left on workbench.slug (test / oD-side string)".
  • New "Verifier round 1" section recording the verifier's three deferred notes for later PRs: lens_submission.py:36-38's now-false docstring (rides B-2's citation refresh), the three → boundary edges awaiting Brett's ruling, and the carve-bookkeeping rows owed for openxdox_surface.py / path_slug.py.

No thread exists for Copilot round 2's finding (it landed as a suppressed "previously missed" comment, not a review thread) — this comment and the body's new section are the record.

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 re-plumbing is narrowly scoped, preserves compatibility via re-exports, and adds targeted tests that enforce the key “no forbidden edges” properties.

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

brettheap added a commit that referenced this pull request Sep 9, 2026
…slug

Copilot's one review comment on PR #852, and it is right: the header called
this "the third neutral module" and cited `path_slug.py` beside
`output_boundary.py` as the first two, but `path_slug.py` is OQ-B B-1's file
and is in flight on PR #843 — it is not in this tree, so on this branch the
sentence was false, and a reader who lands here before #843 does would be
looking for a file that is not there.

The claim was disclosed on the PR body as a forward reference true on the
intended landing order. Copilot's objection is better: a module docstring
should be true of the tree it ships in, whatever the merge order turns out to
be. It now names `output_boundary.py` as the one neutral module in this tree
and records `path_slug.py` as B-1's, in flight on #843, explicitly NOT here
and not depended on either way — which stays true whether #843 lands before
this or after it.

Docstring only. No code, no assertion, no import changed; the module's import
list is still exactly `["__future__"]`, and the guard suite is 13 passed
before and after.

Refs #656

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

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 mechanical and well-guarded by new/extended AST-based tests that directly assert the intended import-edge removals and re-export identity invariants.

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit c6ae684 into main Sep 9, 2026
10 checks passed
brettheap added a commit that referenced this pull request Sep 9, 2026
…S-1/S-3, and true-up lens_submission's docstring after B-1; B-2's relocation measured and held for a ruling (split-opendox § 3.1) (#848)

The owed line-citation refresh after the § 3.1 pre-carve splits, sequenced before the carve manifest because every manifest row carries a sha256 — on Brett Heap's word "merge 848 when green" (2026-09-09). Prose only; every changed file's AST (docstrings stripped) is identical to main.

- Eight citation numbers across four files (`scripts/ideation_dashboard/serve_wire.py`, `tests/ideation-dashboard/test_doxbench_abstract_route.py`, `test_doxbench_scope.py`, `test_doxbench_turns.py`) refreshed to the symbols' locations after S-1 (#837, −71 lines in `doxbench_scope.py`) and S-3 (#835); one historical S-3 citation and three archived-change hits correctly left; the `staging-workbench-model.js` citation family is out of scope.
- `lens_submission.py:36-38`'s docstring trued up after OQ-B B-1 (#843: `human_seen` reads `slug` from the neutral `scripts/path_slug.py`).
- B-2's relocation was measured and HELD for a ruling, not performed: `hosted_ref_refused` reaches `snapshot_registry` (openXdox) and cannot be neutral; the recommended home (i′) is `serve_projection.py` beside `hosted_index`, which keeps the serve-surface location pin green with no test edits (verified). The three string constants take the neutral module when B-2 is ruled.
- Independent verification PASS WITH NOTES (8/8 citations exact by three instruments); body corrections taken.

Landed after the estate freeze lifted (required `pytest-suite` red on every openxFactory PR since the codexFactory org transfer until #801 repointed the pinned-core token); the advisory `merge-master-approval` red of the same cause is disclosed, not a finding against this change.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 9, 2026
… of this tree

The previous commit fixed Copilot's finding by saying `path_slug.py` "is NOT
in this tree". True at that head — and false again the moment #843 lands and
this branch takes a merge from `main`, which is now imminent. A docstring
should not have a correct-only-this-week reading, so the sentence no longer
asserts the file's presence or absence at all: it records `path_slug.py` as
OQ-B B-1's, on sibling PR #843, and states the property that actually matters
— this module neither imports it nor depends on whether it has landed.

Docstring only, again. No code, no assertion, no import; the import list is
still exactly `["__future__"]`.

Refs #656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
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