Skip to content

Split lens: add_as_cluster and its human_seen reach into lens_submission.py (pre-carve S-2, § 3.1) - #836

Merged
brettheap merged 4 commits into
mainfrom
change/opendox-split-s2-lens-submission
Sep 9, 2026
Merged

brettheap merged 4 commits into
mainfrom
change/opendox-split-s2-lens-submission

Conversation

@brettheap

@brettheap brettheap commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Refs #656 — pre-carve split S-2 of three (scout memo § 4; the § 3.1 carve
manifest files every path with ONE disposition, so a file whose halves belong to
two columns cannot be filed). Mechanical relocation inside openxFactory: no
behaviour change, no renamed symbol, no changed signature.
Base
56e69a11c59d473da23eab455cb9848dc083fac3.

What DOES change is the import PATH of the two moved names, and that is the
point of the split, not a side effect.
lens.add_as_cluster and
lens.AddAsClusterResult no longer resolve, and neither does the unread
HumanSeenSubmission / SubmissionRefused re-export that sat at lens.py:58;
all of them are lens_submission.* now, and both in-tree callers are repointed
below. A compatibility re-export is exactly what this split cannot have — it
would re-import human_seen into lens.py and put the removed edge straight
back, which is why test_lens_column_split.py asserts the absence. Nothing
outside this repository imports scripts/ideation_dashboard/, and no changelog
or release note names the moved symbols (checked: contracts/CHANGELOG.md is
the contract-release record and names neither); the § 3.1 carve manifest is
what will record the move, and it is authored later by design.

What moved

AddAsClusterResult + add_as_cluster and the human_seen import they use, out
of lens.py (column oD, design D3: "the keyword-query half of lens … PULL
UP"
) into a new scripts/ideation_dashboard/lens_submission.py (column stays
= openxFactory's own engineering adapter, D3's third column under RULING DQ-1 —
the same column as human_seen.py).

at base after
moved block lens.py:228-282 — 55 lines, 3,014 bytes lens_submission.py:55-109 — 55 lines, 3,014 bytes
sha256 of the moved text 7c12c6df73b437e1d84bbd36d66c3fe847916de5207d5b78fa28394a7acc4223 7c12c6df73b437e1d84bbd36d66c3fe847916de5207d5b78fa28394a7acc4223
lens.py 282 lines / 14,496 bytes 230 lines / 11,838 bytes
lens_submission.py — 109 lines / 5,879 bytes (54-line header + imports, then the block)

cmp on the two extracts is clean: the relocated text is byte-identical, not
merely equivalent. The memo measured this block at :229-282 on d758a6df; the
@dataclass decorator on :228 is part of the same statement and travels with
it, which is the only drift against the memo's numbers.

Every line that is NOT the relocation

Eight changes, all of them consequences of the move; nothing else in the tree was
renamed, reordered or reformatted.

  1. lens.py:54 — from pathlib import Path DELETED. Path had no remaining
    reader in lens.py (its four uses were all inside the moved block).

  2. lens.py:57 — from . import human_seen, workbench as wb → from . import workbench as wb. This is the removed edge.

  3. lens.py:58 — from .human_seen import HumanSeenSubmission, SubmissionRefused # noqa: F401 (re-export) DELETED, and moved verbatim to
    lens_submission.py:50. The re-export had no in-tree reader (scanned:
    every consumer imports both names from human_seen directly, as hs), so no
    caller is affected — but leaving it would have kept human_seen on lens's
    import graph, which is the whole edge.

  4. lens.py:59-62 — ACTION_ADD_AS_CLUSTER, OutputBoundary and save
    dropped from the from .workbench import (…) block; the remaining six names
    keep their order and the block keeps its shape. All three had no reader left
    in lens.py.

  5. lens.py:48 — five lines APPENDED to the add-as-cluster paragraph of the
    module docstring (an addition, not a rewrite — the RECIPE SEMANTICS list is
    otherwise untouched), in the spirit of serve_wire.py:37-39's own recorded
    obligation:

    rewriting the generated index. The Python half of this verb / now lives in lens_submission.py(pre-carve split S-2): / submitting into openxFactory's cross-reference queue is / adapter-column work, so this module states the semantics and / no longer importshuman_seen.

  6. Two stale prose references in the browser half, one word each — they named
    a Python symbol that no longer resolves:

    • web/views/lens.js:152 the tested engine lens.add_as_cluster submits it)
      → …lens_submission.add_as_cluster submits it)
    • web/views/lens-model.js:1024 lens.add_as_cluster submits it via human_seen.py → lens_submission.add_as_cluster submits it via human_seen.py (the sentence rewraps onto the next comment line; no other
      word changed)

    lens-model.js:951 ("MUST be byte-identical to lens.PENDING_PROPOSAL_NOTE")
    is still true and untouched — see below.

  7. lens.py:64-75 — the PENDING_PROPOSAL_NOTE comment block rewritten
    (Copilot round 1, 67eabd32): it still opened "add_as_cluster SUBMITS …" as
    though the verb lived in this module. Now names
    lens_submission.add_as_cluster, records that the verb left with pre-carve
    split S-2, and states why the NOTE itself did not follow it (its
    byte-identity cross-check is against this module's own browser half,
    web/views/lens-model.js, so both halves of that pair stay in the openDox
    column). Prose only — no import, no behaviour, no name.

  8. lens.py:213 — one word in the build_workbench_from_recipe docstring
    (fix round 1): "the caller persists it via save/add_as_cluster" →
    "…save/lens_submission.add_as_cluster" — add_as_cluster no longer
    resolves in this module, the same class of stale reference already fixed in
    lens.js:152 and lens-model.js:1024.

Deliberately NOT changed: from . import workbench as wb in lens.py is now
a lone unused alias. It was already unused before this PR (introduced by
82ae3d8c, 2026-08-03; no lens.wb reader and no setattr(lens, "wb", …)
anywhere in the tree), so removing it would be unrelated cleanup rather than part
of the relocation, and it is left exactly as it was.

Repointed callers — the repoint IS the split

No re-export back into lens.py. The obvious kindness (from .lens_submission import add_as_cluster) would re-import human_seen into lens.py transitively
and put the edge straight back, with every behavioural test still green. So both
in-tree callers were repointed instead:

  • gate_routes.py:950 — from . import lens, workbench as wb → from . import lens, lens_submission, workbench as wb; :960 lens.add_as_cluster( →
    lens_submission.add_as_cluster(. gate_routes keeps importing lens because
    the same function still calls lens.build_workbench_from_recipe (oD).
  • tests/ideation-dashboard/test_lens.py — one import line added, four call
    sites repointed (:489, :533, :550, :562). Repointed rather than moved to a
    new test module
    (the brief's preference, and the smaller diff): the four
    add-as-cluster tests sit inside a file whose fixtures, _snapshot(),
    _submission() and node harness the rest of the file shares.

AddAsClusterResult had no reader outside lens.py at all. test_human_seen.py
imports lens only for build_workbench_from_recipe, which stayed — untouched.

Cross-column import edges, BEFORE and AFTER

AST scan over all 60 modules in scripts/ideation_dashboard/, columns from the
scout memo § 2.2 table (which supersedes design.md D3's 48-row list for the twelve
§ 2.4 modules); core = D3's four "residue that splits BY FUNCTION" modules
(serve, cli, workbench, authoring); lens_submission is tagged stays.
Counts are per import STATEMENT, so they do not line up with the memo's
per-module-pair figures — the delta is what this table is for.

edge BEFORE AFTER
oD → oxF 3 1 −2 — the split's whole point
oxF → oD 1 2 +1
oXd → oxF 2 3 +1
oxF → core 1 2 +1
oD → oXd 8 8 —
oXd → oD 12 12 —
oxF → oXd 4 4 —
core → oD / oXd / oxF 5 / 2 / 1 5 / 2 / 1 —
oD → core / oXd → core 6 / 12 6 / 12 —
total 57 58

Removed (both of them, and they were the only two):

  • lens.py:57 from . import human_seen
  • lens.py:58 from .human_seen import HumanSeenSubmission, SubmissionRefused

The surviving oD → oxF edge under this PR's own relative-import-plus-import ideation_dashboard.X scan is doxbench_packet.py:177 import ideation_dashboard.doxbench_status_exemption as rail (transcribed as it
actually reads; the known § 2.4 item (a) seam, not mine) — but it is not the
only one: an independent verifier's full-spelling scan (adding from ideation_dashboard import X / from ideation_dashboard.X import …) finds two
further pre-existing edges this PR's scanner spelling misses —
serve_wire.py:1333 → doxbench_contracts (a second oD → oxF edge, and the
S-3 lane's own file) and cli_gate.py:49 (an oXd → oxF edge). Both are
pre-existing, neither is touched by this PR, and neither changes any delta
above; the scanner-spelling gap itself is carried to the manifest author.
lens.py now imports nothing from human_seen in any spelling.

Added, and recorded as residuals for the manifest author rather than solved
here
(all three are the same OQ-B shape as human_seen.py:46's existing
from .workbench import slug, which the memo files as unruled):

  • lens_submission.py:52 from .workbench import ACTION_ADD_AS_CLUSTER, OutputBoundary, Workbench, save — unavoidable: add_as_cluster persists
    through the engine, and memo § 4 S-4 sends workbench.py whole to openDox.
  • lens_submission.py:51 from .lens import PENDING_PROPOSAL_NOTE — deliberate,
    and the reason is a landed cross-check.
    The constant carries a byte-identity
    contract with web/views/lens-model.js's constant of the same name, asserted by
    test_js_and_python_persistence_constants_agree. Both halves of that pair are
    the openDox lens, so leaving the constant in lens.py keeps the cross-check
    inside one column after the carve; moving it would have split a
    cross-checked pair across a repository boundary. One import edge is the cheaper
    of the two prices, and it is declared rather than hidden.
  • gate_routes.py:950 from . import lens_submission — openXdox's gate loop
    reaching the adapter verb, which is what the verb now is.

Net total +1: the block's dependencies (workbench, PENDING_PROPOSAL_NOTE) now
cross the boundary from the other side. That is inherent to the S-2 design as
specified, not a choice made here; the direction that mattered — openDox
reaching openxFactory — is gone.

Tests

  • python3 -m pytest -q tests/ideation-dashboard — 5,096 passed, 31 skipped,
    1 failed in 663s
    . The one failure is
    test_snapshot.py::test_find_validator_locates_pinned_checkout, and it is
    pre-existing and environmental, not this change: it asserts that a
    sibling openxFactory checkout is reachable from the repo root, and this
    work was done in a git worktree under /tmp that has no such sibling.
    Proven rather than asserted — a clean origin/main worktree at
    56e69a11, in the same directory, fails the same single test with the same
    assert None is not None. It passes on CI, where the checkout is a
    submodule of the aggregation.
  • Whole suite (python3 -m pytest -q -p no:cacheprovider tests/): not a
    usable local signal, and that is stated rather than papered over.
    This work
    was done in a git worktree, where the openXwallet submodule is not
    checked out; the pytest-suite workflow does git submodule update --init openXwallet and puts the pinned openspec CLI on PATH before it runs, and
    without that setup the local run takes 50 collection ERRORS in one band at
    6-7%, none of them near this change. It was stopped rather than reported as
    if it meant something. The pytest-suite check on this PR is the
    authority
    — it runs pytest tests/ on a clean checkout with that setup, and
    it is GREEN on head 67eabd32 (run 34328587320), together with the other
    nine checks: lane-line, clearing-dispatch-gate, merge-master-approval,
    openreposhape-pin, openspec-cli-pin, release-tag-gate,
    signed-execution-chain-gate, wallet-validation and
    copilot-pull-request-reviewer — all success.
  • New: tests/ideation-dashboard/test_lens_column_split.py (114 lines, 3 tests),
    named after test_cli_column_split.py, the § 2.4 split's own precedent. It
    holds the removed edge: an AST scan (PARSED, NOT GREPPED — lens.py's docstring
    and its PENDING_PROPOSAL_NOTE comment both still NAME human_seen.py in
    prose and must keep doing so) over lens.py for every spelling of the edge
    including lazy function-local imports; a negative control measuring the same
    input
    that asserts the scanner catches all six spellings of a restoration;
    and an assertion that add_as_cluster is NOT re-exported from lens.
    tests/import_scan.py's imported_modules skips relative imports by design
    (it polices a direction BETWEEN packages), which is why the scan is local.
  • Every existing test passes unchanged in behaviour; the only test edit in
    this PR is the four-call-site repoint above.

Doc-health and proposal-support parity

  • python3 scripts/doc-health.py --single-repo . — 10 critical, 9 error, 57
    warning, 16 info
    ; canon share 39.3%. Identical to a clean base worktree at
    56e69a11: the two reports diff to zero lines after normalising the
    worktree-derived Repo-Identity.
  • python3 scripts/proposal-support.py . verify — proposal support verification ok (exit 0).

NOT DONE

No carve. No docs/opendox-carve-manifest.yaml (it does not exist and was not
created). No openspec/**, contracts/** or .github/** edit — D3's column
table and the ratified packet are untouched, and the manifest author re-measures
later. No behaviour change, no renamed or re-signed public name. The three
OQ-B edges are untouched
: human_seen.py:46 from .workbench import slug,
intent_apply_lane.py branch_session.bootstrap_sessions, and
serve_openxfactory_lanes.py's four serve_wire names — all unruled. Splits S-1
(doxbench_scope) and S-3 (serve_wire.hosted_index) belong to sibling PRs;
doxbench_scope.py and serve_wire.py are not touched here.

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

🤖 Generated with Claude Code

https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu

brettheap and others added 2 commits September 9, 2026 04:07
…ion.py (pre-carve S-2, § 3.1)

`AddAsClusterResult` and `add_as_cluster` move out of `lens.py` UNCHANGED, byte
for byte (lens.py:228-282 at 56e69a1 -> lens_submission.py:55-109, 3,014 bytes,
sha256 7c12c6df73b437e1d84bbd36d66c3fe847916de5207d5b78fa28394a7acc4223), with
the `human_seen` import they use. `lens.py` is openDox (design D3: "the
keyword-query half of `lens` ... PULL UP"); submitting a human-seen cluster
proposal into openxFactory's cross-reference queue is adapter-column work, and
the scout memo measured `lens -> human_seen` as the single openDox ->
openxFactory import edge in the whole package. It is now gone.

No re-export back into `lens.py`, deliberately: that would re-import
`human_seen` transitively and put the edge back with every test still green. The
two in-tree callers are repointed instead —
`gate_routes.execute_lens_add_as_cluster` (which keeps importing `lens` for
`build_workbench_from_recipe`) and four call sites in `test_lens.py`. The
re-export at lens.py:58 had no in-tree reader at all.

Consequential edits, all of them: `Path`, `ACTION_ADD_AS_CLUSTER`,
`OutputBoundary` and `save` dropped from `lens.py`'s imports (no reader left);
five lines appended to the docstring's add-as-cluster paragraph naming where the
verb went; two one-word prose fixes in the browser half, which named a Python
symbol that no longer resolves. `PENDING_PROPOSAL_NOTE` stays in `lens.py` and
is imported back, so its byte-identity cross-check against
`web/views/lens-model.js` stays inside one column after the carve.

Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
…arve S-2)

The only point of split S-2 is a removed import DIRECTION, so a test holds it
rather than a note. Named after `test_cli_column_split.py`, the § 2.4 split's
own precedent, and small: three tests.

PARSED, NOT GREPPED, and the difference is load-bearing here exactly as it is in
`tests/doc-health/test_import_direction.py`: `lens.py`'s docstring and its
`PENDING_PROPOSAL_NOTE` comment both still NAME `human_seen.py` in prose, and
must keep doing so — they document where the submission path went. A substring
grep would call both violations, and the pressure to make it green would be
pressure to delete true documentation. The scan is local rather than
`tests/import_scan.py`'s because `imported_modules` skips relative imports by
design: it polices a direction BETWEEN packages, and this one is inside one.

Three assertions: no import of `human_seen` from `lens.py` in any spelling,
lazy function-local ones included; a negative control over the SAME input,
asserting the scanner recognises all six spellings of a restoration rather than
passing vacuously; and that `add_as_cluster` is not re-exported from `lens` —
the failure mode this file exists for, because a convenience re-export puts the
edge back transitively with every behavioural test still green.

Refs #656.

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

@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 change is a mechanical relocation with repointed call sites and a dedicated regression test, and only a minor documentation-comment tweak remains.

Pull request overview

This PR performs the pre-carve S-2 “lens split” by relocating the add-as-cluster submission verb (and its human_seen reach) out of lens.py into a new lens_submission.py, and repointing in-tree callers so lens.py no longer imports human_seen.

Changes:

  • Move AddAsClusterResult and add_as_cluster (byte-identical) from lens.py to lens_submission.py, removing lens.py → human_seen import edges.
  • Repoint the Python caller (gate_routes.py) and the add-as-cluster tests to call lens_submission.add_as_cluster.
  • Update browser-side prose comments to reference lens_submission.add_as_cluster, and add a dedicated test preventing the edge/regression.
File summaries
File Description
tests/ideation-dashboard/test_lens.py Repoint add-as-cluster tests to call lens_submission.add_as_cluster.
tests/ideation-dashboard/test_lens_column_split.py Add AST-based import scan guarding against lens.py importing human_seen and against re-exporting add-as-cluster from lens.
scripts/ideation_dashboard/web/views/lens.js Update comment reference from lens.add_as_cluster to lens_submission.add_as_cluster.
scripts/ideation_dashboard/web/views/lens-model.js Update comment reference from lens.add_as_cluster to lens_submission.add_as_cluster.
scripts/ideation_dashboard/lens.py Remove human_seen imports and delete the moved add-as-cluster block; document the relocation in the module docstring.
scripts/ideation_dashboard/lens_submission.py New module containing the relocated add-as-cluster implementation and its human_seen dependency.
scripts/ideation_dashboard/gate_routes.py Repoint the gate route implementation to call lens_submission.add_as_cluster.
Review details

Suppressed comments (1)

scripts/ideation_dashboard/lens.py:70

  • The comment above PENDING_PROPOSAL_NOTE still describes add_as_cluster as if it lives in this module, but the verb was moved to lens_submission.py. This can mislead future readers about where the submission behavior is implemented.
# add_as_cluster SUBMITS the human-seen cluster proposal into the cross-reference
# recommendation queue (change 3.5 / T028). The T028 blocker cleared 2026-07-14
# when add-ideation-cross-reference-readiness realized the pending_review intake
# contract in ideation-cross-reference.schema.yaml; the submission path lives in
# human_seen.py (build -> refuse-if-incomplete -> write -> validate against the
  • Files reviewed: 7/7 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.

…ilot round 1)

The docstring was updated by the split commit; this comment block was not, and
it still opened "add_as_cluster SUBMITS ..." as though the verb lived in this
module. Copilot's one finding on #836, and a fair one. The block now names
`lens_submission.add_as_cluster`, records that the verb left with pre-carve
split S-2, and says why the NOTE did not follow it: its byte-identity
cross-check is against this module's own browser half
(`web/views/lens-model.js`), so both halves of that pair stay in the openDox
column. Prose only — no import, no behaviour, no name.

Refs #656.

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

Copy link
Copy Markdown
Contributor Author

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

Copilot round 1 — taken. The review recommended approval with 0 posted
threads
and one suppressed comment, so there is no thread to answer on; the
finding is answered here instead, because it was factual and correct.

The finding (scripts/ideation_dashboard/lens.py:70): the comment block above
PENDING_PROPOSAL_NOTE still opened "add_as_cluster SUBMITS the human-seen
cluster proposal…"
, as though the verb still lived in this module. The module
docstring was updated by the split commit; this block was not.

Fixed in 67eabd32. Prose only — no import, no behaviour, no name changed.
The block now names lens_submission.add_as_cluster, records that the verb left
with pre-carve split S-2, and states why the NOTE did not follow it: its
byte-identity cross-check is against this module's own browser half
(web/views/lens-model.js's constant of the same name, asserted by
test_js_and_python_persistence_constants_agree), so both halves of that pair
stay in the openDox column. test_lens.py + test_lens_column_split.py: 28
passed, 1 skipped.

The import-direction test is unaffected by design — it is PARSED, not GREPPED,
precisely so that lens.py stays free to keep NAMING human_seen.py in prose
while importing nothing from it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PR description asserts “no public-name change,” but the diff removes the lens.add_as_cluster module-level surface (callers must now use lens_submission), so the stated contract should be corrected/clarified before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

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

Comment thread scripts/ideation_dashboard/lens.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
INDEPENDENT VERIFICATION of head 67eabd326fcd87da5436e9e6bc048287ee81cd8e — PASS WITH NOTES

Adversarial re-measurement by a verifier who did not author this PR, against the
S-2 section of the shared brief and the § 3.1 scout memo (§ 2.2 / § 2.3 / § 4 / § 7).
Base compared against origin/main 56e69a11c59d473da23eab455cb9848dc083fac3
(the branch's merge-base and main's tip; git log --merges origin/main..HEAD empty
— a strict fast-forward, no catch-up merge). Every number below is my own; the edge
scan is my own script, not the author's.

Nothing in the relocation is wrong. The block is byte-identical, the removed
edge is really removed, the guard test really fails at base, doc-health is
bit-identical, and the OQ-B trio is untouched. The notes are body-accuracy and
guard-completeness items, plus one judgment call (PENDING_PROPOSAL_NOTE) that is
Brett's to rule, not a defect.

The twelve items

# item verdict
1 Scope + branch shape PASS (note: two comment-only .js files, named in the body)
2 Byte-identical relocation PASS — sha256 match, cmp clean
3 Nothing else moved PASS (2 body-accuracy NOTES)
4 Public surface / no stale importer PASS (1 cosmetic NOTE)
5 The edge claim PASS — deltas reproduce exactly (1 NOTE on the absolutes)
6 OQ-B untouched PASS — diff is 0 lines
7 Circularity PASS — clean in both import orders
8 Tests PASS (1 guard-completeness NOTE)
9 Parity (doc-health / proposal-support / cli-pin) PASS — 0-line diff
10 Hygiene PASS
11 Copilot round PASS — 2 rounds, both factual, both taken
12 Over-reach PASS — nothing outside the stated surface

2 — the relocation, re-measured by symbol (item (b) of the tasking)

Located by symbol, not by the memo's line numbers. In base lens.py the block runs
from the @dataclass decorator at :228 (the memo said :229-282; the decorator
is part of the same statement) to EOF at :282.

base   lens.py:228-282              55 lines  3,014 bytes
head   lens_submission.py:55-109    55 lines  3,014 bytes
sha256 7c12c6df73b437e1d84bbd36d66c3fe847916de5207d5b78fa28394a7acc4223   (both)
cmp                                 clean — byte-identical, decorator included

Confirmed: the @dataclass line travelled with the block, and the body's sha256 is
the one I compute independently. Nothing left behind and nothing duplicated at the
boundary
: base :226-227 were the two blank separator lines, and head lens.py now
ends at return w with a single trailing newline — no orphan blanks, no truncation.
AddAsClusterResult and add_as_cluster exist in exactly one module tree-wide
(lens_submission.py); grep finds no second definition and no re-export.

5 — my own edge scan

Independent AST script; columns from memo § 2.2 plus § 4's split dispositions.

Under the author's own convention (relative imports plus import ideation_dashboard.X;
serve/cli/workbench/authoring tagged core) I reproduce the body's table row for row:

oD→oxF  3→1     oxF→oD  1→2     oXd→oxF 2→3     oxF→core 1→2
oD→oXd  8→8     oXd→oD 12→12*   oxF→oXd 4→4     core→oD/oXd/oxF 5/2/1
oD→core 6       oXd→core 12     total 56→57 (body says 57→58)

* I count 11 at base and 11 at head, not 12 — an unchanged row, so a single
column-assignment difference, not a delta error. Every row that MOVES matches exactly.

Under a full-spelling scan (adding from ideation_dashboard import X and
from ideation_dashboard.X import …, memo tagging, no core bucket):

oD→oxF  4 → 2      oxF→oD  6 → 8      oXd→oxF 3 → 4
oD→oXd 36 → 36     oXd→oD 33 → 33     oxF→oXd 15 → 15     total 101 → 102

Removed, verified present at base and absent at head — both of them:
lens.py:57 from . import human_seen · lens.py:58 from .human_seen import HumanSeenSubmission, SubmissionRefused.

No new edge in a forbidden direction. oD→oXd is unchanged in both scans; oD→oxF
strictly falls; no openDox-column module gains any import in this diff.

Added, and all three are named in the body: lens_submission.py:51 → lens
(stays→oD) · lens_submission.py:52 → workbench (stays→oD) · gate_routes.py:950 → lens_submission (oXd→stays). Judgment on each is below.

The three added edges — item (a) of the tasking

lens_submission.py:52 from .workbench import ACTION_ADD_AS_CLUSTER, OutputBoundary, Workbench, save — UNAVOIDABLE. The moved body calls w.record_action(...) and
save(w, boundary, ...); memo § 4 S-4 sends workbench.py whole to openDox and
recommends no split. A byte-identical relocation of a verb that persists through the
engine cannot not call the engine. No cut avoids it at any cost short of changing
behaviour, which the brief forbids. It is the same shape as OQ-B's existing
human_seen.py:46 from .workbench import slug.

gate_routes.py:950 from . import lens_submission — UNAVOIDABLE, and adds no new
DIRECTION.
Some caller must reach the verb wherever it lives, and gate_routes (oXd)
already imports the adapter column twice (:1046, :3428, both human_seen). This
edge widens no boundary that was not already open.

lens_submission.py:51 from .lens import PENDING_PROPOSAL_NOTE — AVOIDABLE, but not
at zero cost. NOTE, ruling matter (OQ-B class), not a defect.
Measured, both ways:

  • As landed (constant stays in lens.py). Cost: one extra stays→oD import edge, i.e.
    OQ-B grows from three edges to four. Benefit: the byte-identity pair
    lens.PENDING_PROPOSAL_NOTE ↔ web/views/lens-model.js:952, asserted by
    test_lens.py::test_js_and_python_persistence_constants_agree, stays wholly inside the
    openDox column, so the cross-check survives the carve inside one repository.
  • The alternative (move the constant into lens_submission.py). It breaks no test —
    test_js_and_python_persistence_constants_agree reads the Python constant through an
    attribute (lens.PENDING_PROPOSAL_NOTE, test_lens.py:621 and :625), so moving it is
    a two-line test edit, not a failure. Cost: the byte-identity pair then straddles the
    openDox/openxFactory boundary, and after the carve no single repository can run that
    assertion
    — it needs both files. Benefit: zero extra OQ-B edges.

My recommendation: keep it as landed. An import edge is expressible in the manifest —
it is the import rewrites edit class, and it is exactly the shape § 7 OQ-B already
carries unruled. A straddling byte-identity test is expressible in nothing: it has to
be deleted or re-invented at carve time, silently, by whoever notices. Trading a
declared, filed import edge for an undeclarable lost invariant is the worse trade.
The counter-argument Brett should hear before ruling: the JS constant's only consumer is
lens-model.js's clusterPlan() at :1029 — the browser half of the very verb that
just moved to the adapter column
— so "both halves are the openDox lens" is not
self-evident, and lens-model.js will face the same two-column problem as one manifest
row when the JS surface is filed. Either way the PR discloses the edge rather than
hiding it, which is the part that matters for the manifest.

Defects

NOTE-1 — the body's "Six changes ... nothing else" list is incomplete at head
(body accuracy).
The Copilot round-1 commit 67eabd32 rewrote the
PENDING_PROPOSAL_NOTE comment block (lens.py:64-75), a seventh non-relocation
change that is not in the enumerated list. It is prose only and correct, and the commit
message and the #836 issue comment both describe it — but the body's own list is the
artefact the manifest author will read.
Fix: add it as item 7 of "Every line that is NOT the relocation".

NOTE-2 — the body's size table is stale at head (body accuracy). It states
lens.py after = 227 lines / 11,628 bytes. That is exact at 37c1cfc3; at head
67eabd32 the file is 230 lines / 11,822 bytes (the round-1 comment rewrite added
3 lines / 194 bytes). lens_submission.py 109 lines / 5,879 bytes is correct, as is
every moved-block figure.
Fix: re-measure the two lens.py cells at head.

NOTE-3 — one stale prose reference left in Python (cosmetic). lens.py:213:
"the caller persists it via save/add_as_cluster through an OutputBoundary" —
add_as_cluster no longer resolves in this module. This is the same class of reference
the author correctly fixed in lens.js:152 and lens-model.js:1024; the Python one was
missed. One word (lens_submission.add_as_cluster).

NOTE-4 — "the single oD → oxF edge that survives" is understated, because the
author's scanner misses one import spelling.
Their scan reads relative imports and
import ideation_dashboard.X, but not from ideation_dashboard import X /
from ideation_dashboard.X import …. A full-spelling scan finds a second surviving
oD → oxF edge — serve_wire.py:1333, a lazy from ideation_dashboard import doxbench_contracts — and a third oXd → oxF edge at cli_gate.py:49. Both are
pre-existing, neither is touched by this PR, and neither changes any delta here; but the
manifest author must not take "the single surviving edge" at face value, and
serve_wire.py:1333 sits in the S-3 lane's own file. Separately, the body transcribes
that surviving edge as "doxbench_packet.py:177 from .doxbench_status_exemption import …" — the actual line is import ideation_dashboard.doxbench_status_exemption as rail.
Fix: one sentence in the body, and carry the spelling gap to the manifest author.

NOTE-5 — the guard measures the DIRECT edge only. _imports_sibling covers every
spelling of lens → human_seen (I verified all seven, including
import ideation_dashboard.human_seen, which the negative control's six do not list),
and test_add_as_cluster_is_not_re_exported_from_lens catches the restoration the
module docstring names (from .lens_submission import add_as_cluster) via hasattr.
But a restoration spelled from . import lens_submission in lens.py restores the
transitive lens → lens_submission → human_seen reach and passes all three tests.
Fix (one line): also assert list(_imports_sibling(source, "lens_submission")) == [].

Evidence for the rest

  • Item 1. 7 files: lens.py (source), lens_submission.py (target),
    gate_routes.py (the repointed importer), test_lens.py + new
    test_lens_column_split.py (tests), and web/views/lens.js /
    web/views/lens-model.js — comment-only, one prose reference each, named in the body.
    They fall outside the brief's literal enumeration but change no code; recorded, not
    faulted. No openspec/**, contracts/**, .github/**;
    docs/opendox-carve-manifest.yaml does not exist and was not created.
  • Item 3. The lens.py diff is the removed block + four import-line edits + the
    5-line docstring append + the comment rewrite (NOTE-1). Nothing reformatted, reordered
    or renamed: the surviving from .workbench import (…) keeps its six names in their
    original order and its original shape. Path and wb. have no reader left (wb was
    already an unused alias at base — verified: zero wb. uses in base lens.py, so the
    body's "deliberately not changed" is correct).
  • Item 4. Live import: lens.add_as_cluster, lens.AddAsClusterResult,
    lens.human_seen, lens.HumanSeenSubmission, lens.SubmissionRefused are all absent
    at head. Zero in-tree importers of the old path remain. At base AddAsClusterResult
    had no reader outside lens.py, add_as_cluster had exactly two Python callers
    (gate_routes.py:960, test_lens.py ×4), and the :58 re-export had none — all three
    body claims confirmed. The one surviving textual reference,
    openspec/changes/archive/2026-07-29-add-ideation-dashboard/tasks.md:27, is a
    historical record and correctly untouched.
  • Item 6. git diff origin/main..HEAD -- over human_seen.py,
    intent_apply_lane.py, serve_openxfactory_lanes.py (and, for the sibling lanes,
    serve_wire.py, doxbench_scope.py, workbench.py) is 0 lines.
  • Item 7. lens.py contains no import of lens_submission in any spelling (only
    prose at :49). Both modules import cleanly in a fresh interpreter in both orders.
    AddAsClusterResult.note's default is identical to lens.PENDING_PROPOSAL_NOTE.
  • Item 8. The guard is specific and proven to fail at base: running the shipped
    _imports_sibling unmodified over base lens.py yields
    [(57, 'from . import human_seen'), (58, 'from .human_seen import …')], and over head
    lens.py yields []. The negative control's six spellings are all caught.
    I also checked the failure class test_cli_column_split.py (the precedent this file is
    named after) exists for — "the scans that lost their subject": no test reads
    lens.py as a path
    other than the new file, and the package-wide sweeps that could
    have shrunk (test_provider_boundary.py:115, test_hermeticity.py:705,
    test_gateway_provenance.py:571) are open-world glob/rglob over the package, so
    lens_submission.py is inside them automatically. No sweep lost its subject.
    Local suite, run by me in my own worktrees. At head:
    1 failed, 5096 passed, 31 skipped in 671s. At a clean origin/main worktree in the
    same directory: 1 failed, 5093 passed, 31 skipped in 674s. The delta is +3 passed
    — exactly the three tests in test_lens_column_split.py, and nothing else moved. The
    single failure is test_snapshot.py::test_find_validator_locates_pinned_checkout, and it
    is identical at base and at head (same assert None is not None, because a /tmp
    worktree has no sibling openxFactory checkout): the author's "pre-existing and
    environmental" claim is not merely asserted, it is reproduced independently here. On CI,
    where the checkout is a submodule of the aggregation, pytest-suite is green at head.
  • Item 9. doc-health.py --single-repo . at head and at a clean base worktree:
    10 critical / 9 error / 57 warning / 16 info on both, canon share 39.3% on both,
    and the two reports diff to 0 lines after normalising the worktree-derived repo name.
    proposal-support.py . verify → proposal support verification ok, exit 0, at both.
    validate-openspec-cli-pin.py --all --strict → exit 0 at head, with the same two named
    accepted exceptions as base (no openspec/** file changed).
  • Item 10. Body line 1 exact. No closing keyword in the body or in any of the three
    commit messages; closingIssuesReferences.totalCount == 0. All three commits carry
    Lane: openxfactory-4-opendox-extraction,
    Co-Authored-By: Claude Fable 5.1 <[email protected]> and the Claude-Session:
    line verbatim. autoMergeRequest null; reviewDecision: REVIEW_REQUIRED; no approving
    review. CI at head: pytest-suite, lane-line, clearing-dispatch-gate,
    merge-master-approval, openreposhape-pin, openspec-cli-pin, release-tag-gate,
    signed-execution-chain-gate, wallet-validation, copilot-pull-request-reviewer —
    all success; the body's claim is exact.
  • Item 11. Two Copilot rounds. Round 1 (08:19:31Z) recommended approval with 0
    posted threads
    and one suppressed comment (lens.py:70, the comment block still
    reading as though the verb lived there) — factual, taken in 67eabd32, answered in the
    #836 issue comment since there was no thread to answer on. Round 2 (08:23:37Z) posted
    one thread (lens.py:52): the body's "no public-name change" was misleading because the
    import PATH does change — factual, taken by rewriting the body's opening paragraph (no
    code change needed), answered on the thread and resolved. Both answers are correct on
    the substance; I independently confirmed the changelog half — contracts/CHANGELOG.md
    names neither moved symbol. No factual finding is left unaddressed.
  • Item 12. No workflow, ruleset, contract, openspec document or carve-manifest file
    appears in the diff or in any of the three commits.

Shared checkout

/home/brett/projects/xFactory/openxFactory — at start: 6612d323, 0 staged.
At end: 6612d323, 0 staged — unchanged, and no command in this verification wrote to it (fetch, worktree prune, worktree add --detach, worktree remove --force only).
Worktrees used and removed: wt-verify-s2, wt-verify-s2-base (mine only).

Verification only — no merge, no approval, no push to this branch, no ruleset or
workflow act, and this is the verifier's single comment on this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu

…sion; widen the column-split guard to every import spelling

NOTE-3: `build_workbench_from_recipe`'s docstring at lens.py:213 still named
bare `add_as_cluster` as if it lived in this module; it now reads
`lens_submission.add_as_cluster`, matching the fix already applied to
lens.js:152 and lens-model.js:1024.

NOTE-5: `test_lens_imports_nothing_from_human_seen` only scanned lens.py for
imports of `human_seen`, so a restoration spelled `from . import
lens_submission` (or either absolute spelling) would restore the transitive
`lens -> lens_submission -> human_seen` reach while passing all three tests
in test_lens_column_split.py. The scan now also covers the `lens_submission`
sibling, using the same `_imports_sibling` scanner (which already recognizes
all three import spellings for any given sibling name).

Refs #656.

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

Copy link
Copy Markdown
Contributor Author

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

Fix round 1 — taken. New head 61ab8f86 (fast-forward from 67eabd32,
67eabd32..61ab8f86).

  • NOTE-3 — lens.py:213's docstring named bare add_as_cluster; now reads
    lens_submission.add_as_cluster, matching the fix already applied to
    lens.js:152 / lens-model.js:1024.
  • NOTE-5 — test_lens_column_split.py's guard only scanned for human_seen
    imports, so a restoration spelled from . import lens_submission (or either
    absolute spelling) would have restored the transitive lens -> lens_submission -> human_seen reach while passing all three tests. The scan now also covers
    the lens_submission sibling via the same _imports_sibling scanner (which
    already recognizes all three import spellings for any given sibling name).
    Proved independently (scratch-string exec, not the real file): the widened
    scan detects from . import lens_submission,
    import ideation_dashboard.lens_submission, and
    from ideation_dashboard import lens_submission alike; the real lens.py
    at head is clean for both siblings.
    python3 -m pytest -q tests/ideation-dashboard/test_lens_column_split.py tests/ideation-dashboard/test_lens.py — 28 passed, 1 skipped.

NOTES 1/2/4 were taken in the PR body (this comment does not repeat them):
the non-relocation-changes list now runs eight items (adds the round-1
PENDING_PROPOSAL_NOTE rewrite and this round's docstring fix), the size
table's lens.py "after" cell is re-measured at head (230 lines / 11,838
bytes), and the surviving-edge paragraph transcribes doxbench_packet.py:177
correctly (import ideation_dashboard.doxbench_status_exemption as rail) and
now acknowledges the verifier's two further pre-existing, untouched edges
(serve_wire.py:1333 → doxbench_contracts; cli_gate.py:49 oXd→oxF).

Diff: 2 files changed, 11 insertions(+), 4 deletions(-)
(scripts/ideation_dashboard/lens.py,
tests/ideation-dashboard/test_lens_column_split.py). Nothing else moved.

🤖 Generated with Claude Code

https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu

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 change is a contained mechanical relocation with callers and tests updated to enforce the intended import-graph split.

Review details

Suppressed comments (1)

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

scripts/ideation_dashboard/lens.py:60

  • wb is imported as a module alias but never referenced in lens.py (and lens.py already imports the specific names it needs from .workbench). Keeping this unused import adds an extra module-level side effect and is easy to misread as a supported public surface (lens.wb).
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit 8914858 into main Sep 9, 2026
11 checks passed
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]>
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