Repository navigation
Extract the openXdox and lane serve columns (§ 2.4 PR-3) - #761
Conversation
`serve.py` (6,914 lines) carried the doxBench workbench surface, the
project/notebook/edit routes and the shared wire vocabulary in one file.
This is the pure move that separates them, ahead of the openDox carve:
* `serve_workbench.py` — the seven workbench route handlers and their
private helpers, composed back as the `WorkbenchRoutes` mixin.
* `serve_project.py` — `_serve_project_register`, `_handle_notebook_action`
and `_handle_edit_action`, composed back as `ProjectRoutes`.
* `serve_wire.py` — the wire vocabulary and body bounds the core AND both
columns read, so the import graph is a DAG rather than a cycle.
Every moved symbol is byte-identical to its previous text (142 of them,
verified by an AST comparison against the parent commit); the only edits are
the mechanical import and binding lines the shape requires. Mixins precede
`SimpleHTTPRequestHandler`, so `_route` and `do_POST` stay literally inside
`class DashboardHandler` in `serve.py`, the CAPABILITIES arm stays inline, and
`build_server` and its `BoundDashboardHandler` construction are untouched.
Every moved module-level name is imported back by name, so `serve.X` resolves
for every reader that already had it.
Ten source-level tests are repointed from `serve.py` to the whole serve
surface — same assertion, strictly more code scanned — and one monkeypatch
follows its name to the module that now resolves it. Each is disclosed in the
PR body with the mutation that proves it still bites.
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_019sa33gYhfLF1F1MkS7Xrd6
Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019sa33gYhfLF1F1MkS7Xrd6
#748) Fixes verified findings from independent review of § 2.4 PR-2 (serve.py openDox-column extraction): - F1: decision 1's "mixins precede SimpleHTTPRequestHandler" ordering claim was never checked. Added test_extension_point_parity.py tests pinning DashboardHandler.__mro__ and asserting WorkbenchRoutes/ ProjectRoutes share no member name with the http.server chain, plus a negative control; both mutation-verified. - F2/Copilot: serve_surface_source()'s docstring overstated its boundary guarantee (a "\n\n" join defeats a blank-line pattern, not just a single-newline one). Corrected the docstring. - F3: test_session_snapshot.py's apply_lane absence was still narrowed to serve.py alone after this PR made the serve four files; repointed that negative clause to serve_surface_source() (positives stay pinned to serve.py, forward-flagged for PR-3). Mutation-verified. - Scope-lens (wf24b r12.json): corrected row 2's bound-buffer counts (40 total: 0/36/4/0 across the surface, not "26 in serve_workbench.py"); disclosed row 11's second, undisclosed widening of three positive import anchors; removed the now-dead SERVE_PY constant in test_doxbench_bound_buffer.py. - Copilot: widened the relative-import guard regex (test_repo_selector.py) from `\.\w*` to `\.+\w*` so it also catches parent-relative imports (`from .. import x`); added a parametrized test over dot depths 1-3. Nothing weakened, deleted, skipped or made vacuous; all repoints disclosed. Full suite + validators re-run green (one pre-existing environmental failure plus one confirmed unrelated flake, both disclosed in the PR body). Refs #656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019sa33gYhfLF1F1MkS7Xrd6
…mport guard (PR #748) Two open Copilot review threads: - conftest.py:178 — SERVE_SURFACE_MODULES claimed "import-graph order" but started with serve.py (the module that imports the other three). Reordered to serve_wire.py -> serve_workbench.py -> serve_project.py -> serve.py, matching the actual import DAG, and documented in the docstring why no reader depends on the order. - test_repo_selector.py:642 — the relative-import guard regex (\.+\w*) matched a single module segment only, so `from .pkg.sub import x` and `from ..pkg.sub import x` slipped through. Widened to \.+[\w.]*. r9 LOW: test_the_relative_import_guard_catches_every_dot_depth restated the guard's pattern as an independent literal copy rather than exercising the production regex, so narrowing the production pattern would have left the test green. Hoisted a shared RELATIVE_IMPORT_RE module-level constant used by both the production scan and the (renamed, now segment-depth-covering) parametrized test; mutation-verified that narrowing the shared constant now turns both red. Both threads replied to and resolved separately after push. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017guxvApq5jqB1QXukJUsTQ
…-columns One real conflict, in tests/ideation-dashboard/conftest.py's NO_IMPLICIT_PUSH_MODULES tuple: this branch widens it by serve_workbench.py/serve_project.py/serve_wire.py (§ 2.4 PR 2), main's #741 widens it by doxbench_status_exemption.py (§ 2.4 OQ-1). Resolved by keeping both sides' additions and both comment blocks. Nothing else conflicted. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017guxvApq5jqB1QXukJUsTQ
… seam (§ 2.4 PR 3)
`split-opendox-two-layer-product` § 2.4, PR 3 of 4 — the first slice where the
route extension point carries live traffic instead of an empty tuple.
Three new column modules, each a mixin class + a structurally-conforming
extension class + its route constants, every moved body byte-identical to the
one it replaced (18 of 18 functions, asserted against HEAD):
* serve_gate.py (openXdox) _handle_gate_action, _log_gate_failure
* serve_projection.py (openXdox) the snapshot read, the index roster and
the /source pass-through, plus resolve_source_path
* serve_openxfactory_lanes.py (this repository's own adapter column, DQ-1/OQ-3)
the DTN and staging seeds, the register-edit lane,
both refresh bindings and the committed-intent feed
serve_wire.py gains the hosted-plane confinement (HOSTED_SESSION_REFUSAL,
hosted_ref_refused, hosted_index): the core AND both new columns read it, and
leaving it in serve.py would have forced a column to import serve while serve
imported it — the cycle serve_wire.py exists to prevent.
profile_openxfactory.py is created here with the header PR 4 already wrote for
it, carrying ROUTE_EXTENSIONS alone; build_server registers that profile ahead
of the caller's route_extensions, additively, exactly as build_parser does for
SUBCOMMAND_EXTENSIONS. Nine arms leave the fixed _route/do_POST tables and
arrive as RouteBindings dispatched BY NAME against the live handler, so each
still meets self.loopback and self.capabilities by construction.
Two deliberate exceptions, both disclosed in the PR body: /snapshot.json's
handler moved but its ARM stayed core (its test reads the per-server
build_server(snapshot_route=...) keyword, which a frozen pattern cannot carry),
and the /source pair moved TOGETHER because splitting it would have changed the
answer a trailing-slash request gets. _refuse_bare_source is the one non-move.
Test repoints are per ruling (a), each disclosed with the mutation that proves
it bites: the pinned dispatch table, the MRO and mixin-collision pins, the
default-table assertion, the off-loopback core comparator, the hosted-arrival
source read, the intent-feed AST walk, and both conftest surface tuples
(widened, never narrowed). No behavioural test modified, no golden regenerated.
New: tests/ideation-dashboard/test_serve_column_split.py pins the contributed
table and gives every moved write route its own off-loopback parity test.
Refs #656
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_017guxvApq5jqB1QXukJUsTQ
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.
🔵 Needs a closer look
It refactors live request dispatch and server assembly (core vs contributed route resolution) across multiple modules, so final human verification is warranted even with strong test pinning.
Pull request overview
This PR implements §2.4 PR-3 of the openDox/openXdox extraction by moving the openXdox gate + projection routes and openxFactory’s lane routes out of serve.py into dedicated mixin modules, and then serving them via the route extension point (by-name dispatch against DashboardHandler) while keeping serve.py’s public surface stable via re-exports.
Changes:
- Add three new serve “column” modules (
serve_gate.py,serve_projection.py,serve_openxfactory_lanes.py) and compose them intoDashboardHandleras mixins. - Register the in-tree route profile (
profile_openxfactory.ROUTE_EXTENSIONS) insidebuild_server()and flatten contributed bindings viaroute_extension.collect_bindings(...). - Repoint/widen tests to scan the full “serve surface” and add a new test file that pins the contributed binding table and off-loopback parity for moved write routes.
File summaries
| File | Description |
|---|---|
| tests/ideation-dashboard/test_session_snapshot.py | Repoint source-scan assertions to the full serve surface after handlers moved into new modules. |
| tests/ideation-dashboard/test_serve_column_split.py | New test suite pinning moved handlers’ resolution, profile composition order, contributed binding table, /source ordering trap, and off-loopback parity for moved write routes. |
| tests/ideation-dashboard/test_route_extension.py | Update expectations: default server now includes the in-tree profile bindings; add additive-composition property test; repoint core comparator route. |
| tests/ideation-dashboard/test_intent_plane_boundary.py | Widen AST authority-scan to the full serve surface and assert the handler exists exactly once. |
| tests/ideation-dashboard/test_extension_point_parity.py | Narrow the fixed core arm tables (moved arms now contributed) and widen MRO + collision sweeps to include the three new mixins. |
| tests/ideation-dashboard/conftest.py | Extend serve-surface module lists so all source-level scans include the new serve column files. |
| scripts/ideation_dashboard/serve.py | Compose new mixins, re-export moved names/constants, shift moved routes to contributed binding dispatch, and compose profile route extensions inside build_server(). |
| scripts/ideation_dashboard/serve_wire.py | Move hosted-plane confinement helpers (HOSTED_SESSION_REFUSAL, hosted_ref_refused, hosted_index) out of serve.py into shared wire vocabulary. |
| scripts/ideation_dashboard/serve_projection.py | New projection/snapshot column mixin + extension: /snapshot-index.json, /source, /source/, plus moved snapshot/source handlers and resolve_source_path. |
| scripts/ideation_dashboard/serve_openxfactory_lanes.py | New openxFactory lane column mixin + extension: refresh/seeds/apply-register-edits and committed-intents feed routed through the seam. |
| scripts/ideation_dashboard/serve_gate.py | New gate-console column mixin + extension: contributed /actions/gate/ prefix dispatch and logging helper. |
| scripts/ideation_dashboard/profile_openxfactory.py | New in-tree profile defining the assembled ROUTE_EXTENSIONS tuple for build_server() composition. |
Review details
- Files reviewed: 12/12 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.
The mixin-vs-SimpleHTTPRequestHandler collision check subtracted a fixed
list of five dunder names from the intersection. WorkbenchRoutes already
carries __annotations__ (from INTAKE_QUERY_FIELDS's class annotation),
and a future stdlib release could add a dunder to the http.server chain
that the hand-listed set doesn't name -- making the test fail for a
reason unrelated to what it guards.
Both the real check and its negative control now filter dunders by the
general name.startswith("__") and name.endswith("__") rule via a shared
_non_dunder() helper, applied to both the mixin side and the chain side
before intersecting, so the assertion's strength (no shared non-dunder
member between the mixins and the whole http.server MRO chain) is
unchanged. Added a non-vacuity floor asserting the mixin member set is
non-empty, so a reader bug that resolves to the wrong classes can't pass
by producing an empty set on both sides.
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_017guxvApq5jqB1QXukJUsTQ
Fix round finding F1/F5 (WF24d r8): the base branch advanced past PR-3's fork point to ca61cf1 ("Exclude dunders by rule, not a hand-listed set, in mixin collision test"), which rewrote the same test function this PR also rewrites in place. Resolved test_extension_point_parity.py's test_the_mixins_share_no_member_name_with_the_http_server_chain by keeping BOTH edits: ca61cf1's rule-based `_non_dunder(...)` / `_http_server_chain_members()` exclusion (never the hand-listed {__module__, __doc__, __qualname__, __dict__, __weakref__} set) AND PR-3's five-mixin sweep (WorkbenchRoutes, ProjectRoutes, GateRoutes, ProjectionRoutes, LaneRoutes) plus its non-vacuity assertion. Taking either side wholesale would have silently narrowed the other. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01UyynFBwGMQNeNU8D8qhQBW
…ce-gap disclosure Fixes verified findings from the WF24d parity + gating lenses on PR #761 (§ 2.4 PR 3, r7/r8): * Arm-count claim corrected: "five read arms" -> "four read arms" (matches the measured ROUTE_ARMS 10->6 delta) in the PR body and the test comment above ROUTE_ARMS in test_extension_point_parity.py. * "35 in-tree build_server(...) call sites across 27 files" corrected to the measured "31 in-tree test call sites across 27 test files" (AST walk, not a grep of prose) in serve.py's build_server docstring, profile_openxfactory.py's ROUTE_EXTENSIONS comment, and the PR body. * serve_wire.py's docstring and the PR body's "Plus" bullet both over-generalized the reason HOSTED_SESSION_REFUSAL/hosted_ref_refused/ hosted_index moved to serve_wire.py, claiming all three are read by the core and both columns. Corrected per-name: only hosted_ref_refused is read by the core; HOSTED_SESSION_REFUSAL is read by both columns only; hosted_index has exactly one in-tree reader (serve_projection.py). * profile_openxfactory.py's relative-import comment spoke in CLI terms copied verbatim from #742 (referencing cli.py/cli_gate, neither of which exists on this branch) to keep an eventual add/add merge to one hunk. Rewritten for the route/server half; the merge cost (a one-paragraph resolution instead of a clean add/add on that paragraph) is disclosed in the PR body. * conftest.py's SERVE_SURFACE_MODULES/NO_IMPLICIT_PUSH_MODULES banner said "four files" where the tuple now has seven entries; corrected. Added a comment explaining why profile_openxfactory.py (also new, also read by build_server) is deliberately excluded from both tuples: it is relative-import-only by design, so the D12 relative-import guard would fail on it for a reason it does not exist to catch. * Disclosed an undisclosed test addition (test_route_extension.py's test_a_caller_s_extensions_are_added_to_the_profile_and_never_replace_it) and corrected "No behavioural test was modified" to name the one behavioural comparator repoint (row 5) it was asserted alongside. * Catch-up merge: origin/feat/split-2-4-pr2-opendox-columns advanced to ca61cf1 ("Exclude dunders by rule...") after this branch's original push, rewriting the same test function this PR also rewrites. Took a real merge and resolved the one conflict keeping BOTH the base's rule-based _non_dunder exclusion and this PR's five-mixin sweep, disclosed in the PR body in place of the stale "base is an ancestor" claim. * Added test_an_exact_caller_binding_under_a_contributed_prefix_wins_the_match to test_route_extension.py, pinning (as a disclosed characterization, not a fix) that collect_bindings accepts an exact caller binding whose pattern sits inside an already-declared contributed PREFIX binding and lets it win the match. The structural remedy is in scripts/route_extension.py, which this lane must not touch; raised in the PR body's Decisions for Brett instead. python3 -m pytest -q tests/ideation-dashboard tests/doc-health: 1 failed (known environmental test_find_validator_locates_pinned_checkout), 6635 passed, 31 skipped, 783s. OPENSPEC_TELEMETRY=0 openspec validate --all --strict: 97 passed, 1 failed (known disposition-codexfactory-declared-renames artifact). Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01UyynFBwGMQNeNU8D8qhQBW
There was a problem hiding this comment.
🟡 Changes recommended
It introduces a confirmed authorization-bypass path where exact caller bindings can override security-sensitive contributed prefixes (e.g. /actions/gate/) unless collision rules are tightened.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 2
- Review effort level: Lite
…3-extension-columns Six conflicts, all from the squash-merge identity problem (#748/#742 landed as squash commits, so git treats PR-3's pre-existing work against them as a fresh collision rather than a fast-forward): - scripts/ideation_dashboard/profile_openxfactory.py (add/add): the only real splice. Kept the shared module docstring (#742's landed header, which already anticipated PR 3 adding ROUTE_EXTENSIONS), rewrote the "Relative, like the core's own imports..." comment to speak for both verbs and routes, and kept BOTH extension tuples: SUBCOMMAND_EXTENSIONS (#742/main) alongside ROUTE_EXTENSIONS + `from . import serve_gate, serve_openxfactory_lanes, serve_projection` (this branch). DISCOVERED WHILE RUNNING THE FULL SUITE, not part of either side's original text: a plain top-level `from . import cli_gate` (#742's own spelling) turned into a regression the moment ROUTE_EXTENSIONS joined it in the same module. `serve.py`'s `build_server` imports `profile_openxfactory` on every startup, hosted included, to reach ROUTE_EXTENSIONS; `cli_gate` pulls in `authoring` -> `workbench` -> PyYAML, which the hosted image deliberately does not carry (`test_repo_selector.py::test_hosted_posts_do_not_load_notebook_only_dependencies`, green on `main` and on this branch's pre-merge tip, red after a naive splice). Fixed by resolving `SUBCOMMAND_EXTENSIONS` and the `cli_gate` submodule attribute lazily, via a module-level `__getattr__` (PEP 562) — the same pattern `authoring.py` already uses for `REQUIRED_HEADER_FIELDS` and for the same reason (a shared module should not carry a dependency only one caller needs). `cli.py`'s read of `SUBCOMMAND_EXTENSIONS`, the `len(...)==1`/`isinstance(...)` pins in `test_cli_column_split.py`, and the `profile.cli_gate is gate` identity check in `test_a_library_caller_gets_the_columns_of_its_own_core` (module `__getattr__` still answers through `sys.modules`, so identity holds) all still pass — verified by re-running the full targeted suite. - scripts/ideation_dashboard/serve.py (7 hunks): resolved by keeping our side throughout, verified hunk by hunk rather than assumed: * `import traceback` (main) dropped — the only caller of the module (`_log_gate_failure`, T092 defect-3 logging) already lives in `serve_gate.py` on this branch, which imports `traceback` itself; the name would be dead/unused in `serve.py` after the extraction. * the split docstring + import block, the `serve_projection` import + widened `serve_wire` import list, the `fresh_ledger_events`/ `hosted_index`/`hosted_ref_refused` import line, and the `DashboardHandler` mixin base list: our side is a strict superset of main's (main's text is a subset written before PR 3 added its three columns). * the `_handle_dtn_seed`/`_handle_staging_seed`/`_handle_apply_register_edits`/ `_handle_refresh_action`/`_run_refresh` block and the `_read_snapshot`/`_serve_snapshot`/`_hosted_entry_refused`/`_serve_index`/ `_serve_committed_intents`/`_keyed_source`/`_serve_source` block: main still carries these as fixed core methods; this branch already moved them (byte-diffed to confirm) into `serve_openxfactory_lanes.py` and `serve_projection.py` respectively, so keeping our side (empty) is the correct resolution, not a loss. - scripts/ideation_dashboard/serve_wire.py (add/add, 3 hunks): our side only — the hosted-plane confinement paragraph, the `HOSTED_SESSION_REFUSAL`/ `hosted_ref_refused`/`hosted_index` additions and the `snapshot_registry` import are PR-3-only content; main's side of every hunk was empty. - tests/ideation-dashboard/conftest.py (3 hunks), test_extension_point_parity.py (3 hunks), test_session_snapshot.py (1 hunk): our side throughout — each is the "seven files"/five-mixin widened version of an assertion main still states at PR 2's "four files"/two-mixin count; no assertion was dropped, every one got strictly broader (NO_IMPLICIT_PUSH_MODULES and SERVE_SURFACE_MODULES tuples are the union, in dependency-first order). Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01UyynFBwGMQNeNU8D8qhQBW
There was a problem hiding this comment.
🟡 Changes recommended
Two lane POST handlers can currently return without sending an HTTP response and can raise on non-dict JSON bodies due to missing body-type validation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
scripts/ideation_dashboard/serve_openxfactory_lanes.py:197
_handle_staging_seedreturns early when_read_json_body()isNoneand assumes the parsed JSON is a dict (usesbody.get(...)). Since_read_json_body()can return non-dict JSON orNoneon malformation, this can raise AttributeError and/or result in no HTTP response being sent. Validate the body type and return a consistent 400invalid_bodyresponse.
body = self._read_json_body()
if body is None:
return
project = str(body.get("project_id") or "").strip()
- Files reviewed: 12/12 changed files
- Comments generated: 1
- Review effort level: Lite
Brett Heap ruled A on 2026-09-07 over Copilot review PRRT_kwDOTAvnrs6f_iG1:
close the precedence gap this PR opened rather than defer it, which authorizes
this lane's one edit to the landed seam scripts/route_extension.py
(subcommand_extension.py stays untouched).
THE GAP. collect_bindings keyed a collision on (method, pattern, is_prefix)
alone, so an EXACT binding was never compared against an already-declared
PREFIX binding's pattern. Before § 2.4 PR 3 moved the gate console off
serve.py's fixed do_POST table this was unreachable — no caller-suppliable
binding stood a chance against a hard-coded `if`. Once ACTIONS_GATE_PREFIX and
SOURCE_PREFIX became CONTRIBUTED prefix bindings, a caller passing
route_extensions could declare an exact binding under one, the build accepted
it, and — because exact is consulted before prefix — it won the match, so
_handle_gate_action and its loopback/capability/actor/human-console refusals
never ran for that path. Demonstrated live at this branch's head.
THE REFUSAL. collect_bindings now refuses ANY pattern that sits under an
already-declared prefix pattern (str.startswith — RouteBinding.matches's own
test), in EITHER declaration order, with the same RouteBindingError a literal
duplicate raises; the message names both bindings by their own declared method
and pattern, as _collision_message already does. Method-aware on the same slot
rule the duplicate check uses, reused rather than restated
(_claimed_collision_keys -> _claimed_methods): POST-exact under POST-prefix
collides, a GET and a HEAD binding collide because a GET binding answers HEAD,
and a GET exact under a POST prefix does not — no live request is offered to
both. The check runs AFTER the exact-key check so a literal duplicate keeps
reporting itself as a duplicate.
NESTED PREFIXES: REFUSED, decided on evidence as the ruling directs. The
in-tree profile declares exactly two prefixes, POST /actions/gate/ and GET
/source/, and neither sits under the other, so nothing legitimate needs the
case — while which of two nested prefixes answered a path they both cover
would be settled by the assembly order this module refuses to depend on. Fail
closed.
STILL LEGAL, and the profile still builds: an exact pattern EQUAL to a prefix
minus its trailing slash is not under it ("/source".startswith("/source/") is
False, and no request path reaches both), which is exactly what the projection
column declares. Asserted directly and by the nine-binding profile pin.
Tests. test_an_exact_caller_binding_under_a_contributed_prefix_wins_the_match
is FLIPPED to ..._refuses_the_build over a real build_server, parametrized
over both contributed prefixes. New: the containment refusal over four
overlapping pairs x both declaration orders, message content included; the
positive control that a prefix of ANOTHER method does not collide; and the
/source-beside-/source/ pair plus the nine in-tree bindings.
test_exact_bindings_are_consulted_before_prefix_bindings is repointed onto the
legal cross-method pair, since the same-method pair it used to build is now
refused. Mutation-proved twice: dropping the refusal turns 10 tests red;
dropping its method-awareness turns 4 red.
Also corrects the false justification above build_server's lazy
`from ideation_dashboard import profile_openxfactory` (Copilot review
PRRT_kwDOTAvnrs6f_iG1): serve.py already imports all three contributed columns
at module scope, because they are DashboardHandler's mixin bases, so the
profile import pulls in nothing new. What must stay out of a module the
container runs as a plain script is cli_gate, and that is held out at the
profile's own end, which resolves SUBCOMMAND_EXTENSIONS on access (PEP 562).
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q8CkMMAdcUZCqAUTgNjsPy
There was a problem hiding this comment.
🔵 Needs a closer look
It changes core server routing composition and introduces new build-time route-collision semantics for security-sensitive prefixes, warranting a final human review despite strong test coverage.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/ideation-dashboard/conftest.py:228
serve_surface_paths()'s docstring says it returns "Every file the dashboard serve is made of", but this helper intentionally excludesprofile_openxfactory.py(per the comment immediately above). Updating the docstring avoids misleading future readers about what is (and isn't) being scanned.
- Files reviewed: 13/13 changed files
- Comments generated: 0 new
- Review effort level: Lite
…idence; record the § 2 carried items (#769) split-opendox-two-layer-product group-2 bookkeeping: tick § 2.1 (#724 e2b8f62), § 2.2/2.2a (#725 ea4e6ff), § 2.3 (#728 1a2ea82), § 2.4 (#736 a83eb93, #741 75467fe, #748 7f7ce75, #742 421b52d, #761 7992b87), § 2.6 (gate re-run on the branch: 6681 passed, the environmental snapshot test and the tolerated disposition artifact identical on main); § 2.5 stays open (Path A D-2). Records the twelve § 2 carried items for the § 3.1 carve manifest; repoints two doc_health sweep-record strings to doxbench_status_exemption. Landed under a Rule 6 window on Brett Heap's word "merge 769 when green" (2026-09-07). Refs #656. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q8CkMMAdcUZCqAUTgNjsPy
Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
Realizes
split-opendox-two-layer-product§ 2.4, PR 3 of 4: the openXdox gate and projection columns and openxFactory's own lane column leaveserve.pyand arrive through the ROUTE EXTENSION POINT that PR 1 landed. Refs #656.#748 landed as 7f7ce75 and #742 as 421b52d; this PR was caught up by merging main (conflicts resolved keeping both sides) and now targets main directly.
Fix-round catch-up merge, disclosed here: the base branch advanced past this branch's fork point (686706a) to
ca61cf1a("Exclude dunders by rule, not a hand-listed set, in mixin collision test") while this PR sat for review, and that commit rewrote the same test function this PR also rewrites in place,test_extension_point_parity.py::test_the_mixins_share_no_member_name_with_the_http_server_chain. Corrected here: an earlier note on this PR read the base as an ancestor of HEAD (true at the original push, false onceca61cf1alanded) and said no catch-up was needed. A real merge (git merge --no-edit) was taken instead, and the one conflict was resolved keeping BOTH sides —ca61cf1a's rule-based_non_dunder(...)/_http_server_chain_members()exclusion (never the hand-listed{__module__, __doc__, __qualname__, __dict__, __weakref__}set) AND this PR's five-mixin sweep (WorkbenchRoutes, ProjectRoutes, GateRoutes, ProjectionRoutes, LaneRoutes) plus its own non-vacuity assertion. Taking either side wholesale would have silently reverted the other's hardening inside the merge commit itself.This is the first slice where the seam carries live traffic rather than an empty tuple: four read arms and five write arms leave the fixed
_route/do_POSTtables and are dispatched BY NAME against the liveDashboardHandlerinstead — which is what makes every one of them still meetself.loopback,self.capabilities,self.actorand the human-console test by construction rather than by its author's memory.What moved
Three new column modules, each a mixin class + an extension class + its route constants. Every moved body is byte-identical to the one it replaced (asserted mechanically against
HEAD— 18 of 18 functions, including the three that landed inserve_wire.py).scripts/ideation_dashboard/serve_gate.py_handle_gate_action,_log_gate_failureACTIONS_GATE_PREFIXscripts/ideation_dashboard/serve_projection.py_query_key,_read_snapshot,_serve_snapshot,_hosted_entry_refused,_serve_index,_keyed_source,_serve_source,_refuse_bare_source(new), module fnresolve_source_pathSNAPSHOT_INDEX_ROUTE,SOURCE_PREFIX,BARE_SOURCE_ROUTE(new)scripts/ideation_dashboard/serve_openxfactory_lanes.py_handle_dtn_seed,_handle_staging_seed,_handle_apply_register_edits,_handle_refresh_action,_run_refresh,_serve_committed_intentsCOMMITTED_INTENTS_ROUTE,ACTIONS_REFRESH_ROUTE,ACTIONS_APPLY_REGISTER_EDITS_ROUTE,ACTIONS_DTN_SEED_ROUTE,ACTIONS_STAGING_SEED_ROUTEPlus:
scripts/ideation_dashboard/serve_wire.pygains the hosted-plane confinement —HOSTED_SESSION_REFUSAL,hosted_ref_refused,hosted_index(FR-048) — moved verbatim out ofserve.py. CORRECTED (an earlier version of this paragraph over-generalized): the three names are not read alike.hosted_ref_refusedis read by the core (_divergence_headers,serve.py) AND by both new columns.HOSTED_SESSION_REFUSALis read by both columns only — the core never names it.hosted_indexhas exactly ONE in-tree reader,serve_projection.py's_serve_index(an openXdox FR-048 index-confinement rule; the § 3 carve will have to re-home it out of this shared module with its column). Leaving any of the three inserve.pywould have forced at least one column to importservewhileserveimported it, which is the cycleserve_wire.pyexists to prevent; filing any of them under a column would have made the core or the other column depend on a column. It also gainssnapshot_registry as registry_modforis_publishable_ref(no cycle —snapshot_registryimports no module of the split).scripts/ideation_dashboard/profile_openxfactory.py— created here with the header Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742 already wrote for it (that PR's docstring names this one: "PR 3 of § 2.4 addsROUTE_EXTENSIONSbesideSUBCOMMAND_EXTENSIONS"). It carriesROUTE_EXTENSIONSonly;SUBCOMMAND_EXTENSIONSand itscli_gateimport arrive with Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742. The two PRs both add this file, so whichever lands second needs a one-hunk conflict resolution that keeps both constants — see "Decisions for Brett". Fix-round correction: the import comment aboveROUTE_EXTENSIONS's imports originally copied Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742's CLI-flavoured wording verbatim (referencingcli.py's note andcli_gate._core(), neither of which exists on this branch) so the eventual add/add merge would need only one hunk. It has been rewritten in this fix round to speak in route/server terms instead, on explicit instruction — the tradeoff is that the two branches' copies of this paragraph no longer match byte-for-byte, so the future merge with Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742 will need a one-paragraph resolution (keep this branch's route-flavoured wording) rather than a clean add/add on that paragraph; every other line of the shared header (docstring,ROUTE_EXTENSIONSvsSUBCOMMAND_EXTENSIONSconstants) is untouched and still resolves in one hunk.scripts/route_extension.py— edited under RULING A (design decision 9), the ONE landed-seam edit this lane is authorized to make.collect_bindingsgains the containment refusal and four private helpers (_claimed_methods,_share_a_method_slot,_sits_under,_overlapping_previous,_containment_message); every pre-existing refusal — literal duplicates, the GET/HEAD slot, missing and non-callable handlers, non-conforming extensions — is unchanged and still asserted, and the module still imports nothing but the standard library (the AST neutrality scan is unmoved).scripts/subcommand_extension.pyremains untouched.serve.py's lazyprofile_openxfactoryimport comment is corrected (design decision 10, Copilot reviewPRRT_kwDOTAvnrs6f_iG1): the stated justification was false on this branch, and the comment now carries only the half that is true. Its neighbouringcollect_bindingscomment also names the new refusal. No code inbuild_serverchanged — both are comment edits, in commit eb1dbee.serve.pyre-imports every moved module-level name by name (serve.ACTIONS_GATE_PREFIX,serve.SOURCE_PREFIX,serve.resolve_source_path,serve.hosted_index, … all still resolve), keeps_route/do_POSTliterally insideclass DashboardHandler, keepsCAPABILITIES_ROUTEinline and_session_repositoryin core, and drops its now-unusedimport traceback.Nine contributed bindings, in
collect_bindingsconsult order:Design decisions taken
/snapshot.json's HANDLER moved; its ARM stayed core. The arm testspath == self.snapshot_route, a per-server class attribute fed by the publicbuild_server(snapshot_route=…)keyword. ARouteBinding.patternis a frozen string, so contributing this route would have broken that keyword silently — no in-tree caller overrides it, so nothing would have gone red. The method therefore moved toserve_projection.pywith its neighbours and the dispatch arm stayed in_route. This is in tension with design § D2's "contributes snapshot,/sourceand projection routes", so it is flagged below rather than settled here. Third deviation from the § 2.4 memo, in the same spirit as PR-2's decisions 3 and 4.The
/sourcepair moved TOGETHER — behaviour would have changed otherwise.if path == "/source" or path == "/source/"was partly dead:path.startswith("/source/")fired first, so/source/reached_serve_source("")→ 404 with divergence headers and a zero-length body, neversend_error(404, "no source path"). Moving only the prefix binding would have promoted the surviving core arm above it and turned that answer into an HTML error body — observable, and exercised bytest_renderer.py::test_serve_rejects_path_traversal.collect_bindingsreturns every exact binding before every prefix one, so an exact/sourcebinding plus the/source/prefix binding reproduces today's order exactly._refuse_bare_sourceis the one non-move in this PR: asend_errorline lifted out of thatifso a binding can name it. Pinned bytest_the_exact_source_binding_is_consulted_before_the_prefix_oneand by a live-wire test that asserts the two 404s stay different.Composition is ADDITIVE, not a sentinel — this is a deviation from the slice brief's "preferred" shape, taken on evidence.
build_serverregistersprofile_openxfactory.ROUTE_EXTENSIONSfirst and the caller'sroute_extensionsafter, exactly as Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742'sbuild_parserdoes forSUBCOMMAND_EXTENSIONS. The proposed sentinel (None→ profile,()→ none) does not work: the only in-tree caller that passes the keyword at all istest_route_extension.py's ownserving()helper, which declaresroute_extensions=()and always forwards it explicitly — under sentinel semantics every server in the file that tests this very seam would lose/snapshot-index.json,/source/, the committed-intent feed and every gate verb, andtest_a_contributed_write_route_refuses_off_loopback_exactly_like_a_core_onewould 404 where it expects 403. The default-assertion test has to change under either design (see repoint 4), so the sentinel bought nothing and cost a second behavioural break.route_extensions=()and passing nothing now mean the same thing, which is the reading 31 in-tree testbuild_server(...)call sites across 27 test files already assume (measured by AST walk, corrected from an earlier '35 across 27' figure that counted prose mentions rather than parsed calls; three more call sites live inscripts/itself —cli.py,doxbench_mcp.py,serve.py— none of which passesroute_extensionseither).profile_openxfactoryis imported lazily, insidebuild_server.cli.pynames it at module scope because a parser is built from it at import time; a server is not; the profile is a WIRING input read once per build, so it sits beside the composition it feeds. CORRECTED in this fix round (decision 10 below): the two further reasons this decision originally gave are both false and have been struck from the code comment and from here — a module-scope import would NOT pull the contributed columns into a new import graph (serve.pyalready imports all three, asDashboardHandler's mixin bases), and it would NOT makegate_routesan eager import ofserve(serve_gateimports it function-locally, inside_handle_gate_action). What genuinely must stay out of a module the container runs as a plain script iscli_gate, and that is held out at the profile's own end by PEP 562.Extension classes conform STRUCTURALLY.
GateRoutesExtension,ProjectionRoutesExtensionandLaneRoutesExtensionimplementroutes()and import nothing from the core they contribute to — the direction the § 3 carve needs. Named uniformly…RoutesExtension(the scout manifest proposedProjectionExtensionfor one of the three; a uniform triple reads better and nothing depends on the name).openxFactory's own lanes reach the seam the same way openXdox does. Nothing stops the repository that owns the extension point from contributing through it, and doing so is what proves the seam is a seam rather than a courtesy extended to one column.
The three
doc_healthimports. Only two travel (shared_identity,staging_seed, both still function-local, still reachingdoc_healthdirectly — nothing re-plumbed throughcorpus_adapter_openxfactory). The third,_head_of'sRealGit, is called bybuild_serverand is core, soserve.pykeeps one directdoc_healthimport. The § 2.4 memo's "all three" claim is wrong; reported below, memo not edited.The intent feed is a pure move.
_serve_committed_intentslands exactly as PR Intent plane 4.4 (PR-1): hosted tray emits intents; pending/applied/refused chips and refusal panel from the inbox plus the committed-intent feed #718 left it, byte for byte.RULED A (Brett Heap, 2026-09-07):
collect_bindingsrefuses an exact binding under a declared prefix; fixed in eb1dbee. This PR opened the gap by moving the gate console and the projection routes offserve.py's fixed tables:collect_bindingskeyed a collision on(method, pattern, is_prefix)alone, so an EXACT binding was never compared against an already-declared PREFIX binding's pattern. Before the move no caller-suppliable binding stood a chance against a hard-codedif; after it, a caller who passesroute_extensionscould declare an exact binding underACTIONS_GATE_PREFIXorSOURCE_PREFIX— e.g.POST /actions/gate/<verb>— the build accepted it, and because exact is consulted before prefix it WON the match, so_handle_gate_actionand its loopback/capability/actor/human-console refusals never ran for that path. The pushed version disclosed and characterized this rather than fixing it, on the grounds thatscripts/route_extension.pywas out of this lane's scope; Brett ruled it CLOSED here, which authorizes this lane's one edit to that landed seam (scripts/subcommand_extension.pystays untouched).collect_bindingsnow refuses ANY pattern that sits under an already-declared prefix pattern (str.startswith—RouteBinding.matches's own test for a prefix hit), in EITHER declaration order, with the sameRouteBindingErrora literal duplicate raises, and the message names both bindings by their own declared method and pattern (the discipline_collision_messagealready keeps). Method-aware on the same slot rule the duplicate check uses, reused rather than restated (_claimed_collision_keys->_claimed_methods): POST-exact under POST-prefix collides; a GET and a HEAD binding collide, because a GET binding answers HEAD; a GET exact under a POST prefix does not, since no live request is offered to both. The containment check runs AFTER the exact-key check, so a literal duplicate keeps reporting itself as a duplicate. Nested prefixes: REFUSED, decided on evidence as the ruling directs. The in-tree profile declares exactly two prefixes, POST/actions/gate/and GET/source/, and neither sits under the other, so no legitimate declaration needs the case — while which of two nested prefixes answered a path they both cover would be settled by the assembly order this module refuses to depend on, leaving the loser unreachable across a whole subtree. Fail closed; the day a real declaration needs nesting it can be admitted with a rule and a test. What stays legal, and had to: an exact pattern EQUAL to a prefix minus its trailing slash is not under it ("/source".startswith("/source/")is False, and no request path reaches both), which is exactly what the projection column declares — asserted directly and by the nine-binding profile pin, so this assembly still builds. One consequence worth stating: with overlap refused, no two bindings can both answer one live request at all, so the exact-before-prefix grouping now decides nothing a refusal has not already prevented and is kept as defence in depth.The lazy
profile_openxfactoryimport's justification was false, and is corrected (Copilot reviewPRRT_kwDOTAvnrs6f_iG1; same commit eb1dbee). The comment abovebuild_server'sfrom ideation_dashboard import profile_openxfactoryclaimed a module-scope import "would pull every contributed column ... into the import graph of a module the container runs as a plain script". It would not:serve.pyalready imports all three contributed columns at module scope, because they areDashboardHandler's mixin bases, and the profile imports exactly those three. The dependency that must stay out of the server's import graph is the CLI column —cli_gatereachesauthoring->workbench-> PyYAML, which the hosted image deliberately does not carry — and that is held out at the profile's OWN end, which resolvesSUBCOMMAND_EXTENSIONS(andcli_gate) on access through PEP 562. The comment now says that, and decision 4 above is corrected with it: the claim that a module-scope import would makegate_routesan eager import ofserveis also false —serve_gateimportsgate_routesfunction-locally, inside_handle_gate_action.Test repoints
Every repoint below is disclosed per ruling (a): same assertion, same strength, repointed because the code it names moved. Each repoint row's mutation was RUN and observed to fail. Rows 10 and 12-14 are NOT repoints — they are new tests, disclosed here rather than under "Proof" because they bear directly on decisions 3 and 9. Rows 11 and 15 ARE repoints, both forced by RULING A: row 11 inverts an assertion because the behaviour it characterized is now refused, and row 15 rebuilds a setup that the refusal made illegal.
test_extension_point_parity.pyROUTE_ARMS/DO_POST_ARMStest_serve_column_split.py.WORKBENCH_MODEL_INTAKE_ROUTEandWORKBENCH_THREAD_ROUTEarms in_route→ FAILStest_extension_point_parity.py::test_the_mixins_precede_simplehttprequesthandler_in_the_mromro[:4], 2 mixinsmro[:7], 5 mixinsGateRoutesafterSimpleHTTPRequestHandlerin the base list → FAILStest_extension_point_parity.py::test_the_mixins_share_no_member_name_with_the_http_server_chainca61cf1akept BOTH this widening AND the base's independent hardening (rule-based_non_dunderexclusion in place of the hand-listed dunder set) — see the disclosure note under "Stacked on" above.def send_head(self)toLaneRoutes→ FAILS; separately, reintroducing the hand-listed dunder set in place of_non_dunderwould silently drop__annotations__-carrying members from the check (not independently mutation-proved here — see the base's own commit)test_route_extension.py::test_a_server_built_with_no_extensions_has_an_empty_table→…_carries_exactly_the_in_tree_profileroute_bindings == ()== collect_bindings(profile_openxfactory.ROUTE_EXTENSIONS)== (): a stray binding added to the profile, a member dropped from it, or a caller's tuple leaking into a default build all fail.profile_openxfactory.ROUTE_EXTENSIONSfrombuild_server's composition → FAILS. (A stray binding ADDED to the profile moves both sides of this equality, so that case is caught instead by the new file's literal 9-tuple pin.)test_route_extension.py::test_a_contributed_write_route_refuses_off_loopback_exactly_like_a_core_one/actions/gate/ratifyserve_mod.ACTIONS_EDIT_ROUTE/actions/editis a fixed core arm with the sameif not self.loopbackfirst clause.if not self.loopbackguard from_probe_write→ FAILStest_session_snapshot.py::test_the_hosted_session_arrival_path_is_recorded_and_not_builtserve.pytextconftest.serve_surface_source()def hosted_ref_refused(moved toserve_wire.py, and the per-route body slices for_serve_snapshot/_serve_source/_handle_refresh_actionmoved to two more files. Definition, named prose, call-site floor and per-route bodies are all still asserted.hosted_ref_refused(call from_handle_refresh_action→ FAILStest_intent_plane_boundary.py::test_serving_pod_is_credential_freeast.parseofserve.pyserve_surface_paths()file, plus a new "found exactly once" assertion_serve_committed_intentsmoved, so the oldnext(...)raisesStopIteration. The exactly-once clause is new and makes the scan un-hollowable.os.environ.get("X")inside_serve_committed_intents→ FAILSconftest.pySERVE_SURFACE_MODULESserve_gate.py,serve_projection.py,serve_openxfactory_lanes.pyfrom . import action_errorsinserve_gate.py→test_serve_module_uses_no_relative_importsFAILS; keep that defect and dropserve_gate.pyfrom the tuple → it goes GREEN again. Observed both ways.conftest.pyNO_IMPLICIT_PUSH_MODULESdoxbench_status_exemption.py, kept)serve_gate.pyis load-bearing:_handle_gate_actiondispatches the SESSION-BEARING verbs, so a list left at PR-2's set would have let the file move evade the absence..push(toserve_gate.py→test_doxbench_share.pyFAILStest_route_extension.py— NEWtest_a_caller_s_extensions_are_added_to_the_profile_and_never_replace_itroute_extensionsis ADDITIVE:profile_bindings <= got,PROBE_BINDINGS <= got,len(got) == len(profile) + len(probes)build_serverREPLACE the profile with the caller's tuple instead of composing both → FAILStest_route_extension.py::test_an_exact_caller_binding_under_a_contributed_prefix_wins_the_match->…_refuses_the_buildACTIONS_GATE_PREFIXWON the match (a characterization of the gap decision 9 disclosed)build_serverREFUSES withRouteBindingError, parametrized over BOTH contributed prefixes (ACTIONS_GATE_PREFIX,SOURCE_PREFIX), and asserts the message names the caller's binding and this assembly's ownPOST /actions/gate/<verb>with its own 200, no loopback/capability/actor/console check run — is now impossible before the socket opens.collect_bindings-> FAILS (observed: 10 tests red, both parametrizations of this one included)test_route_extension.py— NEWtest_a_pattern_under_a_declared_prefix_refuses_the_buildtest_route_extension.py— NEWtest_an_exact_binding_under_a_prefix_of_ANOTHER_METHOD_does_not_collide_share_a_method_slotfrom the containment scan -> 4 FAIL (these 3 plus row 15)test_route_extension.py— NEWtest_an_exact_pattern_equal_to_a_prefix_minus_its_slash_does_not_collide/sourcebeside prefix/source/collects, AND the whole in-tree profile still yields its 9 bindingsstartswithon the raw patterns rather than a segment-wise or same-stem rule, which would have refused the profile itself._sits_undercompare path SEGMENTS instead ofstartswith-> FAILS (andtest_serve_column_split.py's nine-binding pin with it)test_route_extension.py::test_exact_bindings_are_consulted_before_prefix_bindings/a/+ a GET exact/a/exact/a/+ a GET exact/a/exactexactandprefixincollect_bindings' return -> FAILSRows 8/9 widen with THREE new files, not four:
profile_openxfactory.pyis also new and is also part of the serve surface (build_serverimports it and itsROUTE_EXTENSIONStuple determines the whole contributed route table), but it is deliberately left OUT of both tuples and a comment now says why besideSERVE_SURFACE_MODULESinconftest.py— it is relative-import-only by design, so the D12 relative-import guard these tuples feed would fail on it for a reason that guard does not exist to catch. Fix-round correction: an earlier version of this PR left the exclusion undisclosed.No behavioural test's ASSERTED BEHAVIOUR was changed — one behavioural test's core COMPARATOR was repointed (row 5), because the route it named (
/actions/gate/ratify) became contributed; the docstring's claim (contributed-against-CORE) is what the repoint restores, since left alone the test would have compared contributed-against-contributed. No golden was regenerated —fixtures/cli-help-tree.golden.txtis CLI-only and does not appear in this diff; nothing else pins the route table as a fixture.Proof
tests/ideation-dashboard/test_serve_column_split.py— (a) every one of the 16 moved handlers resolves onDashboardHandler, is defined on the column mixin this file records, and is NOT also defined onDashboardHandler(a fork would shadow); (b) the profile declares exactly three protocol-conforming extensions in a named order; (c) the flattened 9-binding table, compared whole; (d) the/sourceordering trap, at the binding level and over the wire; (e) one off-loopback parity test per moved WRITE route (/actions/refresh,/actions/dtn-seed,/actions/staging-seed,/actions/apply-register-edits,/actions/gate/ratify), each asserting the SAME status and SAME error code the core/actions/editgives, driven through a realbuild_server; (f) a negative control proving those five do NOT answerloopback_onlyon a loopback bind.git show HEAD:scripts/ideation_dashboard/serve.py— identical, and none of them still defined inserve.py.test_repo_selector.py(refresh, index),test_renderer.py/test_source_dot_directories.py/test_explorer_viewer.py(/source),test_session_verbs.py/test_branch_session.py/test_gate_routes.py(gate verbs),test_session_snapshot.py/test_session_confinement.py(FR-048 confinement),test_intent_plane_boundary.py(the feed).python3 -m pytest -q tests/ideation-dashboard tests/doc-health— 1 failed, 6681 passed, 31 skipped in 14m22s, re-run at the RULING A head (eb1dbee). The single failure is the known environmentaltest_snapshot.py::test_find_validator_locates_pinned_checkout(a worktree has no sibling pinned checkout), the only tolerated one for this slice.OPENSPEC_TELEMETRY=0 openspec validate --all --strict— 98 passed, 1 failed (only the knowndisposition-codexfactory-declared-renamesartifact), re-run at the same head.collect_bindings-> 10 tests red (rows 11-12, both parametrizations of each), restore -> green. Drop its method-awareness (_share_a_method_slot) -> 4 red (rows 13 and 15), restore -> green.serve_openxfactory_lanes.py:126and:194—_handle_dtn_seed/_handle_staging_seedcall_read_json_body()and thenbody.get(...), which raisesAttributeErroron a non-dict JSON body (a list). Factual and confirmed, and NOT fixed here: both bodies are byte-identical moves out ofserve.py(diffed againstorigin/main, lines 1126-1199 and 1200-1283),_read_json_bodyis itself untouched and still inserve.py, so the defect is exactly as reachable onmaintoday. Fixing it here would break this slice's by-function-move invariant and the byte-identity proof that rides on it; a follow-up issue names both sites. The minimal fix already exists in the same file —_handle_refresh_action'sisinstance(body, dict)-> 400invalid_bodyguard.CI scoping, stated so "green" is not over-read: this PR targets PR-2's branch, and the heavy gates (
pytest-suite,openspec-cli-pin,clearing-dispatch-gate,release-tag-gate,signed-execution-chain-gate,wallet-validation,openreposhape-pin) only trigger on pull requests intomain— #748 has all of them. On this PR onlylane-lineandmerge-master-approvalran, both green. The full set runs when this is retargeted tomainafter the base lands; until then the local run above is the proof.Not in this PR
cli.pysplit — separate PR, separate branch. This PR touches no parser and no CLI file.openspec/,contracts/,docs/,README,tasks.md— no governance edits; § 2.4's checkbox bookkeeping belongs to the § 2.6 PR.scripts/subcommand_extension.py— landed by Add the route and subcommand extension points behind serve.py and cli.py (split § 2.4, PR 1 of 4: scaffolding, zero behavior change) #736, untouched.scripts/route_extension.pywas also untouched in the pushed version and IS now edited, under RULING A alone (design decision 9, commit eb1dbee); nothing else about the landed seam moved.doc_healthimports throughcorpus_adapter_openxfactory(§ 2.4's own hard constraint)./project-register.json's "tenant-catalog authority row" (memo OQ-2) — whole-route registration only, per your ruling; the route stays a fixed core arm inserve_project.py.Decisions for Brett
/snapshot.jsonstayed a core arm (decision 1). Design § D2 says openXdox contributes "snapshot,/sourceand projection routes". The alternatives are (i) accept the loss of thebuild_server(snapshot_route=…)keyword, or (ii) make the profile expose a factory rather than a constant, which conflicts with Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742's landed shape. I took neither and left the arm core. If you want § D2 read literally, that is a follow-up with one of those two costs.profile_openxfactory.pyis created by BOTH this PR and Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742. Same docstring header, different constants, so the second to land needs a one-hunk add/add resolution keepingSUBCOMMAND_EXTENSIONS+ itsfrom . import cli_gateandROUTE_EXTENSIONS+ its threefrom . import serve_*. Flagging so it is a planned catch-up rather than a surprise. Nothing here touches a line Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742 wrote.serve.py's directdoc_healthimports is wrong — only two travel; (b) every line citation in memo § 2 predates PR-2 and is stale; (c) memo § 3 item 3 names onlyNO_IMPLICIT_PUSH_MODULES—SERVE_SURFACE_MODULESdid not exist when it was written and also had to be widened; (d)tasks.md§ 2.4 still citesserve.py (6,733 lines)and § 2.1/2.2/2.2a/2.3 checkboxes still read[ ]though all four landed — bookkeeping for the § 2.6 PR.collect_bindingsrefuses an exact binding under a declared prefix; fixed in eb1dbee (design decision 9). Kept here rather than deleted so the ruling and its scope stay on the record: your word authorized this lane to editscripts/route_extension.py, which the pushed version had declared out of scope and had only characterized with a test. The one sub-question the ruling left to evidence — two PREFIXES where one starts with the other — is decided REFUSE (fail closed): the in-tree profile declares no nested pair, so nothing legitimate needs the case. Nothing else about the landed seam moved:scripts/subcommand_extension.pyis untouched, and every pre-existing refusal is unchanged and still asserted. The build-time guard the review also offered (refuse inbuild_serverbefore callingcollect_bindings) was NOT taken: the refusal belongs where every assembly passes through it, not where only this repository's server would get it.profile_openxfactory.pyshared-header comment (decision item under "What moved") no longer matches Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742's copy verbatim after this fix round's rewrite (it spoke in CLI terms that don't apply here). The eventual add/add merge with Split cli.py by column behind the subcommand seam (§ 2.4, PR 4 of 4) #742 will need a one-paragraph resolution on that comment (keep this branch's route-flavoured wording) in addition to the constants merge item 2 above already flags.Asking for your word on this one; I have merged nothing and will not.
🤖 Generated with Claude Code
https://claude.ai/code/session_017guxvApq5jqB1QXukJUsTQ