Repository navigation
Re-home serve_wire.hosted_index into serve_projection.py (pre-carve S-3, § 3.1) - #835
Conversation
`split-opendox-two-layer-product` § 3.1's carve manifest files every path under exactly ONE column with one disposition and one sha256. `serve_wire.py` goes WHOLE to openDox; `hosted_index` is an openXdox FR-048 index-confinement rule with exactly one in-tree reader, `serve_projection._serve_index`. A file with halves in two columns cannot be filed, so the minority half moves first and the carve stays a pure per-file move. The 47 lines at `serve_wire.py:1387-1433` are relocated BYTE-IDENTICAL (sha256 9a826204…82e41 before and after) to `serve_projection.py:94-140`. `registry_mod` — the only name the body reaches — was already imported by `serve_projection.py`, so nothing had to be imported back from `serve_wire`'s private helpers. NO re-export is left in `serve_wire.py`: `serve.py` imports the name back from `serve_projection` instead, in a block it already had, so `serve.hosted_index` resolves exactly as before for the suites that call it. The one non-relocation change is `serve_wire.py`'s own docstring sentence at :37-39, which named this obligation in advance; it is rewritten to record that split S-3 discharged it. No behaviour change, no public-name change, no signature change. `serve_openxfactory_lanes.py`'s four `serve_wire` names are deliberately untouched (memo § 7 OQ-B, unruled). Refs #656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
`test_serve_column_split.py` is where the § 2.4 moves are pinned, so the pre-carve one goes there too, at the same strength: `hosted_index` is callable on `serve_projection` and is NOT reachable on `serve_wire` — `getattr` catches a re-export and a re-definition alike, since both set the same module attribute — and `serve.hosted_index` is the projection column's function rather than a second copy left behind. Without this, re-adding the name to the wire module for a caller's convenience would silently put openXdox content back into an openDox row with nothing else red. The existing `hosted_index` behavioural tests (`test_session_confinement.py`, four of them) are UNMODIFIED and still read `serve_mod.hosted_index` through the preserved re-export, which is the actual proof that the move changed no behaviour. Refs #656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
🟢 Approval recommended
The change is a low-risk, mechanically verified relocation with explicit tests preserving the public surface, and only minor docstring cleanup suggested.
Pull request overview
This PR mechanically relocates the hosted_index(document: dict) -> dict hosted-plane index projection from serve_wire.py into serve_projection.py to keep the upcoming carve manifest “one path, one column”, while preserving the public surface via serve.hosted_index.
Changes:
- Moved
hosted_indeximplementation fromscripts/ideation_dashboard/serve_wire.pyintoscripts/ideation_dashboard/serve_projection.py(intended to be byte-identical). - Updated
scripts/ideation_dashboard/serve.pyre-export to importhosted_indexfromserve_projectioninstead ofserve_wire. - Added/extended column-split tests to assert
hosted_indexis not reachable onserve_wireand thatserve.hosted_indexpoints to the new home.
File summaries
| File | Description |
|---|---|
| tests/ideation-dashboard/test_serve_column_split.py | Adds invariants that hosted_index lives in serve_projection, is absent from serve_wire, and remains re-exported via serve. |
| scripts/ideation_dashboard/serve.py | Re-points the hosted_index re-export import source to serve_projection. |
| scripts/ideation_dashboard/serve_wire.py | Removes hosted_index and updates module docstring to reflect the re-home. |
| scripts/ideation_dashboard/serve_projection.py | Adds hosted_index definition and removes it from the serve_wire import list. |
Review details
- Files reviewed: 4/4 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.
Copilot review finding on PR #835: the "WIDENED BY PR 3 OF 4" paragraph still said the hosted-plane group "moves here", so a reader met the claim that `hosted_index` lives in this module several lines before the sentence saying it does not. Factual as a matter of reading order, and it is the failure mode the S-3 sentence exists to prevent. The widening is now stated with its narrowing in the same breath, and the group's arrival is past tense. No code change: docstring prose only, in the module whose whole remaining content is openDox. Refs #656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
There was a problem hiding this comment.
🟢 Approval recommended
The change is a verified mechanical relocation with call sites updated consistently and new tests enforcing both the new home and preserved public re-export.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox) VERDICT: PASS WITH NOTES at head I did not author this PR. Nothing was merged, approved, pushed, dispatched or resolved; this comment is my only act on GitHub. The twelve items
The edge scan (mine, written independently)60 modules under
Every number reproduces the body exactly, from an independently written script and independently derived tags. Stronger than the body claims: Tests
DefectsSHOULD-FIX — the body's file-level sha256 table is stale by one commit. It states NOTE — one sentence of the same docstring is still pre-split. NOTE — only one of the two new tests is revert-detecting. NOTE — " Shared checkout
|
…from this module Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
|
Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox) Fix round 1 on the independent verifier's PASS WITH NOTES review. One commit,
Not taken: the SHOULD-FIX's other two NOTEs are documentation-only observations already addressed by the body text (the two-tests-independence NOTE and the "reach" NOTE) — no action needed beyond what the body already said, and the SHOULD-FIX (stale table row) is the one this round fixes.
Nothing merged, approved, or resolved; no thread touched; no file besides |
There was a problem hiding this comment.
🟢 Approval recommended
The change is a verified symbol move with consistent import rewiring and targeted tests ensuring the symbol’s new home and preserved public surface.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
…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]>
Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
Refs #656 — pre-carve split S-3 of the § 3.1 scout memo
(
opendox-carve-3-1-spec-memo-2026-09-08.md§ 4). Base56e69a11.split-opendox-two-layer-product§ 3.1's carve manifest files every path withONE disposition and ONE sha256, under ONE destination column. A file whose
halves belong to two columns cannot be filed.
serve_wire.pygoes whole toopenDox;
hosted_indexis an openXdox FR-048 index-confinement rule withexactly one in-tree reader. So the minority half moves first, inside
openxFactory, and the carve stays a pure per-file move.
serve_wire.py's own docstring named this obligation before this PR existed:"
hosted_indexhas exactly one in-tree reader,serve_projection.py's_serve_index(an openXdox FR-048 index-confinement rule; the § 3 carve willhave to re-home it out of this shared module alongside its column)."
Mechanical relocation: no behaviour change, no public-name change, no
signature change.
What moved
hosted_index(document: dict) -> dictscripts/ideation_dashboard/serve_wire.py:1387-1433(at base56e69a11)scripts/ideation_dashboard/serve_projection.py:94-1409a8262046e292ca96b2d7236732d2fffbdf72283a5b8813986fc03e5db182e419a8262046e292ca96b2d7236732d2fffbdf72283a5b8813986fc03e5db182e41— byte-identicalFile sha256, base → head:
serve_wire.py8d68aac4…8bacae032ee1…0f4eserve_projection.py420a887c…9203780b6d41…4da3serve.pyda863ab1…dc0f9fd3440f…f642hosted_index's own imports. The body reaches exactly one module-levelname,
registry_mod.is_publishable_ref(3 call sites) — andserve_projection.pyalready importedsnapshot_registry as registry_modatits line 53, for
resolve_source_pathand_serve_source. Nothing had to beimported from
serve_wire's private helpers, so the destination gained noserve_wirename and no new module edge.No re-export is left in
serve_wire.py— that is the point of the split.serve.pyimports the name back fromserve_projectioninstead (a re-exportblock
serve.pyalready had, at :191-197), soserve.hosted_indexresolvesexactly as before for the suites that call it directly, and
serve.py's own:163-169claim about its namespace stays true.Repointing the one in-tree reader.
serve_projection._serve_index(:238 at head) is the reader; it now calls the module-local definition, so its
from ideation_dashboard.serve_wire import (…)list dropshosted_indexandkeeps the other three. That import statement — the
serve_projection→serve_wiremodule edge — remains; it is not S-3's to remove.OQ-B untouched.
serve_openxfactory_lanes.py:52-57still imports its fourserve_wirenames (HOSTED_SESSION_REFUSAL,JSON_CTYPE,JSON_OBJECT_BODY_REQUIRED,hosted_ref_refused) unchanged — memo § 7 OQ-B isunruled and this PR does not touch it.
Cross-column import edges: BEFORE == AFTER, and that is correct
Measured with a 55-line AST scan over all 60 modules of
scripts/ideation_dashboard/, tagging each module by D3's column table plus thetwelve § 2.4 additions of memo § 8. Counting UNIQUE
(source module, target module)pairs:56e69a11)d758a6df)Counting import STATEMENTS instead of pairs gives 24 / 14 / 5 / 21 / 19 / 7 / 3
/ 16 / 7 — also identical before and after.
S-3 removes no cross-module edge, and memo § 4 does not claim one. S-1
("removes 4 of 14 oD→oXd edges") and S-2 ("removes the single oD→oxF edge") are
edge-removing; S-3's entry says only that the wire module's rest goes whole to
openDox, and that it "does not resolve
serve_openxfactory_lanes.py:52".What S-3 removes is column-mixing WITHIN one file: after this PR
serve_wire.py's DEFINITIONS are all openDox (it still IMPORTSdoxbench_packet,doxbench_contractsandsnapshot_registry, unchangedfrom base and not S-3's to remove) and
hosted_indexsits in the openXdoxmodule that reads it. That is a manifest property (one path, one column), not an
import-graph property, which is exactly why § 4 files it as a pre-carve split
rather than as an
import rewritesedit class.Where my BEFORE differs from memo § 2.3 the cause is (a) drift from
d758a6dfto
56e69a11and (b) my own column tags for the twelve § 2.4 modules, which thememo does not publish per-module. Three of the nine reproduce the memo exactly.
The BEFORE/AFTER comparison is sound regardless: both columns are the same
script over the same tags, run twice.
Residual for the manifest author (no action here):
serve_projection.py:54still imports
HOSTED_SESSION_REFUSAL,JSON_CTYPEandhosted_ref_refusedfrom
serve_wire— one surviving oXd→oD pair, by design (hosted_ref_refusedis read by all three columns, per
serve_wire.py's docstring).Every non-relocation line change
serve_wire.py:37-39→:37-44— the docstring sentence that named theobligation, rewritten to record that S-3 discharged it. This is the one
non-relocation change to shipped code. Before:
After:
1b.
serve_wire.py:29-31→:29-34(commit892c9423, on the Copilotround below) — the same paragraph's opening, which still said the hosted-plane
group "moves here", so a reader met that claim several lines before the
sentence saying
hosted_indexdoes not. The widening is now stated with itsnarrowing before the group is named, and the arrival is past tense:
The group is still NAMED in full rather than trimmed to two: this docstring is
the record of why the hosted-plane confinement was filed here, and PR 3 of 4
did file all three.
:50-52's "serve.pyimports all three back by name, so…
serve.hosted_indexstill resolve" is deliberately left alone and is stillliterally true — one of the three now comes from
serve_projection, which theS-3 sentence says.
1c.
serve_wire.py:54-55→:54-56(commitfb50536f, fix round 1'sNOTE 1) — the same paragraph's closing sentence, which still said
serve.py"imports all three back by name"; after S-3 only two of the three
(
HOSTED_SESSION_REFUSAL,hosted_ref_refused) come from this module, andthe third,
hosted_index, is re-exported fromserve_projectioninstead.Reworded to name that split; no other code edit.
2.
serve_wire.py— lines:1385-1433deleted (two blank separators plusthe function). The file now ends at what was
:1384.3.
serve_projection.py:57—hosted_index,dropped from thefrom ideation_dashboard.serve_wire import (…)list. Nothing else in thatstatement changed.
4.
serve_projection.py:83-92— an 88-character section banner in themodule's existing style (
# ——— hosted-plane index projection (pure) ———,matching
# ——— source-path containment (pure) ———at :69) plus a nine-linecomment recording the S-3 arrival, the source range, and that
registry_modwas already present. Comment only; no code.
5.
serve.py—hosted_index,moved from theserve_wirere-export block(:290) into the
serve_projectionre-export block (:195), in isort position.Net zero lines; both blocks already existed and already carried
# noqa: E402,F401.6.
tests/ideation-dashboard/test_serve_column_split.py— "FOUR THINGS" →"FIVE THINGS" plus a fifth docstring item;
serve_wireadded to an existingfrom ideation_dashboard import …line; and section 5, two tests (below).Nothing was renamed, reordered or reformatted outside the moved block. No
openspec/**,contracts/**or.github/**file is touched; D3's table is notupdated (the manifest author re-measures).
The test that keeps it done
test_serve_column_split.pyis where § 2.4's moves are pinned, so the pre-carveone goes there, at the same strength:
test_the_hosted_index_projection_belongs_to_the_projection_column—hosted_indexis callable onserve_projectionandgetattr(serve_wire, "hosted_index", None) is None. Onegetattrcatches a re-export and are-definition alike, since both set the same module attribute.
test_serve_re_exports_the_hosted_index_from_its_new_home—serve.hosted_index is serve_projection.hosted_index: the public surface ispreserved AND sourced from the new home, not from a second copy.
The four existing behavioural tests
(
test_session_confinement.py:1454,1604,1632and the aggregate case) areUNMODIFIED and still read
serve_mod.hosted_indexthrough the preservedre-export — which is the actual proof the move changed no behaviour.
conftest.py'sSERVE_SURFACE_MODULESandNO_IMPLICIT_PUSH_MODULESalreadylist
serve_projection.py, so every source-level sweep over the serve surfacestill sees this code; neither tuple needed widening.
Evidence
python3 -m pytest -q tests/ideation-dashboard— 5,095 passed, 31 skipped,1 failed in 680s. The one failure is
test_snapshot.py::test_find_validator_locates_pinned_checkout, which isPRE-EXISTING and environmental: reproduced identically on a clean
worktree at base
56e69a11(find_validatorlooks for a siblingopenxFactorycheckout, which a scratchpad worktree has no sibling for).Unrelated to this change.
python3 -m pytest -q -p no:cacheprovider(whole suite, that oneenvironmental test deselected) — passed 35 minutes locally without
finishing, because three lane worktrees are sharing this box; abandoned per
the split brief's ~15-minute rule in favour of the authority below.
pytest-suite— PASS in 20m47s at head892c9423, and every otherrequired check green:
lane-line,openspec-cli-pin,openreposhape-pin,release-tag-gate,clearing-dispatch-gate,signed-execution-chain-gate,wallet-validation,merge-master-approval. That is the whole-suiteevidence for this PR.
python3 scripts/proposal-support.py . verify—proposal support verification ok, byte-identical to the same command at base.python3 scripts/doc-health.py --single-repo .— 92 findings, and 92 atbase; the two reports diff ONLY on the worktree directory name in the
repo=/Repo-Identity:fields. Parity exact.Review
One
copilot-pull-request-reviewerround, one thread, taken as FACTUAL andfixed in
892c9423(docstring prose only, no code): the paragraph opening stillread as though
hosted_indexlived here. Replied on the thread naming the fixcommit and resolved. A second Copilot round ran on
892c9423and raisednothing; no unresolved threads remain. Change 1b above is that fix; the affected suites
(
test_serve_column_split,test_session_confinement,test_hermeticity,test_session_snapshot,test_extension_point_parity) run 146 passed at892c9423.NOT DONE
docs/opendox-carve-manifest.yaml(it does not exist and this PRdoes not create it).
openspec/**edit — not D3's table, not the ratified change, not adisposition.
serve_openxfactory_lanes.py's fourserve_wirenames,human_seen.py'sfrom .workbench import slug, andintent_apply_lane.py'sbranch_session.bootstrap_sessionsare all unruledand all unchanged.
doxbench_scope.pyorlens.py— those are S-1 and S-2, separatePRs in this lane.
Asking for Brett Heap's separate word to land this.
🤖 Generated with Claude Code
https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu