Skip to content

Carve leg 1: openDox-code receives its 123 rows at opendox-carve-0 (split-opendox § 3.2) - #4

Closed
brettheap wants to merge 207 commits into
mainfrom
carve/opendox-code-leg-1
Closed

brettheap wants to merge 207 commits into
mainfrom
carve/opendox-code-leg-1

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

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

Refs opensoft/openXfactory#656

The first leg of the CARVE arc. openDox-code receives the 123 rows the § 3.1
manifest gives destination opendox_code, by the procedure
docs/opendox-cutover-runbook.md § 5 sets out — history-preserving
git filter-repo (RULED OQ-H) out of a fresh --mirror of the now-public
opensoft/openxFactory, onto a named carve-src ref, joined to this scaffold
with --allow-unrelated-histories as a pull-request branch. This repository's
main is neither rewritten nor force-pushed.

CARVE_COMMIT = b075fd91dc8fced8e1373825ba80220c33536bae
CARVE_TAG    = opendox-carve-0        # a LABEL beside that commit, never the referent
SOURCE       = opensoft/openxFactory  # public since 2026-09-09

Every byte here comes from that commit's blobs. Nothing comes from a later main.

Census for this leg

count proof
rows for opendox_code 123 matches the runbook § 2 table
moved_verbatim 61 byte-identical in BOTH commits
moved_with_declared_edit 62 239 declared lines; 214 changed, 25 left
declared roots src/opendox, tests computed from the manifest, printed by the verifier
replicas placed and DECLARED 8 --replica-at, all byte-identical
files created by this leg 0 no --allow-created was needed

src/.gitkeep, pyproject.toml and conftest.py are the levelling pass's
(#3) and are untouched; the import root already existed, so
the runbook's --allow-created pytest.ini/conftest.py case does not arise here.

The two commits, and the history shape

  • A 828e00a4f28ffc61d7b0b1b27566eee1fae5f9cf — placement only, every blob
    byte-identical to carve_commit, so the arrival is provable at phase A.
  • B cfabe3c4982e54288c3f2e5c7f0587be91c65117 — the declared edits and the
    eight declared copies, and nothing else.
# § 5.2  the control, BEFORE the carve: the manifest re-verified against the mirror
git clone --mirror https://github.com/opensoft/openxFactory.git oxf-carve-src.git
python3 openxFactory/scripts/validate-carve-manifest.py \
    --repo oxf-carve-src.git --at b075fd91dc8fced8e1373825ba80220c33536bae \
    --manifest openxFactory/docs/opendox-carve-manifest.yaml
# OK …: 454 row(s) at opensoft/openxFactory@b075fd91dc8f (opendox-carve-0) — 172
# moved_verbatim, 146 moved_with_declared_edit, 136 not_moved; 318 digest(s)
# recomputed; 454 file(s) in the declared surface with none undeclared

# § 5.3  the path file, generated FROM the manifest: 123 SELECTors + 123 renames
wc -l paths-opendox_code.txt   # 246
sha256sum paths-opendox_code.txt
# 48ebf0bf26afb3a2a8acd78662e8d81609fa3f699283d885c8301a047a100fc9

# § 5.4  the carve, onto a NAMED ref (a raw object id is not a ref)
git -C oxf-carve-src.git branch carve-src b075fd91dc8fced8e1373825ba80220c33536bae
git -C oxf-carve-src.git filter-repo --paths-from-file paths-opendox_code.txt --refs carve-src
git -C oxf-carve-src.git ls-tree -r --name-only carve-src | wc -l   # 123
git -C oxf-carve-src.git ls-tree -r --name-only refs/heads/main | wc -l  # 5523, still UNFILTERED

# § 5.5  ONE ref, by refspec — never a bare `git fetch carved`
git fetch carved carve-src:refs/remotes/carved/carve-src
git merge --allow-unrelated-histories carved/carve-src   # = commit A

git filter-repo ed61b4050b71. The --mirror clone has one HEAD reflog
entry and needed no --force. The filtered tree is EXACTLY the manifest's 123
destination_paths — diff against the sorted list from the document is empty.

History shape: 211 commits, two roots — 4e278d36 ("Seed the code leg of
openDox") and 0ebafcc0 ("Tranche A: adopt the doc-health spine…"), the
rewritten openxFactory root. 205 commits are carried by filter-repo and keep
their original authorship; the two commits above are this lane's and carry its
trailer. Two roots is the accepted price of the ruled method plus an unrewritten
protected branch (runbook § 5.0). filter-repo's rename directives apply to ALL
history, so a path that did not exist at its carve-commit spelling carries
partial blame continuity; RULED OQ-1 already declared bisectability unavailable.

The floor, at the destination — verify-carve-arrival.py, verbatim

Phase A, re-run against commit A in a throwaway clone:

OK …/verify-A: opendox_code (opensoft/openDox-code) at opensoft/openxFactory@b075fd91dc8f
(opendox-carve-0), phase A — 123 row(s) arrived, 123 digest(s) verified, 0
declared-edit row(s) within their lines, 0 unapplied; 0 of 0 declared replica(s)
byte-identical; 124 file(s) under src/opendox, tests with none undeclared (1
scaffold, 0 replica, 0 created); scaffold admissions checked against d3635930208f

Phase B, against this branch's head:

OK …/dest-openDox-code: opendox_code (opensoft/openDox-code) at opensoft/openxFactory@b075fd91dc8f
(opendox-carve-0), phase B — 123 row(s) arrived, 61 digest(s) verified, 60
declared-edit row(s) within their lines, 2 unapplied; 8 of 8 declared replica(s)
byte-identical; 132 file(s) under src/opendox, tests with none undeclared (1
scaffold, 0 replica, 0 created); scaffold admissions checked against d3635930208f

Both runs make the STRONG scaffold claim — checked against d3635930208f, this
repository's pre-carve main, not the weaker by NAME ONLY. The declared roots
the runs print are the runbook § 2 table's cell for this leg exactly.

The fence bites. Poking ONE undeclared line (serve.py:120, import route_extension) in a throwaway copy of this tree:

FAIL …: arrival-undeclared-edit — src/opendox/serve.py was edited at carve-commit
line(s) [120] which the row for scripts/ideation_dashboard/serve.py does not
declare; it declares [109, 110, 111, 122, …, 1661] under class(es) adapter calls,
import rewrites, path constants. Commit B applies the declared edits and nothing
else — an edit in no class is an UNDECLARED MOVEMENT and the carve refuses
(RULED OQ-1).

exit 2. The copy was deleted; nothing was poked in this branch.

Operator note: the verifier walks the FILESYSTEM, not the index, so a
__pycache__ left by a local pytest refuses arrival-undeclared-file on a
tree git status calls clean. Run it on a swept tree.

My own digest recount, independent of the verifier

OWN RECOUNT vs carve-src:            123/123 rows' sha256 AND git mode equal the manifest
                                     (0 mode mismatches, 0 digest mismatches)
OWN RECOUNT vs carve_commit blobs:   123/123 (source_path side, straight from the mirror)
8/8 declared replicas byte-identical to their blobs at b075fd91

The edit table

239 declared lines: 185 import rewrites, 42 path constants, 12
adapter calls. Applied 214 (209 rewritten + 5 deleted) over 60 of the 62
rows; 25 left, every one named below.

  • import rewrites → 173 rewritten. ideation_dashboard.X becomes opendox.X
    where X is one of this leg's own rows, and openxdox.X where the manifest
    sends X to openxdox_code (gate_console, gate_routes, generator,
    register, kickoff, snapshot, snapshot_registry, corpus_root,
    cli_gate, serve_gate, serve_projection, doxbench_scope) — the
    runbook § 5.5 rule verbatim. A relative spelling whose target travels here is
    already correct and untouched; one whose target lands in openXdox becomes
    openxdox.X. The three RULED OQ-A neutral modules and the OQ-Q
    corpus-adapter interface become package-internal (from .output_boundary import, .path_slug, .wire_messages, .corpus_adapter).
  • path constants → 35 rewritten: scripts/ideation_dashboard/ →
    src/opendox/, in the Path segment form and the string form.
  • adapter calls → 1 rewritten (authoring.py:317, the interface RULING Q4
    gives openDox).
  • 5 DELETED: serve.py:109-111, the dead sys.path.insert(0, _SCRIPTS_DIR)
    shim the runbook names by number (all three lines declared); cli.py:104 and
    serve.py:1371, the two imports of profile_openxfactory, which is
    not_moved / deleted_at_carve and has no post-carve home anywhere.
Per-row table (62 rows: declared lines, applied by class, left)
row (destination_path) declared lines applied left
src/opendox/authoring.py 2 adp×1 318(adp)
src/opendox/boundary.py 1 imp×1 —
src/opendox/branch_session.py 8 imp×8 —
src/opendox/cli.py 21 imp×18 path×1 26(imp) 106(path)
src/opendox/cli_model_binding.py 2 imp×2 —
src/opendox/cli_project.py 2 imp×2 —
src/opendox/doxbench_bridge.py 3 imp×3 —
src/opendox/doxbench_install.py 5 imp×5 —
src/opendox/doxbench_intake.py 1 imp×1 —
src/opendox/doxbench_knowledge.py 1 imp×1 —
src/opendox/doxbench_mcp.py 2 imp×1 61(imp)
src/opendox/doxbench_packet.py 4 imp×3 177(imp)
src/opendox/doxbench_provider.py 3 imp×3 —
src/opendox/doxbench_scope_types.py 3 — 50(adp) 69(adp) 71(adp)
src/opendox/doxbench_telemetry.py 1 imp×1 —
src/opendox/doxbench_turns.py 5 imp×5 —
src/opendox/serve.py 31 imp×26 path×1 171(imp) 178(imp) 618(adp) 1661(path)
src/opendox/serve_project.py 6 imp×6 —
src/opendox/serve_wire.py 7 imp×6 1369(imp)
src/opendox/serve_workbench.py 30 imp×30 —
src/opendox/web/views/gate.js 1 path×1 —
src/opendox/web/views/staging-workbench-model.js 1 path×1 —
src/opendox/workbench.py 8 imp×2 82(adp) 83(adp) 745(adp) 1406(adp) 1407(adp) 1408(adp)
tests/session_fixtures.py 4 imp×4 —
tests/test_account_menu_dom.py 1 path×1 —
tests/test_boundary.py 2 imp×2 —
tests/test_bullseye_widget.py 1 path×1 —
tests/test_doc_surfaces.py 1 path×1 —
tests/test_doc_wheel.py 1 path×1 —
tests/test_doxbench_abstract_pane.py 2 imp×1 path×1 —
tests/test_doxbench_accessibility.py 5 path×5 —
tests/test_doxbench_bridge_live.py 3 imp×3 —
tests/test_doxbench_chat_view.py 4 imp×2 path×2 —
tests/test_doxbench_composition.py 2 path×2 —
tests/test_doxbench_context_panes.py 3 imp×2 path×1 —
tests/test_doxbench_document_abstract.py 4 imp×4 —
tests/test_doxbench_entrypoint.py 5 imp×5 —
tests/test_doxbench_hash.py 2 imp×1 34(path)
tests/test_doxbench_knowledge.py 1 imp×1 —
tests/test_doxbench_mcp.py 3 imp×3 —
tests/test_doxbench_memory_gateway.py 4 imp×4 —
tests/test_doxbench_privacy.py 1 path×1 —
tests/test_doxbench_proposal_discard.py 1 path×1 —
tests/test_doxbench_proposals.py 1 path×1 —
tests/test_doxbench_state.py 1 — 25(path)
tests/test_doxbench_thread_switch.py 1 path×1 —
tests/test_doxbench_tile_verbs.py 1 path×1 —
tests/test_doxbench_view.py 5 path×3 18(path) 293(path)
tests/test_doxbench_workspace.py 1 path×1 —
tests/test_hermeticity.py 4 imp×4 —
tests/test_intent_tray_dom.py 1 path×1 —
tests/test_lens_labels_at_scale.py 1 path×1 —
tests/test_model_provider_broker.py 11 imp×10 1135(imp)
tests/test_openprofiler_broker_e2e.py 3 imp×3 —
tests/test_outline_model.py 1 path×1 —
tests/test_outline_tab.py 2 path×2 —
tests/test_provider_boundary.py 2 imp×1 57(path)
tests/test_session_git.py 1 imp×1 —
tests/test_subcommand_extension.py 1 imp×1 —
tests/test_wheel_paint_and_reach.py 1 path×1 —
tests/test_wheel_verbs_dom.py 1 path×1 —
tests/test_workbench.py 2 imp×2 —

imp = import rewrites, path = path constants, adp = adapter calls.

The 25 declared lines this leg did NOT change, and why

A declared line is PERMISSION to edit that line, never an instruction to invent
an edit. Each of these is left deliberately, and each is a question for the
manifest's owner rather than something a carve leg may improvise.

  1. adapter calls, 11 lines — serve.py:618, workbench.py:745, 1406-1408
    (doc_health reaches), authoring.py:318 (corpus_adapter_openxfactory),
    workbench.py:82-83 (the corpus-shaped WORKBENCH_DIR / ORGANIZE_DIR
    literals) and doxbench_scope_types.py:50, 69, 71 (SCOPE_KINDS, whose
    successor openDox neutrality: ScopeKey validates against the tuned SCOPE_KINDS domain inside doxbench_scope_types.py (S-1 successor) openXfactory#838 is OPEN at the carve — which is why
    that row exists). D2's resolve is the answer and this leg has no resolver
    binding to reach it through: that is § 3.5's, the BUILD arc (RULED OQ-N).
    Filing any of them as a path constant would ship openxFactory's tree shape
    as a literal, which corpus-adapter-seam requirement 4 refuses by name.
  2. Three import rewrites naming a module that lands at NO destination —
    serve.py:171 and :178 (serve_openxfactory_lanes, not_moved / stays_openxfactory_adapter), serve_wire.py:1369 (doxbench_contracts),
    doxbench_packet.py:177 (doxbench_status_exemption). There is no package
    path to rewrite to, and the statements cannot go either: their uses sit on
    UNDECLARED lines — serve.py:630 (a mixin tuple in a class body),
    serve_wire.py:1370, doxbench_packet.py:178 — and serve.py:178's
    re-export block runs to undeclared :179-184.
  3. cli.py:26 and doxbench_mcp.py:61 — the same dead-shim family as
    serve.py:109-111, which the runbook names; but their if /
    sys.path.insert siblings are UNDECLARED, so the block cannot be removed
    inside the fence. Harmless here: they insert src/, which this leg's own
    import root already inserts.
  4. cli.py:106, serve.py:1661 — already package-relative
    (Path(__file__).resolve().parent / "web" resolves to src/opendox/web
    unchanged).
  5. Five SHORT CITATIONS — test_doxbench_hash.py:34,
    test_doxbench_state.py:25, test_doxbench_view.py:18 and :293 are bare
    / "web" continuation segments of a multi-line Path expression whose
    "scripts" / "ideation_dashboard" segments sit on UNDECLARED lines;
    test_provider_boundary.py:57 is WEB = PACKAGE / "web", with PACKAGE
    defined on undeclared :56. The note each row carries describes an edit its
    own line citation cannot express. Reported, not worked around with ..
    or .parent arithmetic.
  6. test_model_provider_broker.py:1135 — its note repoints it onto "the
    destination suite's own harness". This leg has none, and
    FORBIDDEN_PORT_MEMBERS is a 20-name set: writing one is not a carve act.

Two rows are therefore byte-identical after commit B and the verifier reports
them as 2 unapplied: doxbench_scope_types.py (all three of its lines are in
finding 1) and test_doxbench_state.py (its one line is in finding 5).

The eight copies with no row

RULED OQ-A / OQ-C: the manifest declares what LEAVES, never what a destination
assembles, so a replicated_at_destination row carries no destination, no
destination_path and no digest. Each copy below is therefore DECLARED to the
verifier with --replica-at, which makes its presence and its bytes checkable
by name rather than by a coincidence of bytes, and each is byte-identical to
carve_commit. Every one is imported BY NAME by an arrived row — measured over
the carved tree with an AST scan, not assumed.

replica (source_path in openxFactory) placed at who needs it
scripts/output_boundary.py src/opendox/output_boundary.py boundary.py:24, tests/test_boundary.py
scripts/path_slug.py src/opendox/path_slug.py workbench.py:62
scripts/wire_messages.py src/opendox/wire_messages.py serve_wire.py:105
scripts/corpus_adapter.py src/opendox/corpus_adapter.py authoring.py:317 (RULING Q4 / OQ-Q — a replica while it is one)
tests/hermeticity.py tests/hermeticity.py test_hermeticity.py, test_doxbench_bridge_live.py
tests/import_scan.py tests/import_scan.py test_subcommand_extension.py
tests/ideation-dashboard/staging_shapes.py tests/staging_shapes.py tests/session_fixtures.py
tests/ideation-dashboard/conftest.py tests/conftest.py 37 arrived test modules spell from conftest import …

NOT placed: the tests/corpus-adapter/ conformance corpus (9 replica rows).
§ 3.7 wants every destination to pass the neutral corpus, and this leg has no
adapter IMPLEMENTATION to run it against yet; test_conformance.py is also the
one replica the runbook says must NOT be declared, because its
implementation-aware block is rewritten per destination by design. Placing the
corpus without the implementation would add nine files no arrived row imports.

Tests and validate — RED, and this leg STOPPED rather than patch it

validate runs python -m pytest -q, and pyproject.toml sets
testpaths = ["tests"], so the whole arrived suite runs inside the required
check. It is red, at COLLECTION, and every cause is structural:

$ python3 -m pytest -q
!!!!!!!!!! Interrupted: 8 errors during collection !!!!!!!!!!
8 errors in 0.92s                                    (exit 2)

$ python3 -m pytest -q --continue-on-collection-errors
11 skipped, 962 errors in 47.22s                     (0 passed)

$ python3 -c "import opendox"      -> OK
30/39 `opendox` submodules import cleanly; 9 do not, and they trace to THREE
unresolved names:
  ModuleNotFoundError: No module named 'openxdox'               (7 modules)
  ModuleNotFoundError: No module named 'route_extension'        (serve, notebook_action)
  ModuleNotFoundError: No module named 'subcommand_extension'   (cli)

965 tests are collected. The 962 errors are the 8 collection errors above plus
954 test-SETUP errors, and those 954 have one dominant cause:
tests/session_fixtures.py:413's autouse fixture declared_human_console
imports opendox.cli, which fails on subcommand_extension — so every test the
suite does collect errors in setup (954 + 11 skipped = the 965 collected). The 11 skips are
environmental (no omp harness, no openprofiler-broker binary) and unrelated
to the carve.

Three findings for the manifest's owner. Each is why this is red; none is
patchable inside the declared-line fence, and I did not patch any of them.

  1. scripts/route_extension.py and scripts/subcommand_extension.py have NO
    MANIFEST ROW.
    They are § 2.4's extension points (landed by
    Add the route and subcommand extension points behind serve.py and cli.py (split § 2.4, PR 1 of 4: scaffolding, zero behavior change) openXfactory#736), they sit OUTSIDE the manifest's moved_paths
    surface — so the completeness check never looked at them — and both are
    imported at MODULE level by arrived rows, on UNDECLARED lines
    (serve.py:120, cli.py:65). Their own docstrings say they travel with the
    carve: "A neutral module at the top of scripts/, belonging to neither
    package and importing neither, for the same three reasons output_boundary
    and corpus_adapter sit there: both sides of the carve consume it, it
    travels with the carve
    "
    . This leg could not place them lawfully:
    --replica-at refuses a path that is not a replicated_at_destination row,
    and calling an openxFactory blob "created at the destination" would be an
    undeclared movement wearing RULED OQ-C's name. This is OQ-Q's shape
    exactly
    — the omission OQ-Q found and repaired for scripts/corpus_adapter.py
    — and it needs the same act: two not_moved / replicated_at_destination
    rows, or a ruling that each destination assembles its own.
  2. The cross-column import rewrites are unresolvable until the openXdox leg
    lands
    — openxdox.gate_console and eleven more. That is the ruled rewrite
    and the runbook's own § 5.1 order (opendox_code first), so it is expected;
    it is recorded here because it means this leg's suite cannot be green in
    sequence position 1. Worth a separate look: openDox importing openxdox is
    the reverse of the pin direction (openXdox pins openDox, openDox pins
    nothing), which § 2.4's route/subcommand EXTENSION POINTS exist to invert.
    Inverting them is authoring, not carving — the BUILD arc's.
  3. Two rows whose declared lines cannot carry the file's own openxFactory
    reach
    : tests/test_boundary.py:14 is a bare import output_boundary on an
    UNDECLARED line (the row declares only :22-23), and
    tests/test_session_harness.py — a moved_verbatim row, so it declares NO
    edit at all — execs REPO_ROOT / "scripts" / "sync-notebooklm-books.py" at
    module level, an openxFactory script with no row that never travels.
    Additionally, the tests/ideation-dashboard/conftest.py replica is a PURE
    COPY, and its REPO_ROOT = HERE.parent.parent assumes the two-deep
    tests/ideation-dashboard/ home; at this leg's flattened tests/ home it
    resolves one level ABOVE the repository. Adapting it is an edit to a file
    with no row — lawful only as an --allow-created act, with a reason — so I
    left it a pure copy and declared it.

Local pytest is 9.1.1; CI installs pytest>=8,<9, so the numbers above are
indicative and this pull request's own validate run is the authority.

NOT DONE, deliberately

  • No other leg. opendox_spec, openxdox_code, openxdox_spec are separate
    pull requests in the runbook's § 5.1 order.
  • No carved_from: — RULED OQ-I places it in the ASSEMBLY ROOT's
    contracts/manifest.yaml, which is opensoft/openDox's Phase 3 commit, not a
    leg's. This repository carries no contracts/ at all.
  • No pin, no gitlink, no tag: dox-v1.0 is cut in the assembly root and is
    Brett Heap's act (runbook § 9, § 12).
  • Nothing in openxFactory — the carve COPIES and deletes nothing. The shed is
    Phase 5. Through Phase 4 the whole arc's rollback is "leave the legs unpinned".
  • No manifest edit, no validator edit: fix the destination, never the manifest.

Rollback

Close this pull request, or revert it if it merged, and delete the scratch
mirror. This leg pins nothing and is pinned by nothing until Phase 3, so a
reverted arrival leaves the levelled scaffold exactly as #3
left it.

Asking for Brett Heap's separate word to land this (CODEOWNERS * @brettheap;
admin merge).

🤖 Generated with Claude Code

brettheap and others added 30 commits August 3, 2026 18:57
Provenance: adopted from codexFactory main@e4caa03bf48655b54bc96fc5450d9ad5bddf4886 (copy, no history graft — D1).

114 files / ~31k LOC: scripts/doc_health/ (minus the two CloudPC
readiness evaluators, which ride tranche D to the aggregation repo — D3),
doc-health.py, sync-notebooklm-books.py, tests/doc-health/,
tests/notebooklm/, doc-health-reusable.yml, and the suites' pytest
infrastructure (pytest.ini anchor, hermeticity conftest). Scoped rider:
ideation_dashboard/__init__.py + boundary.py (the lanes' write-boundary
import; tranche B overwrites byte-identically). Path hygiene: SYNC_SCRIPT
and 9 workflow entrypoints now openxFactory-rooted; ownership prose
updated incl. the emitted cross-reference _YAML_HEADER. Neutral citations
made truthful: catalog-snapshot schema x2, validate-document-catalog x5,
cross-reference.yaml producer, lifecycle-notebook workspaces managed_by
x3, doc-health.md + lifecycle-notebook-projection.md prose/paths. The
active add-cross-factory-ideation-routing ownership requirement amended
pre-promotion (D5) with a dated note in its ledger.

Gates: 551 passed + 3 tranche-B probe skips; existing suites unaffected
(45 + 146); 11/14 doc-health families match the 2026-08-02 nightly
exactly, 3 diffs are corpus drift (documented in tasks 1.5 evidence);
openspec --all --strict 54/54.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Provenance: adopted from codexFactory main@e4caa03bf48655b54bc96fc5450d9ad5bddf4886 (copy, no history graft — D1).

168 files / ~98k LOC: scripts/ideation_dashboard/ (package incl. web/ at
scripts/ideation_dashboard/web/), the three nightly entrypoints, the
session runbook, tests/ideation-dashboard/. kickoff.py, serve.py, and
all web assets byte-identical to the pin (D4 held at byte level); the
two tranche-A riders overwrote byte-identically (sha256-verified);
exactly 14 files differ from the pin, all deliberate and ledgered.

D3 refinement (dated note in design.md, flagged for Brett):
readiness.py IS CloudPC CI-host code and still rides tranche D to the
aggregation repo; readiness_dispatch.py is the ideation-readiness LANE
dispatch (docstring + imports quoted in the note) and comes home with
its 13-test suite plus the restored cross-lane register-carry test —
tranche A's repointed workflow lines are now live unedited.

Gates: tests/ideation-dashboard 2522 passed / 23 env-conditional skips;
doc-health+notebooklm 610 passed 0 skipped (all three tranche-B probes
flipped to passes); existing suites green (ideation_dashboard 45,
catalog+routing+avatar 146, avatar_runtime 97, hermes CLI 21); snapshot
shape identical to the published openxFactory snapshot with corpus-drift
deltas only; serve smoke HTTP 200; openspec --all --strict 54/54.

Open items ledgered in tasks 2.x evidence: doxbench publisher-side
stack-pin ruling (serve's two doxbench routes fail closed from a
publisher checkout), six tombstoned cross-repo pins for tranche C/D,
the HGR conftest exemption, check_repo_tree tests/ exclusion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…un F8 drift)

nlm 0.5.26 rejects --json on notebook create (it keeps it on list/get/source
list), so every at-open session notebook create degraded — the drift the
2026-08-04 T092 re-run hit live (codexFactory specs/007 t092-rerun-2026-08-04
evidence). The create is spoken in ONE place (_create_titled); it now speaks
the plain form, reads the id from either answer shape (JSON object, or the
0.5.26 'ID: <uuid>' line via _created_notebook_id), and a create that echoes
no readable id still resolves through _ensure_notebook's fresh-list fallback.

The 0.5.26-shaped regression test FAILS on the pre-fix code (fake raises on
--json exactly like typer); proved by stashing the workbench.py hunk and
re-running. Full tests/ideation-dashboard: 2527 passed, 20 skipped. Live
probe through the real CLI: create parsed id a861d174-…, delete cleaned up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Speak nlm notebook create in the plain form 0.5.26 accepts (F8 drift)
T104 F5–F10 wave, slice 1, realizing the reviewer's binding ruling of
2026-08-02 (R-12, FR-038). The defect was in the comparison, not the
field: `_require_buffer_binding` compared ref NAMES, conflating "same
ref name" with "same base bytes", so after a partial Save every buffer
the Save did not land was permanently refused.

The guard now accepts a buffer whose base names the ref the session
branched FROM at the session's own recorded base revision — acceptance
on the REVISION, never the name alone — and still refuses once the
session has diverged past that base for the buffer's own document,
byte-precise against the session's current text read through the same
lens the client hashes (`doxbench_hash.served_text`). `base_ref` keeps
its provenance meaning and `rekeyDoxBenchState`'s byte-identity pin
stands untouched.

The base is recorded where it is known and nowhere later: the OPEN
stamps `(base_ref, base_revision)` on the registry entry and durably in
the owner marker; it is sticky across snapshot regenerates (the same
rule the owner rides), and the bootstrap recovers marker-first, then
from git's own fork point. None degrades to the original name-equality
binding — advisory, never a refusal.

Guards, per the ruling: the post-partial-Save turn SUCCEEDS for the
un-landed buffer; the diverged session still refuses; a session with no
recorded base keeps the old refusal; the original pin is re-purposed as
the provenance record. FR-038 moves PARTIAL → EVIDENCED in the archived
change's realization mapping. Full dashboard suite at this tree:
2542 passed / 19 skipped (baseline 2527/18).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…les and tests

T104 F5–F10 wave, slice 2: family F9 (styles / markup / accessibility)
and F8 (a test that passed with the behaviour removed).

F9: both authoring textareas and both previews derive text direction
from content (dir="auto", FR-045's direction clause — the chat rail's
idiom, extended; status and heading stay unset because their text is the
fixed vocabulary, never content); the textarea and document picker
disable autofill (FR-044); the later .doxbench-picker-label block
declares flex-direction: row and flex: none so the surviving
flex-direction: column from the earlier append wave no longer stretches
the picker to half the pane; a narrow-viewport override (equal
specificity, later source) finally beats the has-rail thirds rule under
900px, with .doxbench-rail included this time; the dead
.doxbench-tab-active rule AND its classList.toggle are removed — one
spelling of selection state, aria-selected, remains.

F8: test_app_js_documents_the_remaining_tasks_for_the_absent_seams
iterated an empty tuple and asserted nothing; it is now parametrized
over the roster (empty ⇒ one explicit skip, never a vacuous green) with
a companion pin that derives the consumed seam set from
staging-workbench.js's own doxbench?.* reads and requires each key in
app.js's doxbenchSeams literal.

Named suites 165 → 169 passed + 1 skipped (+5 pins; the vacuous pass
became the explicit skip). Full dashboard suite at the combined tree:
2542 passed / 19 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… honest verb roster

T104 F5–F10 wave, slice 3: the server-side F10 singletons.

The FR-032 base revalidation now reads the document through the SAME
lens the client hashed (`doxbench_hash.served_text`: verbatim bytes,
strict UTF-8, one leading BOM dropped — what `Response.text()` does)
instead of `Path.read_text`'s universal-newline translation, so a CRLF
document's honest Save is no longer refused as stale forever. The two
governed document writes (`create_document`,
`rewrite_session_document`) pin `newline=""` so the landed bytes are
exactly the replacement the buffer's identity describes on every
platform (FR-045's byte-exactness clause, write leg).

`first-edit` joins `EXECUTING_VERBS`: it joined the dispatch if-chain
and SESSION_BEARING_VERBS when the governed Save landed, and the lagging
declaration made the roster — and serve.py's logging justification that
cites it — lie about the executable set.

Guards: a CRLF document edited from its served bytes is no refusal
(reverse-RED shown against the old read_text lens); the
declared-and-dispatched pin now names first-edit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eing

T104 F5–F10 wave, slice 4, both halves of family F5.

Server: a lone UTF-16 surrogate anywhere in a turn (buffer content,
message, working subject, transcript) is refused as the fixed
invalid_turn_request instead of killing the handler with no response —
ContentEncodingError is caught at all three route sites, including the
step-9 re-verification so a reserved slot finalizes through the normal
envelope. The governed Save (`first-edit`, alone among gate verbs)
reads its body through the widened bounded reader: a full 400,000-byte
buffer now fits the transport and a genuinely oversize body gets the
honest measured 413 instead of "a JSON object body is required". And
the tiny reader now DRAINS a refused over-cap body before answering —
the carried "65kb test" flake closed at its root: refusing with every
byte unread let the kernel's reset destroy the queued 400 while the
client was still mid-body.

Client: `firstEditVerdict` carries the server's resolved verb on the
SUCCESS branch (where readVerdict consumes it) and stops dereferencing
a null payload; the transcript display never evicts the newest pair
while a separate wire window enforces the 64,000-byte request bound; a
refused Apply records a visible, announced, non-echoing failure; a
persisted model id is adopted only if the catalog vouches for it (and
re-validated when the catalog arrives), so Send can never arm behind
the placeholder; and an offered rail with no selectable model states
the unavailable posture itself instead of contradicting the shell's
note.

+31 pins across routes/request-handling/turns/transport/chat-view/save,
all RED-first. Full dashboard suite at the combined tree: 2573 passed /
19 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… refuses visibly

T104 F5–F10 wave, slice 5: family F6 plus the FR-045 round-trip's
client half.

onIdentitySettled now fires from EVERY transition that moves a buffer's
identity — Discard, a document switch, and each buffer a Save actually
landed (refused buffers deliberately excluded) — so the rail's proposal
cards can never keep claiming `current` against text that moved.

Before the initial load settles (and permanently after a load/hash
failure) the editing surfaces refuse VISIBLY: textareas mount disabled
with the fixed loading line, every entry point states its refusal
through the existing "refused --" status idiom instead of throwing an
unhandled TypeError and silently overwriting the keystrokes, and an
oversized document mounts to a stated size failure — byte counts, never
content — with `ready` resolving instead of dead-lettering.

The textarea's forced-LF projection stops rewriting documents: the
buffer keeps the document's real line endings (flavor named by the
first line break in the loaded base), the display holds the LF
projection the browser imposes anyway, read-back re-applies the real
flavor before hashing, and the sync comparison settles in the display
domain. A CRLF document now loads clean, edits to its own bytes, and
saves what the identity describes — completing commit c2f432c's
server-side lens.

The absent-outline Save pin now drives savePlanState with the real seam
request shape end to end instead of discarding an empty plan.

+11 pins, RED-first (the harness probe recorded for the test-only
finding). The byte-identical rekey pin (test_doxbench_state.py:454)
stands untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…claimed to

T104 F5–F10 wave, slice 6. `viewState()` was exported with no production
caller and nothing ever wrote selection or scroll back: hiding a pane
drops its layout box, and the browser's scroll offset with it, so every
tab switch landed the human at the top of the buffer while the FR-010
tests passed against a shim that kept scrollTop for free.

`applyTabVisibility` now captures each pane's view as it goes hidden and
re-applies it on return — scroll last, so focus()'s scroll-into-view
never wins over the human's place — and the shim models the layout-box
loss (hiding drops descendants' scrollTop; selection, being DOM state,
survives), which turns the existing tab round-trip pin into a real one:
it fails with the write-back neutered (reverse-RED shown).

FR-010 and FR-045 move PARTIAL → EVIDENCED in the archived change's
realization mapping (FR-045's two residuals — dir="auto" and the CRLF
round-trip — closed earlier in this wave), leaving FR-041/SC-010's
operator-gated screen-reader legs as the change's one open row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ailure posture

T104 F5–F10 wave, slice 7, closing the finding families.

Persistence/restore (F7): the composition root reads sessionStorage
through a guard, so a browser blocking site data degrades to the
documented no-persistence posture instead of replacing the dashboard
with a false snapshot error; the FR-039 session-end clear finally
passes the injected storage seam (the shell-harness record now really
disappears); a proposal Apply/Reject restores keyboard focus to the
REBUILT control by identity — terminal cards fall back to the composer,
where the named continuation starts — and the two pins that passed with
the behaviour removed (a restoreFocus substring grep and a finally
count) are behavioural now, mutation-proven.

Viewer images (F7/F6): the click-to-load replacement keeps the derived
label as alt text, a failed load restores a labeled retry placeholder
and revokes consent (a dead URL never auto-retries per keystroke), and
an image the human explicitly loaded survives the preview's
per-keystroke rebuild — consent is per container per src; a new src
still asks.

Honest failure posture (F10): the catalog loader distinguishes a stale
console token (the R-3 recoverable reload sentence) from an unreadable
catalog (its own fixed line) instead of collapsing every failure into
"no approved model is configured" — with matching posture-ladder rungs —
and an over-bound composer or subject paste is refused VISIBLY through
the aria-live failure note, naming the bound and never the text.

+26 pins, RED-first. Full dashboard suite at the agent's tree:
2611 passed / 19 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave re-review fix-first (reviewer disposition, 2026-08-05). The F5-8
fix guarded three sites and missed the one live unguarded one: the
canonical-digest statement. json.dumps(..., ensure_ascii=False) passes
a lone surrogate through, so the raise happens at the encode inside
sha256_hex — and base_ref/base_revision are the two request fields that
reach the digest with no earlier measurement or hash gate, both
released-schema-valid surrogate carriers. A conforming client posting
one got a dropped connection instead of any envelope.

The digest now refuses through the same fixed invalid_turn_request as
the other sites. Two route pins, RED-first (both reproduced the dropped
connection).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave re-review fix-first. The mutation round proved two silent
regressions were possible: the R-12 route reader could revert to
read_text (every fixture was LF-only, where the two lenses coincide)
and served_text's one-leading-BOM rule could break in either direction
(never-strip / strip-all), all with the suite green.

Pins: a route-level R-12 case whose session document carries a BOM and
CRLF — the two lenses disagree, so the read_text regression refuses a
correctly-based buffer (reverse-RED shown) — and a served_text unit pin
with one clause per mutation class: exactly one leading BOM dropped, a
doubled BOM keeps the second, a non-leading BOM is content, CR/CRLF
survive, malformed bytes raise strictly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave re-review fix-first. The F5 drain closed the refusal-transport race
for one reader and one band, and without any socket timeout it traded an
instant 400 for an UNBOUNDED block: a client declaring an over-cap body
and going silent pinned a handler thread and its connection for the life
of the process — strictly worse than the pre-drain posture for that
class (W-5). And the bounded reader — the chat-turn route and the very
first-edit route the wave widened — still abandoned the refused
remainder on the socket, leaving the measured 413 exposed to the same
close-with-unread reset (W-6).

One posture now: `DashboardHandler.timeout` bounds every socket
operation (network silence, never request duration — a slow model
dispatch performs no socket read while it waits), and both readers drain
a refused body through the shared `_drain_refused_body` — chunked, and
bounded by `_MAX_REFUSED_DRAIN_BYTES`, sized past the largest body a
real client can legally compose (a maximal buffer JSON-escapes to under
2.5 MiB) so every honest refusal survives while a flood still closes
with bytes unread.

Pins: the bounded reader's drain (reverse-RED shown against the old
max_bytes+1 read), the shared flood ceiling on both readers, and a
real-socket stalled-body test proving the connection ends promptly
under a shrunken timeout instead of parking a thread in read().

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…troke

Wave re-review fix-first. applyProposal handed the model's text to
edit() verbatim — only the HUMAN input path routed through the F10-3
lens — so an LF-spelled proposal into a CRLF document made the buffer
pure LF (a Save then committed an every-line-ending rewrite of a
reviewed one-paragraph change), and the next keystroke flipped the
whole file back to the base's flavor: two byte-level outcomes for one
proposal, neither stated anywhere, re-opening through the other content
door the silent-mass-rewrite class this wave closed for typing.

The proposal's content is now projected into the display domain and
re-flavored exactly like read-back, so the buffer stays uniformly in
the document's own line-ending discipline whichever door text arrives
through. Pins (reverse-RED shown): an LF proposal into a CRLF document
lands CRLF with the identity hashed over the real bytes; an LF
document's proposal stays LF verbatim.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… click-time snapshot

Wave re-review fix-first. `adopt(await proposalActions.apply(state, …))`
derived the outcome from the state captured at click time, so every
adopt that landed during the seam's await was clobbered: follow-up
typing during a slow Apply was silently destroyed, and an Apply
spanning a turn settlement re-adopted the in-flight snapshot — phase
back to "in_flight" with nothing in the air, the settled answer and its
proposals gone, Send wedged at "Sending…" for the life of the mount
(rail.abort() has no production caller). The wave built exactly this
defense on the send path (the R1 liveState + abandoned-flight check)
and did not extend it to the card handlers it was rewriting.

The actions now take the rail's live-state getter and settle against
it. A refusal records the visible failure on the live state; a landed
swap marks the proposal applied only when the live record is
field-identical to the record the seam actually swapped — a set the
turn replaced mid-await is never marked, and the live truth wins. The
one widening this needs is `markProposalAppliedAfterSwap` ("stale" here
can only be the apply's own re-score, since the swap moved the buffer
identity before its promise resolved); every other stale record keeps
refusing through the current-only rule.

Pins, RED-first (the wedge reproduced exactly: phase 'in_flight' ==
'idle' failed): typing during a slow Apply survives in state and DOM
with the proposal still landing applied; an Apply spanning a turn
settlement keeps the settled turn's transcript, an idle phase, and a
Send that does not read "Sending…".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lias

Wave re-review fix-first. R-12's acceptance demanded revision EQUALITY
with the recorded merge-base — but a real client's base_revision is the
serving projection's source_revision, the checkout HEAD at snapshot
GENERATION time (the browser never receives a per-file revision), while
the branch point is the OPEN-time HEAD. Any main movement between
snapshot bake and session open made the two differ forever, silently
reverting R-12 to the refusal it closed — executed in the re-review,
both directions, on real git over HTTP.

The OPEN now records the serving snapshot's revision beside the
merge-base as an accepted ALIAS: on the entry
(`session_base_aliases`, sticky across regenerates like the base
itself), durably in the owner marker, and read back verbatim by the
bootstrap — never re-derived later, because the snapshot regenerates
and its current revision proves nothing about what clients of that
session hold. The guard accepts a listed revision; the ref-name and
base-bytes clauses are untouched, so an alias never weakens staleness
detection.

Pins, RED-first: the unit alias acceptance (with byte-clause and
unlisted-revision refusals in the same breath); the recording test
drives the exact reverting window — main moves after the snapshot is
baked, the session opens, and the alias equals the baked revision,
surviving into the next process via the marker; the route twin grounds
a turn declaring the snapshot revision end to end. Full dashboard
suite: 2623 passed / 19 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…er lies

Wave re-review fix-first, round 3.

W-8: the guard's Save arm awaits a Save whose onSaveLanded hand-off
remounts this canvas when the key moves — and the corpse kept going:
switchDocument mutated state, persisted under the rekeyed session key
AFTER destroy() had written its own record (a reload in that window
resurrected the wrong active document), and fired a late
onIdentitySettled into the torn-down composition. The arm re-checks
destroyed after the awaited Save, and switchDocument refuses on a
corpse at entry and again after its own awaited loads.

W-9: a picker change during the loading window is refused by the F6-2
posture, but the handler reverted the DISPLAYED value only on
"blocked" — the picker then showed a choice that never landed, forever,
lying about which document edits land in and turns ground on, with the
refusal itself invisible. The picker now reverts on every non-switched
outcome and a refusal is stated through the same "refused --" status
idiom every other refusal uses ("blocked" stays silent: the guard IS
its statement).

Pins, RED-first: the guard-save-into-remount scenario proves the
resolve refuses, exactly one identity notification fires (the Save's
own), and the persisted record is destroy()'s pre-switch document; the
picker probe proves the revert and the stated refusal during the load
and the agreement after it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ehind

Wave re-review fix-first, round 3. markProposalApplied never touched
lastFailure and the only clearers were a settled turn and a rekey, so a
refused-then-successful Apply rendered two live regions asserting
opposite facts about the same proposal: the applied announcement beside
the still-visible "no longer matches the buffer" note — permanent in
the editor-only posture, where no turn can ever settle to clear it.

A landed apply now clears the local failure channel through the pure
clearLocalFailure (narrow: only lastFailure moves); a refusal still
records it. Pin, RED-first: refuse-then-land shows the refusal note,
then the applied status with a hidden note and no lingering error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…crolling

Wave re-review fix-first, round 3. The F9-5 narrow flex:none block ties
the is-expanded geometry on specificity and, later in source, beat it:
under 900px with the rail the per-pane expand controls toggled
aria-pressed and moved nothing. Worse, with all three regions at
natural height inside .swb-panel's overflow:hidden, a tall transcript
pushed the canvas below the fold with no scrollbar anywhere — the
thirds split this wave replaced had at least kept every region bounded.

In the stacked column, expansion now means HEIGHT: a later-in-source
narrow block gives the expanded pane the column's share and compresses
the other panes to bounded, still-scrollable 20vh strips, and
.swb-regions.has-rail owns its own vertical scrolling so nothing is
ever unreachable. Pin, RED-first: the scroll owner, the re-declared
expansion, its position after the flex:none block (source order is the
whole contest), and the compressed strips.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave re-review fix-first, round 3. The F10-1 shell threading was pinned
only by a source-grep whose docstring claimed the onState comparison
"re-renders when the FAILURE changes (not only the count)" while its
assertions checked substring counts — deleting the failure half of the
comparison left the whole repo green, and in the shipped zero-adapter
posture (count 0 before and after every failed fetch) the shell's note
would then never leave "no approved model is configured" on a stale
console token.

The pin now drives a failing catalog through the REAL mounted shell and
reads the rendered posture note. Mutation-proven: dropping
`|| failure !== railCatalogFailure` fails exactly this test; restored,
the module is green. No production change — the threading was correct;
its guard was not.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…alid restores

Wave re-review batch tail (reviewer disposition, 2026-08-05), the
client's eleven items:

EOL-only dirtiness is STATED (a mixed-EOL document whose display is
byte-identical to the loaded text says "line endings only" instead of
presenting invisible dirtiness); the loading and failed-load postures
disable the Save/Discard/picker controls whose clicks were silently
dropped; proposals adopted from an in-flight turn are re-scored against
the live editor identities at settle (a buffer that moved mid-flight
renders stale, never current); an in-bound edit clears ITS OWN
over-bound note — the note is a present-tense claim that goes false the
moment the text is shortened (the pinned lifecycle updated, with why);
restoreChatState drops malformed transcript turns instead of
fabricating "undefined", and adopts subject/composer only within their
byte bounds (dropped whole, never truncated); send focus follows INTENT
(success → composer, failure → the re-enabled control) instead of a
captured node that disabling had dropped to <body>; the mount-to-catalog
window says "checking the model catalog…" instead of claiming a
configuration fact not yet known; a detached image's late error no
longer revokes the live container's consent; an edit settling after
destroy() leaves storage untouched (the FR-039 clear survives); plus
the wire-window and catalog-loader comment corrections (turns vs pairs;
the considered-and-rejected salvage case; the unreadable posture).

+10 pins, RED-first; the per-keystroke re-request of consented images
is recorded as designed (browser cache owns it).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…efusals

Wave re-review batch tail, the server's seven items:

The undecodable-base refusal names only the exception CLASS — the old
{exc} interpolation leaked the offending byte value and offset from the
file being edited — with the strict-decode asymmetry recorded as
deliberate (the browser hashes U+FFFD-replaced text; the server refuses
to fabricate an identity, so a non-UTF-8 file is honestly unsaveable).
A lone surrogate in first-edit content refuses 400 with the
transaction's own fixed sentence instead of escaping the boundary write
into the unwind as a 500 action_failed. The gate_console writers stop
translating line endings — the demote move copies BYTES (no decode at
all on the move arm), the status flip preserves each line's own ending,
the README append and both redline legs read and write without
translation — closing the F10 corpus-integrity class arriving through a
different verb: on Linux today these rewrote CRLF documents as LF,
invalidating open buffers' base identities.

Guards: the carve-out's one-verb pin is parametrized across four gate
verbs (mutation-proven: widening the branch fails create-document); a
transcript-ROLE surrogate is pinned as covered by W-1's digest catch
(differentially proven against a re-raising mutation); the boundary's
newline="" spelling gets a textual pin that states why no behavioral
test can go red on this platform; and the 413 comments say "declared",
which is what the refusal is actually based on.

+11 pins, RED-first throughout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…yte clause, honest harness

Wave re-review batch tail, the R-12 machinery items.

The arms that JUST created (or re-materialized) a session branch now
prefer git's own fork point over the owner marker: a marker there can
only be crash residue from a previous session of the same deterministic
name, and reading it first resurrected a dead session's base and
re-persisted it — self-healing never occurred. The JOIN and bootstrap
arms stay marker-first (the marker is the one source that remembers a
non-default base), and marker ALIASES are trusted only when the
marker's base agrees with the recovered one — one rule, so a stale
marker cannot smuggle its aliases past a prefer-git override. The
register heals the marker with the derived truth.

The binding guard's byte clause fails closed twice over: a reader
failure yields None and None never grounds anything — including a
direct caller's base_hash=None, which once satisfied None == None and
was accepted on the very failure that should refuse it.

And the shell harness stops modeling a client capability that does not
exist: the fake source loader returned a per-file revision production
never sends, exercising a dead arm of baseRevisionOf and masking W-4's
whole mechanism. It now returns the production {content, ref} shape,
the session scenarios run through the true projection-fallback path,
and the wire base_revision is pinned to the projection's
source_revision.

Pins RED-first: the orphaned-marker fresh open (base healed, stale
aliases refused) and the hashless-buffer reader failure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave re-review batch tail, the vocabulary split. Every refusal an Apply
could meet — a settling identity, a Save in flight, a loading canvas, a
thrown seam — collapsed into "this proposal no longer matches the
buffer — ask again in a new turn", false in both halves for everything
but genuine staleness (the proposal matched, and a moment's wait was
the recovery; a persistently-throwing seam looped the false advice
forever, and the dominant real path to the sentence was never
staleness at all, since currency interception disables Apply first).

The editor's applyProposal now carries a fixed CODE per refusal class
(stale / unsettled / unavailable — codes, never free text), and the
rail maps them through a WHITELIST: stale keeps the new-turn sentence,
unsettled is advised a moment, and everything else — including a throw,
a null, or an unknown code — gets the generic "the apply failed — the
proposal stays reviewable; try again". The seam's own error text stays
dropped unread.

Pins: the unsettled and throwing cases (reverse-RED shown against the
one-sentence mapping), the editor's own codes at its boundary, and the
existing staleness pins re-keyed to the stale-coded seam.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reviewer ruling, 2026-08-06, closing the wave re-review's last open
item. "Continues to refuse once the session has DIVERGED past that
base" is a CONTENT reading: the guard hashes the session's current
text, so a session that moved this document and moved it back
byte-identically accepts the pre-session buffer again. Every acceptance
is content-safe — the buffer's base bytes provably equal the session's
current text, so no stale envelope can result; consulting history would
refuse turns whose grounding is provably coherent.

No behavior change: the docstring now cites the ruling, and the
executable record pins both halves against one worktree — refused while
the document is moved, grounding again once it is restored. The full
ruling addendum lives with the R-12 ruling record
(doxbench-r12-ruling.md).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ject-scoped selection

Ratified by Brett 2026-08-06 ("ratify exit 1 and realize it") and
realized the same day, tasks 1.1-1.3, 2.1-2.4, 3.1-3.3, 4.1-4.2.

Contracts: gate-intent + gate-action-record grow create-project /
project_id additively (verb+action enums, target field, per-verb
conditional, workflow-job companion), with packaged examples and a
conformance test group; no contract_schema_version bump.

Engine: kickoff.create_project() — the commission mechanic one register
over. The target id is orchestration-slugged from the name (D-a);
guards in ruled order (human gate, name/member shape, register
reachability via upward discovery, id collision, single-parent, roster
membership, duplicate via the shared (verb, target) index); descriptor
carries the proposed name + deduped members; the aggregation-owned
register is NEVER written here (D2). GateConsole delegate, executing
route (roster = the session registry's own reachable set), and the CLI
twin `gate create-project <name> --repo ...`.

Surface: serve.py gains read-only GET /project-register.json (the
snapshot index is a locator and carries no grouping, so the picker
reads the register projection; absent register or static image -> 404
-> the picker hides). repo-selector grows buildProjects/scopeRoster in
the pure model, the project picker (scope survives reload via
sessionStorage, membership-checked on the way back in), and the
create-project affordance under the gate capability with textContent
refusals and honest empty-candidate handling.

Verification: engine+wire test group (14), node model tests for
scoping, conformance group (6); the renderer fetch-inventory pins
widened by the declared arithmetic (repo-selector.js 2 -> 4, both new
routes individually named). Full dashboard suites 2598 passed / 0
failed; openspec --all --strict 52/52; live browser check green both
planes (picker + affordance gate-on, affordance absent gate-off, zero
page errors; wire probe returned the single-parent refusal).

Remaining: 1.4 bundle registration at the next additive cut; 4.3
Brett's first real commission + fulfilment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One conflict, EXECUTING_VERBS: main's add-project-scoped-selection
appended create-project while this branch appended first-edit (T104
F10) — both kept. The resolved tree is byte-identical to the rebase
this branch's protection rules would not accept (7ae6ca66f4; full
dashboard suite 2674 passed / 19 skipped at exactly this tree).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
doxBench T104 F5–F10 wave: R-12 closed per the ruling, 28 findings fixed test-first
…ts (D8)

Brett's 2026-08-06 realization-day ruling on add-project-scoped-selection
(design D-d; topic decision D8, the D22 post-ratification precedent):
a project is a named VIEW over repositories, not an owner.

Contracts: the register schema's validator-side rules rewritten —
repository->project membership is multi-parent, project->group stays
single-parent; the snapshot schema gains the additive `projects` list
(full membership in register order) beside the singular `project`,
which survives as the first-declaring PRIMARY so grouped roll-ups keep
one heading per repository. The register validator drops its
project-multi-parent-repo error; the packaged negative example converts
to a positive multi-parent example. The change's delta gains the
MODIFIED "Project grouping hierarchy" requirement and the create-project
requirement's single-parent scenario becomes a second-membership
acceptance.

Runtime: ProjectRegisterAdapter.projects_of() (primary first); the
generator stamps `projects`; the create-project single-parent guard is
dropped (roster guard unchanged); the affordance offers all roster
repositories as candidates.

Tests: owned-member acceptance engine + wire, adapter primary/full-list
resolution, shared-membership validity; full dashboard suites 2600
passed / 0 failed; openspec --all --strict 52/52. The D8 register
content (MedxFactory joins medx-clinical, staying primary in domains)
landed in the aggregation repo as 01ace7e; tasks section 5 records the
realization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
brettheap and others added 16 commits September 6, 2026 07:26
…o the neutral module (split § 2.1) (#724)

split-opendox-two-layer-product tasks § 2.1: the OutputBoundary write guard (whole 377-line module, moved byte-for-byte by git mv) now lives at scripts/output_boundary.py, a plain module both packages import; scripts/ideation_dashboard/boundary.py stays as an explicit 17-name re-export so every existing import keeps working (identity-tested); scripts/doc_health/derive_possibles.py and ideation_readiness.py repoint their lazy house-guard imports; tests/doc-health/test_import_direction.py parses ASTs and proves scripts/doc_health imports nothing from ideation_dashboard, with a negative control. The packet fixed no path: the choice (scripts/, not named boundary because tests/avatar_runtime/boundary already occupies that top-level name in a full pytest run) is recorded in the PR body with its design § D2 basis. ideation-dashboard and doc-health suites green; doc-health delta zero; three verifiers passed.

Landed on Brett Heap's word, 2026-09-06, verbatim "merge 724 when green" (#656). Admin squash because brettheap-authored PRs cannot self-clear the code-owner review.

Refs #656

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

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WoVQPAyEUXZf9S779gRVbo
…efused chips and refusal panel from the inbox plus the committed-intent feed (#718)

add-ideation-intent-plane task 4.4, first pull request (Path A, Brett Heap's rulings D-1..D-6 on #656): the actions.intent capability (not loopback → intent emission; exactly one of gate/intent is ever true); the hosted dispose tray emits a gate-intent by same-origin POST /intents with {verb, target, snapshot_rev_seen (full 40-hex, refused client-side otherwise), args} and no body-claimed actor (D16); the read-only committed-intent feed at /committed-intents.json served from ideation/dashboard/intents/ (RULING D-1; stdlib parser, size- and count-capped before any read, symlink-escape-proof, malformed files skipped); pending/applied/refused chips joining the inbox with the corpus feed (a committed entry's status wins; applied only from the corpus, never from a POST success); a refusal panel for inbox and lane refusals plus stalled/error states; local mode untouched. Verified across two rounds: design conformance, tests with mutation checks, live behavior against a fake inbox, and security; four Copilot threads taken. Records and ticks come in PR-5.

Landed on Brett Heap's word, 2026-09-06, verbatim "merge 718 when green" (#656). Admin squash because brettheap-authored PRs cannot self-clear the code-owner review.

Refs #656

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

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WoVQPAyEUXZf9S779gRVbo
…sify (split § 2.3) (#728)

split-opendox-two-layer-product tasks § 2.3: authoring.py's REQUIRED_HEADER_FIELDS is no longer a constant co-authoritative with doc_health.corpus.STATUS_SCAN_LINES — the dashboard's gate stages a proposal as a corpus of one and asks the landed corpus adapter's classify (through home_corpus(), the interface's only door) for required and missing fields; the field block moved to the adapter's home layout data, so the adapter package no longer imports ideation_dashboard.authoring and authoring.py no longer imports doc_health; REQUIRED_HEADER_FIELDS survives only as a lazily resolved alias with every production consumer migrated; obliged_prefixes pinned to authoring.IDEATION_PREFIX; parity against a frozen pre-§2.3 oracle over 679 governed documents with zero divergence; mutations bite (7 tests). Verified adversarially; advisory: per-call latency ~1 ms at the single per-submission site.

Landed on Brett Heap's words, 2026-09-06, verbatim "merge 727 and 728 when green" (#656). Admin squash because brettheap-authored PRs cannot self-clear the code-owner review.

Refs #656

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

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MDVAo41VtZqJQpuawwJeYC
….py (split § 2.4, PR 1 of 4: scaffolding, zero behavior change) (#736)

split-opendox-two-layer-product § 2.4 PR-1 of 4: route extension point (scripts/route_extension.py, RouteExtension/RouteBinding dispatched by handler name against the live DashboardHandler) and subcommand extension point (scripts/subcommand_extension.py), wired into build_server()/build_parser() with empty-tuple defaults; zero behaviour change (help golden byte-identical, dispatch arms pinned). Verify rounds: neutrality/closure/gating/mutations + golden parity/suites/CI delta/design conformance; fix rounds: non-callable handlers refused at build time, GET/HEAD collision slot shared with an accurate refusal message, docstring no longer overclaims gating. Landed on Brett Heap's word "merge 736 when green" (2026-09-07). Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CHAHvr9zFHRd4kWVnZLK9k
…(#741)

split-opendox-two-layer-product § 2.4 OQ-1 (ruled as recommended): doxbench_packet.py keeps every public name with no doc_health import; the Status:-header exemption rail moves to scripts/ideation_dashboard/doxbench_status_exemption.py (openxFactory-adapter column) keeping its direct doc_health import — the classify() route is unavailable without widening the closed Classification (RULING OQ-2), fallback ACCEPTED by Brett Heap 2026-09-07 ("accept the 741 fallback"). Three adversarial verifier lenses; 6 findings fixed; re-verify pass. Landed on Brett Heap's word "merge 741 when green". Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019sa33gYhfLF1F1MkS7Xrd6
split-opendox-two-layer-product § 2.4 PR-2 of 4: the openDox column leaves serve.py as mixins — serve_workbench.py (WorkbenchRoutes: doxBench surface, chat turn, model intake/approval, abstract, thread), serve_project.py (ProjectRoutes: project register, notebook + edit actions) and serve_wire.py (shared wire vocabulary, re-exported by serve.py) — fixed core routes, dispatch tables and build_server() byte-stable; CAPABILITIES_ROUTE handling and _session_repository stay in core on test evidence. Nine test repoints under RULING (a), each disclosed and mutation-proved. Three adversarial lenses + re-verify pass; four Copilot threads fixed. Landed on Brett Heap's word "merge 748 when green" (2026-09-07). Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UyynFBwGMQNeNU8D8qhQBW
…(#742)

split-opendox-two-layer-product § 2.4 PR-4 of 4: cli.py split by column behind the subcommand extension point — cli_gate.py (openXdox, 19 gate verbs + the gate subparser tree, registered through SubcommandExtension), cli_project.py and cli_model_binding.py (openDox, fixed core), profile_openxfactory.py naming the in-tree SUBCOMMAND_EXTENSIONS; the 31-entry --help golden byte-identical; the __main__ bootstrap re-dispatches to the package module and the columns resolve the core relative to their own package spelling, so script, -m and scripts.-prefixed imports all bind one module object (identity-tested); bypass-flag and HumanGate closed-world sweeps re-stated at landed strength over the whole CLI surface. Three ruling-(a) test repoints, disclosed. Three adversarial lenses over four fix rounds; final gating re-verify pass. The branch history carries #736 commits already landed as fe73a28; this squash is the authoritative diff. Landed on Brett Heap's word "merge 742 when green" (2026-09-07). Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UyynFBwGMQNeNU8D8qhQBW
split-opendox-two-layer-product § 2.4 PR-3 of 4: the openXdox and openxFactory columns leave serve.py through the route extension point — serve_gate.py (gate verbs under ACTIONS_GATE_PREFIX), serve_projection.py (snapshot-index, /source, /source/), serve_openxfactory_lanes.py (refresh, dtn-seed, staging-seed, apply-register-edits, committed-intents; the doc_health imports travel with it) — registered by profile_openxfactory.py ROUTE_EXTENSIONS, which build_server() composes unconditionally and additively; the fixed _route/do_POST tables shrink by exactly the moved arms; 42 moved bodies byte-identical; the CLI half of the profile resolves lazily so the hosted image loads no PyYAML. RULING A (Brett Heap, 2026-09-07): route_extension.collect_bindings refuses any pattern under an already-declared prefix, either order, method-aware, so no caller extension can sit under a contributed prefix. Parity + gating + scope lenses, two re-verifies, 270-response refusal parity battery, mutation-proved. Landed on Brett Heap's word "merge 761 when green". Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q8CkMMAdcUZCqAUTgNjsPy
…-3, § 3.1) (#835)

Pre-carve split S-3 of split-opendox-two-layer-product § 3.1 (scout memo 2026-09-08 § 4), on Brett Heap's word. Mechanical relocation inside openxFactory; no behaviour, signature or public-name change.

- `hosted_index` (47 lines, byte-identical, sha256 9a826204…82e41) moves from `scripts/ideation_dashboard/serve_wire.py` to `serve_projection.py` (openXdox column), discharging the obligation serve_wire's own docstring recorded; no re-export is left in serve_wire, so the module's definitions are all openDox.
- `serve.py` re-exports `hosted_index` from its new home; the four `test_session_confinement.py` tests run unmodified. New `test_serve_column_split.py` (2 tests) guards the split.
- Cross-module edges: BEFORE == AFTER on every column pair (S-3 removes in-file column mixing, not an edge). `serve_openxfactory_lanes.py`'s four other serve_wire names untouched (OQ-B, unruled).
- Independent verification (own worktrees) PASS WITH NOTES, 12/12; one Copilot round + one verifier-note round (docstring sentences). doc-health finding set identical to main; CI green.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
…ion.py (pre-carve S-2, § 3.1) (#836)

Pre-carve split S-2 of split-opendox-two-layer-product § 3.1 (scout memo 2026-09-08 § 4), on Brett Heap's word. Mechanical relocation inside openxFactory; no behaviour or signature change; the import path of `add_as_cluster` changes and every in-tree importer is repointed.

- `AddAsClusterResult` + `add_as_cluster` (55 lines incl. the `@dataclass` line, byte-identical, sha256 7c12c6df…4223) move from `scripts/ideation_dashboard/lens.py` to new `lens_submission.py` (openxFactory adapter column) together with their `human_seen` reach; `lens.py` (openDox column) no longer imports `human_seen` — the one openDox→openxFactory edge the memo named is gone. No re-export (it would restore the edge).
- Repointed: `gate_routes.execute_lens_add_as_cluster` and four `test_lens.py` call sites. New `test_lens_column_split.py` (3 tests: AST direction scan over all three import spellings, non-vacuity control, no-re-export).
- New adapter→core edges, declared for the manifest: `lens_submission` → `workbench` (unavoidable) and → `lens` for `PENDING_PROPOSAL_NOTE` (kept beside its JS twin under the shared byte-identity test); OQ-B's set grows from three edges to four. OQ-B's existing edges untouched.
- Independent verification (own worktrees) PASS WITH NOTES, 12/12; two Copilot rounds + one verifier-note round. doc-health finding set identical to main; CI green.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
…re-carve S-1, § 3.1) (#837)

Pre-carve split S-1 of split-opendox-two-layer-product § 3.1 (scout memo 2026-09-08 § 4), on Brett Heap's word. Mechanical relocation inside openxFactory; no behaviour, signature or public-name change (`doxbench_scope` re-exports every moved name).

- `ScopeConfinementError`, `ScopeKey`, `ScopeDocument`, `ScopeSection`, `ScopeProjection` (86 lines, byte-identical, sha256 b6c99693…7e157e3d) move from `scripts/ideation_dashboard/doxbench_scope.py` to new `doxbench_scope_types.py` (openDox column). `SCOPE_KINDS` travels with them because `ScopeKey.__post_init__` validates against it — DISCLOSED: the memo's assignment of that tuple to openXdox was right (funnel-stage vocabulary); landed as-is on the verifier's recommendation, successor #838 filed to move the domain back to the authority.
- Repointed openDox modules: `doxbench_packet`, `doxbench_telemetry`, `doxbench_turns` — openDox→openXdox edges −3 (the memo's fourth, `serve_workbench`, is genuinely mixed and stays). Dead `dataclass` import removed from doxbench_scope. New `test_scope_column_split.py` (6 tests).
- Owed after the three splits land: one line-citation refresh (six prose citations staled by the line shift).
- Independent verification (own worktrees) PASS WITH NOTES, 12/12 mechanics; three Copilot rounds + one verifier-note round. doc-health finding set identical to main; CI green.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139swz8Tq3FjNveDRR2SNPv
…ntent_apply_lane reaches sessions through the openXdox surface (split-opendox § 3.1) (#843)

OQ-B pre-carve re-plumb, part 1 of 2 (B-1 + B-3), realizing Brett Heap's ruling "rule all OQs as recommended" (2026-09-09), on his word "merge 843 when green". Mechanical, inside openxFactory; no behaviour, signature or public-name change.

- B-1: the slug family (`MAX_SLUG_CHARS`, `_SLUG_KEY_SEPARATOR`, `_SLUG_KEY_DIGEST_CHARS`, `_slug_key_digest`, `slug` — 66 lines, byte-identical, sha256 ac32a122…) moves from `scripts/ideation_dashboard/workbench.py` to the new neutral module `scripts/path_slug.py` beside `output_boundary.py` (`not_moved / replicated_at_destination` at the carve, RULED OQ-A/OQ-C); `workbench.py` re-exports the same objects; `human_seen.py` (adapter column) reads `slug` from the neutral module — the ruled edge is gone.
- B-3: new `scripts/ideation_dashboard/openxdox_surface.py` (openXdox column) is a named re-export of `branch_session.bootstrap_sessions` and nothing else; `intent_apply_lane.py` reaches sessions through it — at the carve the lane's import becomes a package-path rewrite.
- Edges (AST, five spellings): openxFactory→openDox 8 → 6; no new forbidden-direction edge. Remaining six are the `boundary` shim reaches, B-2 (`serve_openxfactory_lanes → serve_wire`, its own PR), and `lens_submission`'s two (OQ-B's fourth item, `import rewrites` at the carve).
- `tests/notebooklm/` DEFERRED by measurement (22 distinct names / 65 reaches over four openDox modules, all as namespace imports, one private): recommended `import rewrites at the carve`, like `lens_submission` — recorded on #656.
- Tests: new `tests/ideation-dashboard/test_oqb_replumb.py` (7) + a `path_slug` neutrality test in `tests/doc-health/test_import_direction.py`; Copilot round 1 taken; independent verification PASS WITH NOTES (10/10) on the PR, its one should-fix taken in a second round (a source-level assertion that workbench re-exports rather than redefines the slug family).

Landed after the estate freeze lifted: the required `pytest-suite` had been red on every openxFactory PR since the codexFactory org transfer (pinned-core token) until #801 repointed it; the advisory `merge-master-approval` red of the same cause is disclosed, not a finding against this change.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…S-1/S-3, and true-up lens_submission's docstring after B-1; B-2's relocation measured and held for a ruling (split-opendox § 3.1) (#848)

The owed line-citation refresh after the § 3.1 pre-carve splits, sequenced before the carve manifest because every manifest row carries a sha256 — on Brett Heap's word "merge 848 when green" (2026-09-09). Prose only; every changed file's AST (docstrings stripped) is identical to main.

- Eight citation numbers across four files (`scripts/ideation_dashboard/serve_wire.py`, `tests/ideation-dashboard/test_doxbench_abstract_route.py`, `test_doxbench_scope.py`, `test_doxbench_turns.py`) refreshed to the symbols' locations after S-1 (#837, −71 lines in `doxbench_scope.py`) and S-3 (#835); one historical S-3 citation and three archived-change hits correctly left; the `staging-workbench-model.js` citation family is out of scope.
- `lens_submission.py:36-38`'s docstring trued up after OQ-B B-1 (#843: `human_seen` reads `slug` from the neutral `scripts/path_slug.py`).
- B-2's relocation was measured and HELD for a ruling, not performed: `hosted_ref_refused` reaches `snapshot_registry` (openXdox) and cannot be neutral; the recommended home (i′) is `serve_projection.py` beside `hosted_index`, which keeps the serve-surface location pin green with no test edits (verified). The three string constants take the neutral module when B-2 is ruled.
- Independent verification PASS WITH NOTES (8/8 citations exact by three instruments); body corrections taken.

Landed after the estate freeze lifted (required `pytest-suite` red on every openxFactory PR since the codexFactory org transfer until #801 repointed the pinned-core token); the advisory `merge-master-approval` red of the same cause is disclosed, not a finding against this change.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ection beside hosted_index; the three wire strings to a neutral module (split-opendox § 3.1) (#852)

OQ-B pre-carve re-plumb, part 2, realizing Brett Heap's ruling "rule B-2 (i′)" (2026-09-09), on his word. Mechanical, inside openxFactory; no behaviour, signature or public-name change.

- `hosted_ref_refused` (35 lines, byte-identical, sha256 1f0257cd…) moves from `scripts/ideation_dashboard/serve_wire.py` (openDox column) to `serve_projection.py` (openXdox) beside `hosted_index` — S-3's precedent; the module already imports `snapshot_registry`, where the predicate's one dependency lives. `serve_wire` keeps no definition and no re-export; its `snapshot_registry` import, dead once the predicate left, goes too (an openDox→openXdox edge removed). `serve.py`'s existing re-export of the name follows it (+1/−1; a `serve_wire` re-export would be a circular import).
- The three wire strings (`JSON_CTYPE`, `JSON_OBJECT_BODY_REQUIRED`, `HOSTED_SESSION_REFUSAL`; byte-identical) move to the new neutral `scripts/wire_messages.py` beside `output_boundary` (`not_moved / replicated_at_destination` at the carve); `serve_wire` re-imports them; `serve_openxfactory_lanes.py` (adapter column) reads the predicate from `serve_projection` and the strings from `wire_messages` — it imports nothing from `serve_wire` any more.
- Edges (AST, five spellings): adapter→openDox 8 → 7; openDox→openXdox 33 → 32; no new forbidden-direction edge. The serve-surface location pin (`test_session_snapshot.py`) stays green untouched. Two prose refreshes (`serve_wire.py` header; `conftest.py` comment, prose only). New `tests/ideation-dashboard/test_oqb_replumb_2.py` (13 guards, mutation-proven).
- Independent verification PASS WITH NOTES (10/10, no should-fix); one Copilot thread resolved; CI green on its own result.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e-identical)

The 123 rows the § 3.1 manifest gives destination `opendox_code`, placed at
their declared `destination_path` by history-preserving `git filter-repo`
(RULED OQ-H) out of a fresh `--mirror` clone of `opensoft/openxFactory` at
carve_commit `b075fd91dc8fced8e1373825ba80220c33536bae` — tag
`opendox-carve-0`, which is a LABEL beside that commit and never the referent.

Every blob is the carve commit's: 123/123 rows' `sha256` AND `git_mode` equal
the manifest's, recomputed independently against the filtered ref before
anything was fetched from it. NO declared edit is in this commit — the edits
are commit B — so the arrival is provable at PHASE A, the strongest statement
available (openDox cutover runbook § 5.5).

Two roots, deliberately: the scaffold's `main` is neither rewritten nor
force-pushed, so the filtered history is joined to it with
`git merge --allow-unrelated-histories` and lands as a pull-request branch
(runbook § 5.0). filter-repo's rename directives apply to all history, so a
path that did not exist at its carve-commit spelling carries partial blame
continuity; RULED OQ-1 already declared bisectability unavailable here.

Refs opensoft/openXfactory#656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… needs

`opendox_code`'s 62 `moved_with_declared_edit` rows declare 239 lines, in three
classes: 185 `import rewrites`, 42 `path constants`, 12 `adapter calls`. This
commit changes 214 of those lines and nothing else — 209 rewritten, 5 deleted,
across 60 of the 62 rows. Two rows stay byte-identical and 25 declared lines
are left alone, each for a reason recorded below and enumerated line by line in
the pull request: a declared line is PERMISSION to edit that line, never an
instruction to invent an edit.

APPLIED, mechanically and by the runbook's own rule (§ 5.5,
`ideation_dashboard.X` -> `opendox.X` / `openxdox.X`):
  * `import rewrites`, 173 lines — to `opendox.<module>` where the module is
    one of this leg's own 123 rows, and to `openxdox.<module>` where the
    manifest sends it to `openxdox_code` (`gate_console`, `gate_routes`,
    `generator`, `register`, `kickoff`, `snapshot`, `snapshot_registry`,
    `corpus_root`, `cli_gate`, `serve_gate`, `serve_projection`,
    `doxbench_scope`). A relative spelling whose target travels here is
    already correct and is untouched; a relative spelling whose target lands
    in openXdox becomes `openxdox.X`.
    Inside that count, the three RULED OQ-A neutral modules and the OQ-Q
    corpus-adapter interface become package-internal: `from output_boundary
    import` -> `from .output_boundary import`, and likewise `path_slug`,
    `wire_messages`, `corpus_adapter`.
  * `path constants`, 35 lines — the package directory
    `scripts/ideation_dashboard/` -> `src/opendox/`, in the `Path` segment
    form (`REPO_ROOT / "src" / "opendox" / "web"`) and the string form
    (`"python3 src/opendox/cli.py"`, `web/views/gate.js`'s `CLI`).
  * `adapter calls`, 1 line — `authoring.py:317`'s `from corpus_adapter import
    DocumentId`, which is the interface RULING Q4 gives openDox and which
    arrives here as a declared replica.
  * DELETED, 5 lines — `serve.py:109-111`, the dead `sys.path.insert(0,
    _SCRIPTS_DIR)` shim the runbook names by number (it exists only because
    `scripts/` is not a package, and all three of its lines are declared); and
    `cli.py:104` + `serve.py:1371`, the two imports of `profile_openxfactory`,
    which is `not_moved / deleted_at_carve` and has no post-carve home at all.

LEFT — 25 lines, and why:
  * 11 `adapter calls` — every `doc_health` reach (`serve.py:618`,
    `workbench.py:745, 1406-1408`), the `corpus_adapter_openxfactory` reach
    (`authoring.py:318`), the corpus-shaped `WORKBENCH_DIR` / `ORGANIZE_DIR`
    literals (`workbench.py:82-83`), and `doxbench_scope_types.py:50, 69, 71`'s
    `SCOPE_KINDS`, whose successor #838 is OPEN at the carve — which is why
    that row exists at all. D2's `resolve` is the answer and this leg has no
    resolver binding to reach it through: that is § 3.5's, the BUILD arc
    (RULED OQ-N). Filing any of them as a path constant would ship
    openxFactory's tree shape as a literal, which `corpus-adapter-seam`
    requirement 4 refuses by name.
  * 7 `import rewrites` — three lines naming a module that lands at NO
    destination (`serve_openxfactory_lanes` twice in `serve.py`,
    `doxbench_contracts` in `serve_wire.py`, `doxbench_status_exemption` in
    `doxbench_packet.py`): there is no package path to rewrite to, and the
    statements cannot go either, because their uses sit on UNDECLARED lines.
    `cli.py:26` and `doxbench_mcp.py:61` are the same dead-shim family as
    `serve.py:109-111`, but their `if` / `sys.path.insert` siblings are
    undeclared, so the block cannot be removed inside the fence; harmless
    here, since they insert `src/`, which this leg's import root already does.
    `test_model_provider_broker.py:1135` is repointed by its own note onto
    "the destination suite's own harness": this leg has none yet, and
    `FORBIDDEN_PORT_MEMBERS` is a 20-name set — writing one is not a carve act.
  * 7 `path constants` — `cli.py:106` and `serve.py:1661` are already
    package-relative (`Path(__file__).resolve().parent / "web"` resolves to
    `src/opendox/web` unchanged). The other five carry no package-directory
    spelling: four bare `/ "web"` continuation segments
    (`test_doxbench_hash.py:34`, `test_doxbench_state.py:25`,
    `test_doxbench_view.py:18, 293`) and one `WEB = PACKAGE / "web"`
    (`test_provider_boundary.py:57`), whose `"scripts"` /
    `"ideation_dashboard"` segments sit on UNDECLARED lines. A SHORT CITATION,
    reported rather than worked around with path arithmetic.

THE EIGHT COPIES WITH NO ROW (RULED OQ-A / OQ-C — the manifest declares what
LEAVES, never what a destination assembles), each declared to the arrival
verifier with `--replica-at` so its presence AND its bytes are checkable, and
each byte-identical to `carve_commit`: `output_boundary.py`, `path_slug.py`,
`wire_messages.py`, `corpus_adapter.py` into `src/opendox/`; `hermeticity.py`,
`import_scan.py`, `staging_shapes.py` and `tests/ideation-dashboard/conftest.py`
into `tests/`. Every one is imported BY NAME by an arrived row — measured over
the carved tree, not assumed. The `tests/corpus-adapter/` conformance corpus is
NOT placed: § 3.7's run needs an adapter IMPLEMENTATION this leg does not have
yet, and `test_conformance.py` must be rewritten per destination by design.

`verify-carve-arrival.py --phase B` -> OK: 123 row(s) arrived, 61 digest(s)
verified, 60 declared-edit row(s) within their lines, 2 unapplied; 8 of 8
declared replica(s) byte-identical; 132 file(s) with none undeclared.

Refs opensoft/openXfactory#656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 10, 2026 02:27

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 20000 lines

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Security Rating on New Code (required ≥ A)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4-opendox-extraction

validate is RED, exactly as the body predicted — and CI names one cause the local run masked

run 34429514470, head cfabe3c4982e54288c3f2e5c7f0587be91c65117:

ERROR tests/test_boundary.py
ERROR tests/test_doxbench_chat_view.py
ERROR tests/test_doxbench_entrypoint.py
ERROR tests/test_hermeticity.py
ERROR tests/test_model_provider_broker.py
ERROR tests/test_session_harness.py - FileNotFoundError: [Errno 2] No such file or
  directory: '/home/runner/work/openDox-code/scripts/sync-notebooklm-books.py'
ERROR tests/test_subcommand_extension.py
ERROR tests/test_workbench.py
!!!!!!!!!!!!!!!!!!! Interrupted: 8 errors during collection !!!!!!!!!!!!!!!!!!!!
8 errors in 2.56s
##[error]Process completed with exit code 2

The same eight files, with the same causes the body enumerates (openxdox,
route_extension, subcommand_extension, test_boundary.py:14's bare
output_boundary) — plus one more, which only CI could show:

tests/test_workbench.py:39: in <module>
    from opendox import workbench as wb
src/opendox/workbench.py:52: in <module>
    import yaml
E   ModuleNotFoundError: No module named 'yaml'

FINDING 4 — a PHASE-1 (levelling) gap, not a carve edit

.github/workflows/validate.yml installs pytest>=8,<9 and nothing else,
and pyproject.toml declares no [project] dependencies. The arrived package
imports PyYAML at MODULE scope (src/opendox/workbench.py:52,
src/opendox/branch_session.py:74), so import opendox.workbench cannot resolve
on a clean runner however the carve is done. My own local run passed that import
only because this machine happens to have PyYAML installed — which is exactly the
kind of thing a hermetic runner exists to catch.

That is #3's territory (it pinned pytest and built the import
root; it declared no runtime dependency), and it sits outside this pull request's
declared-line fence: I stopped rather than patch a scaffold file to make a carve
look green.
The repair is a one-line levelling follow-up — python -m pip install "pytest>=8,<9" pyyaml, or better, a [project] dependencies = ["PyYAML>=6"] the
workflow installs with pip install -e . — and it is a separate act needing its
own word.

The conftest replica's level, measured live

'/home/runner/work/openDox-code/scripts/sync-notebooklm-books.py' is one
directory ABOVE the checkout (/home/runner/work/openDox-code/openDox-code).
That is the pure-copy tests/ideation-dashboard/conftest.py replica's
REPO_ROOT = HERE.parent.parent, which assumed the two-deep
tests/ideation-dashboard/ home; at this leg's flattened tests/ home it
resolves one level high. Adapting the copy is an edit to a file with no row —
lawful only as an --allow-created act with a stated reason — so it is left a
pure copy and DECLARED, and the arrival verifier proves it byte-identical.

The floor is unaffected

verify-carve-arrival.py is green at BOTH phases against this head (quoted
verbatim in the body): phase A 123/123 digests, phase B 61 verbatim digests + 60
declared-edit rows within their lines + 8/8 declared replicas, 132 files with none
undeclared, scaffold admissions checked against d3635930208f. FLOOR PART 1 at the
destination is what this pull request proves; the four findings are about what the
leg can RUN, which needs the openXdox leg, the two extension-point modules'
disposition, and this dependency line.

Bot round

sourcery-ai declined with zero findings — "Sorry, we are unable to review this
pull request / The GitHub API does not allow us to fetch diffs exceeding 20000
lines"
— and left no inline comments. A Copilot review request cannot be placed on
this repository (the add is accepted, no request appears, no review arrives), so
there is no Copilot round to answer. Nothing to fix, reply to or resolve.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The current diff introduces test-suite breakers (a SyntaxError, incorrect/missing module paths/imports, and a correctness issue in smoke-signal attribution) that need to be resolved before the PR can be safely approved.

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

Pull request overview

This PR brings the first “carve” tranche of openDox-code into this repository (the implementation “code leg”), adding the carved Python package, browser dashboard views, and a large set of accompanying tests/utilities intended to preserve and enforce the carved architectural seams (extension points, boundary scans, browser-signal accounting, etc.).

Changes:

  • Adds a substantial src/opendox/ implementation surface (actions, hashing/content identity, lens/workbench-related logic, boundary re-exports, and dashboard JS views).
  • Adds/ports multiple test modules and shared test utilities (AST import scanners, smoke-signal oracle + tests, fixtures).
  • Adds/ports the static dashboard assets (src/opendox/web/*) including new settings/account UI and gate/notebook/edit affordances.
File summaries
File Description
tests/test_subcommand_extension.py New tests asserting the CLI subcommand extension-point contract.
tests/test_smoke_signals.py Unit tests for the Playwright browser-signal “oracle” logic.
tests/test_provider_boundary.py Package-wide provider boundary sweep tests (needle-based scans).
tests/test_doxbench_proposals.py Node-harness tests for doxBench proposal state semantics.
tests/test_doxbench_privacy.py Node-harness tests enforcing privacy/transport non-leakage rules.
tests/test_doxbench_hash.py Cross-runtime hash parity tests (Python vs browser JS).
tests/test_doxbench_entrypoint.py Entry-point level tests that the model-provider port is declared and memoized.
tests/staging_shapes.py Shared fixture-shape helpers for staged-topic readiness tests.
tests/smoke_signals.py Browser-signal oracle implementation used by the Playwright smoke.
tests/import_scan.py Shared AST scanners used by multiple tests to enforce import direction/neutrality.
tests/fixtures/doxbench_hash_vectors.json Test vectors for content hashing/identity parity.
src/opendox/wire_messages.py Neutral wire-level constants and refusal messages.
src/opendox/web/views/settings.js Settings popover + persisted preferences (localStorage) and live eventing.
src/opendox/web/views/notebook.js Frontend “Open in NotebookLM” action view/controller and capability probing.
src/opendox/web/views/model.js Snapshot → funnel view-model derivation (pure, node-testable).
src/opendox/web/views/lineage.js Snapshot-only lineage/readiness rendering (verbatim fields).
src/opendox/web/views/helpers.js Shared DOM/text helpers enforcing textContent-first rendering.
src/opendox/web/views/grouping.js Renderer-side project/group roll-up model + DOM control (import-free, node-testable).
src/opendox/web/views/gate.js Gate console bar + CLI descriptor builder + optional executing ratify upgrade.
src/opendox/web/views/edit.js Frontend select-to-edit action wrapper (loopback-only token header).
src/opendox/web/views/docs.js Document list view with filtering/sorting/search and keyboard-accessible open affordance.
src/opendox/web/views/canvas-model.js Cluster-canvas view-model derivation + shared escape helpers.
src/opendox/web/views/board.js Pipeline board rendering + filtering/search, snapshot-only aggregation.
src/opendox/web/views/account-menu.js Account popover showing identity + access level and hosted logout link.
src/opendox/web/vendor/.gitkeep Keeps vendor directory present in repo tree.
src/opendox/web/index.html Main dashboard HTML scaffold (header controls, tabs, dialogs, overlays).
src/opendox/path_slug.py Neutral slug derivation and bounding, with JS parity requirements.
src/opendox/notebook_action.py Server-side NotebookLM action orchestration (tile → confined doc-set → adapter → manifest bind).
src/opendox/lens.py Keyword-lens recipe evaluation and workbench manifest assembly (pure semantics + persistence prep).
src/opendox/fixtures.py Worked-example possibles projection/backfill loader with no-fabrication guard.
src/opendox/doxbench_scope_types.py Frozen doxBench scope dataclasses moved into openDox column surface.
src/opendox/doxbench_hash.py Exact-byte content hashing/identity helpers + strict served-text lens.
src/opendox/cli_project.py Project CLI verbs (generate, create, edit) split out by column and core accessor strategy.
src/opendox/cli_model_binding.py Model-provider binding CLI surface (list/add/edit/remove/set-credential) with custody guarantees.
src/opendox/canvas_drafts.py Cluster-canvas draft authoring (choose-one/composer) producing validator-shaped YAML sections.
src/opendox/boundary.py Re-export of OutputBoundary and refusal constants from neutral home to preserve import paths.
src/opendox/action_errors.py Dependency-light action-route refusal catalog for handler use without heavy imports.
src/opendox/init.py Package header + generator version constant.
Review details
  • Files reviewed: 33/131 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/test_doxbench_hash.py Resolved
Comment thread tests/test_provider_boundary.py Resolved
Comment thread tests/test_smoke_signals.py Resolved
Comment thread tests/test_subcommand_extension.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4-opendox-extraction

Correction, and the Copilot round

My previous comment was wrong about one thing and I am correcting it rather than
editing it away:
I wrote that "a Copilot review request cannot be placed on this
repository … so there is no Copilot round to answer." A Copilot review DID arrive
about four minutes later — org ruleset 8981805 Copilot Auto-Review All PRs
places it, so the empty requested_reviewers I read was a timing artefact and not
a capability. The round is answered below.

Copilot: 🟡 Changes recommended, 4 inline comments, 33/131 files reviewed
("Review effort level: Lite"). All four are answered and resolved; 0 unresolved
threads remain.
Three were FACTUALLY RIGHT and one was wrong:

# file verdict act
1 tests/test_doxbench_hash.py RIGHT — STATE_JS still names scripts/ideation_dashboard/web/… replied, resolved. UNFIXABLE HERE: the row declares line 34 only; the "scripts" / "ideation_dashboard" segments are lines 32-33, UNDECLARED. Repair = widen the row's citation in openxFactory.
2 tests/test_provider_boundary.py RIGHT — PACKAGE still names scripts/ideation_dashboard replied, resolved. Same class: PACKAGE is undeclared line 56, read again on undeclared 115/149/188/274.
3 tests/test_smoke_signals.py WRONG — claimed """" is a SyntaxError replied with the disproof, resolved. Line 104 is a docstring whose first phrase is quoted; ast.parse and py_compile both pass, pytest collects the module, and the file is a moved_verbatim row byte-identical to carve_commit (00e679b923c44c1f…). Nothing changed.
4 tests/test_subcommand_extension.py RIGHT, and it is FINDING 1 replied, resolved. subcommand_extension has NO manifest row; it could not be placed lawfully by this leg. Copilot found this independently, which is worth recording.

Three of the four are the same underlying fact this pull request is asking about:
the manifest's line citations and its moved_paths surface are short for this
leg, and a destination may not repair that from the outside.
No file was changed
in response to the review — the two commits are still 828e00a4 and cfabe3c4,
and verify-carve-arrival.py is still green at both phases.

Check state, for the record

check state required?
validate fail (8 collection errors, exit 2) YES — repository ruleset 22364973 "Require validate check", and it is the only required status check
copilot-pull-request-reviewer success review required by org ruleset 8981805
SonarCloud Code Analysis fail — "Quality Gate failed" no: an org integration, in no ruleset. It is measuring ~97k lines of newly ADDED code that arrived byte-identical from carve_commit; a carve cannot both preserve bytes and satisfy a new-code quality gate, and the honest reading is that the gate is answering a question this pull request is not allowed to act on.
Sourcery review skipped (diff > 20000 lines) no

gh opens pull requests AS brettheap, so the code-owner requirement (.github/CODEOWNERS
is * @brettheap) cannot clear on his own click — admin merge with a recorded
OrganizationAdmin bypass actor is the standing pattern (runbook § 12, act 1).

brettheap added a commit that referenced this pull request Sep 10, 2026
…ox leg and the BUILD arc (RULED Q-L3 (b))

Seven arrived test modules cannot import at this leg's position in the runbook
§ 5.1 order, because they reach across the carve for something not yet carved.
Six import `openxdox.*`, directly or through `opendox.workbench` /
`branch_session` / `cli` — the ruled § 5.5 rewrite pointing at the
next-but-one leg. One, `tests/test_session_harness.py`, is a `moved_verbatim`
row that `exec`s `scripts/sync-notebooklm-books.py`, an openxFactory-only file
with no row that never travels, so no leg can ever satisfy it. Naming them here
turns 8 collection errors into 0, which is the difference between a suite that
is interrupted at collection and one that runs.

Each entry carries its reason and its removal condition. The list is a
levelling artefact removed by the BUILD arc (split-opendox § 3.5/3.6) or by the
openXdox-code leg, whichever reaches it first; deleting an entry is the whole
of the removal.

`tests/test_boundary.py` is deliberately ABSENT, and the header says why. It
fails to import on a bare `import output_boundary` at its line 14 — an
UNDECLARED line, so the leg could not rewrite it. That is cause 3 of
openxFactory#656, and RULED Q-L1 has the manifest amendment declare exactly
that line; with the rewrite simulated, collection is clean. It is fixed
upstream, not ignored. Only two reasons qualify for this list, and any other
failure is a finding reported on the pull request rather than added here.

Verified against the carve leg's own tree (#4, head `cfabe3c4`) in a throwaway
worktree with this branch's `pyproject.toml` installed and Q-L1's two
extension-point modules placed: 8 collection errors before, 1 after (the
finding above), 0 with that line's declared rewrite applied; 993 tests
collected.

FINDING, disclosed on the pull request: this list does NOT make `validate`
green on the re-cut leg, because the remaining failure is not a collectible
file. The arrived `tests/conftest.py` re-exports two AUTOUSE fixtures from
`tests/session_fixtures.py`, and their bodies import `opendox.cli` /
`opendox.actor_identity`, which reach `openxdox.snapshot` through
`authoring` -> `workbench`. Autouse applies to every test under `tests/`,
including the scaffold's own `tests/test_leg_shape.py` — 12 setup errors when it
is the only file collected. `collect_ignore` removes files from collection and
cannot remove a fixture, and both files are carved rows this pull request may
not touch.

Scaffold file only: the root `conftest.py`, which carries no manifest row
(RULED OQ-C).

Refs opensoft/openXfactory#656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@brettheap

Copy link
Copy Markdown
Contributor Author

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

CLOSED, superseded — RULED Q-L4 (Brett Heap, 2026-09-10, opensoft/openXfactory#656): leg 1 is RE-CUT as #6 (carve/opendox-code-leg-1-recut) on the amended manifest (openxFactory #889 → 15ebb37d: two extension-point replica rows + the short citations this PR exposed) and the levelled scaffold (#5 → da2391e: dependencies, package install, disclosed collect_ignore). This first cut proved the carve — phase A 123/123, phase B OK, fence proved, 205 carried commits — and its validate red was structural (four causes, all remedied outside the fence). Nothing from this branch is merged; #6 carries an identical commit-A tree (scoped identity proof) and a regenerated commit B.

@brettheap brettheap closed this Sep 10, 2026
brettheap pushed a commit that referenced this pull request Sep 10, 2026
…s; RULED Q-L1/Q-L4)

`opendox_code`'s 62 `moved_with_declared_edit` rows declare 250 lines in the
AMENDED manifest (openxFactory#889, RULED Q-L1), in three classes: 186 `import
rewrites`, 52 `path constants`, 12 `adapter calls`. This commit changes 225 of
those lines and nothing else — 220 rewritten, 5 deleted, across 61 of the 62
rows. One row stays byte-identical and 25 declared lines are left alone, each
for a reason recorded below and enumerated line by line in the pull request: a
declared line is PERMISSION to edit that line, never an instruction to invent
an edit.

APPLIED, mechanically and by the runbook's own rule (§ 5.5,
`ideation_dashboard.X` -> `opendox.X` / `openxdox.X`):
  * `import rewrites`, 174 lines — to `opendox.<module>` where the module is
    one of this leg's own 123 rows, and to `openxdox.<module>` where the
    manifest sends it to `openxdox_code` (`gate_console`, `gate_routes`,
    `generator`, `register`, `kickoff`, `snapshot`, `snapshot_registry`,
    `corpus_root`, `cli_gate`, `serve_gate`, `serve_projection`,
    `doxbench_scope`). A relative spelling whose target travels here is
    already correct and is untouched; a relative spelling whose target lands
    in openXdox becomes `openxdox.X`.
    Inside that count, the three RULED OQ-A neutral modules and the OQ-Q
    corpus-adapter interface become package-internal: `from output_boundary
    import` -> `from .output_boundary import`, and likewise `path_slug`,
    `wire_messages`, `corpus_adapter`.
  * `path constants`, 45 lines — the package directory
    `scripts/ideation_dashboard/` -> `src/opendox/`, in the `Path` segment
    form (`REPO_ROOT / "src" / "opendox" / "web"`) and the string form
    (`"python3 src/opendox/cli.py"`, `web/views/gate.js`'s `CLI`).
  * `adapter calls`, 1 line — `authoring.py:317`'s `from corpus_adapter import
    DocumentId`, which is the interface RULING Q4 gives openDox and which
    arrives here as a declared replica.
  * DELETED, 5 lines — `serve.py:109-111`, the dead `sys.path.insert(0,
    _SCRIPTS_DIR)` shim the runbook names by number (it exists only because
    `scripts/` is not a package, and all three of its lines are declared); and
    `cli.py:104` + `serve.py:1371`, the two imports of `profile_openxfactory`,
    which is `not_moved / deleted_at_carve` and has no post-carve home at all.

THE ELEVEN LINES RULING Q-L1 ADDED, which the first cut (#4) reported as
SHORT CITATIONS it could not express inside the fence and left byte-identical:
  * `tests/test_boundary.py:14` — a BARE `import output_boundary`, rewritten to
    the destination-local `from opendox import output_boundary` the row's own
    amended note names, the replica landing package-internally.
  * the `"scripts"` / `"ideation_dashboard"` CONTINUATION SEGMENTS of four
    multi-line `Path` expressions — `test_doxbench_hash.py:32-33`,
    `test_doxbench_state.py:23-24`, `test_doxbench_view.py:16-17, 291-292` —
    now `/ "src"` and `/ "opendox"`. Their bare `/ "web"` siblings (`:34`,
    `:25`, `:18`, `:293`) need no change once the segments above are right.
  * `test_provider_boundary.py:56` — `PACKAGE = REPO_ROOT / "scripts" /
    "ideation_dashboard"` -> `REPO_ROOT / "src" / "opendox"`, which makes
    `:57`'s derived `WEB = PACKAGE / "web"` correct as written.
  * `test_subcommand_extension.py:43` — `MODULE = REPO_ROOT / "scripts" /
    "subcommand_extension.py"` -> `REPO_ROOT / "src" /
    "subcommand_extension.py"`, the replica's placed path, exactly as that
    row's note directs. Its `:38` bare `import subcommand_extension` stays
    undeclared and needs no edit under that placement.
No settled disposition moved: the first cut's 239 lines keep their EDIT /
DELETE / LEAVE decisions unchanged, and the plan diff is additions only.

LEFT — 25 lines, and why:
  * 11 `adapter calls` — every `doc_health` reach (`serve.py:618`,
    `workbench.py:745, 1406-1408`), the `corpus_adapter_openxfactory` reach
    (`authoring.py:318`), the corpus-shaped `WORKBENCH_DIR` / `ORGANIZE_DIR`
    literals (`workbench.py:82-83`), and `doxbench_scope_types.py:50, 69, 71`'s
    `SCOPE_KINDS`, whose successor #838 is OPEN at the carve — which is why
    that row exists at all, and why it is this commit's one byte-identical row.
    D2's `resolve` is the answer and this leg has no resolver binding to reach
    it through: that is § 3.5's, the BUILD arc (RULED OQ-N). Filing any of them
    as a path constant would ship openxFactory's tree shape as a literal, which
    `corpus-adapter-seam` requirement 4 refuses by name.
  * 7 `import rewrites` — three lines naming a module that lands at NO
    destination (`serve_openxfactory_lanes` twice in `serve.py`,
    `doxbench_contracts` in `serve_wire.py`, `doxbench_status_exemption` in
    `doxbench_packet.py`): there is no package path to rewrite to, and the
    statements cannot go either, because their uses sit on UNDECLARED lines.
    `cli.py:26` and `doxbench_mcp.py:61` are the same dead-shim family as
    `serve.py:109-111`, but their `if` / `sys.path.insert` siblings are
    undeclared, so the block cannot be removed inside the fence; harmless
    here, since they insert `src/`, which this leg's import root already does.
    `test_model_provider_broker.py:1135` is repointed by its own note onto
    "the destination suite's own harness": this leg has none yet, and
    `FORBIDDEN_PORT_MEMBERS` is a 20-name set — writing one is not a carve act.
  * 7 `path constants` — `cli.py:106` and `serve.py:1661` are already
    package-relative (`Path(__file__).resolve().parent / "web"` resolves to
    `src/opendox/web` unchanged). The other five are the `/ "web"` and
    `WEB = PACKAGE / "web"` siblings named above: correct as written once
    Q-L1's newly declared segments are rewritten, and no longer the first
    cut's short citations.

THE TEN COPIES WITH NO PLACEMENT ROW (RULED OQ-A / OQ-C — the manifest declares
what LEAVES, never what a destination assembles), each declared to the arrival
verifier with `--replica-at` so its presence AND its bytes are checkable, and
each byte-identical to `carve_commit`: `output_boundary.py`, `path_slug.py`,
`wire_messages.py`, `corpus_adapter.py` into `src/opendox/`; `hermeticity.py`,
`import_scan.py`, `staging_shapes.py` and `tests/ideation-dashboard/conftest.py`
into `tests/`; and RULING Q-L1's two new § 2.4 extension-point seams,
`route_extension.py` and `subcommand_extension.py`, onto the `src/` IMPORT ROOT
BESIDE the package — `src/route_extension.py` and `src/subcommand_extension.py`,
NOT inside `src/opendox/` — because their three arrived importers
(`src/opendox/serve.py:117`, `src/opendox/cli.py:65`,
`tests/test_subcommand_extension.py:38`) are bare top-level imports on lines no
row declares, so a copy inside the package would need an import rewrite this
manifest does not authorize while a copy on the import root resolves unedited.
That is the placement both new rows RECOMMEND by name, and it mirrors
`scripts/*.py` sitting beside `scripts/ideation_dashboard/` at the source.
Every one is imported BY NAME by an arrived row — measured over the carved
tree, not assumed. The `tests/corpus-adapter/` conformance corpus is NOT
placed: § 3.7's run needs an adapter IMPLEMENTATION this leg does not have yet,
and `test_conformance.py` must be rewritten per destination by design.

`verify-carve-arrival.py --phase B` -> OK: 123 row(s) arrived, 61 digest(s)
verified, 61 declared-edit row(s) within their lines, 1 unapplied; 10 of 10
declared replica(s) byte-identical; 132 file(s) with none undeclared.

Refs opensoft/openXfactory#656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
brettheap added a commit that referenced this pull request Sep 10, 2026
…arve-0 (split-opendox § 3.2, RULED Q-L4) (#6)

Carve leg 1 of split-opendox-two-layer-product (§ 3.2, RULED OQ-H; re-cut under RULED Q-L4): opensoft/openDox-code receives its 123 manifest rows at carve_commit b075fd91dc8fced8e1373825ba80220c33536bae (tag opendox-carve-0), on Brett Heap's standing word "merge leg 1 when green".

History-preserving `git filter-repo` over the rows from a `--mirror` of the public source, rewritten on the named `carve-src` ref and joined to the levelled scaffold with an unrelated-histories merge, per the landed cutover runbook (openxFactory #875 → a970fd9d) and the amended manifest (#889 → 15ebb37d): 207 commits, two roots, original authorship carried. Two content commits: A (8e8983d) places every row byte-identical to the carve commit — `verify-carve-arrival.py --phase A`: OK, 123 rows arrived, 123 digests verified, 124 files, none undeclared (1 scaffold); its tree is identical to the superseded first cut's A (#4, CLOSED) over the carve roots. B (749c926) applies exactly the 250 declared lines over 61 `moved_with_declared_edit` rows (220 edits, 5 deletions, 25 declared-and-lawfully-left) and places the 10 declared replicas, including the two § 2.4 extension-point seams at `src/route_extension.py` and `src/subcommand_extension.py` — `--phase B`: OK, 61 declared-edit rows within their lines, 10 of 10 replicas byte-identical, 132 files, none undeclared; the fence proved (`arrival-undeclared-edit`, exit 2; phase A over the B tree refuses). Census 123 = 61 verbatim / 62 declared-edit. Independent verification: READY FOR LANDING — whole-history path census over the 207 exclusive commits = 146 paths = 123 rows + 10 replicas + 13 scaffold files byte-identical to base (no unfiltered history, no undeclared bytes); three-way digests 123/123 at A; both OK lines and both refusals reproduced; the 13 module-level openXdox reaches confirmed on declared lines with no third failure class; the regenerated 246-line path file matches commit A's recorded sha256; 2/2 review threads resolved; closingIssuesReferences 0.

`validate` is green on the scaffold's shape assertions only (RULED Q-L5 (b′), #7 → fe71247): the carved openDox column reaches openXdox at module level from 13 declared lines across five core files, and the byte-identical `tests/conftest.py` replica's `REPO_ROOT` depth misresolves — both BUILD-arc items (§ 3.5/3.6), recorded on #656; Q-L6 (defer one import) was measured ineffective and withdrawn.

Merged as a merge commit so the carried history arrives intact. Not in this PR: any other leg, the assembly roots' `carved_from`, the openXdox submodule pin.

Refs opensoft/openXfactory#656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants