Skip to content

Split doxbench_scope: the scope TYPES into doxbench_scope_types.py (pre-carve S-1, § 3.1) - #837

Merged
brettheap merged 5 commits into
mainfrom
change/opendox-split-s1-doxbench-scope-types
Sep 9, 2026
Merged

brettheap merged 5 commits into
mainfrom
change/opendox-split-s1-doxbench-scope-types

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-1 (split-opendox-two-layer-product § 3.1, scout memo § 4).
A mechanical relocation inside openxFactory: no behaviour change, no
public-name change, no signature change.
Base 56e69a11c59d473da23eab455cb9848dc083fac3.

Why

§ 3.1's carve manifest files every path with exactly ONE disposition and a
sha256. doxbench_scope.py (841 lines) holds two columns: the five FROZEN
value types are openDox, the ownership authority that produces them
(resolve_scope, registry-root confinement, editable classification, the
section vocabulary) is openXdox. A file whose halves belong to two columns
cannot be filed at all. This split moves the openDox half into its own module
now, so the carve is later a pure per-file move.

What moved

source scripts/ideation_dashboard/doxbench_scope.py:61-146 at 56e69a11
symbols ScopeConfinementError, ScopeKey, ScopeDocument, ScopeSection, ScopeProjection
size 86 lines / 2519 bytes
sha256 of the moved text, BEFORE b6c99693fb31c14a81079569d14c06a4561e7587933ddd226628cb867e157e3d
sha256 of the moved text, AFTER (doxbench_scope_types.py:53-138) b6c99693fb31c14a81079569d14c06a4561e7587933ddd226628cb867e157e3d
destination new scripts/ideation_dashboard/doxbench_scope_types.py, column oD

Byte-identical. The memo measured :61-148 at d758a6df; re-measured at
this base the five classes are :61-146 (147-148 are the two blank lines that
separate them from def _mapping, left behind as the separator). No other drift.

SCOPE_KINDS travelled with the types — the one column call this PR makes

doxbench_scope.py:16 (SCOPE_KINDS = ("cluster", "possible", "staged"), 47
bytes) moved to doxbench_scope_types.py:50. The brief and memo § 2.4 (b) both
place it in the openXdox half, so this is a deliberate departure, flagged for
the manifest author.
ScopeKey.__post_init__ (:77, :79 at base)
validates tile_kind against it, so it is the frozen type's own value domain.
The three alternatives were: import it back from doxbench_scope (a cycle, and
the brief forbids it), duplicate the tuple (a co-authoritative constant, the
pattern this repository repairs everywhere else), or inject it at import time
(inventing a design). Measured before deciding: doxbench_scope.SCOPE_KINDS
has no reader in the tree other than the moved class
— every other
SCOPE_KINDS under scripts/ and tests/ is branch_session.SCOPE_KINDS, a
different tuple with different spellings (staged-topic/cluster/possible).
doxbench_scope re-exports it, so doxbench_scope.SCOPE_KINDS still resolves.
Say the word and it can go back the other way, but not without one of the three
costs above.

Independent verifier's disposition (round 2): confirmed the memo's
assignment was right — the tuple is tuned funnel/wheel vocabulary, not generic
scope shape — and recommended landing this PR as-is rather than blocking on
it. Landed on that recommendation; the column-pure fix (a behaviour change, its
own packet) is filed as the successor, #838.

Cross-column import edges, AST-measured

Method: for every module under scripts/ideation_dashboard/, every import
naming a sibling module, in all FIVE spellings the package uses —
from ideation_dashboard.X import, from scripts.ideation_dashboard.X import,
from ideation_dashboard import X, from .X import, and from . import X
(the fifth parses with module=None and was missed by the first version of this
scan; Copilot caught the same hole in the shipped test, fixed in 20b784d0).
A yielded name is kept only when a sibling module of that name exists, because
from . import GENERATOR_VERSION names a re-export, not a module. Lazy
function-local imports are counted like module-level ones. Modules are tagged by
memo § 2.2's column table for all 60, with memo § 4's post-split columns for the
four split files and core = the residue that splits BY FUNCTION (serve,
cli, workbench, authoring).

edge BEFORE (pairs / statements) AFTER delta
oD -> oXd 15 / 22 12 / 19 -3 / -3
oXd -> oD 17 / 19 18 / 20 +1 / +1 (the re-export)
core -> oD 24 / 25 24 / 25 —
core -> oXd 11 / 14 11 / 14 —
core -> oxF 3 / 4 3 / 4 —
oD -> oxF 3 / 4 3 / 4 —
oXd -> oxF 2 / 3 2 / 3 —
oxF -> oXd 14 / 15 14 / 15 —
oxF -> oD 5 / 5 5 / 5 —
oD -> core 7 / 8 7 / 8 —
oXd -> core 6 / 14 6 / 14 —
oxF -> core 1 / 1 1 / 1 —

The three removed edges, named:

  • doxbench_packet.py:78 from ideation_dashboard.doxbench_scope import ScopeKey, ScopeProjection
  • doxbench_telemetry.py:46 from ideation_dashboard.doxbench_scope import ScopeKey
  • doxbench_turns.py:58 from ideation_dashboard.doxbench_scope import ScopeKey, ScopeProjection

Each becomes the same statement against doxbench_scope_types. Alphabetical
import order holds in all three (doxbench_scope_types sorts before
doxbench_telemetry and doxbench_threads).

The one added edge is the point, not a cost. doxbench_scope (oXd) now
imports doxbench_scope_types (oD). openXdox pins openDox and never the reverse
(design.md D3a, RULING OQ-2), so this direction is lawful where the three it
replaced were not. Net cross-column statements 41 -> 39 across the six column-to-column rows.

Residual, recorded for the manifest author, NOT fixed here:
serve_workbench.py is openDox and keeps four lazy doxbench_scope imports
(:346, :543, :1664, :2606). It reaches the AUTHORITY as well as the types
— is_live_session_ref, resolve_scope, session_created_paths_for_scope —
and imports the module object rather than names, so per the brief the mixed
import was left whole. :543's block happens to use only ScopeKey and could be
repointed on its own; that would remove one statement and no module-pair, so it
was left alone as the smaller-diff call. The memo's "4 of the 14 oD->oXd edges"
resolves to 3 by this method, serve_workbench being the fourth reader and
not cleanly repointable.

Against memo § 2.3 (oD->oXd 14, oXd->oD 15): the corrected scan measures 15
and 17 at this base — close, and the residual gap is what you would expect from
28 commits of drift since d758a6df plus a core bucket whose membership the
memo does not publish. The first version of this table (understated, 12 and 11)
was the bug Copilot found. The manifest author should re-derive the absolute
figures at the carve commit regardless; what this PR asserts is the BEFORE/AFTER
delta under one stated method, and that is -3 either way.

Every non-relocation line change

  1. doxbench_scope_types.py:1-43 — new header docstring, in the style of
    serve_wire.py's: names the column (oD), the split (S-1), what
    stayed behind and why, why SCOPE_KINDS travelled, and D12's absolute-import
    rule.
  2. doxbench_scope_types.py:45,47,48 — from __future__ import annotations,
    from dataclasses import dataclass, from typing import Any. The only three
    names the moved block needs; nothing else in doxbench_scope.py's import
    block is referenced by it.
  3. doxbench_scope_types.py:50 — SCOPE_KINDS, relocated verbatim (above).
  4. doxbench_scope.py:16-24 — a 9-line comment recording the split and that the
    re-exported names are the SAME OBJECTS.
  5. doxbench_scope.py:25-32 — the re-import:
    from ideation_dashboard.doxbench_scope_types import ( # noqa: F401 (re-export)
    with the six names. Absolute, per serve_wire.py's D12 note and the spelling
    every reader of this module already uses. boundary.py is the house
    precedent for the noqa/re-export shape.
  6. doxbench_scope.py — deletions only, at the original commit: line 16
    (SCOPE_KINDS) and lines 59-146 (two blank lines + the five classes); no
    import line was removed then. This round removes one: dataclass — left
    in place at the original commit — was a dead import once the five
    @dataclass-decorated classes moved (its only occurrence); line 12 is now
    deleted too (verifier's D1). Any, Iterable, Mapping, Sequence, Path
    and PurePosixPath still have readers in the remaining 769 lines (checked).
  7. doxbench_packet.py:78, doxbench_telemetry.py:46, doxbench_turns.py:58 —
    one word each, doxbench_scope -> doxbench_scope_types.
  8. tests/ideation-dashboard/test_scope_column_split.py — new, 164 lines, 6
    tests (below), including 20b784d0's scanner fix from Copilot's round.
  9. This round (fix round 1, verifier D1) — doxbench_scope.py:12: removed
    the dead from dataclasses import dataclass import (item 6, above).
  10. This round (D2, D3) —
    tests/ideation-dashboard/test_scope_column_split.py docstrings: "forty-odd
    landed test modules" corrected to the measured 13 landed test modules (26
    import statements)
    ; "All four spellings" corrected to "All five
    spellings" (:83's own docstring already said FIVE) — Copilot round 2's
    open finding.
  11. This round (D4, Copilot's suppressed round-2 comment) —
    doxbench_scope_types.py:39-42: the header's invocation note narrowed from
    a package-wide claim ("modules in this package use ABSOLUTE imports") to
    THIS module only, matching the note it was adapted from
    (serve_wire.py:53-54). Measured false as a package-wide rule: 16 of 61
    modules use relative imports, and design.md D12 states no such rule.
  12. This round (Copilot round 3) —
    tests/ideation-dashboard/test_scope_column_split.py:141:
    test_types_module_is_the_bottom_of_the_scope_graph's docstring corrected
    from "by any of the four spellings" to "by any of the five spellings" (the
    module header and _sibling_modules already said five) — Copilot round 3's
    open finding.

Nothing else was renamed, reordered or reformatted. doxbench_scope.py
841 -> 770 lines after the split, 769 after this round's dead-import
removal
; doxbench_scope_types.py 138.

Public surface

doxbench_scope re-exports all six names as the same objects, so every
landed importer keeps working unmodified: 13 test modules (26 import
statements), the four lazy serve_workbench imports, and prose references in
serve_wire.py:606-607,
serve_workbench.py:322-341, doxbench_binding.py:54 and
web/views/staging-workbench-model.js:372,384 (all still true — they name
doxbench_scope._projection and the authority half, which did not move).
No test import was repointed, and none needed to be: tests/ reaches the
types through doxbench_scope and the re-export keeps that valid. Which test
files are openDox-column is OQ-G, which is unruled, so nothing there was
pre-judged.

Tests

  • python3 -m pytest -q tests/ideation-dashboard — 5099 passed, 31 skipped, 1
    failed in 691s.
    The one failure is
    test_snapshot.py::test_find_validator_locates_pinned_checkout, pre-existing
    and environmental
    : it fails identically on a clean detached worktree at base
    56e69a11 (verified in a separate worktree), because the validator walk
    expects a sibling checkout layout a /tmp worktree does not have. Unrelated to
    this change.
  • python3 -m pytest -q tests/doc-health tests/corpus-adapter tests/openspec_cli_pin
    — 1878 passed (the suites that police an import DIRECTION).
  • New: tests/ideation-dashboard/test_scope_column_split.py, 6 tests, all
    passing. Three parametrized cases assert the removed edge stays removed with a
    non-vacuity floor (each module must still import doxbench_scope_types, so the
    sweep cannot lose its subject); one asserts doxbench_scope_types imports
    nothing from its own package (a back-edge would be a cycle AND would restore
    the edge); one asserts re-export identity with is rather than == (a copy
    would pass equality and break isinstance / except ScopeConfinementError);
    one proves SCOPE_KINDS is the domain ScopeKey actually validates against.
    It carries its own AST scanner rather than tests/import_scan.py's, and says
    why: that helper deliberately skips relative imports, which is right for its
    question about other top-level packages and wrong for this one —
    from .doxbench_scope import ScopeKey names no top-level package and is exactly
    the edge this file exists to catch.
  • A NEGATIVE CONTROL for the scanner fix: appending
    from . import doxbench_scope to doxbench_telemetry.py leaves the first
    version of the scanner green and turns the fixed one red; the tree was restored
    and re-run clean.
  • Whole suite: CI pytest-suite PASSES at head 20b784d0 (22m23s), and all
    nine checks are green (clearing-dispatch-gate, lane-line,
    merge-master-approval, openreposhape-pin, openspec-cli-pin,
    pytest-suite, release-tag-gate, signed-execution-chain-gate,
    wallet-validation). A local whole-suite run was started too and was still
    going well past the 15-minute mark, so it was stopped once CI — which runs it
    in the supported environment and does not carry the worktree-layout artefact
    above — had answered the same question.

Doc-health parity

python3 scripts/proposal-support.py . verify — proposal support verification ok, exit 0, at base and at head. python3 scripts/doc-health.py --single-repo . — exit 0 and 92 findings at base, 92 at head, with an
identical severity x family distribution (6 critical ratified-provenance, 4
critical record-immutability, 1 error release-inventory-drift, 4 error
status-validity, 4 error tag-hygiene, 1 info document-catalog, 2 info
ideation-routing, 9 info modified-block-currency, 2 info release-inventory-drift,
1 info release-tag-publication, 1 info staged-candidate-aging, 2 warning
ideation-routing, 33 warning staged-candidate-aging, 22 warning
staged-topic-template). Unchanged.

Note for the manifest author (no action here)

tests/ideation-dashboard/fixtures/doxbench_scope_cases.json has two readers
that land in different legs after this split:
tests/ideation-dashboard/test_doxbench_scope.py:28 (the authority's own suite)
and tests/ideation-dashboard/test_doxbench_turns.py:1025,1083. The fixture
cannot travel with one destination and leave the other reader without it.

Six prose line-citations into doxbench_scope.py are now stale — OWED, deliberately not fixed here

Removing 71 lines from the top of the file shifts every line below the moved
block by -71, uniformly, and six comments and docstrings cite line numbers
into that region. Measured, with the correct new numbers:

site cites now
scripts/ideation_dashboard/serve_wire.py:606 doxbench_scope.py:356-358 :285-287
scripts/ideation_dashboard/serve_wire.py:607 doxbench_scope.py:390 :319
tests/ideation-dashboard/test_doxbench_abstract_route.py:16,379 doxbench_scope.py:390 :319
tests/ideation-dashboard/test_doxbench_abstract_route.py:377 doxbench_scope.py:356-358 :285-287
tests/ideation-dashboard/test_doxbench_scope.py:141, test_doxbench_turns.py:1065 doxbench_scope.py:398 :327
tests/ideation-dashboard/test_doxbench_scope.py:188 doxbench_scope.py:384 :313

Every cited line still exists and still says the same thing; only its number
moved. No test asserts on these numbers (they are prose), so nothing is red.
This list is complete for live prose only: three further doxbench_scope.py:
citations live in the archived change
openspec/changes/archive/2026-08-26-add-doxbench-distilled-abstract
(proposal.md:774,778, design.md:322), and under record-immutability those
are correctly NOT refreshed here.

Why they were left. Two of the six are in serve_wire.py, which belongs to
sibling split S-3 and which this author may not touch — and S-3 removes
hosted_index from that file, shifting its OWN numbers. Fixing the four test
citations while leaving the two in serve_wire.py stale would ship a worse
record than fixing none. The correct act is one citation refresh across all
three files AFTER S-1, S-2 and S-3 have landed, when the line numbers stop
moving. Filed here so it is not discovered later as unexplained drift; happy to
do it as that single follow-up act on the word.

NOT DONE

  • No carve. Nothing moved to another repository; nothing was created in
    openDox, openXdox or openRepoShape.
  • No manifest. docs/opendox-carve-manifest.yaml was not created or edited;
    it still does not exist.
  • No openspec edit. openspec/** and contracts/** untouched — D3's column
    table still states the pre-split assignment, for the manifest author to
    re-measure. .github/** untouched.
  • No behaviour change, no public-name change, no signature change. The moved
    text is byte-identical and the re-export binds the same objects.
  • OQ-B edges untouched: human_seen.py's from .workbench import slug,
    intent_apply_lane.py's branch_session.bootstrap_sessions, and
    serve_openxfactory_lanes.py's four serve_wire names are unruled and were
    not read or changed.
  • lens.py and serve_wire.py untouched — splits S-2 and S-3, sibling PRs.
  • No merge, no approval, no auto-merge, no ruleset or branch-protection change,
    no workflow dispatch, no force-push, no rebase.

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:14
…_types.py

Pre-carve split S-1 (`split-opendox-two-layer-product` § 3.1). `doxbench_scope.py`
holds two columns' worth of code: the five FROZEN types (`ScopeConfinementError`,
`ScopeKey`, `ScopeDocument`, `ScopeSection`, `ScopeProjection`, `:61-146` at
`56e69a11`) are openDox, while the ownership authority that produces them —
`resolve_scope`, the registry-root confinement, the editable classification and
the section vocabulary — is openXdox. § 3.1's carve manifest files every path
under exactly ONE disposition, so a file whose halves go to two repositories
cannot be filed at all. This is the mechanical relocation that makes the carve a
pure per-file move: no behaviour change, no public-name change, no signature
change.

The 86 moved lines are byte-identical (sha256
b6c99693fb31c14a81079569d14c06a4561e7587933ddd226628cb867e157e3d before and
after, 2519 bytes). `SCOPE_KINDS` travelled with them — `ScopeKey.__post_init__`
validates against it, so it is the frozen type's own value domain and could not
stay behind without either a circular import back into `doxbench_scope` or a
second copy of the same three strings. It has no other reader in the tree: every
other `SCOPE_KINDS` in this package is `branch_session.SCOPE_KINDS`, a different
tuple with different spellings.

`doxbench_scope` re-exports all six names as the SAME OBJECTS, so every landed
importer — forty-odd test modules and `serve_workbench`'s four lazy imports —
keeps working unchanged. Three openDox modules whose repoint IS the split
(`doxbench_packet:78`, `doxbench_telemetry:46`, `doxbench_turns:58`) import from
the new module directly, because that is what removes the cross-column edge:
oD->oXd falls from 12 module-pairs / 19 statements to 9 / 16, and the surviving
scope edge runs openXdox -> openDox, the direction RULING OQ-2 permits.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
The three repointed openDox modules could each have the unlawful direction put
back by a one-line import while every behavioural test stayed green, so the
direction is asserted rather than noted (`split-opendox-two-layer-product`
§ 3.1, pre-carve split S-1). Four rules, all cheap: the three repointed modules
import `doxbench_scope_types` and never `doxbench_scope`, with a non-vacuity
floor so the sweep cannot quietly lose its subject; `doxbench_scope_types`
imports nothing from its own package (a back-edge would be a cycle AND would
restore the removed edge by another route); `doxbench_scope` re-exports the same
OBJECTS, asserted with `is` rather than `==` because a copy would pass equality
and break `isinstance` and `except ScopeConfinementError` in production; and
`SCOPE_KINDS` is proven to be the domain `ScopeKey` actually validates against,
so the constant cannot be copied back and left stale.

PARSED, NOT GREPPED, with a scanner of this file's own rather than
`tests/import_scan.py`'s. That helper deliberately skips relative imports —
correct for its own question, which is about other top-level packages, and wrong
for this one: `from .doxbench_scope import ScopeKey` names no top-level package
at all and is exactly the edge this file exists to catch. All four spellings the
package admits are read.

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:16

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

🟡 Changes recommended

The new test helper _sibling_modules() does not currently detect from . import X imports, creating a false-negative hole in the import-direction guardrail it is intended to enforce.

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

Pull request overview

This PR mechanically splits the “frozen” doxBench scope value types out of scripts/ideation_dashboard/doxbench_scope.py into a new doxbench_scope_types.py, with doxbench_scope re-exporting the same objects to preserve the existing import surface while reducing openDox→openXdox import direction violations ahead of the S-1 carve work.

Changes:

  • Added doxbench_scope_types.py containing SCOPE_KINDS and the five frozen scope types (relocated from doxbench_scope.py), and updated three openDox modules to import types from it.
  • Updated doxbench_scope.py to re-import/re-export the moved symbols (keeping public import paths stable).
  • Added tests/ideation-dashboard/test_scope_column_split.py to enforce the intended import direction and re-export identity.
File summaries
File Description
tests/ideation-dashboard/test_scope_column_split.py Adds regression tests for import-direction and re-export identity across the scope split.
scripts/ideation_dashboard/doxbench_turns.py Repoints imports of ScopeKey/ScopeProjection to doxbench_scope_types.
scripts/ideation_dashboard/doxbench_telemetry.py Repoints import of ScopeKey to doxbench_scope_types.
scripts/ideation_dashboard/doxbench_packet.py Repoints imports of ScopeKey/ScopeProjection to doxbench_scope_types.
scripts/ideation_dashboard/doxbench_scope.py Removes the moved types and re-exports them from the new types module.
scripts/ideation_dashboard/doxbench_scope_types.py New module containing the frozen scope types and SCOPE_KINDS.
Review details
  • Files reviewed: 6/6 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.

…counts

Copilot's review of #837 found it, and it was a real hole in both the shipped
test and the measurement behind the PR body: `from . import doxbench_scope`
parses as an `ImportFrom` with `level=1` and `module=None`, so a helper that
reads `node.module` sees nothing at all. The file's own docstring claimed to
cover that spelling. It is not hypothetical — the package uses it forty times
(`gate_routes.py:70`, `kickoff.py:61`, `doxbench_scope.py:730` and the rest) —
so the exact back-edge these tests exist to prevent could have walked past them.
Proven by a negative control before and after: appending
`from . import doxbench_scope` to `doxbench_telemetry.py` leaves the old scanner
green and turns the fixed one red.

Two more things the fix carries. `from . import X` and `from pkg import X` can
name a NAME rather than a module — `generator.py:70` imports `GENERATOR_VERSION`
that way — so a yielded name is now kept only when a sibling module of that name
exists. And the same hole understated the PR body's own table: with all five
spellings read, oD->oXd measures 15 module-pairs / 22 statements at base
`56e69a11` and 12 / 19 after the split, still exactly the three named edges
removed; oXd->oD goes 17 / 19 to 18 / 20, the one lawful re-export edge added.
The corrected BEFORE figures also sit far closer to memo § 2.3's own (14 and 15),
which the understated scan did not. The body carries the corrected table; the
first commit message's 12/19 -> 9/16 was measured with the hole and is superseded
by it.

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

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 narrowly-scoped and appear behavior-preserving, with added tests; remaining feedback is limited to small docstring wording corrections.

Review details

Suppressed comments (1)

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

scripts/ideation_dashboard/doxbench_scope_types.py:42

  • The docstring’s D12 note claims that all modules in ideation_dashboard “use ABSOLUTE ideation_dashboard.* imports, never from . import”, but the package contains many relative-import users (e.g. gate_routes.py uses from . import …). This overstates D12, which applies to serve.py / serve_* modules, and makes the docstring misleading.
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

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

VERDICT: PASS WITH NOTES at head 20b784d03e00f8735014ce10278aa07df8877548, base
56e69a11c59d473da23eab455cb9848dc083fac3. The relocation is byte-identical, the
public surface is preserved by identity, the edge delta reproduces exactly under an
independently written scanner under two different taggings, and doc-health / CLI-pin /
proposal-support parity holds. Nothing blocking. Five SHOULD-FIXes, all prose or
bookkeeping, plus one decision owed to Brett on SCOPE_KINDS.

Verified by a second author in own worktrees (wt-verify-s1, wt-verify-s1-base), own
AST scanner, own reversion controls. No merge, approve, push, auto-merge, ruleset,
workflow-dispatch or thread act was performed.

The twelve items

# item verdict evidence
1 Scope PASS exactly the 6 stated files; no openspec/**, contracts/**, .github/**, no carve manifest. git log --merges origin/main..HEAD empty; merge-base == 56e69a11 (fast-forward)
2 Byte-identical relocation PASS base doxbench_scope.py:61-146 vs head doxbench_scope_types.py:53-138: diff empty, both sha256 b6c99693fb31c14a81079569d14c06a4561e7587933ddd226628cb867e157e3d, 86 lines / 2519 bytes — the body's figure to the byte. SCOPE_KINDS line also byte-identical
3 Nothing else moved PASS the doxbench_scope.py diff is the deleted block + the deleted SCOPE_KINDS + the 9-line comment + the 8-line re-import, nothing else. Three importers: one word each. 841 → 770
4 Public surface PASS all six names resolve from ideation_dashboard.doxbench_scope and are is-identical to the types module's. ScopeKey(...) constructs and refuses tile_kind="bogus" unchanged
5 Edge claim PASS own scanner; the body's 12-row table reproduces row for row, and the −3 survives a different column tagging (below)
6 OQ-B untouched PASS git diff empty for human_seen.py, intent_apply_lane.py, serve_openxfactory_lanes.py, serve_wire.py, lens.py, workbench.py. serve_openxfactory_lanes.py:52 from ideation_dashboard.serve_wire import ( # noqa: E402 byte-identical base and head
7 Circularity PASS both import orders clean in fresh interpreters; AST of doxbench_scope_types.py shows exactly three imports, all stdlib (__future__, dataclasses, typing) — nothing from the package
8 Tests PASS own run at head: 5099 passed, 31 skipped, 1 failed in 672s — the body's numbers exactly. The failure is test_snapshot.py::test_find_validator_locates_pinned_checkout, reproduced at base in my own base worktree (environmental, sibling-checkout layout). Collected 5125 (base) → 5131 (head) = the 6 new tests. CI pytest-suite green at head, all 9 checks success. Reversion proved: reverting only doxbench_packet.py's repoint turns its case red; the from . import doxbench_scope negative control turns doxbench_telemetry's case red
9 Parity PASS proposal-support verify ok/exit 0 both. doc-health --single-repo: 92 findings at base, 92 at head, and after normalising the worktree name the finding lists are diff-identical. validate-openspec-cli-pin.py --all --strict byte-identical output, exit 0 both
10 Hygiene PASS body line 1 is the lane line; no closing keyword; closingIssuesReferences.totalCount == 0; all three commits carry the three exact trailers; autoMergeRequest null; no approving review (all four are COMMENTED)
11 Copilot round SHOULD-FIX round 1 taken and fixed well in 20b784d0 (a real hole, correctly disclosed). Round 2's two findings are both unaddressed — see D3 and D4
12 Over-reach PASS no workflow, ruleset, contract, openspec or manifest path in the diff or the commits

Edge scan — independently written, run under two taggings

Under the body's own tagging (core = serve/cli/workbench/authoring) my scanner
reproduces every one of the twelve rows, including oxF -> core 1/1:

oD -> oXd 15 pairs / 22 statements -> 12 / 19 (-3 / -3) · oXd -> oD 17/19 -> 18/20
(+1/+1, the re-export) · core -> oD 24/25 · core -> oXd 11/14 · core -> oxF 3/4 ·
oD -> oxF 3/4 · oXd -> oxF 2/3 · oxF -> oXd 14/15 · oxF -> oD 5/5 · oD -> core 7/8 ·
oXd -> core 6/14 · oxF -> core 1/1 — all unchanged.

Under memo § 2.2's tagging instead (serve/cli/authoring/workbench as oD, no core
bucket), so the result does not depend on the body's one interpretive choice:
oD -> oXd 26 / 36 -> 23 / 33 (-3 / -3) · oXd -> oD 23/33 -> 24/34 (+1/+1) ·
oD -> oxF 6/8 -> 6/8 · oxF -> oD 6/6 · oxF -> oXd 14/15 · oXd -> oxF 2/3 — unchanged.

The delta is -3 under both taggings. The three named edges exist at base and are absent
at head (doxbench_packet.py:78, doxbench_telemetry.py:46, doxbench_turns.py:58).
No new forbidden-direction edge: oD -> oXd and oD -> oxF are flat or down in both
taggings; the single added edge is oXd -> oD (doxbench_scope.py:25), named in the body
and lawful under D3a / RULING OQ-2. My scanner reads from . import X (41 statements
across 12 modules in this package) — the spelling that defeated the first scan.

The serve_workbench residual claim verified. Four lazy imports at :346, :543,
:1664, :2606. :346 uses is_live_session_ref; :1664 and :2606 use resolve_scope,
session_created_paths_for_scope and ScopeConfinementError — genuinely mixed, correctly
left whole. :543's block does use ScopeKey alone (the next doxbench_scope. use is
:1667), so the author's own "could be repointed, one statement and no module pair"
is accurate. The memo's "4 of the 14" counts serve_workbench as the fourth module PAIR;
3 removable is the right number and the memo's 4 was not wrong, just differently counted.

Defects

D1 — SHOULD-FIX. The body's non-relocation claim 6 is false for dataclass

Body item 6: "No import line was removed: dataclass, Any, Iterable, Mapping,
Sequence, Path and PurePosixPath all still have readers in the remaining 770 lines
(checked)."
dataclass does not.

$ grep -n '\bdataclass\b' scripts/ideation_dashboard/doxbench_scope.py   # at head
12:from dataclasses import dataclass          <- the only occurrence
$ grep -n 'dataclass' <base>/scripts/ideation_dashboard/doxbench_scope.py
12,65,91,101,121                              <- the four decorators all moved

The five relocated classes were the file's only @dataclass decorators, so
doxbench_scope.py:12 is now a dead import. Harmless at runtime (no flake8/ruff config
and no lint job in this repository, so nothing goes red) and it does not touch the byte
identity of the moved block. But it is a false measurement in a record whose whole value is
measured evidence, and it ships an unused import into the openXdox half at the carve. Either
delete line 12 (a one-line, behaviour-free change squarely inside this split's surface) or
correct the claim to say the import is deliberately left for a later sweep.

D2 — SHOULD-FIX. "forty-odd landed test modules" is ~3x overstated

Measured at head: 13 landed test modules name doxbench_scope (26 import statements);
12 import one of the moved names.

$ grep -rlE '^\s*(from|import).*doxbench_scope' tests/ | wc -l
14        # 13 landed + the new test_scope_column_split.py

The claim appears three times: the PR body (Public surface), commit 6cd3447f's message,
and — the one that matters — the shipped docstring test_scope_column_split.py:27,
which travels to openDox. Worth noting the file's other count is exact: "the package uses it
forty times" for from . import X measures 41. Fix the docstring; the body and commit
message are history.

D3 — SHOULD-FIX. Copilot round-2 thread is open and unaddressed

Thread on test_scope_column_split.py:43 (unresolved): the docstring says "All four
spellings the package admits are read"
and then enumerates five. The finding is correct
and the file contradicts itself — _sibling_modules' own docstring at :83 says "Covers
the FIVE spellings"
, and the PR body says "in all FIVE spellings". Commit 868ac35a's
message repeats "All four spellings". One word. It is wording, not behaviour, but item 11
of my brief treats an unaddressed factual finding as SHOULD-FIX and it is still open.

D4 — SHOULD-FIX. Copilot's suppressed round-2 comment is correct, and unaddressed

On doxbench_scope_types.py:39-42. The new module's header says "modules in this package
use ABSOLUTE ideation_dashboard.* imports, never from . import"
. Measured false:

16 of 61 modules use relative imports; 76 relative ImportFrom statements
gate_routes 16, gate_console 12, branch_session 11, kickoff 5, cli 4, doxbench_scope 4 ...

doxbench_scope.py itself uses from . import branch_session at :730 — a line this very
PR's own test docstring cites
at test_scope_column_split.py:87 as evidence the spelling
is common. Two further points my own reading adds beyond Copilot's: the source note it was
adapted from, serve_wire.py:53-54, scopes the claim to "this module" — the
generalisation to the package is new here; and design.md D12 states no import-style rule
at all
(grep -rn 'ABSOLUTE\|absolute import\|from \. import' openspec/changes/split-opendox-two-layer-product/
returns nothing), so the "(design D12)" attribution is inherited house style rather than
something D12 says. Narrow it to "this module", as serve_wire.py does. This one ships into
openDox on the new module's face.

D5 — DECISION OWED (Brett). SCOPE_KINDS in the neutral module

Answering the question the body raises. The memo's assignment was RIGHT: the tuple is
tuned vocabulary, not generic scope shape.
("cluster", "possible", "staged") are the
ideation funnel's tile/stage names. Under D3's own cluster table the funnel and wheel row
files "the stage names" in the openxFactory adapter column and the lens row files
"the candidate-register row" ("possible") there too; under D3's Q5 test — would someone
with no notion of factories, gates or tenants use it?
— a lab assistant has documents and
clusters, not "possibles" and "staged" tiles.

So doxbench_scope_types.py, the module S-1 exists to make single-column, itself now
carries one line of another column's vocabulary, and S-1 does not fully reach its own stated
goal for the new file. The author's reasoning is nevertheless sound and the disclosure is
exemplary
— ScopeKey.__post_init__ (:69-72) really does validate tile_kind against
it, which means the frozen type as written carries the tuned domain, and all three named
alternatives are worse. Supporting measurement confirmed independently: at base
doxbench_scope.SCOPE_KINDS has exactly two readers, both inside the moved
ScopeKey.__post_init__ (:77, :79); every other Python SCOPE_KINDS in the tree is
branch_session.SCOPE_KINDS (= (STAGED_TOPIC, CLUSTER, POSSIBLE), different spellings).

The column-pure answer is not available inside this PR's mandate: it is for the neutral
ScopeKey to validate SHAPE only (tile_kind a non-empty string) with the closed domain
enforced by the AUTHORITY (resolve_scope and the route constructors) — a behaviour change,
so its own packet and its own word. A validation hook or a module-level registry the oXd
module populates would be import-order-dependent global state, worse than the copy.

Recommendation: land the tuple where it is, and file the shape-only successor rather than
resolving this as "the memo was wrong". One pre-existing co-authoritative copy of the same
three strings already sits in JS at web/views/doxbench-state.js:37 — not this PR's doing,
but it is the second instance and the successor should take both.

N1 — NOTE. The owed citation list is complete for live prose; three omissions are correct

My sweep grep -rnE 'doxbench_scope(\.py)?:[0-9]' scripts tests docs examples openspec contracts
returns 12 hits. Nine are accounted for: the body's six rows (seven file:line pairs), plus
test_scope_column_split.py:87, which cites doxbench_scope.py:730 — the correct
post-split
number. The three the body does not list are
openspec/changes/archive/2026-08-26-add-doxbench-distilled-abstract/proposal.md:774,:778
and .../design.md:322 (citing :390 and :356-358). They are in an archived change and
under record-immutability must NOT be refreshed, so omitting them is right — but the body
reads as exhaustive and should say so, otherwise the follow-up sweep will trip over them.

All six "now" numbers verify. Base :356/:357/:358/:390/:398/:384 are byte-identical to
head :285/:286/:287/:319/:327/:313; 841 -> 770 is the claimed uniform -71.
None is machine-read — every one is a # comment or a docstring, and no test parses
doxbench_scope.py by line number, so nothing is red and nothing would break.

N2 — NOTE. Commit 6cd3447f's message carries the superseded edge figures

"oD->oXd falls from 12 module-pairs / 19 statements to 9 / 16" was measured with the hole
Copilot found. 20b784d0's message explicitly declares it superseded, which is the right
handling, but the figures stand uncorrected in the history — worth a line in the landing
record so a later reader of git log is not misled.

N3 — NOTE. Body heading says "Five prose line-citations"; its own table has six rows

And the paragraph below it says "Two of the six". Cosmetic.

Shared checkout

Start 6612d323, 0 staged. End 6612d323, 0 staged. Untouched.

…s import, correct the counts and the header note

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:11
@brettheap

Copy link
Copy Markdown
Contributor Author

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

Fix round 1 on the independent verifier's report and Copilot round 2, at new head 0b707fc7ff1d38d45692f2707dcc73f755a4702b.

Notes taken (verifier's D1–D4):

  • D1 — doxbench_scope.py:12's dead from dataclasses import dataclass import removed (its only occurrence; the five @dataclass-decorated classes all moved to doxbench_scope_types.py). doxbench_scope.py 770 → 769 lines.
  • D2 — test_scope_column_split.py's "forty-odd landed test modules" corrected to the re-measured 13 landed test modules (26 import statements), in both the docstring and the PR body's Public surface section.
  • D3 — test_scope_column_split.py:43-44's "All four spellings" corrected to "All five spellings" (:83's own docstring already said FIVE) — Copilot round 2's finding.
  • D4 — doxbench_scope_types.py:39-42's header note narrowed from a package-wide claim ("modules in this package use ABSOLUTE imports") to THIS module only, matching the note it was adapted from (serve_wire.py:53-54). Measured false as a package-wide rule: 16 of 61 modules use relative imports, design.md D12 states no such rule.

D5 disposition — no code change, per the verifier's recommendation: SCOPE_KINDS stays in doxbench_scope_types.py as landed. Successor filed as #838 (openDox neutrality: ScopeKey validates against the tuned SCOPE_KINDS domain inside doxbench_scope_types.py), Refs #656 and Refs #837, no closing keyword.

PR body refreshed — the count corrections above, "Five" → "Six" over the six-row citation table (and the paragraph restating the count), the three archived-change citations named as correctly-not-refreshed, the verifier's D5 disposition + successor issue number, this round's changes added to the non-relocation change list, and claim 6 corrected to describe the dead-import removal.

Copilot round 2 — both review threads on test_scope_column_split.py are resolved; the round-2 thread (docstring "four"/"five") received a reply naming this fix commit and was resolved (auto-resolved by the Copilot reviewer after the push; verified via GraphQL isResolved/resolvedBy). The suppressed D4 finding had no thread — the body sentence above is its record.

Tests: python3 -m pytest -q tests/ideation-dashboard/test_scope_column_split.py tests/ideation-dashboard/test_doxbench_scope.py tests/ideation-dashboard/test_doxbench_turns.py — 224 passed.

No merge, approve, auto-merge, force-push, or rebase performed.

🤖 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 changes are a contained, mechanical relocation with consistent import repointing and targeted regression tests; only minor docstring consistency nits were found.

Review details

Suppressed comments (1)

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

scripts/ideation_dashboard/doxbench_scope_types.py:11

  • The module docstring says the scope types “carry no staging vocabulary”, but ScopeKey.__post_init__ validates tile_kind against SCOPE_KINDS in this same module (i.e., there is an explicit vocabulary/domain). This sentence reads as internally contradictory and could mislead future readers about what is actually enforced here.
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

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 refactor appears behavior-preserving with coverage added; remaining findings are minor docstring consistency nits.

Review details

Suppressed comments (2)

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

scripts/ideation_dashboard/doxbench_scope_types.py:11

  • The module docstring says these types “carry no staging vocabulary”, but this module defines and enforces SCOPE_KINDS via ScopeKey.__post_init__. Since SCOPE_KINDS is explicitly discussed later in the docstring, this earlier sentence reads internally inconsistent; tightening the wording here will prevent confusion.
    tests/ideation-dashboard/test_scope_column_split.py:86
  • This docstring hard-codes that the package uses the from . import X spelling “forty times”, but a quick count in scripts/ideation_dashboard/ currently finds 46 occurrences. This kind of exact count will drift over time and can mislead future readers; consider using non-numeric wording (or update the number if you want to keep it exact).
  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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