Repository navigation
T027: the doxBench seams -- the schema validators and the status-exemption rail (serve_wire.py:1369, doxbench_packet.py:177) - #41
Conversation
…n 034 T027) Two of the eight deferred reaches into the publisher that opensoft/openXfactory#1144's task 4.3 routes in phase 1 (plan 034, tasks.md T027), both into openxFactory's ideation_dashboard package at 1e4a57f: - serve_wire.py:1369, default_doxbench_validators, imported ideation_dashboard.doxbench_contracts for the doxBench schema validators; - doxbench_packet.py:177, _status_exemption, imported ideation_dashboard.doxbench_status_exemption, the Status: read the packet assembler's exemption rail marks sources with. Each now resolves what a host registered, once, at process start: serve_wire.register_doxbench_validators(factory), called per request, and doxbench_packet.register_status_exemption(rail), a module or object carrying the reader's names. With nothing registered each fails closed, naming itself and its registration call (4.2's discipline): the validators factory refuses DoxbenchValidatorsNotRegistered, so the two model routes refuse with their fixed codes, and the assembler refuses StatusExemptionNotRegistered, a PacketError, rather than assembling a packet with its sources unmarked. The rail's seven names still answer on the packet module, as the registered rail's own objects, and as an honest AttributeError with none registered. build_server's default binding and serve.py are unchanged. openxFactory registers its own (T046); the standalone defaults are T085's. tests/test_doxbench_seams.py holds both seams to that: the named refusals, the fail-closed readers, a booby-trapped ideation_dashboard that is never reached, registered stand-ins answering through the seams, the one-registration discipline, and an ast check that neither seam makes a deferred reach. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewer's GuideThe PR removes the two remaining deferred reaches into openxFactory by introducing explicit validators and status-exemption registration seams, with fail-closed behavior, per-request validator resolution, lazy rail aliases, and comprehensive regression tests validating isolation and registration semantics. Sequence diagram for registered doxBench validators resolutionsequenceDiagram
participant Request
participant WorkbenchRoutes
participant serve_wire
participant HostFactory
Request->>WorkbenchRoutes: _doxbench_validators()
WorkbenchRoutes->>serve_wire: default_doxbench_validators()
serve_wire->>HostFactory: factory()
HostFactory-->>serve_wire: validators
serve_wire-->>WorkbenchRoutes: validators
WorkbenchRoutes-->>Request: schema validators
alt no factory registered
serve_wire-->>WorkbenchRoutes: DoxbenchValidatorsNotRegistered
WorkbenchRoutes-->>Request: None and fixed route refusal
end
Sequence diagram for status-exemption rail during packet assemblysequenceDiagram
participant Caller
participant doxbench_packet
participant Rail
participant Sources
Caller->>doxbench_packet: exemption_rail(sources)
doxbench_packet->>doxbench_packet: _status_exemption()
doxbench_packet->>Rail: lifecycle_status(text)
Rail-->>doxbench_packet: status
doxbench_packet->>Rail: is_compression_exempt(text)
Rail-->>doxbench_packet: exemption decision
doxbench_packet->>Sources: mark exemption
doxbench_packet-->>Caller: marked sources
alt no rail registered
doxbench_packet-->>Caller: StatusExemptionNotRegistered
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Fix rail validation failures and ensure the new seam tests run in required CI.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR replaces deferred openXfactory imports with explicit registration seams for doxBench validators and status-exemption behavior.
Changes:
- Adds fail-closed validator registration and per-request resolution.
- Adds status-exemption rail registration and lazy aliases.
- Adds seam, isolation, and dependency tests.
| File | Summary |
|---|---|
tests/test_doxbench_seams.py |
Adds registration and fail-closed behavior tests; should be included in required CI coverage. |
src/opendox/serve_wire.py |
Adds the doxBench validator registration seam. |
src/opendox/doxbench_packet.py |
Adds the status-exemption rail seam; attribute-probe failures need normalization, and one docstring needs updating. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
register_status_exemption() probed the rail's two required names with getattr(rail, name, None). That default absorbs AttributeError only, so a lazy rail whose lookup raised anything else (a ModuleNotFoundError from what it loads on first use, say) escaped the registration as that failure instead of the seam's own refusal. Every probe failure now marks the name missing, and the TypeError that names what the rail lacks is chained to the first such failure. A plainly non-conforming rail is refused as before, with no cause. The alias docstring named a reader that no longer exists; it now names the two outside test files that bind this module as pk. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s branch Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) On Copilot's overview at This is deliberate, and #39 received the same answer. Plan 034's
The plan lives at opensoft/openxFactory The rule comes from T006's analyze, finding U2 ( Until T036, this PR quotes the run the plan asks for. At head The other two items in the overview are addressed at |
register_status_exemption() probed both required names on every call, and only then compared the rail with the one already registered. So the SAME rail registered again was probed again, and a lazy rail whose second lookup failed turned an idempotent host start into a TypeError. The same object is now answered first, by identity, and only a new registration is validated. A rail whose is_compression_exempt resolves once and then raises is registered twice in the new test. At the previous head the repeat was refused with TypeError; now it returns the rail, and the property was read once. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 3 days and 16 hours by commenting @sourcery-ai review. Upgrade to get a review now.
|
READY at 0dd2faf — Lane: openxfactory-4 (openXfactory-4-openDox_extraction) |
Since the last merge, main gained T025 (#43) and T027 (#41). Neither touches src/route_extension.py, src/opendox/serve.py, the facet's tests or the profile-registration runbook. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
main is 2768302. It carries P1-A's T010 (#40), T011 (#46) and T012 (#47), which T016 waits for, and P1-E's T025 (#43) and T027 (#41). Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…into openxFactory at all (#49) Plan 034, task **T032**, slice P1-F (the sweep and the nine-file repair). The plan is `specs/034-opendox-standalone-operation/tasks.md` at opensoft/openxFactory `main` `468863d1`, where round 2 (#1176) has landed. The T032 through T035 entries there are byte-identical to `0d48231b`'s, which this record was first written against. This PR realizes box **2.3** of the ratified `add-neutral-product-standalone-operability`. - **Ruled:** R1Q22 (a), openxFactory#656 comment `5817152735`. - **Claim:** openxFactory#656 comment `5852380744`. - **After:** T011, T012, T016, T021, T022, T025–T027 ("every lane joins here"). **All have landed.** T022 landed last, as #45 → `255514df`, merged in at `5270acf0`. T038 then landed as #48 → `796838e8`, and `main` at `796838e8` is merged in (`dc8fa87a`, no force-push). Everything below was re-run at this head, `b53b9db2`. ## The sweep (2.3) The four names in import position under `src/`: import statements, and `importlib.import_module(...)` or `__import__(...)` with a literal name. Every hit is classified by when it runs. It was run at the arc's base, openDox-code `1e4a57fb` (ARC_BASE, `evidence/arc-base.md`), and at `main` `796838e8`. That is where the last lane (T022) joined, plus T038's console script. This PR changes nothing under `src/`, so this head gives the same result. | | at `1e4a57fb` | at `796838e8` | |---|---|---| | import-time reaches | 2 (`ideation_dashboard`) | **0** | | deferred reaches into openxFactory | 8 | **0** | | deferred reaches into `openxdox` | 19 | **19** | **Closed: every reach into openxFactory, and every import-time reach.** | reach at `1e4a57fb` | target | closed by | landed | |---|---|---|---| | `serve.py:199`, `:206` (import time) | `ideation_dashboard.serve_openxfactory_lanes` | T011 (2.1), the handler-contribution facet | #46 → `0e88454a` | | `serve.py:713`, `_head_of` | `doc_health.corpus` (`RealGit`) | T012, openDox's own HEAD reader | #47 → `27683028` | | `authoring.py:318`, `_classify_proposal` | `corpus_adapter_openxfactory` | T021, `corpus_adapter.home()` | #44 → `9d13bd16` | | `workbench.py:746`, `session_documents` | `doc_health.corpus` | T025, the registered adapter's `list_documents` | #43 → `c46430fb` | | `workbench.py:1407`, `:1408`, `:1409`, `run_scoped_doc_health` | `doc_health`, `.families`, `.runner` | T026, the health-check seam | #39 → `582ed073` | | `serve_wire.py:1369`, `default_doxbench_validators` | `ideation_dashboard.doxbench_contracts` | T027, the doxBench validator seam | #41 → `8017cd52` | | `doxbench_packet.py:177`, `_status_exemption` | `ideation_dashboard.doxbench_status_exemption` | T027, the status-exemption seam | #41 → `8017cd52` | **Deferred: 19 reaches, all into `openxdox`, each inside a function body.** Each is routed no later than the phase whose surface calls it (research R5, the release map). openXdox-code's `OPENDOX_BACK_IMPORTS` ratchet counts them by module: `branch_session` 7, `serve_workbench` 7, `serve` 2, `serve_project` 2, `cli` 1. | reach at `796838e8` | target | inside | reason it stays, and who routes it | |---|---|---|---| | `branch_session.py:1568` | `openxdox.generator` | `_change_rows` | the snapshot generator is openXdox's column; phase 2, T055 (5.4/5.5) | | `branch_session.py:1587` | `openxdox.register` | `_active_pick_fallbacks` | the cross-reference register; phase 3, T084 | | `branch_session.py:2005` | `openxdox.kickoff` | `proposal_state_for` | the kickoff column; phase 3, T084 | | `branch_session.py:2105`, `:2151`, `:2228`, `:3573` | `openxdox.snapshot_registry` | `session_entry`, `register_session_entry`, `refresh_session_snapshot`, `refresh_main_view` | the snapshot registry; phase 2, T055 | | `cli.py:628` | `openxdox.snapshot_registry` | `_session_registry` | the snapshot registry; phase 2, T055 | | `serve.py:648` | `openxdox.corpus_root` | `_checkout_real`, called by every `build_server` | the corpus-root predicate; phase 2, T055 (research R7) | | `serve.py:2118` | `openxdox.corpus_root` | `_refuse_impossible_checkout_root`, called by `serve.main()` | the corpus-root predicate; phase 2, T055 | | `serve_project.py:246`, `:247` | `openxdox.gate_console`, `openxdox.kickoff` | `_serve_project_register` | the gate console and kickoff; phase 3, T084 | | `serve_workbench.py:347`, `:544`, `:1665`, `:2607` | `openxdox.doxbench_scope` | `_is_live_session_ref`, `_handle_workbench_thread`, `_handle_workbench_chat_turn`, `_handle_workbench_document_abstract` | doxBench scope; phase 3, T084 | | `serve_workbench.py:407`, `:408` | `openxdox.gate_console`, `openxdox.gate_routes` | `_thread_gate` | the gate column; phase 3, T084 | | `serve_workbench.py:1215` | `openxdox.gate_console` | `_handle_workbench_model_approval` | the gate column; phase 3, T084 | The line numbers moved since research R5 (`cli.py:610` → `:628`, `serve.py:629` → `:648`, `serve.py:1993` → `:2118`), with the code that phase 1, T022 and T038 added. The reaches and their functions did not. **The late seam, which the scan cannot read.** `consumer_reach.py` holds seven `module(...)` stand-ins (`gate_console`, `snapshot`, `snapshot_registry`, `corpus_root`, `generator`, `serve_projection`, `serve_gate`). Each resolves `openxdox.<name>` at first use. `module()` refuses a prefixed name, so no stand-in can name another package. Research R6's census is unchanged: 65 use sites, in `serve.py` 22, `branch_session.py` 20, `cli.py` 18, `serve_workbench.py` 4 and `workbench.py` 1. They are deferred too, into `openxdox` alone, and T084 retires the module. **Prose, not import position.** `git grep -w` finds each name in `src/` beyond these: `ideation_dashboard` on 44 lines, `doc_health` on 25, `corpus_adapter_openxfactory` on 2, and the rest of `openxdox`'s 57. Every one of them outside the table above is a comment, a docstring or a string. Several docstrings still describe the pre-carve layout. `serve_project.py:30`, `serve_wire.py:80`, `serve_workbench.py:33` and `doxbench_scope_types.py:40` say *"this module uses ABSOLUTE `ideation_dashboard.*` imports"*. None of them is a reach. They sit in carved files with other writers, so this PR leaves them. A later edit to each file can correct its sentence. ## What changes **`tests/test_reach_sweep.py`**, a new file, so the sweep's result is held and not only recorded here. It parses `src/` whole, the two top-level extension modules included, as F4.1 parses the package, and it asserts four things: 1. no reach into any of the four runs at import time; 2. no reach of any kind names `ideation_dashboard`, `doc_health` or `corpus_adapter_openxfactory`, in either spelling (the pre-carve `scripts.` one too), the phase-1 cut of 4.3; 3. every reach left is deferred and into `openxdox`, the positive form of F4.1 "lists only `openxdox` targets"; 4. no code under `src/` spells an openxFactory package's name at all. That means no string or bytes literal outside documentation, because every import needs the name, however the importer is reached. **It does not pin the count of 19.** openXdox-code's ratchet already counts those reaches, and each one that T055 or T084 routes simply stops being one. So no later task has to edit this file when a reach closes. A reach may not come back at import time, and none may go into openxFactory. No instrument watched that direction (#1144 task 9.2a), and `tests/test_imports_standalone.py` proves only its import-time half, where no sibling is installed. On this tree, the sweep itself finds exactly F4.1's 19, all `openxdox` and all deferred. **How it reads a module.** It reads by syntax, not by grep. Prose names the four packages on purpose. - **Statements.** Import statements, including `from a import b`'s members as the submodules they may be (`from scripts import doc_health`). A star member is named too. - **Calls.** `import_module` and `__import__` calls with a literal name, by position, as `name=`, or spelled out of a literal `*[...]`/`**{...}`, and under an import alias. - **Relative names.** They are resolved against a literal `package`. `__import__` resolves against its `globals`: `globals()` is the module's own, and a literal `{"__package__": ...}` resolves. `__import__`'s literal `fromlist` also counts. - **A module that holds an importer as a value** (assigns, passes, stores it, or looks it up by name) is read strictly. Every call with a literal module name counts there, read as either importer, since it may be bound to either. - **Refused as UNREADABLE:** a call whose module a spread hides; a relative call whose package or context is unknown; a relative call that leans on `globals()` or `__package__` in a module that rebinds them; a `fromlist` that is not a literal; and a star import, in either form, from a package a sibling lives under (`from scripts import *`). A star from `os` names nothing. - **Not refused:** a computed name, which is how `consumer_reach`'s seam imports. - **Timing.** Where position and run time part (`TYPE_CHECKING`, postponed annotations, a generator), it reads position, the stricter reading. PEP 695's lazy positions are read as deferred. - **What it is not.** It is a regression guard for the code this repository writes, not a sandbox. A name built from pieces at run time is review's to hold, and at import time the runtime sweeps (`test_imports_standalone.py`, `test_consumer_reach.py`) hold it too. **`tests/import_scan.py`**, the shared reader, which exists so that no direction check keeps its own copy of the extraction. The node reader `names_imported_by` and its helpers live there, and `imported_modules` reads with it. Every new behaviour is opt-in, so `imported_modules`' output, `bound_names`', and `string_literals`' default output are identical to `main`'s reader over every parsed file in this repository: 141 files, 1524 imports, 0 differ. The three callers of `imported_modules` give the same result with and without the edit. ## The falsifier: F4.1's scan, which lists only `openxdox` targets `scan_deferred_reaches.py`, research.md's appendix, persisted in opensoft/brett-wip. Its sha256 is `fe11620319b02c23dd9a014bc581e1f4867f013f3c26890d43b12dccce5530a0`, which matches the digest `evidence/remeasure-2026-09-25.md` records. Run from this head, `python3 scan_deferred_reaches.py src/opendox`: ``` src/opendox/branch_session.py:1568: openxdox [in _change_rows] src/opendox/branch_session.py:1587: openxdox.register [in _active_pick_fallbacks] src/opendox/branch_session.py:2005: openxdox [in proposal_state_for] src/opendox/branch_session.py:2105: openxdox.snapshot_registry [in session_entry] src/opendox/branch_session.py:2151: openxdox.snapshot_registry [in register_session_entry] src/opendox/branch_session.py:2228: openxdox.snapshot_registry [in refresh_session_snapshot] src/opendox/branch_session.py:3573: openxdox.snapshot_registry [in refresh_main_view] src/opendox/cli.py:628: openxdox.snapshot_registry [in _session_registry] src/opendox/serve.py:648: openxdox.corpus_root [in _checkout_real] src/opendox/serve.py:2118: openxdox.corpus_root [in _refuse_impossible_checkout_root] src/opendox/serve_project.py:246: openxdox.gate_console [in _serve_project_register] src/opendox/serve_project.py:247: openxdox.kickoff [in _serve_project_register] src/opendox/serve_workbench.py:347: openxdox [in _is_live_session_ref] src/opendox/serve_workbench.py:407: openxdox [in _thread_gate] src/opendox/serve_workbench.py:408: openxdox [in _thread_gate] src/opendox/serve_workbench.py:544: openxdox [in _handle_workbench_thread] src/opendox/serve_workbench.py:1215: openxdox [in _handle_workbench_model_approval] src/opendox/serve_workbench.py:1665: openxdox [in _handle_workbench_chat_turn] src/opendox/serve_workbench.py:2607: openxdox [in _handle_workbench_document_abstract] 19 deferred reaches ``` Every target is `openxdox`. At `1e4a57fb` the same tool printed 27, eight of them into openxFactory. F4.1 WHOLE, *"no deferred reach names the consumer or the publisher"*, is T089's, after T084 routes the last 19 and retires `consumer_reach.py`. **The new test.** `python -m pytest -q tests/test_reach_sweep.py` at this head gives `35 passed`, with the root conftest and under `--noconftest`. The same file, with this head's `tests/import_scan.py`, run over `1e4a57fb`'s tree fails the three reach assertions: ``` AssertionError: 2 reach(es) into a sibling run at IMPORT time, so the module cannot be imported without it (#1144 task 2.1's defect): src/opendox/serve.py:199: ideation_dashboard (AT IMPORT TIME, in <module>); src/opendox/serve.py:206: ideation_dashboard.serve_openxfactory_lanes (AT IMPORT TIME, in <module>) AssertionError: 10 reach(es) into openxFactory, which openDox can never install (#1144 task 4.3's phase-1 cut), or imports the source does not spell out (behind a spread, a star, or a context that is not a literal), which could be: src/opendox/authoring.py:318: corpus_adapter_openxfactory (deferred, in _classify_proposal); … 3 failed, 32 passed ``` **83 mutations, and each fails its assertion.** Each is a copy of this tree with one change. Roughly a third plant a reach in `src/`, and the rest weaken the reader or the sweep. The list is in the review record below, and the spec is kept with the slice's tools. Every finding in the review record was also planted at the head it was raised on, where it passed, before its fix. ## The repository's own check `.github/workflows/validate.yml`'s three report-producing pytest steps, run as the file writes them, and summed as `Pin the triple` sums them. The venv was Python 3.12.3 with `-c constraints-cpython312-linux.txt -e ".[test]"`: ``` triple: selected=1155 passed=1152 skipped=3 failures=0 errors=0 pins: selected>=1114 (margin 41) passed>=1111 (margin 41) skipped==3 ``` This matches `main`. The new file is not on the workflow's list, and neither is any caller of `tests/import_scan.py`. T036 owns `validate.yml` and makes the whole suite the required run. **The whole suite, with the root conftest**, in the same venv: `main` `796838e8` gives `19 failed, 1454 passed, 13 skipped, 66 errors`, and this head gives `19 failed, 1489 passed, 13 skipped, 66 errors`. A test-by-test JUnit diff shows no changed outcome, nothing gone, and 35 new cases, all this file's and all passing. The 85 red cases are research R3's nine files and T030's `.[test]`-only case. T034 repairs the nine. ## Review record (Copilot) There were eighteen threads over fifteen rounds, plus four findings raised without a thread. Every thread is answered with its evidence and resolved. Copilot's review at `19b0ecc2` recommends approval, with no findings. Every finding was a way to reach a sibling that the reader did not follow. Each was planted at the head it was raised on, where it passed, and it fails since its fix. | round, at | finding | fixed in | |---|---|---| | 1, `61b308ed` | `import_module(name=...)`; PEP 695 type parameters; one shared reader | `ae82e2b5` | | 2, `ae82e2b5` | an import alias of `import_module` | `eece371e` | | 3, `eece371e` | a relative `import_module` against a literal `package` | `9862669f` | | 4, `9862669f` | "matched by the name it spells" (docstring) | `ab022702` | | 5, `ab022702` | a destructured alias; a lawful consumer case | `d9d3f3f9` (a module holding an importer as a value is read strictly) | | 6, `d9d3f3f9` | literal `*[...]` and `**{...}` | `981fce65` | | 7, `5270acf0` | nested literal spreads | `e6bd5ef5` (UNREADABLE for any other spread) | | 8, `e6bd5ef5` | an alias looked up by name; a keyword an unreadable entry overwrites | `4b0cb725` | | 9–10, `4b0cb725`, `aa92f71a` | a bound package; custom `globals` | `aa92f71a` (the spelling check), `6cf729ef`, `c3283e55` | | 11, `6cf729ef` | the `scripts.` spelling; the full-name match; a concatenated lookup key | `c3283e55` | | 12, `c3283e55` | a shadowed `globals`; a rebound `__package__` | `1fdd7fbb` | | 13, `1fdd7fbb` | `from scripts import doc_health` | `a5a7f745` | | 14, `a5a7f745` | `__import__`'s `fromlist` | `0f7af1a1` | | 15, `0f7af1a1` | a star import from `scripts`; with it, found in measuring, a strict module's calls read by one importer's rule only | `19b0ecc2`; `b53b9db2` names UNREADABLE for each case it stands for | ## Landing - T022 (#45) and T038 (#48) have landed, and `main` `796838e8` is merged in. Everything above was re-run at this head. - T034 comes after it: T034 re-derives `tests/test_consumer_reach.py`'s record against this sweep. - Squash or merge, never rebase. Each commit message carries both trailers, and so does this body. Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Arc: neutral-product-standalone-operability Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>




Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Plan 034, slice P1-E, task T027. The plan is
specs/034-opendox-standalone-operation/tasks.mdin opensoft/openxFactory. I read it at #1167's head42f34ab7, which landed asa65230f6, and it is unchanged onmainat79a720a2. The claim is opensoft/openXfactory#656 comment5850107036.5817152735: the carved files need no declared-edit act.5850003126: this task stays as planned. Each seam fails closed, and the standalone defaults are T085's, phase 3, where R1Q10 (a) fills them.mainata435aecf, which carries T020 (e295b1a9), T026 (582ed073) and T015 (a435aecf).What it does
Two deferred reaches into openxFactory's
ideation_dashboardpackage, at1e4a57fb:serve_wire.py:1369default_doxbench_validatorsideation_dashboard.doxbench_contractsdoxbench_packet.py:177_status_exemptionideation_dashboard.doxbench_status_exemptionStatus:read that the packet assembler's exemption rail marks sources withEach is now a seam that a host fills with one registration at process start. Both follow
opendox.domain_profile's one-registration idiom:...AlreadyRegistered);TypeError;unregister_...()and..._registered()sit beside each seam.The validators seam is
serve_wire.register_doxbench_validators(factory).factory()answers the released per-kind validators. It is called per request and never cached, so a factory that re-verifies its pin keeps a mid-run repin observable.default_doxbench_validators()refusesDoxbenchValidatorsNotRegistered, naming the seam and the call.WorkbenchRoutes._doxbench_validatorsturns that intoNone, as it does every factory failure, so the two model routes refuse with their fixed codes and no text reaches the wire.build_server's default binding, andserve.py, are unchanged.The rail seam is
doxbench_packet.register_status_exemption(rail).railis a module or an object that carries callablelifecycle_statusandis_compression_exempt. A rail without both is refused at registration, not at the first assembly.ModuleNotFoundErrorfor example, is refused in the same way. Its failure is chained to theTypeErrorand never escapes as itself.StatusExemptionNotRegisteredbefore any source is marked. The refusal names the seam and the call, and it is aPacketError, so a caller that maps packet refusals to a fixed code maps this one too.AttributeError, sohasattrstaysFalse. A rail's lazyModuleNotFoundError, and a name the rail does not carry, are translated the same way.Files:
src/opendox/serve_wire.py,src/opendox/doxbench_packet.py, and a newtests/test_doxbench_seams.py.validate.ymlis not touched, because no slice edits it before T036.Falsifier 1: F4.1's scan
This is #1144's Group 4
FALSIFIED BYast block, run from the checkout aspython3 - src/opendox. The whole scan stays red until T089. This task's two hits are gone, and nothing else in the list moved:At
mainthe scan finds24 deferred reach(es). At this head it finds22 deferred reach(es), listed here:(T026, openDox-code#39, removed
workbench.py:1407-1409and is onmain. T025, openDox-code#43, removesworkbench.py:746separately.)Falsifier 2: the seam tests
The run is in a fresh venv with
pip install ".[test]". It first asserts that the four siblings are absent:Red at
main. With the same file copied ontoa435aecf, the run gives35 failed, 2 passed. The decisive failures are the booby-trappedideation_dashboardmodules insys.modules, whichmainreaches through both functions:The two cases that pass at
mainare the negative control, and the check that the model routes' resolver answersNonewith nothing registered. That check held atmaintoo, through the missing module, and this PR keeps it true through the named refusal.Why
--noconftest. The plan requires it (tasks.md § Phase 1). With the root conftest in play, the file errors 37 times onModuleNotFoundError: No module named 'ideation_dashboard'. The autousedeclared_human_consolefixture raises it when it importsopendox.cli, and it stops once T011 lands. With the Group 2 shim on the path, which simulates T011, the whole suite runs with the root conftest, and these 37 cases pass there.The repository's own checks
validate, replayed locally. Its three pytest steps give the same results asmain:pytest745 passed, 2 skippedpytest (S7 residue)13 passedpytest (runtime, hermetic)360 passed, 1 skippedThe triple is unchanged: selected 1121, passed 1118, skipped 3. The new file is in none of
validate's lists, so it moves no floor. The CIvalidatecheck on this PR is the gate.The whole suite, with the Group 2 shim (research R3's measurement):
maina435aecf20 failed, 1258 passed, 13 skipped, 66 errors20 failed, 1295 passed, 13 skipped, 66 errorsI compared the two JUnit reports test by test. No outcome changed. The 86 red results are the same 86, and the 37 new cases pass.
The consumer's negative space. The 11 spellings that openXdox-code's
tests/test_doxbench_packet.py::_FORBIDDEN_MODULE_NEEDLESforbids in this module (import os,open(,write_text,subprocess,urllib,socket,[:MAX_PACKET_BYTES,[:MAX_PACKET_SOURCES,textwrap,sqlite3,def promote) each have 0 hits in the newdoxbench_packet.py.For the tasks downstream
T046 (P1-K). The host registers both of its implementations, once, in the same process-start call that registers its profile (
scripts/opendox_host.register_openxfactory()). openxFactory's tests read both through the conftest's registration:For example,
tests/ideation-dashboard/test_doxbench_routes.py:2644callsserve_mod.default_doxbench_validators().tests/ideation-dashboard/test_doxbench_status_exemption.py:245-262reads the seven names off the packet module and checks identity with the rail module's own objects. That identity holds when the module itself is registered, and registering the same module again, from a second entry point, is a no-op by identity.T047 and T007 batch E (P1-K).
tests/ideation-dashboard/test_doxbench_status_exemption.py::test_the_dependence_on_the_carved_rail_sits_at_exactly_one_lineasserts exactly one import ofideation_dashboard.doxbench_status_exemptionin the pinned packet module. At the new pin there is none, so that test goes red at T047's pin and is a candidate for batch E's named composition tests.test_the_carved_away_case_is_an_ordinary_attribute_error_toostays green, because__getattr__still translates aModuleNotFoundError.T041, T043 and T019 (P1-J). At the phase-1 pin, openXdox-code's class-H files no longer fail on
No module named 'ideation_dashboard.doxbench_status_exemption'. Those files aretest_doxbench_packet.py(54 cases),test_doxbench_turns.py(32) andtest_doxbench_abstract_envelope.py(1), per T005. With no rail registered they fail onStatusExemptionNotRegistered, whose message names this seam. R1Q24 (a) puts them in the declared exclusion. The reason each entry carries, andclassify_whole_suite.py's class-H rule, should read the new message.The chat-turn route, for T085. In a process where neither seam is filled (standalone, in phase 1), the route refuses
model_capability_unavailableat the validators seam, before it assembles a packet. A host that fills the validators seam but not the rail meetsStatusExemptionNotRegisteredinside the route's packet boundary. The route maps that, as it maps every packet refusal it does not name, to its fixedinvalid_turn_requestcode, and it frees the turn's slot (turn_store.fail) instead of dropping the connection mid-lease. The mapping lives inserve_workbench.py, which is not this slice's file, and T085's standalone default removes the case.Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with Claude Code
Summary by Sourcery
Decouple doxBench validation and status-exemption behavior from openxFactory by replacing deferred imports with explicit host registration seams that fail closed when unconfigured.
New Features:
Bug Fixes:
Enhancements:
Tests: