You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plan 034's task T038, slice P1-H, the console script
(specs/034-opendox-standalone-operation/tasks.md § "Phase 1 writer
slices", read at openxFactory mainbca4a2600299535271761ac24d8adf492a8875fe;
unchanged since #1167's head 42f34ab7, which landed as a65230f6, and
re-checked against #1176's round-2 re-plan diff, which touches no T038 line).
This PR realizes box 10.1 of the ratified add-neutral-product-standalone-operability.
pyproject.toml: adds opendox = "opendox.cli:main" under [project.scripts], alongside the existing opendox-runtime = "opendox.runtime.cli:main". This is the one documented entry point
requirement 10 asks for: opendox.cli:main already builds and dispatches
the whole command tree (generate, generate-and-open — which serves the
browser surface — create, edit, model-binding, plus whatever a host
or the default profile contributes), where opendox-runtime only ever
started the lifecycle subsystem.
src/opendox/runtime/cli.py: corrects two stale comments (R1Q22 (a);
plan 034 T011), each to the past tense:
the "two measured reasons" bullet, which said a line added to src/opendox/cli.py needed a declared-edit act at openxFactory first
(retired by R1Q22 (a)) and that opendox.cli could not be imported at
all (fixed by T011, which removed the ideation_dashboard reach);
the "AND THAT IS THE RULED SHAPE" paragraph, which described Q-R4's
answer in the future tense and named a mechanism ("wired into opendox.cli in the BUILD-arc act that repairs opendox.serve") that
is not quite how it turned out. It now names where the verbs actually
reach opendox: through the default profile (T015/T016), not by
editing cli.py.
src/opendox/cli.py (added at the holder's word, see below): corrects
its own matching stale comment and the build_parser() docstring
(R1Q22 (a)), comment-only.
src/opendox/cli.py: two comments, added after a holder ruling. The
first authoring pass made no edit here — I'd read PR #42 (T016) and #45
(T022)'s diffs against cli.py beforehand, and neither touches the stale
composition-point comment at cli.py:92-111 or the build_parser()
docstring, and src/opendox/default_profile.py's own header (T015, already
on main) states this task's job as the console-script addition alone. I
flagged the ambiguity in this PR rather than guess. The holder ruled: fold
it in, comment-only, since R1Q22 (a) covers cli.py the same way it covers runtime/cli.py, and T038 is phase 1's last task in cli.py's
single-writer order (After: T016, T022; nothing later in phase 1 touches
this file). f9dfc2a does that:
the note above the profile_openxfactory import said the build_parser()
docstring "is NOT corrected here … until an act that declares them lands"
(RULED OQ-1); it now says R1Q22 (a) retired that gate and names T038 as
the act that makes the correction;
build_parser()'s own docstring said the composition point is "the one
line the § 3 carve deletes rather than moves: afterwards the core names
no profile and openXdox declares its own" — superseded by ratified
requirement 3, which has the core carry its OWN default profile
permanently (T015/T016), not become profile-less. It now says whichever
profile is current gets composed (a host's, or openDox's own default),
and names the default's RuntimeSubcommand as how opendox reaches the
runtime verbs with no separate wiring in this file.
No behavior change: build_parser() already read profile_openxfactory.SUBCOMMAND_EXTENSIONS unconditionally before this
commit, and still does. Re-verified after f9dfc2a in a fresh venv: opendox --help, opendox runtime --help and opendox-runtime --help all
exit 0; tests/test_consumer_reach.py, test_route_handler_contribution.py
and test_profile_registration.py (173 tests) unaffected.
The falsifier (F10.1's first assertion, and opendox runtime --help)
Run in a fresh venv, pip install . (no extra, matching F10.1's method):
opendox --help and opendox runtime --help do not exit 0 yet, and
this is expected, not a defect in this PR: build_parser() reads profile_openxfactory.SUBCOMMAND_EXTENSIONS unconditionally, and until
P1-B's T016 lands, nothing registers a default profile, so the lazy proxy
raises:
opendox.domain_profile.ProfileNotRegistered: no host profile is registered,
so openDox has no contributed subcommands and no contributed routes to
compose from. ...
identically for both invocations (both go through opendox.cli.main → build_parser()). opendox-runtime --help above is unaffected: it never
reaches opendox.cli.
pyproject.toml parses (tomllib.load); src/opendox/runtime/cli.py
compiles and tests_runtime/test_runtime_cli.py (83 passed, 1 skipped, no
change from the pre-existing skip) is unaffected by the docstring-only edit.
Landing
READY at ceab6489. Both Register openDox's default at the entry points; a host replaces it only before a build (T016) #42 (T016) and T022: 4.1a, openDox's own default adapter over LocalGitCorpus #45 (T022) have landed; main merged in twice (once per dependency), auto-merging cleanly both
times. Re-ran opendox --help, opendox runtime --help and opendox-runtime --help for real in a fresh venv (editable install,
matching CI's pip install -e ".[test]"): all three exit 0.
Copilot's review at the merge head (2c75ce0) found three findings (two
medium, one low); two are fixed (an entry-point metadata test, and the
one remaining internally-contradictory paragraph in runtime/cli.py) and
the third (the standalone --help's hard-coded prog="ideation-dashboard")
is answered with evidence rather than fixed, since prog is unconditional
and changing it would also change the HOSTED case's byte-identical --help text that build_parser()'s own docstring says a golden
snapshot asserts — raised as a follow-up, not silently dropped. Copilot's
next review, at this exact head, reports 0 new findings and all three
resolved. All three checks (validate, runtime, SonarCloud Code Analysis) SUCCESS.
cli.py has one writer at a time; this PR is last in that chain for
phase 1 (After: T016, T022).
It lands by squash or merge, never rebase. A squash message is built from
the commit messages, which carry both trailers. A merge landing must
write them into the merge message.
Expose the complete openDox command tree through the documented opendox console entry point.
New Features:
Add the standalone opendox console script targeting the full openDox command-line interface while retaining opendox-runtime for direct runtime commands.
Enhancements:
Update CLI composition documentation and comments to reflect default-profile runtime integration and current standalone behavior.
Build:
Declare and validate the opendox project script in package metadata.
Tests:
Add coverage verifying the installed console-script metadata points to both CLI entry points.
openDox's browser surface (`generate`, `generate-and-open`, `create`, `edit`,
`model-binding`, plus whatever a host or the default profile contributes)
had no documented entry point of its own: `[project.scripts]` named only
`opendox-runtime`, a subsystem console script for the lifecycle CLI, which
requirement 10's first scenario says does not count ("a product's packaging
declares console scripts for one subsystem and none for the surface the
product is named for" is reported as no entry point). `opendox.cli:main`
already builds and dispatches the whole command tree; this adds the one
`[project.scripts]` line requirement 10 asks for.
`opendox-runtime` stays as its own alias (R1Q5 (a)); neither golden is
regenerated, since a host that registers its own profile still meets its
31-entry `--help` tree exactly as before, and this act adds no code path
that runs when one is registered.
Q-R4's runtime verbs reach the new script with no separate wiring here:
openDox's own default profile puts `RuntimeSubcommand` in its
`SUBCOMMAND_EXTENSIONS` from its first landing (T015), so once something
registers that default where no host has (P1-B's T016), `build_parser()`'s
existing, unconditional read of `profile_openxfactory.SUBCOMMAND_EXTENSIONS`
composes it into `opendox`'s own parser for free.
Two stale comments corrected (R1Q22 (a), openxFactory#656 comment
`5817152735`; plan 034 T011):
- `pyproject.toml`'s note above `[project.scripts]` said `cli.py` could not
be edited without a declared-edit act landing at openxFactory first, and
that `opendox.cli` could not be imported at all. Neither holds: R1Q22 (a)
retired the declared-edit gate, and T011 removed the `ideation_dashboard`
import that blocked the second claim.
- `src/opendox/runtime/cli.py`'s header made the same two claims about why
the runtime verbs were not wired into `opendox.cli.build_parser` directly,
and its later "AND THAT IS THE RULED SHAPE" paragraph described Q-R4's
answer in the future tense, naming a mechanism ("wired into `opendox.cli`
in the BUILD-arc act that repairs `opendox.serve`") that is not quite how
it turned out. Both are corrected to the past tense, naming where the
verbs actually reach `opendox`: through the default profile (T015/T016),
not by editing this file.
No edit to `src/opendox/cli.py` itself: P1-B's T016 and P1-D's T022 own its
registration-call edits, and `src/opendox/default_profile.py`'s own header
(T015, landed) already states this task's job precisely ("plan 034's T038
gives those verbs the `opendox` console script"). Nothing in `cli.py`'s own
body needs to change for the console script to reach the runtime verbs.
Realizes: 10.1.
Falsifier: `opendox --help` exits 0 (F10.1's first assertion); `opendox
runtime --help` exits 0. Both after a plain `pip install .` into a fresh
venv. NOT YET GREEN: P1-B's T016 (#42) has not landed, so nothing registers
the default profile yet, and `profile_openxfactory.SUBCOMMAND_EXTENSIONS`
(read unconditionally by `build_parser()`) raises `ProfileNotRegistered` for
every invocation, `opendox --help` included — reproduced in a fresh venv
below. This PR stays DRAFT until #42 (T016) and #45 (T022) land; then I
merge `main` in, re-verify for real, and take it to READY.
Ruled: R1Q4 (a), R1Q5 (a), R1Q22 (a).
After: T016, T022 (cli.py's single-writer order).
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The PR implements T038 by registering opendox = "opendox.cli:main" alongside the existing opendox-runtime entry point and updates runtime CLI documentation to describe the now-resolved constraints and default-profile composition. The change intentionally avoids modifying src/opendox/cli.py and remains dependent on T016 and T022 for the fully composed opendox command tree.
File-Level Changes
Change
Details
Files
Adds the documented standalone opendox console entry point while preserving the direct lifecycle alias.
Registers opendox to dispatch through opendox.cli:main.
Retains opendox-runtime as the direct runtime CLI alias.
Documents that the default profile composes runtime subcommands into the main command tree.
pyproject.toml
Updates runtime CLI rationale to reflect the resolved import and carved-file constraints.
Recasts historical blockers as resolved by R1Q22 (a) and T011.
Explains that default-profile registration, rather than edits to cli.py, composes runtime verbs into opendox.
Clarifies the relationship and expected behavior of both CLI spellings.
src/opendox/runtime/cli.py
Tips and commands
Interacting with Sourcery
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
Both exits are 0 now, purely from T016's auto-registration + this PR's [project.scripts] line — opendox runtime needs no separate wiring, exactly as T015's default_profile.py header says. opendox-runtime (the alias) is unaffected. prog= is still ideation-dashboard (unchanged), so a host-registered profile's 31-entry golden is untouched.
I also re-checked src/opendox/cli.py's composition-point comment (lines ~92-111) now that T016's edit is in this tree: T016 updated the sentence about the proxy's refusal (now correctly says it registers openDox's own default first) but left the "THE build_parser() DOCSTRING BELOW STILL DESCRIBES THE IN-TREE PROFILE … is NOT corrected here … This comment is the correction until an act that declares them lands" note untouched — same as the open PR #45 diff showed before landing. Per the PR body's flagged question: I'm leaving that note out of T038's scope (task text names only the two runtime/cli.py comments), but it's a one-paragraph fix if a reviewer wants it folded in here instead.
Still holding DRAFT: this PR's After: line names both T016 and T022 for cli.py's single-writer order. T022 (#45) is still open (currently CONFLICTING, needs its own rebase onto T016 — that's P1-D's writer's own next step, not touched here). Will merge main in again once #45 lands, re-verify, and un-draft.
Holder ruling on T038's scope note (2026-09-27): fold this in. R1Q22 (a)
covers cli.py the same way it covers runtime/cli.py, and T038 is phase 1's
last task in cli.py's single-writer order, so it is the one that gets to
say the framing is current rather than deferring it further.
Comment-only, no behavior change (verified: `opendox --help`, `opendox
runtime --help` and `opendox-runtime --help` all still exit 0 after a fresh
`pip install .`; tests/test_consumer_reach.py, test_route_handler_contribution.py
and test_profile_registration.py, 173 tests, unaffected).
- The note above the `profile_openxfactory` import said the `build_parser()`
docstring "is NOT corrected here" because an edit outside the carve
manifest's declared lines was an undeclared movement the arrival verifier
refused (RULED OQ-1). R1Q22 (a) retired that gate; the note now says so,
past tense, and points at T038 as the act that finally corrects the
docstring instead of deferring it again.
- `build_parser()`'s own docstring said the host-registered profile is what
gets composed, and that "the § 3 carve deletes [this line] rather than
moves [it]: afterwards the core names no profile and openXdox declares
its own." That is no longer where this design is headed: ratified
requirement 3 has the core carry its OWN default profile permanently
(T015/T016), not become profile-less. The docstring now says whichever
profile is current gets composed — a host's, or openDox's own default,
which this function registers first if nothing else has — and names the
default's `RuntimeSubcommand` contribution as how `opendox` (this task)
reaches the runtime verbs with no separate wiring in this file.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Holder ruling on the scope note above: folded in (f9dfc2a).src/opendox/cli.py's own stale composition-point comment and the build_parser() docstring are now corrected too, comment-only:
The note above the profile_openxfactory import ("is NOT corrected here … until an act that declares them lands") now says R1Q22 (a) retired that gate and names T038 as the act that makes the correction, since T038 is phase 1's last task in cli.py's single-writer order.
build_parser()'s own docstring no longer says "the § 3 carve deletes [this line] rather than moves [it]: afterwards the core names no profile and openXdox declares its own" — that framing is superseded by ratified requirement 3, which has the core carry its OWN default profile permanently (T015/T016), not become profile-less. It now says whichever profile is current gets composed (a host's, or openDox's own default), and names the default's RuntimeSubcommand as how opendox reaches the runtime verbs with no separate wiring in this file.
Re-verified in a fresh venv after this commit: opendox --help, opendox runtime --help, opendox-runtime --help all still exit 0; tests/test_consumer_reach.py, test_route_handler_contribution.py, test_profile_registration.py — 173 tests — unaffected.
Head is now f9dfc2a. Still DRAFT, still holding on T022 (#45).
Update runtime documentation for the new opendox command
pyproject.toml:164
This adds opendox as the public standalone command, but docs/runtime.md §4 still documents only opendox-runtime and says the verbs are not yet in opendox.cli. Users following the repository documentation will therefore miss the new entry point and get an obsolete explanation; update that documentation as part of this change.
Two of Copilot's three findings at head f9dfc2a, fixed:
- src/opendox/runtime/cli.py: the "SO THIS ACT SHIPS BOTH SPELLINGS"
paragraph still said, in the future tense, that a later BUILD arc would
make opendox.cli importable and wire the verbs via
build_parser(subcommand_extensions=(RuntimeSubcommand(),)) -- directly
contradicting the two paragraphs beside it, which this PR already
corrected to say both have happened (T011, T015/T016). Corrected to match:
opendox.cli is importable now, and the verbs reach it through openDox's
own default profile, which build_parser()/main() register automatically
-- the same assembly-point call this paragraph predicted, now made for
every standalone build instead of by a caller.
- tests_runtime/test_runtime_cli.py: added
test_the_console_scripts_are_the_real_target, which reads the installed
distribution's console_scripts metadata (importlib.metadata, stdlib) and
asserts both `opendox` and `opendox-runtime` map to their real targets.
Every other case in this file calls opendox.runtime.cli's functions
directly, which is exactly the class of defect a typo in the
[project.scripts] STRING survives (pip install . still succeeds, every
other test still passes, and only the installed command itself fails).
Stays HERMETIC: reads entry-point metadata without loading either target,
so it does not import the much heavier opendox.cli.
The third finding (build_parser()'s hard-coded prog="ideation-dashboard"
means `opendox --help` prints "usage: ideation-dashboard ..." rather than
"usage: opendox ...") is answered on the PR thread rather than fixed here:
prog is unconditional, so changing it would also change the HOSTED case's
usage line, which is the "byte-identical help text for every entry point"
build_parser()'s own docstring says "the parity a golden snapshot asserts"
-- a golden this repository does not own (openxFactory's
test_extension_point_parity.py and its neighbor). Requirement 10, which
this task realizes, is about the entry point existing and reaching the
whole product, not the usage line's program name; a standalone user's
`opendox --help` still exits 0 and lists every command, cosmetic prog
string aside. Fixing it for real means either an invocation-aware prog (a
real design question: the ORIGINAL author hard-coded this precisely to
avoid a caller-dependent help text) or a coordinated golden regeneration in
openxFactory -- both bigger than "the console script" and neither safe to
improvise inside this task. Raised as a follow-up rather than deferred
silently.
Re-verified after both fixes, editable install (matches CI's `pip install
-e ".[test]"`): `opendox --help`, `opendox runtime --help` and
`opendox-runtime --help` all exit 0; tests_runtime/test_runtime_cli.py, 84
passed + 1 skipped (was 83 + 1 before the new test).
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
READY at ceab648 — Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Both dependencies landed (T016 → #4219370ad, T022 → #45255514d); main merged into this branch (auto-merged cleanly, both sets of cli.py edits combined with no conflict). Re-verified the falsifier in a fresh venv (editable install, matching CI's pip install -e ".[test]"): opendox --help, opendox runtime --help and opendox-runtime --help all exit 0.
Copilot's review at the prior head (2c75ce0) found 3 findings (2 medium, 1 low); all resolved at this head:
added an entry-point metadata test (test_the_console_scripts_are_the_real_target), verified red-before/green-after against a typo'd target;
fixed the one remaining internally-contradictory paragraph in runtime/cli.py (future tense beside two already-corrected past-tense ones);
the third (hard-coded prog="ideation-dashboard" shows in a standalone --help) answered with evidence on the thread rather than fixed: prog is unconditional, so changing it also changes the HOSTED case's usage line, which is the golden parity build_parser()'s own docstring names and this task's own text says stays unregenerated; raised as a follow-up, not silently dropped.
Copilot's next review (06:31:01Z, at this exact head) reports 0 new findings and all 3 as resolved. All three checks (validate, runtime, SonarCloud Code Analysis) SUCCESS. All review threads resolved. No "Changes requested" review at any point.
T038 landed after T022, so this takes main at 796838e. The sweep and
F4.1's scan re-run over the console-script entry point it adds.
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>
T038 landed after T022, so this takes main at 796838e and re-verifies
the nine files, the triple and the whole suite over it, in both venvs.
T034 stays after T032 (#49), and takes main again once T032 lands.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…16.6's phase-1 repair) (#50)
Plan 034, task **T034**, 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 T034 entry there is byte-identical to `0d48231b`'s, which this record was first written against. This PR realizes box **9.1 (part)** and **16.6 (the phase-1 repair)** of the ratified `add-neutral-product-standalone-operability`.
- **Ruled:** R1Q2 (a) and R1Q22 (a), openxFactory#656 comment `5817152735`. Eight of the nine files are carved `moved_with_declared_edit` rows, and `tests/test_consumer_reach.py` has no row. None needs a declared-edit act.
- **Claim:** openxFactory#656 comment `5852380744`.
- **After:** T032, "whose sweep fixes the import inventory that the re-derived censuses must match". **It has landed**, as #49 → `68be484a`, after T022 (#45 → `255514df`) and T038 (#48 → `796838e8`). `main` at `68be484a` is merged in (`7e3dc9ff`, no force-push). Everything below was re-run at this head, `bc6b168d`. The inventory the sweep fixes is the one the re-derived record holds. At `68be484a` the sweep finds no reach at import time, and `STILL_REACHING`, which the record now derives on every run, is empty. The sweep's 19 deferred reaches sit in `branch_session`, `cli`, `serve`, `serve_project` and `serve_workbench`, the five modules openXdox-code's ratchet counts. The sweep's own file passes on this tree (`35 passed`).
## For T007's batch E and T047: what this PR moves to openxFactory
**Four test cases leave openDox-code and become NAMED openxFactory composition tests (R1Q2 (a)).** T007's batch E adds each destination path to F11.1's named set (`COMPOSITION_TESTS`) before T047 lands. T047's openxFactory PR lands the cases there, and T049 checks that they arrived. **`tests/test_session_harness.py` is not moved here.** It is in `collect_ignore`, and it is T035's.
**The holder's decision on the three memory-gateway cases: accepted under R1Q2 (a)** (relayed to this lane's writer, 2026-09-27). T034's text names only the outline case. The memory-gateway cases take the same route because the spec they read exists only in openxFactory.
| moved case | from (openDox-code) | to (openxFactory), proposed | why it cannot stay |
|---|---|---|---|
| `test_the_model_and_the_doc_health_family_agree_on_the_contract` | `tests/test_outline_model.py` | `tests/ideation-dashboard/test_outline_template_agreement.py` | It holds `views/outline-model.js`'s `REQUIRED_SECTIONS` and `QUESTION_SUBFIELDS` equal to openxFactory's `doc_health.families` (`_TEMPLATE_SECTIONS`, `_QUESTION_SUBFIELDS`). It imports `doc_health`, which openDox can never install. openDox has no checker of its own until Group 6 (release 2), so there is no openDox contract to rewrite it against. |
| `test_the_roster_is_exactly_the_promoted_capabilitys_requirements` | `tests/test_doxbench_memory_gateway.py` | `tests/ideation-dashboard/test_memory_gateway_roster.py` | It reads `openspec/specs/memory-gateway/spec.md`, the promoted capability that `doxbench_memory_gateway.CAPABILITY_REQUIREMENTS` is transcribed from. That spec is openxFactory's, and no openDox repository carries a copy (checked in openDox-spec, openDox, openXdox-spec, openXdox and openXdox-code). It failed on `FileNotFoundError`. |
| `test_the_tier_column_is_TRANSCRIBED_not_invented` | same | same | the same spec's tier block |
| `test_the_untiered_requirement_really_is_absent_from_the_tier_block` | same | same | the same spec's tier block |
Both destinations compose openDox at openxFactory's pin, which `scripts/carved_reach.py` already puts on the path for `tests/ideation-dashboard/`. The outline case then reads `openDox/code/src/opendox/web/views/outline-model.js` from the pin, and the memory-gateway cases import `opendox.doxbench_memory_gateway`. **The paths are proposals.** If T047's writer chooses others, batch E records what T047 lands. The cases' own text, verbatim from `main` `19370adc`, is below, so no archaeology is needed.
<details><summary>The outline-template agreement case (from <code>tests/test_outline_model.py</code>)</summary>
```python
def test_the_model_and_the_doc_health_family_agree_on_the_contract():
"""The surface and the checker must mean the same thing by conformance."""
import sys
sys.path.insert(0, str(REPO_ROOT / "scripts"))
from doc_health import families
js = MODEL_JS.read_text(encoding="utf-8")
for _needle, label in families._TEMPLATE_SECTIONS:
assert f'label: "{label}"' in js, f"model omits required section {label}"
for field in families._QUESTION_SUBFIELDS:
assert f'"{field}"' in js, f"model omits sub-field {field}"
```
`MODEL_JS` was `REPO_ROOT / "src/opendox/web/views/outline-model.js"`. At openxFactory it is the pinned leg's copy of that file.
</details>
<details><summary>The three memory-gateway roster cases (from <code>tests/test_doxbench_memory_gateway.py</code>)</summary>
```python
SPEC_PATH = REPO_ROOT / "openspec" / "specs" / "memory-gateway" / "spec.md"
# ===========================================================================
# THE ROSTER — transcribed, and asserted against the capability itself
# ===========================================================================
def test_the_roster_is_exactly_the_promoted_capabilitys_requirements():
"""The declaration is only complete if the roster it is complete OVER is
the capability's own. Read from the promoted spec, so a requirement added
upstream fails here rather than becoming a silent gap in the declaration."""
published = {
line[len("### Requirement: "):].strip()
for line in SPEC_PATH.read_text(encoding="utf-8").splitlines()
if line.startswith("### Requirement: ")
}
assert published == set(mg.CAPABILITY_REQUIREMENTS)
def _published_tiers() -> dict[str, str]:
"""The spec's OWN tier block, parsed: requirement name -> the tier line it
is named on."""
spec = SPEC_PATH.read_text(encoding="utf-8")
block = spec.split("```text", 1)[1].split("```", 1)[0]
published: dict[str, str] = {}
for match in re.finditer(r"(M\d):((?:.|\n)*?)(?=\nM\d:|\Z)", block):
tier, body = match.group(1), " ".join(match.group(2).split())
for name in body.split(";"):
published[name.strip().rstrip(".")] = tier
return published
def test_the_tier_column_is_TRANSCRIBED_not_invented():
"""RE-PINNED (adversarial review, F7). The roster test checked NAMES only,
so two wrong tier values sat in the column unchallenged: one requirement
carried `M0` although the spec's tier block never tiers it at all, and
`Expert Memory And Knowledge DBs Are Gateway-Governed` was FLATTENED to
`M4` although the spec says in as many words that it follows the tier of
the operation it mirrors. Both are now transcribed, and this test reads the
spec's own block so neither error can recur silently."""
published = _published_tiers()
for requirement, declared in mg.CAPABILITY_REQUIREMENTS.items():
named = [line for line in published
if line.lower().startswith(requirement.lower())]
if not named:
# Not tiered by the spec at all -- which the column must SAY.
assert declared == mg.TIER_UNTIERED, requirement
continue
line = named[0]
if line != requirement:
# The spec qualifies this row rather than tiering it outright.
assert declared == mg.TIER_MIRRORS_OPERATION, requirement
assert "follows the tier of the operation it mirrors" in line
continue
assert declared == published[line], requirement
def test_the_untiered_requirement_really_is_absent_from_the_tier_block():
published = _published_tiers()
untiered = [name for name, tier in mg.CAPABILITY_REQUIREMENTS.items()
if tier == mg.TIER_UNTIERED]
# TWO since 2026-08-22: add-doxbench-editing-phase-b's archive promoted
# `Subject-Free Local Consumers…` into the capability, and the spec's tier
# block does not tier it either. The list stays EXACT rather than becoming
# a membership check — an untiered requirement is a fact about the spec, so
# a third one appearing should fail here and be looked at.
assert untiered == [
"Derived memory bindings validate against the neutral schema",
"Subject-Free Local Consumers Declare Their Inapplicable Rails"]
for name in untiered:
assert not any(line.lower().startswith(name.lower())
for line in published)
```
`mg` is `opendox.doxbench_memory_gateway`, and the helper needs `import re`. At openxFactory, `REPO_ROOT` is openxFactory's own root, where the spec is (22 requirements at `0d48231b`, and `CAPABILITY_REQUIREMENTS` holds 22).
</details>
## The nine files (research R3), at `main` `68be484a` and at this head
With the root conftest in play, Python 3.12.3, `-c constraints-cpython312-linux.txt -e ".[test]"`. The nine files give the same results on `main` at `68be484a` as at `19370adc`:
| file | `main` | this head | cause | repair |
|---|---|---|---|---|
| `test_doxbench_abstract_pane.py` | 18 passed, 28 errors | 46 passed | § 3.4 slice S5 moved the workbench gate column out of the bundle, so a shell mounted with no column withholds the canvas, and the generate control with it | The harness is the host, so it contributes the column `app.js` resolves. It imports `_CONTRIBUTED_GATE` from `test_doxbench_view.py`, whose S7 note gives the reason, the way it already imports the DOM shim. The column answers `createGateLive` off the same `caps`, so the ungated and hosted mounts still have no gate. |
| `test_outline_tab.py` | 3 passed, 25 errors | 28 passed | the same | the same, and the pre-template sentence reads the SELECTION role's word from `NEUTRAL_DISPLAY`. It spelled openxFactory's "staged" before S7 parameterized it. |
| `test_doxbench_composition.py` | 13 errors | 13 passed | the same | the same |
| `test_provider_boundary.py` | 16 passed, 12 failed | 24 passed | 16.6's three stale reasons | See below. |
| `test_doxbench_memory_gateway.py` | 36 passed, 3 failed | 36 passed | read openxFactory's `openspec/specs/memory-gateway/spec.md` | the three cases move to openxFactory (above) |
| `test_consumer_reach.py` | 31 passed | 36 passed | none left after T011, whose bullet says *"T034 re-derives the rest of the file"* | re-derived: see below |
| `test_boundary.py` | 27 passed, 1 failed | 28 passed | the surface scan kept names whose `__module__` was the literal `"output_boundary"`, so after the carve every class fell out of the census | the guard's home is read off `output_boundary.__name__` |
| `test_doxbench_mcp.py` | 23 passed, 1 failed | 24 passed | the child was started as `-m ideation_dashboard.doxbench_mcp` with `PYTHONPATH=scripts/` | `-m opendox.doxbench_mcp` with `PYTHONPATH=src/` |
| `test_outline_model.py` | 47 passed, 1 failed | 47 passed | imported `doc_health` | the case moves to openxFactory (above) |
| **total** | **201 passed, 18 failed, 66 errors** | **282 passed** | | |
**`test_provider_boundary.py`, for 16.6's three reasons.** None of the twelve failures was a crossing. The file's docstring now records each reason.
1. **It read `snapshot_registry.py`**, its second HTTP-client holder, which the carve sent to openXdox-code. It is no holder in this package now, and the claim about it is not this leg's to make.
2. **It pinned seven per-module scan suites by filename.** The carve manifest sent five to openXdox-code (`test_doxbench_turns.py`, `test_doxbench_packet.py`, `test_doxbench_threads.py`, `test_doxbench_bridge.py` and `test_doxbench_mutation_boundary.py`) and left two in openxFactory (`test_doxbench_model.py` and `test_doxbench_status_exemption.py`, `stays_openxfactory_adapter`). `PRESERVED_SCANS` now pins the three this checkout carries. `PRESERVED_ELSEWHERE` records the seven with their homes, and a case asserts that none of them is here, so the record cannot go stale.
3. **Its sweep reached the runtime (§ 3.5).** `runtime/app.py` spells `Authorization` and `Bearer ` for the identity broker's token, which it checks on the way in. `runtime/oidc.py`, which verifies that token, spells `Authorization` in prose. Both are named as tier-two holders in place of `snapshot_registry.py`, and the provider tier is asserted absent from each, as it was from that module. The named list is an exemption, so it is not its own authority. Since review round 5, `test_the_identity_surface_is_the_runtimes_two_modules` holds it to exactly these two modules, and a third holder has to be argued on its own PR. `runtime/config.py` names `access_token` in `SECRET_PARAMETER_KEYS`, the credential names the runtime refuses and redacts. It gets one permit: that needle, in that module, only while that tuple still names it (read with `ast`), and no other provider-tier spelling there. Since review round 1, the permit covers only the tuple and the module's prose. The sweep asks `_spelled_in_code`, which reads every identifier, attribute name and string literal off the syntax tree outside the declaration and the documentation. A spelling there fails with its line. A case also holds the table to that one entry, not only to its size, so a second permit, or one moved to another module or needle, has to be argued on its own PR.
The boundary is still one module wide for anything that holds a provider credential. 16.6's own measurement agrees: only `doxbench_provider.py` reaches a model provider.
**`test_consumer_reach.py`, re-derived over the whole package.** T011 emptied `STILL_REACHING` by moving its only two entries.
- `test_the_record_is_the_whole_packages_own` now derives the record on every run. It imports every module the package's files define, in one interpreter, with all four siblings blocked. It follows the exception chain, because a stand-in resolved at import time raises `ConsumerReachUnavailable` with the `ModuleNotFoundError` as its cause. The modules that fail on a sibling must be exactly the record. Before this, a module outside `NEUTRAL_MODULES`, which names nine, could start needing `openxdox` at import time and pass the whole file. At this head none fails.
- Every other failure is classified, not dropped. The one read past is a module of `opendox.runtime` missing a package of the runtime extra, where the extra is not installed. In a `.[test]`-only venv, that is `app`, `db` and `oidc`, on `fastapi`, `psycopg` and `httpx`. Anything else fails the test by name: a syntax error, a broken module of openDox's own, an undeclared dependency, or a runtime package needed outside `opendox.runtime`. `RUNTIME_EXTRA` tables the extra's distributions with their import names, and `test_the_runtime_extra_is_the_one_pyproject_declares` holds its keys to `pyproject.toml`'s `runtime` list. `test_the_runtime_extras_modules_are_the_runtimes_own` holds the import names to two independent authorities, the runtime's own imports and the installed metadata. Each tabled name is one that a module of `opendox.runtime` imports. Every third-party package the runtime imports is tabled, or comes from one of the package's required dependencies. Where a tabled distribution is installed, each of its names is installed by it or by a distribution it requires.
- `CONVERTED_SITES` had fallen behind the tree by five names in two files: `branch_session.py`'s `gate_console`, the module whose nine default-argument reads the guard is named for, and `cli.py`'s `corpus_root_refusal`, `generate_snapshot`, `is_rfc3339_datetime` and `SCANNED_ROOTS`. They join the table. `test_every_name_bound_to_the_seam_is_guarded` holds the table equal to the names each module binds to the seam. None of the five is read at import time. The census reads every spelling of the seam:
- `Y = <seam>.X`, its annotated form, and `Y = <seam>.module(...)`;
- `<seam>` spelled as an alias of the module, as `opendox.consumer_reach` after `import opendox` or `import opendox.consumer_reach`, or through `from .. import consumer_reach` in a subpackage;
- each of these wherever the module runs it at import time, a module-level `if` or `try` included.
A wildcard import from the seam fails with its own message.
**Thirty-seven mutations, each a copy of this tree with one planted change, and each fails the assertion it targets.** One more runs in the `.[runtime,test]` venv. The first thirteen:
- an unlisted module gains a module-level `from openxdox import …`;
- an unlisted module resolves a stand-in at import time, which is caught through the exception chain;
- a new name is bound to the seam;
- `branch_session.py` reads `gate_console` at import time;
- a provider endpoint appears in a non-provider module;
- a `Bearer ` header appears in an unnamed module;
- the identity surface gains `MintedToken`;
- `SECRET_PARAMETER_KEYS` stops naming `access_token`;
- the redaction module gains `client_secret`;
- a carved-away scan suite comes back;
- the guard gains a public class the shim does not re-export;
- the pre-template sentence goes back to "staged topic";
- the abstract-pane harness loses its contributed column.
The twelve added in review round 1:
- an import-time `import doc_health` where a `doc_health` is installed;
- a module importing a missing module of openDox's own;
- a module that raises while importing;
- an undeclared dependency;
- `import fastapi` outside `opendox.runtime`;
- a runtime module importing a package the extra does not declare;
- a distribution added to pyproject's runtime extra and not tabled;
- `Y: T = consumer_reach.X`;
- `Y = consumer_reach.module(...)`;
- `runtime/config.py` spelling `access_token` in a dict key, in an attribute read, and in an f-string.
Eight more came from review rounds 2 and 3:
- `import opendox.consumer_reach` then `opendox.consumer_reach.module(...)`;
- `import opendox` then `opendox.consumer_reach.snapshot`;
- an alias of the seam module;
- a subpackage's `from .. import consumer_reach`;
- the seam imported inside a module-level `try`;
- a stand-in bound inside a module-level `if`;
- a wildcard import from the seam;
- a second redaction permit.
Two came from review round 4, and one more runs in the `.[runtime,test]` venv:
- an invented module in a `RUNTIME_EXTRA` row;
- a runtime module importing a package nothing declares, read statically;
- in `.[runtime,test]`, a module tabled under a distribution that does not install it.
Two came from review round 5:
- a third identity holder listed, with `Authorization` in its code;
- the one redaction permit moved to another needle, with `runtime/config.py` spelling that name instead.
Two controls pass, as they must: a new comment and a new docstring in `runtime/config.py` that name `access_token`.
## The falsifier: `python -m pytest -q` over the nine files
```
$ python -m pytest -q tests/test_doxbench_abstract_pane.py tests/test_outline_tab.py tests/test_doxbench_composition.py tests/test_provider_boundary.py tests/test_doxbench_memory_gateway.py tests/test_consumer_reach.py tests/test_boundary.py tests/test_doxbench_mcp.py tests/test_outline_model.py
282 passed in 22.93s
```
It also passes under `--noconftest`, file by file, and in a `.[runtime,test]` venv.
## The repository's own check
`.github/workflows/validate.yml`'s three report-producing steps, run as the file writes them and summed as `Pin the triple` sums them, in the `.[test]` venv above:
```
triple: selected=1160 passed=1157 skipped=3 failures=0 errors=0
pins: selected>=1114 (margin 46) passed>=1111 (margin 46) skipped==3
```
`main` at `68be484a` gives `1155/1152/3`. The five new cases are `test_consumer_reach.py`'s, which the required job runs by name. `test_provider_boundary.py`'s new cases are not on the job's list. No skip was added.
**The whole suite, with the root conftest.** A test-by-test JUnit diff against `main` in the same venv:
| venv | `main` | this head |
|---|---|---|
| `.[test]` | 19 failed, 1489 passed, 13 skipped, 66 errors | 1 failed, 1570 passed, 13 skipped |
| `.[runtime,test]` (F2.1's install) | 18 failed, 1490 passed, 13 skipped, 66 errors | **1571 passed, 13 skipped** |
- 69 cases go from red to passed, all in the nine files.
- 15 are gone: the 4 moved cases, and 11 of `test_provider_boundary.py`'s old ids. Nine were `PRESERVED_SCANS` rows for files this checkout does not carry, one was the renamed tier-two case, and one was the `snapshot_registry.py` case.
- 12 are new, all passing: 5 in `test_consumer_reach.py` and 7 in `test_provider_boundary.py`.
- No other outcome changed.
- The `.[test]` venv's one failure is T030's `test_every_module_imports_with_no_sibling`, which needs the `runtime` extra there, as #46 recorded. T036 gives the `test` extra those packages.
## Review round 1 (Copilot, at `6898748a`)
Each finding was planted at `6898748a` first, and every plant passed there. Each is fixed in `86b8f522`, where every plant fails, and each thread is answered with its evidence and resolved.
- **The derivation blocked only `openxdox`.** With a `doc_health` on the path, a module gaining `import doc_health` dropped out of the census. The derivation, and the record entry check that reads the same failure, now block all four.
- **The derivation dropped every failure that named no sibling.** They are classified now (above).
- **The `access_token` permit covered the whole of `runtime/config.py`.** It covers the declaration and the prose now (above).
- The review's overview also named annotated assignments in the seam census, with no thread. That is done too (above).
## Review rounds 2 and 3 (Copilot, at `86b8f522` and `9d52122b`), no threads
- **Round 2: one previously missed finding.** `import opendox.consumer_reach` binds `opendox`, so a stand-in bound through `opendox.consumer_reach` went unseen. Three sibling forms were unseen the same way. All four are read since `9d52122`, and each passed as a plant at `86b8f52`.
- **Round 3: a summary line only, "seam-alias and wildcard-import gaps, and the single provider-boundary permit invariant."** Since `9a9b21a`:
- the census reads a module-level `if` or `try`, where both plants passed at `9d52122`;
- a wildcard import fails with its own message;
- the permit table is held at one entry.
- **At `9a9b21ae` Copilot reports "Needs a closer look", with no finding and no thread.**
## Review round 4 (Copilot, at `7867614c`, the first merge of `main`)
- **`RUNTIME_EXTRA`'s import names were checked only through its keys.** Adding `"planted"` to fastapi's row left the whole of `test_consumer_reach.py` green at `7867614`, and a missing `planted` import in `opendox.runtime` would then have been read past as an absent extra. Fixed in `383b3232` by the new case above, which holds the names to the runtime's imports and to the installed metadata. The thread is answered with that evidence and resolved.
- **At `383b3232` Copilot reports "Needs a closer look", with no finding and no thread.**
## Review round 5 (Copilot, at `7e3dc9ff`, the merge of T032)
- **`IDENTITY_MODULES` was its own authority.** `holders_seen == permitted` proves only that each listed module holds a needle. Planted at `7e3dc9ff`, `runtime/db.py` added to the tuple, with an `Authorization` string in its code, passed the whole file (`24 passed`). The thread also names line 318, the permit table's pin, which held `REDACTION_PERMITS` by its size only. Planted there, the permit moved to `refresh_token`, with `runtime/config.py` spelling that name in place of `access_token`, passed too (`23 passed`). Fixed in `bc6b168d`: each table is held to the surface it names (above), and both plants fail. The thread is answered with that evidence and resolved. All five threads on this PR are resolved.
## Landing
- T032 (#49) and T022 (#45) have landed, and `main` `68be484a` is merged in. Everything above was re-run at this head.
- `tests/test_consumer_reach.py` has one writer at a time (T011 → T034), and this is its second.
- P1-G (T035–T037, T031) follows this PR.
- 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>
…hy it was narrowed (plan 034) (#52)
Plan 034, task **T036**, with **T031** in the same PR (its "Lands with: T036"), slice P1-G (the whole suite in CI). The plan is `specs/034-opendox-standalone-operation/tasks.md` at opensoft/openxFactory `main` `a9e7db75`; its T031, T035, T036 and T037 entries are unchanged since `133e37d9`. This PR realizes boxes **2.5**, **9.1** and **9.2a** (a required check now runs T030) of the ratified `add-neutral-product-standalone-operability`, and T031 realizes **2.6**.
- **Ruled:** R1Q8 (a), openxFactory#656 comment `5817152735`: `tests_runtime/` is part of the whole suite, with PostgreSQL in the required job.
- **Claim:** openxFactory#656 comment `5856501803`.
- **After:** T035 (#51, landed as `80acead1`) and T038 (#48, landed). This branch merged that `main` at `56d51edc`, with no force-push.
## What changes
**`.github/workflows/validate.yml`.** The three pytest steps are gone, with their file lists, their comment blocks and every line that named the flag that switched the conftest chain off. The one required job now does four things:
1. It installs `.[runtime,test]` under the lock, with `--only-binary :all:`. That is R1Q8 (a)'s install, the one the `runtime` job used.
2. It runs a `postgres:16` service.
3. It runs `python -m pytest -q --junitxml=pytest-report.xml` with the DSN exported. No file list: `testpaths` is the suite.
4. It pins the triple from that one report.
**The `runtime` job is folded in**, which T036 allows ("may then be folded in"). It was advisory under RULED Q-R3 (`5701772032`) "until a separate DECLARED act", and R1Q8 (a) is that act. Keeping it would run every DB-backed case twice, once required and once not. Under `CI` those cases fail rather than skip (`tests_runtime/conftest.py`), so a job whose service did not start is red, not green.
**`pyproject.toml`.**
- `testpaths = ["tests", "tests_runtime"]`.
- The `test` extra gains `opendox[runtime]`. F9.1 installs `.[test]` alone, so without the runtime packages half of `tests_runtime/` would fail under `CI` and skip elsewhere. The extra is named rather than copied, so the runtime's list is still declared once.
- The runtime extra's comment now says why the required job may install it. `tests_runtime/test_runtime_surface.py` measures the import-weight contract in a fresh interpreter by what lands in `sys.modules`, so a leak is named with the extra installed and fails to import without it.
**`Pin the triple`.**
- It reads one report. A missing report now stops the step with one refusal that names the file, instead of failing a zero read from nothing against every floor.
- The skip refusal's message names no test file, which F9.1's second assertion requires. It also no longer lists "an edit to one of the three explicit lists", because there are none.
- **The floors are CI's own reading: `2481` / `2468`, and SKIPPED exactly `13`.** Each move names its run:
| head | run (job) | CI printed | why it moved |
|---|---|---|---|
| `56d51edc` | 36333569456 (108660020012) | `selected=2459 passed=2446 skipped=13` | T035's merge. Its 289 cases are the whole difference from the pre-T035 local replica (2170 / 2157) |
| `485e085a` | 36334996991 (108664042314) | `selected=2471 passed=2458 skipped=13` | twelve run-count cases (below) |
| `db3e8a4f` | 36337919108 (108672216615) | `selected=2481 passed=2468 skipped=13` | ten more, for runs hidden inside a wrapper |
| `13383a6f` | 36338192590 (108672985586) | `selected=2481 passed=2468 skipped=13`, `margin 0` | the floors at that reading |
| `1808146a` | 36339036146 (108675365224) | `selected=2481 passed=2468 skipped=13`, `margin 0` | this head; since `13383a6f`, comments, docstrings and one assertion message only |
**The pins that held the old shape**, rewritten for this one:
- `tests/test_triple_pin.py` covers one report. It gains `test_the_pin_reads_the_report_the_pytest_step_writes`, which holds the `--junitxml` target and `REPORTS` equal, so a rename of either cannot leave the pin reading a file nothing writes.
- `tests_runtime/test_deploy_shape.py`:
- `test_the_workflow_declares_the_required_job_and_its_steps`: one job, and one pytest run across every step, with no positional argument after it.
- The run count is `_pytest_runs`. It splits each script on every shell separator (`&&`, `||`, `;`, a pipe, a background `&`, a newline, a subshell and a command substitution). It counts the word `pytest` wherever it stands in a command, so `env`, `timeout`, `uv run`, `xargs`, `sh -c`, `bash -c` and `pytest.main(` cannot hide a second run. It errs toward counting, and says so. `test_the_run_count_sees_every_shell_separator` drives the count over 22 scripts, including the two that pin that direction.
- `test_the_required_job_supplies_a_postgres_service_and_the_extras`.
- `test_the_required_job_installs_the_runtime_and_test_extras`, which replaces `…installs_only_the_test_extra`. Its docstring gives the measured reason the old premise no longer holds.
- The lock case counts one workflow install instead of two.
**Prose the fold made false:**
- `tests_runtime/conftest.py`'s header, and its `_skip_or_fail` text and message;
- `docs/runtime.md`: the tree line, the § 8 table, and § 9's two residue bullets, now CLOSED;
- the header of `constraints-cpython312-linux.txt`, comments only, with no pin moved;
- every statement that the required job installs `.[test]` and not `.[runtime]`, or that the case runs in "BOTH jobs". These are in `src/opendox/runtime/__init__.py`, `config.py`, `db.py`, `identity.py`, `migrations.py` (twice) and `cli.py`, and in `tests_runtime/test_runtime_cli.py`, `test_runtime_surface.py`, `test_migration_shape.py`, `test_schema_shape.py`, `test_oidc_verifier.py`, `test_deploy_shape.py` and `test_local_git_adapter.py`. There are two more in `tests/test_consumer_reach.py`, and one in a `pyproject.toml` comment. The import-weight contract itself is unchanged;
- the three DB-backed modules' headers, which said they run in the `runtime` CI job: `tests_runtime/test_api_endpoints.py`, `test_migrations_apply.py` and `test_repository_act.py`. They run in `validate`, and under `CI` they fail rather than skip without a database;
- the lock test's missing-lock message, which named "the three installs". There are two: the required job's and the image's.
**T031, `README.md`:** box 2.6. The paragraph gave the narrowing's reason as the openDox → openXdox dependency. It now says what `validate` runs (the whole suite, no exclusion), and that the live cause of the old narrowing was the carved code's reaches into `ideation_dashboard`. The dependency itself was inverted at import time first.
## The falsifier: F9.1 (openDox-code), both assertions, with the database DSN exported
This is F9.1 verbatim from #1144's `tasks.md`, after one line that exports the DSN, quoted, the way the job does. The database is a private `postgres:16` container. The run is at this head, `1808146a`:
```
export OPENDOX_TEST_DATABASE_URL='postgresql://opendox:opendox@host.docker.internal:55471/opendox'
set -euo pipefail
W=$(mktemp -d)
python -m venv --clear "$W/v9"
. "$W/v9/bin/activate"
pip install ".[test]"
python -m pytest -q # NOT --noconftest, NOT a file list
test "$(grep -c -- --noconftest .github/workflows/validate.yml)" -eq 0
python - <<'EOF' … EOF # the named-file check, verbatim
```
It exits 0:
```
2468 passed, 13 skipped, 1 warning in 313.37s (0:05:13)
```
It exited 0 at `13383a6f` too, with the same counts. That was before the last two commits, which change comments, docstrings and one assertion message only.
`pip install ".[test]"` brings FastAPI, psycopg, PyJWT and httpx through `opendox[runtime]`. The flag count is `0`. The named-file check finds no `tests/test_*.py` or `tests_runtime/test_*.py` path outside a comment.
The 13 skips are all in `tests/`:
- 2 in `test_binding_stylesheets.py`: T037's pair, the two that need openXdox's modules or its sheets;
- 8 in `test_doxbench_bridge_live.py`: no `omp` harness;
- 3 in `test_openprofiler_broker_e2e.py`: no broker binary.
`tests_runtime/` skips none with the database up.
## Planted mutations, each caught
Each plant is one change to a scratch copy of the head. A control run of the targets passes first.
**T036's seven:**
1. The pytest step writes its report under another name: the join case fails.
2. The pytest step names a test file: the shape case fails.
3. A second pytest run chained onto the step: the shape case fails.
4. The job installs `.[test]` alone: both extras cases fail.
5. The service is renamed away: the service case fails.
6. The pytest step names a bare `tests_runtime`: the shape case fails.
7. The pin sums on past a missing report: the missing-report case fails.
**Nine more, for the run count.** A second run is added after the step with each of these, and each turns the shape case red:
- `||`
- `|` (into `xargs pytest`)
- a bare `pytest`
- `env CI=true pytest`
- `timeout 600 pytest`
- `uv run pytest`
- `sh -c "python -m pytest …"`
- `bash -c 'pytest -q'`
- `python -c '… pytest.main([]) …'`
The first version of the count read `||` as one run, and the second read the `env` form as one.
## Copilot's reviews
| head | overview | what it found | where it went |
|---|---|---|---|
| `4e0056d4` | Changes recommended | `collect_ignore` still listed the seven | T035 landed and was merged at `56d51edc`; answered with CI's reading, resolved |
| `83fb977e` | Changes recommended | the count missed `\|\|`; two stale "`.[test]` alone" statements | fixed at `485e085a`; the same claim swept everywhere else (comment `5857867635`); resolved |
| `485e085a` | Needs a closer look | runs hidden in a wrapper | fixed at `db3e8a4f` |
| `b8623bf9` | Needs a closer look | `env CI=true pytest`; this body's floors did not match the file | fixed at `db3e8a4f`; this body now carries the table above |
| `13383a6f` | Changes recommended | this body still carried the pre-T035 figures; a note above the separators still described the first count | this body rewritten; the note corrected at `ab862032` |
| `ab862032` | Needs a closer look | three DB-backed headers still named the `runtime` job; two statements in `test_deploy_shape.py` | fixed at `1808146a`, with the rest of that claim's instances |
| `1808146a` | **Approval recommended** | no findings | |
## Two timing-sensitive cases, seen red once each on this machine
Neither case is new, and neither file is changed here. T036 brings both into the required job for the first time. CI ran both green at every head above.
- `tests_runtime/test_migrations_apply.py::test_the_draft_page_budget_does_not_read_the_bodies_it_sizes` asserts a timing ratio above 4x. It read 3.87x once, under a full local run against a Docker Postgres. It passes alone 3 of 3. It was in the advisory `runtime` job before.
- `tests/test_model_provider_broker.py::test_a_token_past_its_declared_expiry_is_discarded_and_re_minted` (T035's module) gives a token a wall-clock expiry one second in the past, at whole-second precision. It failed once in an F9.1 run. One of five module runs right after also went red, and I did not capture which case; the next 42 module runs were all green. The code compares `now >= expires_at`, so a red needs the wall clock to step back more than a second, which this WSL2 host can do. A follow-up could widen the margin (`time.time() - 3600`); that file is not this task's.
## Left as it is, and why
- **Test docstrings that call a module "`--noconftest` safe, like every file `validate` runs today"** (about 25 files under `tests/`). Each file is still safe to run with no conftest, so the claim about the file holds. Only the "`validate` runs today" framing is dated. A sweep through 25 carved files is not this task's to make, and F9.1 counts `validate.yml` alone.
- **`src/opendox/cli.py:1120`** names the flag about openXdox-code's own `validate`, not this one's.
## Landing
- T037 follows this PR, and P1-R (the openDox root pin) waits on T037.
- Squash or merge, never rebase. Each commit 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>
**Authored ahead, as a phase-2 draft.** Brett ruled on openxFactory#656, comment `5857365170` ("Start phase 2's independent tasks"), that phase-2 tasks are authored as drafts. **T049 has landed** (openxFactory#1204 → `9d2e5bc3`), so phase 2 is open. This PR stays a draft until the two tasks below have landed and the holder un-drafts it.
T055 is `After: T054, T057, T022, T038`, and all four have landed (#57 `a691e4e4`, #58 `8ec08e91`, #45, #48). Before they landed:
- T054 is #57, a clean draft. It waits on #54, #56 and T053 (openDox-spec#16).
- T057 is #58, a clean draft. It also waits on the openDox root pinning T053's landed spec commit. See "T057 and the validator default" below.
- T022 (#45) and T038 (#48) have landed.
This is plan 034's **T055 (serve and generate standalone: 5.5, and 4.3 in part)**, phase-2 slice **P2-R**. I read the plan at openxFactory `main` `6b97c60` (`specs/034-opendox-standalone-operation/tasks.md`). The slice is claimed on openxFactory#656, comment `5873583149`.
## What this branch carries
- It is **built on #57's branch**, `build/034-p2p-t054-neutral-projection` (T054, the neutral projection), which is itself built on #54 (T052, the generator seam). It was cut at `5a6fe637`, with #54's head `8d507c5b` merged in as `e8a733d`.
- After T049 landed, **#57's head `8e7da4a2` is merged in as `8cbb1ea`**, clean. That head carries:
- #54's final head, `2f515c57`;
- #56's head, `44dcc3a1`;
- `main` `dc3765dd`, where #53 (T050) landed;
- the holder's scaffold decision (`8e7da4a`), which answers r4126022820 below.
- **#58 (T057) is not merged in**, on the holder's decision (below).
- Until #54, #56 and #57 land, the diff against `main` carries their changes as well. T055's own change is:
- its commits `c27eac35` through `f4ef63d3`: the first builds T055, and the other six take Copilot's review rounds;
- `d7aa9d8c` (the holder's decision on empty source options), and `687d37bf`, `96f18c45` and `e3ef506a` (the next three review rounds), all after T049.
## What it builds
### Four seams, each with an openDox default of its own (R1Q10 (a))
`src/opendox/projection_seams.py` is new and uses the standard library only. It declares four seams:
| seam | what a registration carries | openDox's default |
|---|---|---|
| `registry` | the entry, registry and source types; the key, containment and publishable-ref rules; the data-source readers; the refresh bindings and defaults | `opendox.default_registry` |
| `corpus_root` | `corpus_scan_defect`, `corpus_root_refusal`, `change_rows`, `SCANNED_ROOTS` | `default_projection.CORPUS_ROOT` |
| `writer` | `write_snapshot(snapshot, path, boundary)` | `default_projection.WRITER` |
| `validators` | one validator per KIND: `validate(path, *, strict, search_from)`, answering a `ValidationResult` | `default_projection.VALIDATOR`, for `opendox-snapshot` and `ideation-workbench` |
The rules are the ones the profile and generator seams keep (R1Q3 (a) and (ii); RN-1 (a)):
- **Nothing registered refuses** (4.2). The refusal names the seam, its call and the four entry points. There is never a silent fallback.
- **The entry points register the defaults where no host has.** They are `cli.build_parser()`, `cli.main()`, `serve.build_server()` and `serve.main()`. `register_defaults()` reads nothing.
- **A host's registration replaces a default until a consumer has read it**, and is refused (`SeamAlreadyRegistered`) after that. A host over a host is refused. The same object again is a no-op. `unregister()` makes a swap explicit.
- **Each registration is probed for its names when it is made.** A missing or non-callable name is a `TypeError` naming what is missing. A lookup that raises is chained as the cause (T027's rule).
- **A consumer resolves the seam at each use.** `serve.py` and `serve_workbench.py` bind `registry_mod = projection_seams.registry.proxy`, which resolves on every attribute read. No proxy is read at import time, and a test walks the AST to hold that.
The defaults are new code, not openXdox's modules moved.
- **`default_registry`** is one in-memory registry keyed `(repository, ref)`, with `ref` defaulting to `main`.
- It keeps `/source`'s containment rule (`resolve_within`).
- Its `SnapshotSource` serves the snapshot it was handed, and it regenerates that snapshot.
- It reads **no data source and no index**, because openDox has no index kind (T053). A declared `--data-source-*` or `--local-index` is **refused**, naming the seam, rather than ignored.
- `compose_view` composes nothing.
- **`CORPUS_ROOT`** asks, structurally, for a git repository's root: a directory holding `.git`, and a worktree's `.git` file counts. Its `SCANNED_ROOTS` is empty, and `change_rows` answers no row.
- **`WRITER`** writes canonical JSON (sorted keys, indent 2, ASCII, a trailing newline) through the interactivity boundary.
- **`VALIDATOR`** is a stand-in until T057 is in this tree. It answers `validator-unavailable`, naming T057, and never answers `validated`.
### The verbs go through the seams (4.3, in part)
- **Generation.** `cli._generate_and_write` and `cli._gate_snapshot` call `generator_seam.generate(...)`, which looks the generator up on each call.
- Both write through the registered writer.
- An unset `--project-register` or `--possibles` is not passed.
- A set one that the registered generator does not declare is refused (`generate refused: …`) before anything is written.
- **The validator is chosen by the written snapshot's `kind`** (`cli._validate_by_kind`). `_locate_validator` is gone.
- The three outcomes keep their meaning, and so do `--strict` and `--no-validate`.
- A kind with no validator is *unavailable*. It is never given another kind's validator.
- A snapshot that declares no kind fails.
- The remedy line prints only when the validator declares a `dependency_remedy`.
- **The workbench manifest.** `workbench.validate_manifest` asks the lookup for `ideation-workbench`, and no longer calls `consumer_reach.find_validator`. An explicit validator script still runs as before.
- **The regenerate.** The default source's regenerate (`SnapshotSource.refresh`) generates through the seam and writes through the registered writer. It keeps `main` active and never promotes a session ref (FR-014a).
- **`branch_session`.**
- `session_entry`, `register_session_entry`, `refresh_session_snapshot` and `refresh_main_view` use the registered registry's types.
- `_change_rows` (the brief's `:1568`) asks the corpus-root seam's `change_rows`, because the generator seam does not carry it.
- **The RFC 3339 check.** `is_rfc3339_datetime` is openDox's own (`src/opendox/rfc3339.py`). It implements the neutral contract's `generated-at-is-rfc3339` rule, which no seam carries, and it agrees with openXdox's check over 20 vectors.
- **The core `/snapshot.json` arm is `serve.py`'s own.**
- `_query_key`, `_read_snapshot`, `_serve_snapshot` and `_hosted_entry_refused` are now defined on `DashboardHandler`.
- `hosted_ref_refused` is a function in `serve.py`, over the registry seam's `is_publishable_ref`.
- While they were forwarded to openXdox, a standalone server refused every `/snapshot.json`, and `_divergence_headers` asks `hosted_ref_refused` on every response.
- `_checkout_real` and `_refuse_impossible_checkout_root` ask the registered predicate.
- **`_report`** prints `repository=… kind=opendox-snapshot` for the neutral kind, which carries no project. Every other kind's line is unchanged.
- **The empty-projection warning** reads the registered predicate's `SCANNED_ROOTS`. With none, as openDox's own predicate has, it says "it was accepted as a corpus checkout, but nothing in it was read as a document". The governed wording is unchanged.
- **The `_default_home_factory` docstrings** in `cli.py` and `serve.py` now say that the adapter's default `required_fields` is `NEUTRAL_FIELDS` (`title` and `summary`, since T054), as #57 asked. The two copies stay identical apart from each naming the other.
- **`serve.main()` registers the defaults before building its parser**, because its option defaults read the registry.
- So `--help` now runs in a lone checkout, which research R7 found it could not.
- `--data-source-path`'s help reads `(default: the source root)`.
- A seam's refusal prints `serve refused: …` and exits 1.
### Retired from `consumer_reach`
- **The stand-ins.** `snapshot_registry`, `snapshot`, `corpus_root`, `generator`, `find_validator`, `corpus_root_refusal`, `generate_snapshot`, `is_rfc3339_datetime`, `hosted_ref_refused` and `scanned_roots` are gone.
- **The helpers.** The `function` and `constant` stand-in helpers are gone too, since nothing binds through them any more.
- **The projection column.** `LateProjectionRoutes` now forwards ONE method, `_serve_index`, for the column's own `/snapshot-index.json` binding. That binding is T084's.
## The falsifier
From T055's entry in tasks.md:
> **Falsifier**: F4.1's scan, down by these reaches.
The scan is `scan_deferred_reaches.py` from research.md's appendix (sha256 `fe116203…`, as in the remeasure table), run over `src/opendox`. At `e8a733d`, the branch before T055's commit:
```text
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:632: openxdox.snapshot_registry [in _session_registry]
src/opendox/serve.py:652: openxdox.corpus_root [in _checkout_real]
src/opendox/serve.py:2125: 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
```
At `c27eac35`:
```text
src/opendox/branch_session.py:1592: openxdox.register [in _active_pick_fallbacks]
src/opendox/branch_session.py:2010: openxdox [in proposal_state_for]
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:351: openxdox [in _is_live_session_ref]
src/opendox/serve_workbench.py:411: openxdox [in _thread_gate]
src/opendox/serve_workbench.py:412: openxdox [in _thread_gate]
src/opendox/serve_workbench.py:548: openxdox [in _handle_workbench_thread]
src/opendox/serve_workbench.py:1219: openxdox [in _handle_workbench_model_approval]
src/opendox/serve_workbench.py:1669: openxdox [in _handle_workbench_chat_turn]
src/opendox/serve_workbench.py:2611: openxdox [in _handle_workbench_document_abstract]
11 deferred reaches
```
- **The eight reaches that are gone** are the ones T055 names:
- `branch_session`'s `_change_rows`, `session_entry`, `register_session_entry`, `refresh_session_snapshot` and `refresh_main_view`;
- `cli`'s `_session_registry`;
- `serve`'s `_checkout_real` and `_refuse_impossible_checkout_root`.
- **The eleven that remain** are all T084's.
- **The census of `consumer_reach` sites** (`census_consumer_reach.py`, sha256 `7f36b848…`) falls from 65 to 29: `gate_console` 27, `LateGateRoutes` 1 and `LateProjectionRoutes` 1. No projection name remains.
**Standalone, end to end:** `tests/test_projection_seams.py::test_generate_and_serve_run_with_no_sibling_importable` runs in a process where `openxdox`, `ideation_dashboard`, `doc_health` and `corpus_adapter_openxfactory` cannot be imported.
- `generate` exits 0 and writes `kind: opendox-snapshot`.
- `serve.build_server` builds.
- The server answers `GET /snapshot.json` 200 (the neutral kind), `/capabilities` 200, `/source/notes-toolshed-inventory.md` 200 and `/source/.git/config` 404.
- No sibling module is loaded.
## The repository's own checks
- **The whole suite, against a `postgres:16` container** (CI's service and DSN shape), on Python 3.12.3 with pytest 8.4.2. The venv was installed with `-c constraints-cpython312-linux.txt -e ".[runtime,test]"`, and `LANG=C.UTF-8`, as the runner sets it.
| run | passed | skipped |
|---|---|---|
| base `e8a733d` (the branch before T055's commit) | 2583 | 11 |
| head `f4ef63d3` | 2701 | 11 |
The test-by-test JUnit diff shows **127 added**, all passing:
- 117 in the new `tests/test_projection_seams.py`;
- 4 new `NEUTRAL_MODULES` parameters in `test_consumer_reach.py`;
- 6 in `test_source_core_arm.py`.
It shows **9 removed**. Each subject is retired or replaced:
- Four tests exercised `consumer_reach.constant()`, which is retired: `test_a_constant_does_not_forward_attribute_reads`, `test_constructing_a_constant_resolves_nothing`, `test_the_sequence_operations_a_re_exported_constant_meets` and `test_an_unavailable_consumer_refuses_at_the_operation_not_at_the_binding`.
- `test_a_converted_name_is_never_used_at_import_time[serve.py|serve_workbench.py|workbench.py]`: those modules bind no `consumer_reach` name any more. The import-time property of the proxies they bind instead is held by `test_no_proxy_over_a_seam_is_read_at_import_time`.
- `test_the_column_keeps_the_rules_the_ruling_did_not_move` asserted that `_serve_snapshot` and `_hosted_entry_refused` stay forwarded, which T055 reverses. It is replaced by `test_the_column_keeps_only_its_own_contributed_route` and `test_the_snapshot_arms_handlers_are_defined_on_this_handler` (four cases).
- `test_hosted_ref_refused_is_still_reached_through_the_late_seam` is replaced by `test_hosted_ref_refused_asks_the_registered_registrys_rule`.
**0** outcomes changed.
- **The triple pin** reads: selected 2712 (floor 2476), passed 2701 (floor 2465), skipped 11 (pinned exactly 11). No test ships skipped. CI's own line at `f4ef63d3` reads `triple: selected=2712 passed=2701 skipped=11 failures=0 errors=0`.
- **One environment note.** In a shell with no `LANG`, `test_model_provider_broker.py::test_the_broker_child_inherits_no_credential_shaped_environment` fails. The child Python's PEP 538 locale coercion adds `LC_CTYPE`, which is not in the bridge's allowlist. With `LANG=C.UTF-8` it passes. T055 touches neither the broker nor the bridge, so this predates it.
- **Mutations: 34 of 34 killed.** Twenty-three were run at `c27eac35`:
- Seams:
- a host replaces a default after it was read;
- reading a default does not close its window;
- `register_defaults` skips the writer;
- a proxy resolves dunders;
- a missing kind answers another kind's validator.
- Validation:
- the validator is chosen by a fixed kind;
- the manifest is validated by another kind's validator.
- Serving:
- the hosted plane never refuses a session ref;
- an active session entry is served hosted;
- the checkout is never real.
- Containment: files below a dot-directory are served.
- Regenerate:
- it promotes a session ref;
- it bypasses the registered writer.
- Registry:
- the neutral source ignores a declared data source;
- the session entry type is not the registered registry's;
- the CLI's session registry is not the registered registry's.
- Routed sites:
- `_report` prints the governed line for the neutral kind;
- `_change_rows` ignores the registered predicate;
- the predicate accepts a directory with no `.git`;
- `generate` skips the corpus-root guard;
- the gate snapshot bypasses the seam.
- RFC 3339:
- it admits a space for the `T`;
- it refuses a lower-case `t`.
One more mutation, admitting second 60, is equivalent, because `datetime` refuses it too.
Eleven more were run in the review rounds, one or two for each change:
- a symlink leads to what a name cannot;
- a declared token variable is dropped;
- dropping the active entry leaves its key;
- an explicitly empty URL is dropped for being falsy;
- an unregistered kind is described as a search;
- the lookup's refusal is cut before its remedy;
- the writer writes NaN and Infinity;
- the snapshot body re-resolves the active entry;
- the source arm resolves the entry twice;
- the writer rewrites the snapshot in place;
- a failed move leaves its temporary sibling.
- **pyflakes over the touched files** finds nothing new: 104 findings at base and 104 at head, all pre-existing re-export F401s.
## T057 and the validator default
- **What T055 asks for.** T055's text makes the lookup's default openDox's own validator (T057).
- **Where T057 is.** When this branch was cut, T057 had no PR. It now has one, #58 (a draft at `ca52182f`, stacked on #57's branch). This PR does **not** merge it, for two reasons:
- #58 edits `pyproject.toml`, which phase-2 drafts in this lane stay out of;
- #58 is still in review.
- **What happens meanwhile.** The default for openDox's two kinds is the stand-in, `OwnValidatorNotBuilt`, which names T057.
- A generate verb warns "validation SKIPPED" and exits 0, or 1 under `--strict`.
- A manifest saved with `validate=True` is refused as unvalidated. That is what a lone openDox answered before T055 whenever no validator was reachable, except that `validate_manifest` no longer reaches the consumer.
- **The swap is one registration** (see T058 below).
- **The holder's decision (2026-09-28): do NOT merge #58 into #59.** The validator stand-in stays until T058 wires `opendox.validator`. This branch takes #58's code only through `main`, once #58 has landed, and still keeps the stand-in until T058.
## Beyond the task's list: `hosted_ref_refused`
- **Where the plan put it.** T084's list names `hosted_ref_refused` (2 sites).
- **Why T055 routes it.** The core `/snapshot.json` handlers that T055 makes `serve.py`'s own call it, and so does `_divergence_headers`, on every response. Without it, a standalone server could not answer `/snapshot.json` or `/capabilities`.
- **So T084's list is one name shorter.**
## Files (T055's own commits)
- **New:**
- `src/opendox/projection_seams.py`
- `src/opendox/default_registry.py`
- `src/opendox/default_projection.py`
- `src/opendox/rfc3339.py`
- `tests/test_projection_seams.py`
- **Changed:**
- Source: `src/opendox/cli.py`, `serve.py`, `serve_workbench.py`, `workbench.py` and `branch_session.py`.
- `consumer_reach.py`.
- Docstrings only: `serve_wire.py`, `generator_seam.py`, `default_generator.py` and `cli_project.py`.
- Tests: `test_consumer_reach.py`, `test_source_core_arm.py`, `test_route_handler_contribution.py`, `test_doxbench_entrypoint.py`, `test_generator_seam.py`, `test_profile_registration.py`, `test_authoring_seam.py`, `test_reach_sweep.py` and `test_neutral_projection.py`.
- **Not touched:** `conftest.py`, `pyproject.toml`, `.github/workflows/validate.yml`, `README.md`, and every pin. The new modules are created files, with no carve-manifest row (RULED OQ-C).
## What the later tasks need
- **T056** (the standalone generate path, end to end). I probed this at `c27eac35`, with the four siblings blocked by a meta-path blocker, over a copy of T050's fixture. In that copy, `candidate-toolshed-rebuild.md`'s `stage:` is `brainstorming`.
- `python -m opendox.cli generate` exits 0 and writes the neutral snapshot. It prints `notice: candidate-toolshed-rebuild.md: its stage: value 'brainstorming' is not one of the six station role keys (source, grouping, candidate, selection, submission, completion), so it is not a declaration; the document is read as a source`. The snapshot reads that document as `stage: source`. So the verb's half of F5.3's `stage:` case needs no further plumbing.
- `generate-and-open --no-open --no-serve` exits 0, builds the server and prints its URL.
- What remains is T056's own:
- a test that the server STARTS and answers, run as `generate-and-open` without `--no-serve` (or `serve.main`) in a subprocess with the siblings blocked, polling the printed URL and then stopping the server;
- F10.1's plain-install run, which is T070's.
- **T058** (the post-render validator in the generate verbs).
- Replace `default_projection.VALIDATOR` with an adapter over #58's `opendox.validator` that keeps T055's protocol: `validate(path, *, strict=False, search_from=())` answers a `projection_seams.ValidationResult`.
- How the adapter should work:
- It reads the file: JSON for `opendox-snapshot`, and YAML for the `ideation-workbench` manifest, which `workbench.py` already parses with PyYAML.
- It calls `validator_for(kind)`, or `validate(instance, kind=…)`.
- How its answers should map:
- No violation is ok, with return code 0.
- Violations are `not-conformant`, with return code 1 and `report(violations)` on stdout, so each rule id is named. F7.2 needs `EXPECTED_RULE`.
- `ValidatorUnavailable` and `SchemaNotEvaluable` are `validator-unavailable`, with the reason.
- `dependency_remedy = None`. No subprocess runs, so F7.2's "no `No such file or directory`" holds by construction.
- `OWN_KINDS` stays `(opendox-snapshot, ideation-workbench)` unless T058 widens it to #58's `KINDS`. The doxBench wire kinds keep their own path (`serve_wire.register_doxbench_validators`).
- The stand-in's cases in `tests/test_projection_seams.py` change with it:
- `test_the_validator_stand_in_concludes_nothing_and_names_T057`;
- `test_openDoxs_own_kind_meets_the_stand_in_and_strict_makes_it_fatal`;
- the stand-in half of `test_a_manifest_is_validated_by_the_validator_for_its_kind`.
- `--strict` and `--no-validate` already mean what T058 says.
- **T059** (openXdox registers its governed mechanisms). It registers everything below at process start, before any entry point reads a default, because a default is sealed once read.
- `openxdox.snapshot_registry` at `projection_seams.registry`. The module already carries every required name.
- An adapter at `corpus_root`. It takes `openxdox.corpus_root`'s `corpus_scan_defect`, `corpus_root_refusal` and `SCANNED_ROOTS`, plus a `change_rows` built from `generator.iter_changes` and `declared_origin_state`, which is what `branch_session._change_rows` computed before T055.
- `openxdox.snapshot` at `writer`.
- A validator adapter for each governed kind, such as `ideation-dashboard-snapshot`. Its `dependency_remedy` is `snapshot.DEPENDENCY_REMEDY`, and it names `VALIDATOR_RELPATH` in `unavailable_reason`.
- It lowers `OPENDOX_BACK_IMPORTS` in `tests/test_dependency_direction.py`. `cli.py` and `serve.py` leave the table, and `branch_session.py` goes from `(0, 7)` to `(0, 2)`. `serve_project.py` stays at `(0, 2)` and `serve_workbench.py` at `(0, 7)`.
- `tests/test_generated_at_anchor.py:223` patches `cli_mod._locate_validator`, which T055 removed. The seam to patch now is `_validate_by_kind`, or a validator registered for the kind.
- Four gaps that the review rounds closed in openDox's own defaults are still open in the governed mechanisms T059 registers. They are openXdox-code's to close, ideally before T059 registers them:
- `snapshot_registry.resolve_within` checks the hidden-name rule only against the URL's spelling, so `link -> .git` serves `/source/link/config`, which is `.git/config` (r4125556296).
- `SnapshotRegistry.drop` leaves the active key pointing at a dropped entry.
- `snapshot.write_snapshot` writes in place through `write_output`, so a request can read a truncated snapshot (r4126138808). Its `canonical_json` also writes NaN and Infinity (r4125900060).
- `SnapshotRegistry` reads `active`, `get`, `entries()`, `keys()` and `len()` without its lock, so a reader can answer from the middle of a block `atomically()` holds (r4136863481).
- **T084**: its list no longer includes `hosted_ref_refused`. The eleven reaches the scan still finds are all T084's.
## For the holder
All three earlier items are now decided:
- **The validator default**: #58 is not merged here (above).
- **T054's `NEUTRAL_FIELDS` default missed openDox's own scaffold** (r4126022820): #57's commit `8e7da4a` takes it, and this branch now carries that commit. openDox's own scaffold leads with `title:`/`summary:` where the registered corpus obliges them, and keeps the governed layout where it obliges neither.
- **Empty generator inputs**: the holder ruled that an empty `--project-register`/`--possibles` is REFUSED, fail closed. It is neither dropped nor read as `Path("")`. Taken in `d7aa9d8c`:
- `cli.SourceOptionRefused`, raised by one helper, `_source_option()`, which both call sites use: `_generate_and_write` for `generate` and `generate-and-open`, and `_gate_snapshot` for the gate verbs. It answers `None` for an option not given, refuses an empty one, and resolves anything else.
- The guard runs beside the other two, before any generation or write. In `generate-and-open` it runs early too, so a refused run mints no run directory. `main()` prints `<verb> refused: …` and exits 1.
- `serve.main` refuses an empty `--project-register` the same way, before a socket is bound.
- Seven new cases. Mutations: 8 of 9 killed. The ninth removes the explicit guard in `_generate_and_write`, and it is equivalent: the argument expression refuses before `generate()` is called. The guard is kept beside the other two, so the order does not rest on argument evaluation.
## CI and review rounds
`validate` is green at every head below, and SonarCloud passed its quality gate. Every thread was answered and resolved, and each change carries a case that its mutation fails.
- **`c27eac35`: 3 threads, all taken in `ea49c424`.**
- r4125556296: symlinks inside the root could lead into a dot-directory. The canonical path now meets the hidden-name rule too.
- r4125556360: `token_env` was ignored. Every declared data-source option is now refused by name, an empty one included.
- r4125556420: an extra "by", in three places.
- The overview's remarks on `display.js` and the plain-documents fixture test are #57's and #53's files. They have no threads here and are flagged, not changed.
- **`ea49c424`: 1 thread, taken in `bfb9c479`.**
- r4125666251: `serve.main`'s `or` turned an explicitly empty `--data-source-url`/`--data-source-github` into `None`. Each option is now handed over as given, and a slug that cannot be composed is refused.
- The overview (no thread) found that `drop` left the active key dangling. That is taken in the same commit.
- **`bfb9c479`: no findings.** The overview (no thread) noted that the unavailable-validator warning described a filesystem search even when nothing is registered for the kind. It is taken in `244d7b7f`: the warning now says which of its two cases happened, and gives the lookup's whole refusal, remedy included.
- **`244d7b7f`: 2 threads, taken in `19c26782`.**
- r4125900060: the writer wrote NaN and Infinity. It now refuses what JSON cannot carry, with `SnapshotNotWritable`, before writing.
- r4125900164: the snapshot arm's query-less path read the active entry twice, for the refusal and for the body. It now resolves the entry once. This race came from openXdox's handlers unchanged.
- **`19c26782`: 2 threads.**
- r4126022918: the source arm resolved its entry twice. It now resolves the entry once and asks for the path by that entry's own pair. Taken in `8c09d74c`.
- r4126022820: T054's `NEUTRAL_FIELDS` default. It is answered with a reproduction, not changed here, and flagged above.
- **`8c09d74c`: 1 thread, taken in `f4ef63d3`.**
- r4126138808: the writer wrote in place, so a concurrent read could see a truncated snapshot. It now writes a temporary sibling and moves it over the target with one `os.replace`, and the boundary still decides the destination.
- **`f4ef63d3`**: `validate` is green, with `selected=2712 passed=2701 skipped=11 failures=0 errors=0`. Copilot's review run there ended with "Copilot encountered an error and was unable to review this pull request", so it posted no verdict.
- **After T049: `8cbb1ea` merges #57's head, and `d7aa9d8c` takes the holder's decision on empty source options** (above). CI is green at `d7aa9d8c`, with `selected=2723 passed=2712 skipped=11`: #57's 4 scaffold cases and these 7.
- **Copilot at `d7aa9d8c`: 1 thread, taken in `687d37bf`.**
- r4136439187: a refresh widened a restricted snapshot. `os.replace` carries the sibling's mode over the target, and the sibling had a new file's ordinary mode.
- Now, where the target exists, its permission bits go onto the sibling (`os.fchmod`) before a byte is written. A new target keeps the ordinary mode.
- If the bits cannot be copied, the write fails and nothing is widened. The copy runs inside the stream's `with`, so the descriptor cannot leak.
- Four new cases, all red against `f4ef63d3`'s writer. Local whole suite: `selected=2727 passed=2716 skipped=11`.
- **Copilot at `687d37bf`: "Changes recommended", 2 threads.** CI is green there, with `selected=2727 passed=2716 skipped=11`.
- r4136585695, taken in `96f18c45`, and taken again without a lock in `e3ef506a` (next round). The source arm asked `resolve_source` for the path by the entry's pair, and `resolve_source` looks the pair up again. So a refresh that re-registered the same key between the two lookups could put another root behind the path.
- `96f18c45` ran both lookups under the registry's own lock, `self.source.registry.atomically()`, the lock `register` and `drop` take.
- Its case ran the refresh on another thread. It was red against `687d37bf`'s arm, and red with the hold removed.
- r4136585637, not taken: it does not reproduce. `_register_baked` sets `baked_repository` (line 560) before it asks `_source_root_for` (line 561), and has done since `c27eac35`.
- Measured with `--repository` omitted: the entry is confined to the served checkout, and `/source/notes-toolshed-inventory.md` answers 200, keyed or not.
- Two existing tests pin the order, and both are red with the two lines swapped: `test_the_source_registers_the_snapshot_it_was_handed` and `test_generate_and_serve_run_with_no_sibling_importable`.
- Local whole suite at `96f18c45`: `selected=2729 passed=2718 skipped=11`, which is +2.
- **Copilot at `96f18c45`: "Changes recommended", 3 threads, all taken in `e3ef506a`.** CI is green there, with `selected=2729 passed=2718 skipped=11`.
- r4136863569: the seam does not declare `atomically()`, so a registry that passes the seam's probe could fail every `/source` request.
- The arm now asks nothing of the registry beyond the one resolution. It confines the path to the resolved entry's own root through `resolve_source_path`, its single entry point and the one the no-registry path already used. That applies the declared per-entry rule, `resolve_within`, as `serve_workbench.py` does for the roots it holds.
- There is no second lookup, so r4136585695's race stays closed with no lock.
- `tests/test_source_core_arm.py` pins the shape: one `resolve`, the entry's own root through `resolve_source_path`, and no `resolve_source` or `atomically` call in the arm. It fails against `687d37bf`'s arm and `96f18c45`'s.
- The race case, now `test_a_refresh_that_replaces_the_key_cannot_move_the_source_arms_root[unkeyed|keyed]`, shows the replacement lands before the path is confined, and the body is still the first entry's file. It is red against `687d37bf`'s arm.
- r4136863481: `get`, `active` and `len()` read without the registry's lock, so a reader could answer from the middle of a block `atomically()` holds.
- All three now read under the lock, as `entries()` and `keys()` already did.
- `test_a_read_waits_for_a_held_read_modify_write[active|resolve|get|len]`: a read on another thread starts while a held block has a session promoted, and it must answer as the block left the registry. Each case is red with its own lock removed.
- openXdox's registry has the same gap, listed for T059 above.
- r4136863311: a registered generator owes the seam only `kind` and an integer `schema_version`, and `_report` indexed `repository` and `generation`, so such a snapshot raised `KeyError` after it was written.
- The report now shows a lacking field, or one in another shape, as `<absent>`. `_stats` counts only a list or a mapping. The verb then goes on to the kind's validator.
- `test_generate_reports_a_snapshot_whatever_else_its_contract_carries`, over a minimal snapshot and one with other shapes. Both are red against `96f18c45`'s report, with `KeyError`.
- Local whole suite at `e3ef506a`: `selected=2735 passed=2724 skipped=11`, which is +6. F4.1's scan is unchanged, at 12.
## After #57 and #58 landed
- `92a9167` merges #57's final head `d7954fc6`, and `814516b7` merges `main` `a691e4e4` (#57), resolving its two add/add conflicts to ours: main's blob is `d7954fc6`'s in each. `c2a8ad9f` merges `main` `8ec08e91` (#58) with no conflict, and what it brings is exactly #58's squash. The validator stand-in stays until T058.
- **Copilot at `c2a8ad9f`: 1 thread, taken in `183b40fc`.** r4146219833: `_regenerate` passed `project_register_source` even when unset. It is now passed only when set, as the seam omits an unset input. `test_an_injected_generator_is_handed_the_register_only_when_one_is_set`, red against `c2a8ad9f`.
- **Copilot at `183b40fc`: 1 thread, not taken, made explicit in `0c946f4e`.** r4146370161 asked for `main` to be restored after an already-active session is regenerated. FR-014a forbids promoting a session, and an entry that was already active is not promoted by its own refresh. The docstring now says so, and `test_a_regenerate_promotes_no_session_and_moves_no_active_key` pins both halves.
- **Copilot at `0c946f4e`: "Needs a closer look", no findings, 0 threads.** CI is green, with `selected=2989 passed=2978 skipped=11 failures=0 errors=0`.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
What this is
Plan 034's task T038, slice P1-H, the console script
(
specs/034-opendox-standalone-operation/tasks.md§ "Phase 1 writerslices", read at openxFactory
mainbca4a2600299535271761ac24d8adf492a8875fe;unchanged since #1167's head
42f34ab7, which landed asa65230f6, andre-checked against #1176's round-2 re-plan diff, which touches no T038 line).
This PR realizes box 10.1 of the ratified
add-neutral-product-standalone-operability.5817152735.5852235792.cli.py's single-writer order. Openedas a DRAFT on Brett's "draft ahead of dependencies," while both were still
open. T016 has since landed (
19370ad);mainmerged in at41dfb75and the falsifier re-verified for real (below). T022 (T022: 4.1a, openDox's own default adapter over LocalGitCorpus #45) is still
OPEN, so this PR stays draft until it lands too.
What changes
pyproject.toml: addsopendox = "opendox.cli:main"under[project.scripts], alongside the existingopendox-runtime = "opendox.runtime.cli:main". This is the one documented entry pointrequirement 10 asks for:
opendox.cli:mainalready builds and dispatchesthe whole command tree (
generate,generate-and-open— which serves thebrowser surface —
create,edit,model-binding, plus whatever a hostor the default profile contributes), where
opendox-runtimeonly everstarted the lifecycle subsystem.
src/opendox/runtime/cli.py: corrects two stale comments (R1Q22 (a);plan 034 T011), each to the past tense:
src/opendox/cli.pyneeded a declared-edit act at openxFactory first(retired by R1Q22 (a)) and that
opendox.clicould not be imported atall (fixed by T011, which removed the
ideation_dashboardreach);answer in the future tense and named a mechanism ("wired into
opendox.cliin the BUILD-arc act that repairsopendox.serve") thatis not quite how it turned out. It now names where the verbs actually
reach
opendox: through the default profile (T015/T016), not byediting
cli.py.src/opendox/cli.py(added at the holder's word, see below): correctsits own matching stale comment and the
build_parser()docstring(R1Q22 (a)), comment-only.
src/opendox/cli.py: two comments, added after a holder ruling. Thefirst authoring pass made no edit here — I'd read PR #42 (T016) and #45
(T022)'s diffs against
cli.pybeforehand, and neither touches the stalecomposition-point comment at
cli.py:92-111 or thebuild_parser()docstring, and
src/opendox/default_profile.py's own header (T015, alreadyon
main) states this task's job as the console-script addition alone. Iflagged the ambiguity in this PR rather than guess. The holder ruled: fold
it in, comment-only, since R1Q22 (a) covers
cli.pythe same way it coversruntime/cli.py, and T038 is phase 1's last task incli.py'ssingle-writer order (
After: T016, T022; nothing later in phase 1 touchesthis file).
f9dfc2adoes that:profile_openxfactoryimport said thebuild_parser()docstring "is NOT corrected here … until an act that declares them lands"
(RULED OQ-1); it now says R1Q22 (a) retired that gate and names T038 as
the act that makes the correction;
build_parser()'s own docstring said the composition point is "the oneline the § 3 carve deletes rather than moves: afterwards the core names
no profile and openXdox declares its own" — superseded by ratified
requirement 3, which has the core carry its OWN default profile
permanently (T015/T016), not become profile-less. It now says whichever
profile is current gets composed (a host's, or openDox's own default),
and names the default's
RuntimeSubcommandas howopendoxreaches theruntime verbs with no separate wiring in this file.
No behavior change:
build_parser()already readprofile_openxfactory.SUBCOMMAND_EXTENSIONSunconditionally before thiscommit, and still does. Re-verified after
f9dfc2ain a fresh venv:opendox --help,opendox runtime --helpandopendox-runtime --helpallexit 0;
tests/test_consumer_reach.py,test_route_handler_contribution.pyand
test_profile_registration.py(173 tests) unaffected.The falsifier (F10.1's first assertion, and
opendox runtime --help)Run in a fresh venv,
pip install .(no extra, matching F10.1's method):opendox --helpandopendox runtime --helpdo not exit 0 yet, andthis is expected, not a defect in this PR:
build_parser()readsprofile_openxfactory.SUBCOMMAND_EXTENSIONSunconditionally, and untilP1-B's T016 lands, nothing registers a default profile, so the lazy proxy
raises:
identically for both invocations (both go through
opendox.cli.main→build_parser()).opendox-runtime --helpabove is unaffected: it neverreaches
opendox.cli.pyproject.tomlparses (tomllib.load);src/opendox/runtime/cli.pycompiles and
tests_runtime/test_runtime_cli.py(83 passed, 1 skipped, nochange from the pre-existing skip) is unaffected by the docstring-only edit.
Landing
ceab6489. Both Register openDox's default at the entry points; a host replaces it only before a build (T016) #42 (T016) and T022: 4.1a, openDox's own default adapter over LocalGitCorpus #45 (T022) have landed;mainmerged in twice (once per dependency), auto-merging cleanly bothtimes. Re-ran
opendox --help,opendox runtime --helpandopendox-runtime --helpfor real in a fresh venv (editable install,matching CI's
pip install -e ".[test]"): all three exit 0.Copilot's review at the merge head (
2c75ce0) found three findings (twomedium, one low); two are fixed (an entry-point metadata test, and the
one remaining internally-contradictory paragraph in
runtime/cli.py) andthe third (the standalone
--help's hard-codedprog="ideation-dashboard")is answered with evidence rather than fixed, since
progis unconditionaland changing it would also change the HOSTED case's byte-identical
--helptext thatbuild_parser()'s own docstring says a goldensnapshot asserts — raised as a follow-up, not silently dropped. Copilot's
next review, at this exact head, reports 0 new findings and all three
resolved. All three checks (
validate,runtime,SonarCloud Code Analysis) SUCCESS.cli.pyhas one writer at a time; this PR is last in that chain forphase 1 (
After: T016, T022).the commit messages, which carry both trailers. A merge landing must
write them into the merge message.
Arc: neutral-product-standalone-operability
🤖 Generated with Claude Code
Summary by Sourcery
Expose the complete openDox command tree through the documented
opendoxconsole entry point.New Features:
opendoxconsole script targeting the full openDox command-line interface while retainingopendox-runtimefor direct runtime commands.Enhancements:
Build:
opendoxproject script in package metadata.Tests: