Skip to content

Carve leg 3: openXdox-code receives its 92 rows at opendox-carve-0 (split-opendox § 3.2) - #5

Merged
brettheap merged 145 commits into
mainfrom
carve/openxdox-code-leg-3
Sep 10, 2026
Merged

brettheap merged 145 commits into
mainfrom
carve/openxdox-code-leg-3

Conversation

@brettheap

@brettheap brettheap commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Refs opensoft/openXfactory#656

Carve leg 3 of split-opendox-two-layer-product (§ 3.2, RULED OQ-H): opensoft/openXdox-code receives its 92 manifest rows at carve_commit b075fd91dc8fced8e1373825ba80220c33536bae (tag opendox-carve-0, a LABEL beside the commit), per docs/opendox-cutover-runbook.md § 5 as landed. The first leg of the openXdox side.

Now COMPLETE: two commits. A 158052bf8906644da9fecfb223bd6adf025ecaad places the 92 rows byte-identically; B a985a22788878afaeaf6e85e9f1259af7b854e62 applies the declared edits and places the declared replicas. Commit A was pushed by one author and re-verified from scratch by the author of B (a fresh clone, an independently regenerated path file and edit plan, no artifact of the first run trusted).

validate IS RED, for reasons disclosed in full below and none of them repairable inside this leg's fence. python -m pytest -q exits 2 with 57 errors in 7.14s, all collection errors in three classes; the dominant runtime class (493 setup errors) is raised inside the PINNED, INSTALLED opendox wheel, not in this tree. Read § "validate, measured" before reading anything else as done.


§ 0 — the launch gates, re-run fresh at commit B's own launch

# Gate Satisfied by Verified at commit B
1 opendox_code (leg 1) landed opensoft/openDox-code #6 (re-cut, RULED Q-L4) → merge ce53b489f8007c37f70da19c90c95ba89156feed gh api repos/opensoft/openDox-code/commits/main → ce53b489…; main's HEAD is that merge commit
2 opendox_spec (leg 2) landed opensoft/openDox-spec #4 → fc67332d5ef203624d5c557f7c53d1f134d6d2ea spec-pin.yaml's commit: is that sha; main has since advanced ONE commit to 41d570e93a0f91edf27066211dd5bf599c720a23 (its README follow-up #5), which is fc67332d's descendant (compare → status: ahead, ahead_by 1) — the pin is a pin, not a moving tip
3 The openDox ROOT PIN landed (Phase 3, runbook § 6) opensoft/openDox #4 → main 49a99df2561bf70e49337c999d79b36836718349 contracts/manifest.yaml carries carved_from: (opensoft/openxFactory @ b075fd91dc8f…, carve_tag: opendox-carve-0, legs: {code: 123, spec: 56}); code-pin.yaml commit: "ce53b489…" — the same commit as openDox-code main's HEAD, they do not disagree
4 import opendox resolvable HERE this repository's #4 → main aef883dd46caaf6a8bced3bf153c15b78a3d8505 ("levelling round 2"), shape (a): opendox @ git+https://github.com/opensoft/openDox-code@ce53b489f8007c37f70da19c90c95ba89156feed + PyYAML>=6.0 + a [test] extra + pip install -e ".[test]" in validate.yml The pinned commit is identical to code-pin.yaml's commit: on opensoft/openDox. Probe results below: import opendox resolves
4b RULED Q-L7 (a) on openxFactory main — the gate commit B itself was held on opensoft/openxFactory #895 → b08b62804b3f8fd06a52aa60d62c2cc89f14ab5f (merged 2026-09-10T14:49:03Z) The manifest and BOTH scripts were read at that commit and nowhere else. session_fixtures.py carries also_replicated_to: [openxdox_code]; the conftest.py replica row carries edits: [{class: path constants, lines: [25]}]; verify-carve-arrival.py --help documents --replica-at admitting "a MOVED row whose also_replicated_to: lists this destination (RULED Q-L7 (a))"
5 Branch currency (strict_required_status_checks_policy: true) — Taken immediately before asking for this to land: git fetch origin main → origin/main = aef883dd46caaf6a8bced3bf153c15b78a3d8505; git merge-base HEAD origin/main = the same sha; git rev-list --count HEAD..origin/main = 0. The branch is already up to date with main; no merge-from-main commit was needed and none was made. gh pr list --repo opensoft/openXdox-code --state open → this pull request alone

The carve — runbook § 5.2–5.5, re-derived rather than inherited

§ 5.2, the control at the carve commit, against a fresh --mirror of the public source:

OK …/docs/opendox-carve-manifest.yaml: 456 row(s) at opensoft/openxFactory@b075fd91dc8f (opendox-carve-0) — 172 moved_verbatim, 146 moved_with_declared_edit, 138 not_moved; 318 digest(s) recomputed; 456 file(s) in the declared surface with none undeclared

§ 5.3, the path file, regenerated FROM the manifest by commit B's author from a fresh clone — two lines per row (the bare source_path to SELECT, source_path==>destination_path to PLACE), sorted by source_path:

  • paths-openxdox_code.txt: 184 lines = 92 × 2
  • sha256 = 9c21426a431a1ba09d23c6fb411b6026a4c0024d859729eef12f8750e99da9e5 — byte-identical to the figure commit A's author recorded, independently regenerated, which is the strongest available check that both runs selected exactly the same 92 rows
  • 0 rows change a basename; every rename is a relocation. One row is an identity rename (scripts/validate-ideation-dashboard-contracts.py → itself)

§ 5.4, the invocation (a raw object id is not a ref, so the carve runs on a NAMED branch):

git clone --mirror https://github.com/opensoft/openxFactory.git leg3-source.git
git -C leg3-source.git branch carve-src b075fd91dc8fced8e1373825ba80220c33536bae
git -C leg3-source.git filter-repo --paths-from-file paths-openxdox_code.txt --refs carve-src
git -C leg3-source.git ls-tree -r --name-only carve-src | wc -l   # 92

§ 5.5, the join: one refspec fetch then git merge --allow-unrelated-histories. main is never rewritten and never force-pushed.

History shape at commit B, re-measured: git log --oneline origin/main..HEAD = 143 commits (141 carried by filter-repo + the A merge + the B commit); git rev-list --max-parents=0 HEAD = two roots, 3f0c11774709baebbe8b31f137f189d4a290be71 "Seed the code leg of openXdox" (this scaffold's own) and c58562e851b5c65b8f9f06d5b0a322c27b25564a "add-ideation-dashboard 2.4: strict validator + fixture corpus" (the carried openxFactory history). Authorship is original throughout — filter-repo rewrites paths, not authors.

Census — recounted at b08b6280, off the AMENDED manifest

measure recounted runbook § 2
rows, destination: openxdox_code 92 92
moved_verbatim / moved_with_declared_edit 9 / 83 9 / 83
declared edit lines on those 83 rows 537 537
… import rewrites / path constants / adapter calls 450 / 73 / 14 450 / 73 / 14
destination roots scripts (1) / src/openxdox (17) / tests (74) scripts, src/openxdox, tests
replicated_at_destination rows in the manifest 20 20
rows also_replicated_to this destination 1 (session_fixtures.py) Q-L7 (a)
replica rows declaring lines 1 (conftest.py, :25) Q-L7 (a)
declared lines this leg carries in total 542 = 537 + 4 (session_fixtures) + 1 (conftest) —

Commit A, re-verified in commit B's own clone

OK …/dest: openxdox_code (opensoft/openXdox-code) at opensoft/openxFactory@b075fd91dc8f (opendox-carve-0), phase A — 92 row(s) arrived, 92 digest(s) verified, 0 declared-edit row(s) within their lines, 0 unapplied; 0 of 0 declared replica(s) verified (byte-identical, or — where the row declares lines — differing only on them); 93 file(s) under scripts, src/openxdox, tests with none undeclared (1 scaffold, 0 replica, 0 created); scaffold admissions checked against aef883dd46ca

exit 0. scaffold admissions checked against aef883dd46ca is the stronger claim — the baseline resolved, so every scaffold admission's BYTES were checked against this repository's own pre-carve main. The one scaffold file under a declared root is tests/test_leg_shape.py.

Independent three-way digest recount, not the verifier's arithmetic: for all 92 rows, sha256(arrived bytes) compared against both sha256(git cat-file blob b075fd91:<source_path>) from the mirror and the manifest's own sha256, with the git mode compared against git_mode on all three sides:

THREE-WAY (arrived == source blob at carve_commit == manifest sha256) + git mode: 92/92

Commit B — a985a22788878afaeaf6e85e9f1259af7b854e62

OK …/dest: openxdox_code (opensoft/openXdox-code) at opensoft/openxFactory@b075fd91dc8f (opendox-carve-0), phase B — 92 row(s) arrived, 9 digest(s) verified, 81 declared-edit row(s) within their lines, 4 unapplied; 5 of 5 declared replica(s) verified (byte-identical, or — where the row declares lines — differing only on them); 97 file(s) under scripts, src/openxdox, tests with none undeclared (1 scaffold, 0 replica, 0 created); scaffold admissions checked against aef883dd46ca

exit 0, on the COMMITTED tree. --json: {"declared_edits_diffed": 81, "declared_edits_unapplied": 4, "replicas_declared": 5, "replicas_verified": 5, "files_walked": 97}.

My own line census, independent of the verifier. Of the 542 declared lines this leg carries, 483 are changed and 59 are left. A declared line is PERMISSION to edit that line, never an instruction to invent an edit (leg 1's own words, and its 25 left lines are the precedent):

class changed left
import rewrites 424 rewritten + 6 deleted 24
path constants 52 21
adapter calls 0 14
the conftest.py replica's :25 1 0

Independent phase-B recount: 9/9 verbatim rows byte-identical; 83/83 declared-edit rows whose changed carve lines are a SUBSET of their declared set (recomputed with my own difflib walk, not the verifier's); git_mode equal on source, manifest and destination for all 92.

import rewrites — resolved per the module's OWN destination row

247 lines → opendox.X, 179 → openxdox.X. The rule is RULED Q-L7 (a)'s own, stated in the amended session_fixtures.py note and applied to every line here: a module's destination-local spelling is the package of the leg the manifest sends that module to. openxdox.X for a module openXdox does not own "would name modules openXdox does not own"; opendox.X is lawful at this leg precisely because openXdox pins openDox (runbook § 5.1, "two pin moves per hop", realized as this repository's #4). Measured at the carve commit, the 406 ideation_dashboard import lines across this leg's rows name modules whose rows go 233 to opendox_code, 180 to openxdox_code, 1 to a stays_openxfactory_adapter row.

A RELATIVE spelling whose target travels here is already correct and is untouched (leg 1's own convention, verified against its landed tree: src/opendox/boundary.py:24 kept from .output_boundary import). A relative spelling whose target goes to the OTHER leg becomes absolute: from .workbench import slug → from opendox.workbench import slug.

Six lines DELETED — the dead sys.path.insert(0, _SCRIPTS_DIR) shims the runbook § 5.5 names by number: serve_gate.py :40-42 and serve_projection.py :47-49, all three lines of each declared. They exist only because scripts/ is not a package and are dead under src/openxdox/.

Six lines SPLIT one-into-two, because one declared line named modules with two different owners. The verifier accepts this (proven by construction — phase B is green with all six in place): a replace of one carve line by two arrived lines touches exactly that one carve line.

row carve line became
src/openxdox/gate_routes.py 70 from opendox import branch_session, doxbench_threads + from . import gate_console, generator
src/openxdox/generator.py 70 from opendox import GENERATOR_VERSION, fixtures + from . import completeness (GENERATOR_VERSION is a name in scripts/ideation_dashboard/__init__.py, an opendox_code row)
tests/test_completeness.py 34 from opendox import authoring + from openxdox import snapshot
tests/test_doxbench_scope.py 17 from opendox import branch_session + from openxdox import gate_console
tests/test_generator.py 14 from opendox import fixtures + from openxdox import generator, snapshot
tests/test_scope_column_split.py 57 from openxdox import doxbench_scope + from opendox import doxbench_scope_types

path constants — 52 applied, 21 left

Applied: the package directory scripts/ideation_dashboard/ → this destination's src/ layout src/openxdox/, in both the Path-segment and the string form, exactly as the class's own note asks. One line takes a depth fix as well as the package rewrite, because both sit on it: tests/test_doxbench_transport.py:74's Path(__file__).resolve().parent.parent.parent reached above the repository once the file arrived one directory shallower, and became .parent.parent.

Nine lines are command-string literals, and they resolve to src/opendox/…, not src/openxdox/… — measured against openDox-code's own LANDED tree rather than guessed: its src/opendox/web/views/gate.js:27 reads const CLI = "python3 src/opendox/cli.py", staging-workbench-model.js:544 export const CREATE_CLI = "python3 src/opendox/cli.py", cli.py:112 "python3 src/opendox/cli.py generate-and-open \n", serve.py:1610 "python3 src/opendox/serve.py \n", and openDox-spec's landed docs/ideation-dashboard-session-runbook.md:566 reads python3 src/opendox/cli.py generate-and-open. These tests assert on strings the openDox column emits, so they take the openDox column's spelling.

Left, with the reason on every line: 5 already correct at the destination's own depth or relativity (gate_console.py:567's parents[2] is the repository root at BOTH depths; test_session_notebook.py:836/:853 are already package-relative via serve_mod.__file__; :877 passes a relative argument); 2 tmp_path / "web" temp copies carrying no source layout; 5 on scripts/validate-ideation-dashboard-contracts.py (below); 4 SHORT CITATIONS whose anchor line is undeclared; and 5 blocked by the numbering finding (below).

The four short citations — leg 1's Q-L1 finding, recurring on this leg's own rows, reported and not papered over:

row declared line why it cannot be applied
tests/test_doxbench_mutation_boundary.py 50 the bare / "web" continuation of EDITOR_JS; its "scripts" (:48) and "ideation_dashboard" (:49) segments are UNDECLARED
tests/test_doxbench_mutation_boundary.py 58 same, for STATE_JS (:56, :57 undeclared)
tests/test_doxbench_save.py 527 "scripts" AND the parent.parent.parent depth sit on :526, undeclared
tests/test_doxbench_save.py 1076 same, on :1075

scripts/validate-ideation-dashboard-contracts.py, all 5 declared lines left. Its destination_path is UNCHANGED, so :114's parents[1] is still the repository root and :909/:1800's repo-relative prefixes (examples/, contracts/schemas/) are still the right names. :115 SCHEMAS_DIR and :116 EXAMPLES_DIR have no destination-local target at all, measured: of the schema and example corpus this validator reads, contracts/schemas goes 3 rows to openxdox_spec, 3 to opendox_spec, 6 stay at openxFactory; examples/ideation-dashboard goes 44 to openxdox_spec, 52 to opendox_spec, 44 stay. None arrives at openXdox-CODE, which pins neither spec leg. RULED OQ-G sent this cross-column subject here; its corpus went to the spec legs. Finding, not a leg edit.

adapter calls — all 14 LEFT, on leg 1's own ruling

Every one of the 14 is a doc_health reach (cli_gate.py:251, completeness.py:81, corpus_root.py:34, 43, gate_console.py:63, 1195, 2047, 2093, gate_routes.py:424, generator.py:66, 67, 68, round_trip.py:43, snapshot_registry.py:85). D2's resolve is the answer and this leg has no resolver binding to reach it through — that is § 3.5, 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. Leg 1 left 11 of its own 12 for exactly this reason and landed.

corpus_root.py:43's SCANNED_ROOTS … {*corpus.GOVERNED_ROOTS, "openspec"} is the runbook's own named example of a corpus-shaped literal, and it is left with the import it depends on.

The full edit table

ir = import rewrites, pc = path constants, ac = adapter calls. Line numbers are the CARVE commit's.

row (destination path) declared class(es) applied deleted left
src/openxdox/cli_gate.py 13 ac, ir 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 74 — 49, 251
src/openxdox/completeness.py 1 ac — — 81
src/openxdox/corpus_root.py 2 ac — — 34, 43
src/openxdox/doxbench_scope.py 2 ir 24, 729 — —
src/openxdox/gate_console.py 8 ac, ir, pc 67, 689, 700 — 63, 567, 1195, 2047, 2093
src/openxdox/gate_routes.py 16 ac, ir 70, 71, 72, 73, 887, 911, 1018, 1019, 1047, 1132, 1227, … — 424, 950, 1046, 3428
src/openxdox/generator.py 4 ac, ir 70 — 66, 67, 68
src/openxdox/openxdox_surface.py 1 ir 42 — —
src/openxdox/register_edit_lane.py 3 ir 41, 42 — 37
src/openxdox/round_trip.py 1 ac — — 43
src/openxdox/serve_gate.py 6 ir 46, 85, 86 40, 41, 42 —
src/openxdox/serve_projection.py 5 ir 53, 54 47, 48, 49 —
src/openxdox/snapshot_registry.py 5 ac, ir 1284, 1285, 1288 — 72, 85
scripts/validate-ideation-dashboard-contracts.py 5 pc — — 114, 115, 116, 909, 1800
tests/session_fixtures.py 4 ir 43, 390, 413, 440 — —
tests/test_aggregation_register_instance.py 1 ir 18 — —
tests/test_authoring_agent.py 3 ir 47, 48, 52 — —
tests/test_branch_session.py 11 ir 27, 28, 29, 495, 496, 874, 906, 907, 908, 1085, 1275 — —
tests/test_canvas.py 4 ir, pc 41, 42, 43, 45 — —
tests/test_completeness.py 5 ir, pc 34, 35, 36 — 506, 507
tests/test_create_document_cli.py 3 ir 25, 26, 27 — —
tests/test_create_project.py 4 ir 28, 29, 30 — 26
tests/test_doxbench_abstract_envelope.py 5 ir 36, 37, 42, 48, 49 — —
tests/test_doxbench_abstract_route.py 12 ir, pc 58, 59, 60, 61, 62, 63, 64, 65, 70, 71, 73, … — —
tests/test_doxbench_abstract_store.py 3 ir 42, 43, 44 — —
tests/test_doxbench_blank_reason.py 6 ir, pc 55, 56, 57, 60, 699 — 683
tests/test_doxbench_bridge.py 10 ir 30, 31, 32, 33, 293, 437, 1207, 1208 — 177, 420
tests/test_doxbench_knowledge_service.py 19 ir 31, 32, 33, 34, 35, 127, 128, 928, 1046, 1126 — 37, 121, 157, 714, 829, 864, 881, 1099, 1112
tests/test_doxbench_mutation_boundary.py 12 ir, pc 63, 66, 487, 488, 489, 490, 491, 492, 493, 496 — 50, 58
tests/test_doxbench_packet.py 5 ir 36, 37, 38, 39, 292 — —
tests/test_doxbench_request_handling.py 7 ir, pc 46, 47, 49, 645, 919, 969, 992 — —
tests/test_doxbench_save.py 10 ir, pc 40, 41, 42, 43, 44, 45, 46, 1110 — 527, 1076
tests/test_doxbench_scope.py 3 ir, pc 17, 18, 29 — —
tests/test_doxbench_share.py 9 ir 36, 37, 38, 39, 40, 41, 42, 43, 44 — —
tests/test_doxbench_telemetry.py 2 ir 19, 20 — —
tests/test_doxbench_thread_wiring.py 37 ir 39, 40, 41, 42, 43, 541, 546, 646, 651, 698, 998, … — 47
tests/test_doxbench_threads.py 4 ir 24, 25, 26, 27 — —
tests/test_doxbench_transport.py 4 ir, pc 71, 72, 74 — 562
tests/test_doxbench_turns.py 10 ir, pc 41, 48, 49, 50, 57, 101, 632, 3137, 3139, 3147 — —
tests/test_doxchat_model_intake.py 9 ir, pc 50, 51, 52, 53, 54, 55, 56, 59, 1125 — —
tests/test_edit_action.py 3 ir, pc 26, 27, 29 — —
tests/test_edit_project.py 4 ir 28, 29, 30 — 26
tests/test_explorer_viewer.py 3 ir, pc 43, 44, 46 — —
tests/test_gate_console.py 12 ir, pc 48, 49, 50, 51, 52, 55, 58 — 870, 1627, 1785, 1786, 1810
tests/test_gate_failure_diagnostics.py 6 ir, pc 48, 49, 50, 51, 52, 54 — —
tests/test_gateway_provenance.py 9 ir, pc 67, 68, 69, 70, 71, 72, 73, 74, 80 — —
tests/test_generated_at_anchor.py 2 ir 43, 44 — —
tests/test_generator.py 4 ir 14, 15, 16, 17 — —
tests/test_grouping.py 2 ir, pc 37, 39 — —
tests/test_header_value_readers.py 2 ir 18, 19 — —
tests/test_hosted_actor.py 3 ir, pc 40, 41, 43 — —
tests/test_kickoff.py 4 ir 30, 31, 32, 33 — —
tests/test_notebook_action.py 5 ir, pc 38, 39, 40, 41, 43 — —
tests/test_project_aggregates.py 3 ir, pc 26, 28, 376 — —
tests/test_readiness_gate.py 7 ir 41, 42, 43, 44, 45, 48, 236 — —
tests/test_register.py 1 ir 12 — —
tests/test_register_edit_lane.py 4 ir 26, 27, 28 — 24
tests/test_renderer.py 6 ir, pc 35, 36, 37, 39, 1076, 1077 — —
tests/test_repo_root_guard.py 7 ir, pc 49, 50, 51, 52, 53, 173, 315 — —
tests/test_repo_selector.py 4 ir, pc 40, 41, 42, 44 — —
tests/test_round_trip.py 4 ir, pc 32, 33, 36 — 728
tests/test_scope_column_split.py 1 ir 57 — —
tests/test_session_commits.py 5 ir 32, 33, 34, 35, 36 — —
tests/test_session_confinement.py 16 ir, pc 58, 59, 60, 61, 62, 63, 64, 65, 66, 72, 282, … — 505
tests/test_session_document_ownership.py 8 ir, pc 47, 48, 49, 50, 51, 52, 62, 390 — —
tests/test_session_gates.py 12 ir, pc 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, … — —
tests/test_session_lifecycle.py 17 ir 59, 60, 61, 62, 63, 64, 65, 630, 670, 705, 728, … — —
tests/test_session_notebook.py 11 ir, pc 44, 45, 46, 47, 48, 49, 50, 51 — 836, 853, 877
tests/test_session_records.py 7 ir 43, 44, 45, 46, 47, 48, 377 — —
tests/test_session_runbook.py 12 ir, pc 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 121, … — —
tests/test_session_snapshot.py 10 ir, pc 59, 60, 61, 62, 63, 64, 65, 70, 877, 896 — —
tests/test_session_transaction.py 10 ir 60, 61, 62, 63, 64, 65, 66, 67, 68, 1137 — —
tests/test_session_verbs.py 12 ir, pc 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 101, … — —
tests/test_snapshot.py 2 ir 13, 14 — —
tests/test_snapshot_determinism.py 3 ir 16, 17, 18 — —
tests/test_snapshot_registry.py 2 ir 38, 39 — —
tests/test_snapshot_validation_launch.py 2 ir 46, 47 — —
tests/test_source_dot_directories.py 4 ir, pc 37, 38, 39, 43 — —
tests/test_staging_workbench.py 19 ir, pc 46, 47, 49, 631, 766, 769, 881, 1004, 1510, 1546, 1547, … — —
tests/test_trust_gaps.py 7 ir 40, 41, 42, 43, 44, 45, 46 — —
tests/test_wheel_model.py 3 ir, pc 75, 76, 78 — —
tests/test_wheel_verbs_cli.py 4 ir 20, 21, 22, 23 — —
tests/tools/playwright-smoke.py 4 ir, pc 227, 228, 229, 282 — —
tests/test_validate_ideation_dashboard_contracts.py 1 ir 367 — —

Four rows are byte-identical despite declaring lines — declared_edits_unapplied: 4, lawful and counted (runbook § 2.1: read that figure before reading the leg as done): src/openxdox/completeness.py, src/openxdox/corpus_root.py, src/openxdox/round_trip.py (all adapter calls only) and scripts/validate-ideation-dashboard-contracts.py (5 path constants, all reasoned above).

The replicas — FIVE placed at commit B, a SIXTH at commit B′ (RULED Q-L9 (a), below)

RULED OQ-C: a replicated_at_destination row carries no destination and no digest, so placement is the leg's and is declared with --replica-at, which makes the copy's presence AND its bytes checkable. My own recount, independent of the verifier: 3 byte-identical + 2 differing only on their declared lines = 5/5.

source at openxFactory placed here declared lines why there, MEASURED on the arrived tree
scripts/route_extension.py src/route_extension.py — (byte-identical, sha256 a39a6489…, matching the figure its own row records) Its two arrived importers are src/openxdox/serve_gate.py:44 and src/openxdox/serve_projection.py:51, both BARE top-level import route_extension on lines no row declares (serve_gate declares 40,41,42,46,85,86; serve_projection 47,48,49,53,54). A copy inside src/openxdox/ would need an import rewrite the manifest does not authorize. Its row RECOMMENDS this path by name, and runbook § 5.5 says "ON the src/ import root and BESIDE the package … never inside src/<pkg>/". Proven, not assumed: in the venv installed as validate.yml installs it, import route_extension → <repo>/src/route_extension.py
tests/ideation-dashboard/conftest.py tests/conftest.py :25 — REPO_ROOT = HERE.parent.parent → REPO_ROOT = HERE.parent RULED Q-L7 (a), and runbook § 5.6 names this placement + this edit for both -code legs. 64 arrived test modules do from conftest import …. The replica lands one directory shallower than its source, so :25 resolved OUTSIDE the repository unedited. :24's TESTS_ROOT = HERE.parent is deliberately NOT declared and is left
tests/ideation-dashboard/session_fixtures.py tests/session_fixtures.py :43, :390, :413, :440 — ideation_dashboard.session_pr / .cli ×2 / .actor_identity → opendox.X RULED Q-L7 (a): the row MOVES to opendox_code and also_replicated_to: [openxdox_code]. --replica-at, never --allow-created — the carve ships the file. 28 references across the arrived tree, and tests/conftest.py:106 imports six names from it unconditionally at module level, which is the gap Q-L7 closed. opendox.X and not openxdox.X: all three modules are opendox_code rows
tests/ideation-dashboard/staging_shapes.py tests/staging_shapes.py — (byte-identical) Imported by name by tests/test_session_document_ownership.py:45 and tests/test_session_gates.py:64 (both arrived rows), and by tests/conftest.py:94. Its row's own evidence names test_session_gates.py → openXdox
tests/hermeticity.py tests/hermeticity.py — (byte-identical) tests/conftest.py:29 imports its autouse fixtures unconditionally at module level. Same depth as at the source. Its two openDox reaches (:479-480) sit behind find_spec guards

The corpus-adapter conformance family is deliberately NOT placed — and that is a FINDING, stated plainly

The brief this author worked from expected 14 --replica-at copies plus tests/corpus-adapter/test_conformance.py via --allow-created. Re-checked against the amended manifest and this leg's own arrived bytes, nine of those fourteen cannot lawfully be placed here, and the rewrite has nothing to point at. Measured:

  • No row in the manifest places a corpus-adapter IMPLEMENTATION at openxdox_code. All scripts/corpus_adapter_openxfactory/** files are not_moved / stays_openxfactory_adapter; scripts/corpus_adapter.py (the INTERFACE) is a replica whose own evidence gives it to openDox (RULING Q4); and none of this leg's 92 rows implements the Protocol — src/openxdox/cli_gate.py:12 mentions corpus_adapter.CorpusAdapter in PROSE only. The tasks.md § 3.7 phrase the rows quote is "openXdox's adapter implementation" — a thing that does not exist yet.
  • tests/corpus-adapter/test_interface_closure.py:34 does from corpus_adapter import OPERATIONS, DESIGN_NAMES, CorpusAdapter and :36 reads REPO_ROOT / "scripts" / "corpus_adapter_openxfactory"; test_no_home_vocabulary.py:48/:50/:51 does the same plus from import_scan import string_literals. Both are replica rows with NO declared lines, so they must arrive byte-identical and this leg cannot repoint them. Placing them would add two guaranteed collection errors of my own making.
  • tests/import_scan.py is needed at this destination by those two files and by nothing else — measured: exactly one PROSE mention across all 92 arrived rows, zero imports.
  • Leg 1 reached the same conclusion on the same rows and landed: "The tests/corpus-adapter/ conformance corpus (ten further replica rows) is deliberately NOT placed: § 3.7's run needs an adapter IMPLEMENTATION this leg does not have, and test_conformance.py must be rewritten per destination by design." Both -code legs now agree.

So this leg places 6 replicas and declares 6 — 5 at commit B, plus scripts/subcommand_extension.py at commit B′ under RULED Q-L9 (a) (see "Commit B′" below) — and the ten corpus-adapter rows plus import_scan stay owed to the phase that builds openXdox's adapter (§ 4.1 / the BUILD arc). Also NOT placed, each on its own row's text and confirmed against the arrived tree: scripts/corpus_adapter.py, scripts/output_boundary.py, scripts/path_slug.py, scripts/wire_messages.py (the last three: zero references of any kind in the arrived tree).

The fence, proven rather than asserted

An undeclared edit refuses. On a throwaway copy, src/openxdox/serve_gate.py's carve line 44 — the bare import route_extension, undeclared — was perturbed to from openxdox import route_extension. Phase B, exit 2:

FAIL …/probe: arrival-undeclared-edit — src/openxdox/serve_gate.py was edited at carve-commit line(s) [44] which the row for scripts/ideation_dashboard/serve_gate.py does not declare; it declares [40, 41, 42, 46, 85, 86] under class(es) import rewrites. 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).

Phase A over the phase-B tree refuses too, which is what makes the two-commit shape meaningful — exit 2:

FAIL …/dest: arrival-digest-mismatch — src/openxdox/cli_gate.py has sha256 2d94a64bc95b4f8869e8104a1b61b6e6b51c4c570fd6a6158d7d2bbd26907d48 where the row for scripts/ideation_dashboard/cli_gate.py records a6dd01f57f66db72c85f755cd610f925e87a15df9e4cf2dc938884fb909833c1 and PHASE A requires the carve commit's bytes exactly. Commit A places the blob byte-identical; the declared edits are commit B

The fence also caught a REAL error in this author's first pass, which is why it is worth having: see finding 5.

§ 3.1 import probes, verbatim

In a fresh venv installed exactly as validate.yml installs it (python -m pip install -e ".[test]", which resolved and BUILT the opendox git dependency at ce53b489):

$ python3 -c "import openxdox"
openxdox -> _NamespacePath(['<repo>/src/openxdox'])          # resolves

$ python3 -c "import opendox"
opendox  -> <venv>/lib/python3.12/site-packages/opendox/__init__.py   # RESOLVES

$ python3 -c "import route_extension"
route_extension -> <repo>/src/route_extension.py             # the replica placement, proven

$ python3 -c "import openxdox.gate_console"
  File "<repo>/src/openxdox/gate_console.py", line 63, in <module>
    from doc_health import corpus
ModuleNotFoundError: No module named 'doc_health'

$ python3 -c "import opendox.cli"
    import subcommand_extension  # noqa: E402
ModuleNotFoundError: No module named 'subcommand_extension'

import opendox became importable through gate 4 — this repository's own levelling round 2 (#4 → aef883dd), a PEP 508 direct reference pinned to openDox-code's merge commit, the same commit opensoft/openDox's code-pin.yaml names. The last two probes are findings 1 and 3 below, not the dependency failing to resolve.

grep -rn "import opendox\|from opendox" src scripts tests → 249 sites, every one of them either an applied import rewrites line or a lazy in-function import on such a line. A forward openxdox → opendox import is the INTENDED end-state direction (runbook § 5.1, design D12), not a red flag.

§ 3.2 pre-flight — all four checks, plus four findings the brief did not anticipate

1. No-row imports — doc_health, and three smaller classes

what sites declared? consequence
doc_health (openxFactory's own corpus machinery, stays at openxFactory, on no row at any destination, not a package on PyPI) 25 13 of them are the declared adapter calls lines in src/openxdox/; 12 are UNDECLARED, all in arrived test modules (test_completeness.py:33, test_doxbench_packet.py:586/610/611/635, test_gate_console.py:47/1881/2176, test_header_value_readers.py:17, test_kickoff.py:335, test_repo_root_guard.py:48, test_round_trip.py:31) 48 of the 57 collection errors
test_gate_routes, test_doxbench_routes, test_doxbench_model — sibling test modules that are not_moved / stays_openxfactory_adapter and arrive at NO destination 16 declared import rewrites lines declared, but there is no destination-local target to rewrite TO, so all 16 are LEFT 3 are module-level (test_create_project.py:26, test_edit_project.py:26, test_register_edit_lane.py:24) → 3 collection errors; the other 13 are in-function
ideation_dashboard imports on lines NO row declares 2 — test_gate_failure_diagnostics.py:209 (from ideation_dashboard.workbench import slug) and test_session_transaction.py:296 (from ideation_dashboard import session_git as sg); both name opendox_code modules UNDECLARED in-function; latent, not a collection error
session_fixtures — the finding the brief flagged as this leg's most severe 28 CLOSED by RULED Q-L7 (a) tests/conftest.py imports and collects fine; pytest --collect-only shows no conftest.py import failure

pytest --collect-only tests/ on the commit-A tree was run FIRST, as the brief asks, before anything was touched. The Q-L5-class failure the brief predicted at tests/conftest.py import time did not occur: the amendment landed, and the replica resolves.

2. Undeclared third-party imports

name sites in pyproject.toml?
yaml 42 (30 module-level) yes — PyYAML>=6.0
pytest 70 yes — pytest>=8,<9 in [test]
jsonschema 3 — scripts/validate-ideation-dashboard-contracts.py:107, src/openxdox/gate_console.py:563, tests/test_doxchat_model_intake.py:1505 NO
referencing 2 — scripts/validate-ideation-dashboard-contracts.py:108, :109 NO
playwright 2 — tests/tools/playwright-smoke.py:116, :123 NO

None of the five undeclared sites breaks anything TODAY: the validator's three sit inside a try: … except ImportError: print("ERROR jsonschema>=4.18 and referencing are required"); sys.exit(2) block, gate_console.py:563 and the two others are in-function, and playwright-smoke.py is not a pytest-collected name. Round 2's own ast walk (recorded in pyproject.toml) found only yaml because it scoped to module-level bodies under src/openxdox/ + tests/ and excluded scripts/validate-ideation-dashboard-contracts.py by design — the census above extends that walk to function bodies and to the scripts/ root. Recorded for a levelling round, not repaired here: pyproject.toml is a scaffold file.

3. Autouse fixtures reaching cross-column modules — YES, and this is why validate is red

The Q-L5 shape, on this leg's side, with the cause inside the pinned wheel:

tests/conftest.py:106            from session_fixtures import (declared_gate_principals, declared_human_console, …)
tests/session_fixtures.py:413    @pytest.fixture(autouse=True) def declared_human_console(...):  from opendox import cli as cli_mod
<venv>/site-packages/opendox/cli.py:65                                    import subcommand_extension
                                 ModuleNotFoundError: No module named 'subcommand_extension'

The declared session_fixtures.py rewrite is CORRECT (opendox.cli is exactly what RULED Q-L7 (a) specifies). What is missing is the module: openDox-code's built wheel does not ship the two RULED Q-L1 top-level extension-point seams. Its pyproject.toml has [tool.setuptools.packages.find] where = ["src"], which discovers PACKAGES; src/route_extension.py and src/subcommand_extension.py are top-level MODULES beside the package and need py-modules. Proven in the installed venv:

route_extension      -> <repo>/src/route_extension.py     # resolves only because THIS leg placed its own copy
subcommand_extension -> None
output_boundary      -> None      # (leg 1 placed it INSIDE src/opendox/, so `opendox.output_boundary` is fine)

So any consumer that pins opendox and imports opendox.cli or opendox.serve gets this error. 493 of the 615 setup errors trace here. It is not repairable in this leg: the file is another repository's scaffold. Recommended remedy shape (a levelling round on opensoft/openDox-code, on whoever's word): add py-modules = ["route_extension", "subcommand_extension"] to its [tool.setuptools], or place the two seams inside src/opendox/ and declare the import rewrite — the second is a manifest question, since RULED Q-L1's rows recommend the import-root placement by name.

4. openxdox modules importing opendox — EXPECTED, and present

249 sites, above. Not a red flag: the pin direction is openXdox → openDox by design.

5. NEW FINDING — the two halves of the floor number lines differently

scripts/validate-carve-manifest.py:1172 bounds a declared line with content.count(b"\n"). scripts/verify-carve-arrival.py:779 splits the same blob with str.splitlines(), which also breaks on U+2028, U+2029, \v, \f, \x1c–\x1e and \x85. Two of this leg's 92 rows carry U+2028 (LINE SEPARATOR), so for lines after it the two numberings disagree and the manifest's numbers are the VALIDATOR's:

row U+2028 at (\n numbering) \n lines / splitlines() lines declared lines affected
tests/ideation-dashboard/test_gate_console.py 795, 802 2364 / 2367 :870, :1810 (import rewrites), :1627, :1785, :1786 (path constants)
tests/ideation-dashboard/test_round_trip.py 113, 115, 507, 511 734 / 738 :728 (path constants)

At the manifest's :870 sits exactly from ideation_dashboard import cli; under the verifier's numbering :870 is _fragment(root).parent.mkdir(parents=True, exist_ok=True). So the intended edits cannot be expressed: applying them refuses (arrival-undeclared-edit naming [873, 1630, 1788, 1789, 1813], exit 2 — the verifier caught this author's first pass, which had used \n indexing), and editing at the verifier's own line would change a statement no class describes. All 6 are therefore LEFT and counted in the 59.

Neither script is wrong on its own terms and neither refuses; the mismatch is silent, which is what makes it worth a record. Recommended remedy shape, for whoever rules it: make the arrival verifier's split agree with the validator's count (splitlines() → a \n-only split), which moves no manifest row; the alternative — re-citing these 6 lines in splitlines() numbering — would make the manifest disagree with its own validator. This lane does not author the fix (openxFactory is not ours to write).

6. NEW FINDING — 7 undeclared repository-root depth lines, 3 of them on moved_verbatim rows

Exactly the shape RULED Q-L7 (a) fixed for the conftest.py replica, recurring on this leg's OWN rows. A file arriving at tests/X.py from tests/ideation-dashboard/X.py is one directory shallower, so a self-computed root is one level too high:

row line text declared?
tests/test_project_action_contracts.py 17 ROOT = Path(__file__).resolve().parents[2] no — moved_verbatim, declares nothing at all
tests/test_project_schema_election.py 27 same no — moved_verbatim
tests/test_wheel_action_contracts.py 12 same no — moved_verbatim
tests/test_validate_ideation_dashboard_contracts.py 28 same no
tests/test_doxbench_share.py 46 REPO_ROOT = Path(__file__).resolve().parents[2] no
tests/test_doxbench_save.py 526, 1075 (Path(__file__).resolve().parent.parent.parent / "scripts" no (the short-citation pair)

src/openxdox/gate_console.py:567 and tests/test_doxbench_transport.py:74 are the only two depth lines that ARE declared; :567 needs no change and :74 was applied. This class produces 71 FileNotFoundErrors in the unnarrowed run, all reading <parent-of-repository>/scripts/validate-ideation-dashboard-contracts.py or <parent-of-repository>/contracts/schemas/…. Recommended remedy shape: a manifest amendment declaring these 7 lines, on RULED Q-L7 (a)'s own precedent (which had to extend the grammar to declare a line on a row; here three of the rows would additionally have to gain an edits: block, changing their disposition from moved_verbatim to moved_with_declared_edit). Not authored here.

7. NEW FINDING — 19 undeclared scripts/ideation_dashboard path reaches in CODE

Leg 1 reported 11 such reaches over 9 of its rows; this leg has 19 over 13 of its 92 rows (plus 6 in prose, plus the 3 that the numbering finding blocks). Examples: test_doxbench_knowledge_service.py:89, 91, 172, 191, test_doxbench_turns.py:103, test_repo_selector.py:46, test_scope_column_split.py:59, test_doxbench_threads.py:31, 635. The path constants class declares where that layout appears in code; these lines were never declared on any row. Same family as leg 1's finding, and it belongs to a later declared-line act, not to a leg that would have to break the floor to reach it.

8. NEW FINDING (Copilot's round, accepted) — a BUILT WHEEL of either -code leg omits the RULED Q-L1 seams

Copilot found this on commit B and it is correct; verified here by building an actual wheel rather than by reading the metadata:

$ python -m build --wheel .
Successfully built openxdox-0.0.0-py3-none-any.whl
  entries: 22        openxdox/ modules: 17
  route_extension.py present: False        top-level .py entries: []

[tool.setuptools.packages.find] where = ["src"] discovers PACKAGES; src/route_extension.py is a top-level MODULE beside the package and needs py-modules. This leg's own validate does not see it, because the workflow installs -e .[test] and an editable install plus pythonpath = ["src"] puts src/ itself on sys.path — which is why the § 3.1 probe (import route_extension -> <repo>/src/route_extension.py) is true of the checkout and NOT of a distribution.

It is symmetric, and that is what makes it load-bearing rather than cosmetic: the same shape in openDox-code's pyproject.toml is finding 3 — the cause of this pull request's red. Recommended remedy shape: py-modules = ["route_extension"] here and py-modules = ["route_extension", "subcommand_extension"] at openDox-code, each in a levelling round; the alternative (moving the seams into src/<pkg>/) is a MANIFEST question, because RULED Q-L1's rows recommend the import-root placement by name and forbid the import rewrite a package-internal copy would need. Not authored here — pyproject.toml is a scaffold file and both import route_extension lines (serve_gate.py carve :44, serve_projection.py carve :51) are undeclared.

validate, measured

The required check runs pip install -e ".[test]" then python -m pytest -q (no narrowing, no collect_ignore, testpaths = ["tests"]). Run in a fresh venv installed exactly that way, on this branch's tree:

$ python -m pytest -q
!!!!!!!!!!!!!!!!!!! Interrupted: 57 errors during collection !!!!!!!!!!!!!!!!!!!
57 errors in 7.14s
exit=2

RED. Collection is interrupted, so nothing runs. The 57 collection errors are exactly three classes, all named above and all outside this leg's fence:

# cause errors
1 ModuleNotFoundError: No module named 'doc_health' — 12 UNDECLARED module-level reaches in arrived test modules, plus the declared-and-LEFT adapter calls chain through src/openxdox/ 48
2 ModuleNotFoundError: No module named 'subcommand_extension' — raised inside <venv>/site-packages/opendox/cli.py:65; the pinned wheel omits the two Q-L1 seams (finding 3) 6
3 ModuleNotFoundError: No module named 'test_gate_routes' — a stays_openxfactory_adapter sibling test module, imported at module level on 3 declared lines with no destination-local target 3

CI confirms the figure, not just this author's venv: run 34494651029 on a985a22 → Interrupted: 57 errors during collection / 57 errors in 9.67s / Process completed with exit code 2. For the record, validate was ALSO red at commit A, with a strictly LARGER set — run 34483734593 on 158052bf → Interrupted: 67 errors during collection, including No module named 'session_fixtures' and No module named 'ideation_dashboard'. Commit B removes 10 of those 67 (every session_fixtures and ideation_dashboard collection error) and introduces none.

With --continue-on-collection-errors, so the full picture is on the record rather than discovered later: 4 skipped, 615 errors, 0 passed, 0 failed — 493 × subcommand_extension (finding 3), 67 + 4 × FileNotFoundError above the repository root (finding 6), 48 × doc_health, 3 × test_gate_routes. 562 tests collected before the interrupt.

tests/test_leg_shape.py — the scaffold's own suite, which passed at commit A — now reports 12 errors, every one ModuleNotFoundError: No module named 'subcommand_extension' at setup: it lives under tests/, so the arrived tests/conftest.py's autouse chain now applies to it. That is finding 3 reaching the scaffold suite, not a change to the scaffold.

Nothing here is patched around. No collect_ignore was added, pyproject.toml and .github/workflows/validate.yml and the root conftest.py are untouched, no test is skipped or xfailed, and no replica is edited outside its declared line. Per the brief and § 4: an anticipated, disclosed red is reported, not hidden. Leg 1's own precedent for the same situation was RULED Q-L5 (b′) — a levelling round narrowing the required check to pytest -q tests/test_leg_shape.py --noconftest until the BUILD arc inverts the dependency — and openDox-code#7 landed exactly that. The equivalent act for this leg is a levelling round on someone else's word, not a leg edit, and this pull request does not make it.

Copilot's round

Round one — six threads on commit A, all replied and all resolved

Every disposition was measured against the tree and the manifest before the reply was written.

thread class disposition
scripts/validate-ideation-dashboard-contracts.py:112 — the import-time sys.exit(2) aborts the vidc fixture because jsonschema/referencing are not in the leg's declared install FACTUAL — accepted as a FINDING It IS pre-flight finding 2, measured before the review was read. Not repaired here for two reasons, both stated in the reply: pyproject.toml is a levelling file off-limits to a leg, and :100-112 are on no declared line (this row declares path constants at :114, :115, :116, :909, :1800 only), so the edit would refuse. Remedy shape named: a levelling round adding jsonschema>=4.18 + referencing
src/openxdox/generator.py:72 — doc_health absent, and no src/openxdox/fixtures.py or __init__.py defining GENERATOR_VERSION half STALE, half FINDING STALE: commit B applied the row's one declared import rewrites line (:70), and both openDox names resolve in the pinned wheel — opendox.GENERATOR_VERSION == 'ideation-dashboard-generator/0.1.0', opendox/fixtures.py present. STANDS: doc_health is finding 1 / the 14 LEFT adapter calls
src/openxdox/record_binding.py:191 — symlink resolved before the containment check OUT OF FENCE moved_verbatim row: ZERO declared lines, byte-identical at both phases. Identical in openxFactory's own tree today; neither introduced nor widened here. Right home named: openxFactory, or the BUILD arc
src/openxdox/register_edit_lane.py — module-level imports still name the pre-carve package STALE Fixed by commit B: :41/:42 now read from openxdox.gate_console import … / from openxdox.kickoff import (. :37's partial shim is LEFT with its reason (siblings :38-39 undeclared)
src/openxdox/snapshot_registry.py:423 — dot-directory policy not applied to the resolved path OUT OF FENCE :423 is on no declared line (row declares :72, :1284, :1285, :1288 + :85). Byte-for-byte openxFactory's own behaviour; the regression test asked for would itself be a created file with no row
src/openxdox/snapshot_registry.py:810 — "the literal ****** is sent as the credential" MISREAD — not a finding Does not hold on the bytes: grep '\*\*\*\*\*\*' over the module and its test returns zero hits. :807-810 reads token = os.environ.get(self.token_env) and sends f"Bearer {token}"; tests/test_snapshot_registry.py:535 asserts the REAL header, "Bearer read-only-secret". The requested change is already the code

Round two — nine threads on commit B, all replied and all resolved

thread class disposition
src/openxdox/serve_gate.py:41 and src/openxdox/serve_projection.py:48 — route_extension.py is at the un-packaged top level of src/, so a built wheel omits it FACTUAL — ACCEPTED Finding 8 above. Verified by building a wheel: route_extension.py present: False. Symmetric with finding 3, which is the cause of the red. Remedy shape named; not authored here (pyproject.toml is scaffold, and both import lines are undeclared)
src/openxdox/snapshot_registry.py:85 — the top-level doc_health import fails and blocks the registry ACCEPTED Pre-flight finding 1, measured before the review was read. :85 is one of the 14 declared adapter calls, all deliberately LEFT (RULED OQ-N; leg 1's own precedent). 48 of the 57 collection errors
src/openxdox/register_edit_lane.py:50 — the validator is anchored to a tree with no contracts/ OUT OF FENCE on the line; SUBSTANCE already recorded :50 is undeclared (row declares :37, :41, :42). The substance is the SCHEMAS_DIR/EXAMPLES_DIR finding: the schema and example corpus arrives at openXdox-spec and openDox-spec, never at openXdox-code, which pins neither. § 4.1's act
src/openxdox/snapshot.py:69 — the validator lookup never probes this leg's own scripts/ OUT OF FENCE moved_verbatim row: zero declared lines, byte-identical at both phases. Noted in the reply that the carve SHARPENS this reading (this leg newly has its own root validator, the one scripts/-rooted row of the 92) without causing it
src/openxdox/doxbench_scope.py:125, snapshot_registry.py:414 — the hidden-file allowlist admits any .yaml/.yml/.md/.json OUT OF FENCE Both lines undeclared (doxbench_scope declares :24, :729; snapshot_registry :72, :85, :1284, :1285, :1288). Byte-for-byte openxFactory's own behaviour
src/openxdox/snapshot_registry.py:515 — read helpers iterate the dictionaries without the RLock OUT OF FENCE Undeclared, and the fix would touch several more undeclared lines
src/openxdox/register_edit_lane.py:286 — a failed git push leaves the descriptor dispatched with the register already modified OUT OF FENCE :286 undeclared

Six of the nine are pre-existing properties of openxFactory's own code that the carve copies verbatim or on undeclared lines; each reply says so, names openxFactory's own copy or the BUILD arc as the right home, and puts the finding on the record rather than letting it close with the thread. 15 threads across both rounds, 15 replied, 15 resolved, 0 unresolved.

The other two bots, disclosed rather than left for a reader to find

  • Sourcery posted a COMMENTED review on each head (13:36Z on A, 15:21Z on B) and opened no inline thread; its own check is SKIPPED with "The GitHub API does not allow us to fetch diffs exceeding 20000 lines" — a carve leg's diff is 2,374 insertions over 84 files on top of 92 arriving rows, so this is the diff size, not the content.
  • SonarCloud Code Analysis: FAILURE, Quality Gate failed — E Security Rating on New Code (required ≥ A) and C Reliability. It fails identically on commit A (placement only, byte-identical blobs), which is the point: Sonar reads 92 files of openxFactory's existing code as this repository's NEW code. Every issue it can be raising is on a carve blob or an undeclared line, the same fence the six out-of-fence Copilot threads sit behind. It is ADVISORY, not required: the branch ruleset's required_status_checks is exactly ["validate"] with strict: true.

For completeness on the ruleset, since it bears on how this lands: require_code_owner_review: true, required_approving_review_count: 0, require_extra_approval_for_unattributed_changes: true, and allowed_merge_methods includes merge. gh opens pull requests as brettheap, so the code-owner requirement cannot clear on his own click — admin merge with a recorded bypass actor is the standing pattern (runbook § 12).

NOT DONE in this pull request

No other leg. No carved_from, no pin, no gitlink, no tag anywhere. No manifest edit and no validator edit (both are openxFactory's, which this lane may not write). No manifest AMENDMENT for findings 5, 6, 7 or 8 — the shapes are recommended above and the act is someone else's, on Brett's word. No src/openxdox/openxfactory_surface.py — the runbook names it as this destination's eventual created file but is explicit that it "is nobody's task but § 4.1's". No pyproject.toml, validate.yml or root conftest.py change. No collect_ignore, no skip, no xfail. openxFactory is untouched: the carve COPIES, and the shed is Phase 5.

Merge-from-main (round 3 arrives on the leg)

Why: GitHub's pull_request trigger runs the workflow file at the PR HEAD, not at a hypothetical merge commit. As main moved past this leg with round 3 (opensoft/openXdox-code #6 → 3487e476d7823a8be6fb2ca62dc949bd830bf1a3, narrowing validate to tests/test_leg_shape.py --noconftest and re-pinning opendox to openDox-code 8e9ffa62), this leg's own validate re-runs kept executing the OLD, unnarrowed python -m pytest -q against the OLD ce53b489 pin — 57 collection errors, none of them this leg's own content.

The fix: a merge commit, no rebase, no force-push — fec4e25ade41b639fe846a8d2865637958873d26 — merges origin/main (3487e476d7823a8be6fb2ca62dc949bd830bf1a3) into the leg on top of commit B (a985a22788878afaeaf6e85e9f1259af7b854e62). Three scaffold files moved (.github/workflows/validate.yml, README.md, pyproject.toml); nothing under the carve's own roots did.

  • Proof, scaffold equals main: git diff origin/main -- .github pyproject.toml README.md conftest.py is empty at the merge commit.
  • Proof, carve roots untouched: git diff a985a227 HEAD --stat -- scripts src/openxdox tests is empty.
  • Proof, the pin followed: a clean venv's pip install -e ".[test]" resolves opendox to git+https://github.com/opensoft/openDox-code@8e9ffa628e96f621ab23af47873e5f2c2267b8db.
  • Proof, validate runs the narrowed command and passes: run 34501454446 logs Run python -m pytest -q tests/test_leg_shape.py --noconftest; check pass in 18s; local re-run: 12 passed.

Q-L9 (the sixth-replica finding from the independent verification) is not yet ruled as of this update — polled on openxFactory#656 through 2026-09-10T16:35Z, and the newest comment there remains the NEEDS BRETT question (issuecomment-5621719657). No B′ commit is added here pending that ruling: this merge carries only the two pre-existing content commits (A, B) plus the merge commit itself.

Commit B′ — the sixth replica (RULED Q-L9 (a))

RULED Q-L9 = (a) (Brett Heap, 2026-09-10 ~16:4xZ, verbatim "rule Q-L9 (a)"; issuecomment-5622261679, following the independent verification's finding at issuecomment-5621719657): opensoft/openXdox-code #5 takes the sixth declared replica, scripts/subcommand_extension.py → src/subcommand_extension.py, as a third content commit, B′, disclosed here — the § 5.5 two-commit doctrine bent once, for one file, on an unchanged manifest (unlike leg 1's re-cut, which a manifest change forced). The merge commit at HEAD now carries three content commits — A, B, B′ — by this ruling, plus the round-3 merge-from-main above.

The row and its note. The manifest row (source_path: scripts/subcommand_extension.py, disposition not_moved, reason replicated_at_destination) carries no destination (RULED OQ-C), but its own evidence text says: "PLACEMENT CARRIES NO destination KEY (RULED OQ-C) but is RECOMMENDED here for the same reason as its twin: place the copy at src/subcommand_extension.py, ON the src/ import root and BESIDE the package — mirroring scripts/subcommand_extension.py beside scripts/ideation_dashboard/ — and NOT inside src/opendox/. … Declare it with --replica-at scripts/subcommand_extension.py=src/subcommand_extension.py." Runbook § 5.5 independently requires the same placement: "RULING Q-L1 (2026-09-10) added two more permanent replicas — scripts/route_extension.py and scripts/subcommand_extension.py, the § 2.4 extension-point seams … both -code legs place them and declare the placement the same way." Commit B placed only the twin (route_extension); B′ places the second.

The blob. At carve_commit b075fd91dc8fced8e1373825ba80220c33536bae, scripts/subcommand_extension.py is blob 1d4833b2c2820fbc4a45e38c2e49e65089e5ef2f, mode 100644, 5,059 bytes, sha256 96d4e64e3835aeee6c455cde31006b5ccf63ecc5f83be6af53467a07ef9ca0a9 — the figure the row's own evidence text records (a replica row carries no digest field of its own). Placed at src/subcommand_extension.py: git hash-object / git ls-tree at B′ shows the SAME blob id 1d4833b2c2820fbc4a45e38c2e49e65089e5ef2f, mode 100644 — byte-for-byte, not merely digest-equal — and the working tree's own sha256sum matches the figure above exactly.

The 6/6 line. Phase B with all six --replica-at flags (the five from Commit B above, plus --replica-at scripts/subcommand_extension.py=src/subcommand_extension.py):

OK …/dest: openxdox_code (opensoft/openXdox-code) at opensoft/openxFactory@b075fd91dc8f (opendox-carve-0), phase B — 92 row(s) arrived, 9 digest(s) verified, 81 declared-edit row(s) within their lines, 4 unapplied; 6 of 6 declared replica(s) verified (byte-identical, or — where the row declares lines — differing only on them); 97 file(s) under scripts, src/openxdox, tests with none undeclared (1 scaffold, 0 replica, 0 created); scaffold admissions checked against 3487e476d782

exit 0.

Why the same command WITHOUT the sixth flag is ALSO OK, and is not a refusal:

OK …/dest: openxdox_code (opensoft/openXdox-code) at opensoft/openxFactory@b075fd91dc8f (opendox-carve-0), phase B — 92 row(s) arrived, 9 digest(s) verified, 81 declared-edit row(s) within their lines, 4 unapplied; 5 of 5 declared replica(s) verified (byte-identical, or — where the row declares lines — differing only on them); 97 file(s) under scripts, src/openxdox, tests with none undeclared (1 scaffold, 0 replica, 0 created); scaffold admissions checked against 3487e476d782

Identical 97 file(s) and none undeclared with or without the flag — because src/subcommand_extension.py sits directly under src/, OUTSIDE every root this destination's moved rows declare (declared_roots() in verify-carve-arrival.py, computed from destination_path alone: scripts, src/openxdox, tests — never bare src). check_undeclared_files (same file) walks os.walk(dest_root / root) for each declared root only; a file living directly under src/ — sibling to, not inside, src/openxdox/ — is never visited by that walk, declared or not. This is the same gap leg 1's verifier recorded on openxFactory#656: "the arrival verifier's root-scoped walk does not cover src/<seam>.py beyond --replica-at name+digest." So the undeclared-file check cannot see this file either way; what --replica-at adds is check_replicas, a SEPARATE check keyed directly off the flag's SOURCE=PATH pair, that os.path.lexists/reads/digests the declared path regardless of the roots walk — turning the placement from merely unrefused into PROVEN.

Proof the flag is load-bearing — perturbation, on a throwaway copy:

$ perturb one byte of src/subcommand_extension.py in a scratch copy
$ verify-carve-arrival.py … --phase B … --replica-at scripts/subcommand_extension.py=src/subcommand_extension.py  (+ the other five)
FAIL …/perturb-check: arrival-digest-mismatch — the replica of scripts/subcommand_extension.py at src/subcommand_extension.py has sha256 10b2f438e1de57ed708a58044aa0df8aa5e3d069eb18391cdd883d8ea2e1cbee where its blob at b075fd91dc8f has 96d4e64e3835aeee6c455cde31006b5ccf63ecc5f83be6af53467a07ef9ca0a9. …
exit 2

WITH the flag, the perturbed byte refuses. WITHOUT the sixth flag, the same perturbed copy is still OK — byte-for-byte the same summary line as the unperturbed no-flag run above (5 of 5, 97 file(s) … none undeclared) — because the undeclared-file walk never reaches the file regardless of its content. The flag is what makes the placement checkable at all.

Tests, in a clean venv against this HEAD: pip install -e ".[test]" resolves opendox to 8e9ffa62 as before; python -c "import subcommand_extension, route_extension; print('ok')" → ok; python -m pytest -q tests/test_leg_shape.py --noconftest → 12 passed, unchanged from the merge-from-main proof above (B′ adds a file outside every declared root and every collected test path; the narrowed shape suite does not walk src/ for loose modules).

Refs opensoft/openXfactory#656.

Landing

Lands under Brett Heap's standing word "merge openXdox-code when green" via the lane's gate (merge commit) — recorded and retrievable on openxFactory#656 at issuecomment-5619495003 (2026-09-10T13:31:05Z), which also fixed this leg's shape: "its commit A + draft PR immediately, commit B once the Q-L7 manifest-grammar amendment (in authoring) is on openxFactory main." Both halves of that are now done.

But validate is not green, so "when green" is not satisfied on its face, and this pull request does not claim it is. What is offered instead is § 4's alternative, in full: a red named and reasoned, with every cause measured, attributed and located outside the fence, and with the remedy for each named as somebody else's declared act. Merge method MERGE, never squash, so the carried history arrives intact (leg 1's precedent). The branch is up to date with main (§ 0 gate 5). The decision on whether this lands red — as leg 1's re-cut did, behind RULED Q-L5 (b′)'s narrowing — or waits on a levelling round 3 and/or the amendments for findings 5–7 is Brett's, and this lane is asking for it rather than assuming it.

🤖 Generated with Claude Code

brettheap and others added 30 commits July 14, 2026 01:47
scripts/validate-ideation-dashboard-contracts.py — offline registry
over all five family schemas (register kernel's cross-file $ref
resolves), FormatChecker attached, self-gating (packaged-examples
self-test every run, house precedent). Beyond-schema rules: snapshot
referential integrity + keyword-drift warning; workbench pinned
subset-of checked, new_candidates disjointness, committed-manifest
guard over tracked YAML; register id uniqueness + transition legality
(--transition old new: picked->superseded only, terminal states, no
deletion/resurrection/id reuse); project-register single-parent D10
hierarchy + group-member existence; gate-action kickoff-ratification
precondition (--context / sibling lookup, SKIPPED when unavailable).
Fixtures: examples/ideation-dashboard/ — 8 valid, 21 negative (each
naming its violated rule), 5 transition pairs, incl. the five cases
task 2.4 names. ideation/workbench/ gitignored. Wiring per house
convention: self-gating + contracts/README pending-realization row
(no Makefile/CI exists; manifest/CHANGELOG registration deferred to
2.5/archive per that table's rule). Opus-built; Fable-verified via
strict sweep (exit 0) and negative spot-check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ated validator (governance 1.1-2.5)

Realize the openxFactory governance tasks (sections 1-2; task 2.6 registration
deferred to the realization commit; sections 3-5 are codexFactory / aggregation
/ omnigent-install work not done here).

- Kernel (contracts/schemas/ideation-possibles-register.schema.yaml): additive
  optional register_entry.origin (enum [human-authored, ai-derived]; absent =
  human-authored) + optional register_entry.derivation, with an allOf
  conditional requiring derivation when origin: ai-derived — modelled
  one-for-one on the index topic_entry.origin + human_seen pair. New
  $defs/derivation (required worker_run{correlation_id, worker_profile,
  prompt_contract_version} + disposition const pending_review + optional
  human_disposition, a LOCAL structural mirror of the index human_disposition,
  not a circular $ref). No loosened required, no retyped field, no
  contract_schema_version bump (additive determination recorded, task 1.2).

- Examples (examples/ideation-dashboard/): valid derived-possible register
  section + four negatives, one per derived-entry rule (missing-derivation =
  the derivation-required conditional; missing-worker-run = schema layer;
  unsourced = validator layer; bad-disposition = the machine pending_review
  const/rule) + three one-way-disposition transition pairs; proven against the
  four-schema co-load registry.

- Validator (scripts/validate-ideation-dashboard-contracts.py): enforces the
  derived-entry rules — derivation required for ai-derived, sourced by a cluster
  edge AND an evidence pin, machine pending_review only, one-way disposition
  lifecycle (origin fixed, no edit back to undisposed), id uniqueness spanning
  derived entries. Delegation note added to validate-ideation-cross-reference.py
  (no duplicated checks) + an additive ideation/README.md AI-derived pointer.

Self-test: dashboard-contracts 9 valid / 25 negative / 8 transition, 0/0 strict;
cross-reference 0/0 strict. openspec validate add-possibles-derivation-lane
--strict and --all --strict (30/30) both pass.

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

The request artifact the intent plane pivots on: inbox-stamped actor, verb
enum in lockstep with gate-action-record, per-verb target conditionals,
snapshot_rev_seen for stale-view refusal, one-way status with
refused->refusal_reason and applied->applied_record (the request->act chain
to the sibling gate-action record), idempotency_key. Packaged valid +
negative examples; registered in the family validator (self-test green).
Registration in manifest/CHANGELOG rides the realization commit (2.4).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The NEW `ideation-dashboard-snapshot-index` schema — the thin (repository,
ref) LOCATOR the repository selector renders and a refresh re-fetches
(design D3: its own contract, never grown into the snapshot schema, because
an index describes a SET of snapshots while a snapshot describes one
repository's corpus and sibling facts would break the snapshot's
byte-identity property).

- contracts/schemas/ideation-dashboard-snapshot-index.schema.yaml: entries
  carrying repository / ref / snapshot location / source_revision /
  revision-derived generated-at; additive posture (no
  additionalProperties: false, consumers ignore unknown properties); an
  explicit statement of what a locator MUST NOT carry; and an optional
  `aggregates` block naming the member (repository, ref) pairs a composed
  cross-repository view composes FROM — locator data only, its rendering
  shape left to the staged topic's open question 1.
- validate-ideation-dashboard-contracts.py: registered in SCHEMA_FILENAMES
  + KIND_TO_SCHEMA (the gate-intent precedent) so the packaged-example
  sweep and the repo-tree scan pick it up, plus the two validator-side
  rules the shape cannot express — every (repository, ref) pair UNIQUE
  within one index, and NO projection data at the root or in an entry.
- examples: a valid index spanning four repositories at `ref: main`, one of
  them a sparse install repo (changes only), with the `xFactory` aggregate;
  negatives `snapshot-index-duplicate-repo-ref` and
  `snapshot-index-carries-projection-data`, each naming its rule.

Validation: `openspec validate add-dashboard-repo-selector --strict` and
`--all --strict` pass (44 items); the dashboard contract validator is
0 errors / 0 warnings with 13 valid + 30 negative examples confirmed.

Contract registration (manifest/CHANGELOG/README index, task 1.6) stays for
the next additive bundle cut per docs/contract-versioning-policy.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…(contract-v1.27 allocation)

add-workbench-integrated-editor-chat tasks 2.1-2.4 complete, 2.5 registered
and allocated on-branch (land/tag at merge):

- xfactory-workbench-model-catalog.schema.yaml: the GET
  /workbench/model-catalog success envelope — public seven-field allowlist,
  structurally closed (credentials/endpoints/secret names impossible), empty
  catalog = successful editor-only posture (FR-025); catalog entries may only
  narrow the server ceilings (1,048,576 / 900,000)
- xfactory-workbench-chat-turn.schema.yaml: one file, three closed envelopes
  discriminated by kind — request / validated success / fixed redacted
  failure; exact-UTF-8 SHA-256 content identity; exactly one outline and one
  document buffer; non-identity working_subject by type; only limit failures
  carry measured data; typed proposals with unique targets, max two
- Instance kinds use the retained workbench-* identifier family per the
  compatibility ruling; file names carry the manifest xfactory- prefix (the
  catalog planning doc's prefixed kind reconciles at codexFactory T007)
- Six schema-valid positives + eight one-violation negatives + the
  duplicate-turn-id pair under examples/ideation-dashboard/ (hashes computed,
  never invented)
- Delegated validator grows the family: hash-parity recomputation, path
  confinement, one-of-each buffers, unknown-model/budget with catalog context
  (SKIPPED-never-passed without one), unique proposal targets, the
  failure/limit pairing, credential/endpoint spelling scan, and the
  duplicate-turn sweep; own pytest suite tests/ideation_dashboard/ (21 tests)
- Registration: manifest entries with per-file sha256 + bundle version
  contract-v1.27; README index rows; CHANGELOG entry;
  contracts/releases/contract-v1.27.digests.yaml
- Evidence: family suites 65 passed; validator self-test 0 errors/0 warnings;
  validate-manifest-digests.py OK (109 digests verify); strict OpenSpec
  validation valid. Branch previously rebased onto origin/main (task 1.6)
  with one conflict resolved to main's authoritative predecessor annotations

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

Tests-first (both red before the fix):
- An index path escaping the repository after normalization now FAILS CLOSED
  (HGR-RELEASE-MEMBER-ESCAPES) instead of digesting content from outside the
  tree; a positive companion pins the legitimate ../schemas/ cross-family
  resolution (tests/hermes_runtime_contracts/test_release_inventory.py)
- The credential/endpoint spelling scan covers ws:// and wss:// alongside
  http(s) (tests/ideation_dashboard, wss mutant)
- Inventory rebuilt from the current tree (release discipline: member bytes
  changed); candidate == committed proven, 181 members, both doxBench schema
  paths retained
- Evidence: dashboard+routing+inventory suites 97 passed (the one in-container
  failure, test_validate_candidate_passes_on_the_realized_repository, is the
  worktree-git environment limitation — its substance passes host-side);
  validator self-test 0/0; manifest digests OK 109; strict OpenSpec valid

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1. catalog.py: the loader accepts a LEADING ../ run as a cross-family member
   confined to the REPOSITORY root at resolution (contracts/<family> sits two
   levels below it); interior traversal and empty segments stay forbidden and
   every refusal keeps HRC-CATALOG-INVALID semantics (three tests: cross-family
   accepted, interior traversal refused, beyond-repo escape refused)
2. release.py _WorkingTreeSource.read_member fails closed on a normalized path
   outside the repository root (HGR-RELEASE-MEMBER-ESCAPES) — defense in depth
   beneath the membership guard, with a direct regression test
3. duplicate-turn sweep canonicalizes buffer order by kind before hashing: a
   reversed [outline, document] retransmission is the same request, not an
   FR-019 conflict (regression test with reversed-order pair)
4. chat-turn buffer_state.path is nullable for a not-yet-created artifact (the
   null-path -> create lifecycle, data-model S4); confinement judges only
   paths that exist (schema + validator halves, positive test)
- Bookkeeping: chat-turn schema sha256 refreshed in the manifest; release
  inventory rebuilt (candidate == committed, 181 members, both schema paths
  retained); manifest digests OK 109; dashboard validator self-test 0/0;
  strict OpenSpec valid; suites 123 passed (the one in-container failure is
  the known worktree-git environment limitation, substance proven host-side)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Release: doxBench model-catalog and chat-turn contracts (contract-v1.27)
…G-1, additive)

Growth source: G-1, the codexFactory PR #63 re-verification finding (reviewer
Brett Heap, 2026-08-02), measured against the real corpus with the consumer's
OWN scope authority: 16 of 21 staged topics have exactly ONE editable path --
the topic's own primary fragment, which doxBench loads as the OUTLINE. The
released request required a non-null `active_document_path`, so no legal turn
existed on ~76% of real topics and the chat surface refused on all of them.
The consumer's exclusion of the outline from its document candidates is
correct (its own FR-015 turn guard would reject a document equal to the
outline); the block was upstream, in this schema.

The amendment, mirroring `buffer_state.path` EXACTLY as ruled: the request key
stays REQUIRED and its value becomes `oneOf: [null, confined_path]`. Same
shape, same reason -- a path that does not exist yet is `null`, never a
fabricated string. Absent and null stay different facts, and only null is
expressible.

Change class: ADDITIVE (minor) per docs/contract-versioning-policy.md. No
`contract_schema_version` bump. Strictly widening: every instance valid before
this commit is still valid, no producer must change, and a consumer that
already handles `buffer_state.path: null` handles the same fact here. Domain
repos pinned to contract-v1.27 are unaffected until they choose to advance.

Process followed (no NEW OpenSpec change):
  * this schema is owned by the ACTIVE change
    `add-workbench-integrated-editor-chat`, whose task 2.5 (register/allocate/
    land+tag the contract package) is still OPEN, so the amendment is an
    UPDATE to that change -- the same route the PR #45 review took when it
    made `buffer_state.path` nullable (73c51bc), which created no change
    record of its own. Recorded as a dated ledger note under 2.5.
  * NO spec-delta edit: the change's own requirement already says a buffer
    carries a "repository-relative path or `null` for a not-yet-created
    artifact" and never required the request's active document path to be
    non-null. The schema realized it more narrowly than the requirement --
    which is exactly what G-1 measured.
  * CHANGELOG "Unreleased -- pending bundle registration (fold into the next
    cut)" carries the entry, including what the cut still owes.

Rides with it:
  * examples/ideation-dashboard/workbench-chat-turn-outline-only.example.yaml
    -- the outline-only turn (null active document + null-path document
    buffer), picked up automatically by the family self-test;
  * two delegated-validator tests: a null `active_document_path` validates,
    and an ESCAPING one is still refused (the shape widens by exactly one
    value). The validator CODE needed no change: its `_confined` helper
    already judges only paths that exist -- the same helper that carried
    `buffer_state.path` nullability.

RED (schema reverted, tests in place):
  python3 -m pytest tests/ideation_dashboard/ -q \
    -k "null_active_document or escaping_active_document"
  -> 1 failed, 1 passed, 25 deselected
     "null-active-document: <root>: ... is not valid under any of the given
     schemas" -- G-1's root, reproduced against the released bytes.

GREEN:
  python3 -m pytest tests/ideation_dashboard/ -q  -> 27 passed
  python3 scripts/validate-ideation-dashboard-contracts.py
    -> 0 error(s), 0 warning(s); 23 valid examples (was 22), 43 negatives,
       8 transition pairs
  OPENSPEC_TELEMETRY=0 openspec validate add-workbench-integrated-editor-chat
    --strict -> valid
  OPENSPEC_TELEMETRY=0 openspec validate --all --strict
    -> 53 passed, 0 failed

DELIBERATELY NOT DONE -- the operator's cut (Contract Versioning Policy,
"Bundle Realization Order": a proposal may not reserve a minor before merge
order is known):
  * contracts/manifest.yaml per-file sha256 refresh for the amended schema.
    `python3 scripts/validate-manifest-digests.py` therefore reports
    "FAIL 1/109" on this branch BY DESIGN, naming exactly this file;
  * version allocation, contracts/releases/<tag>.digests.yaml, and the
    annotated tag;
  * no push, no tag, no bundle cut.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
release: contract-v1.28 — the chat-turn request's active_document_path is nullable (G-1)
- gate-action-record: the three wheel conditionals guard required:[action]
  (matching the intent side; acceptance unchanged, root requires action)
- gate-intent: verb-enum comment now states the enum is the
  intent-transportable subset, not a lockstep mirror of the record enum
- both canonical validators fail closed (exit 2) when jsonschema has no
  date-time checker, instead of silently skipping format enforcement
- release.py: missing catalog contract_schema_version becomes a clean
  ReleaseDependencyError instead of an int(None) traceback; direct tests
  pin the release-schema branch of _catalog_pin_findings
- wheel negatives test asserts against error.validator_value, not message
- four pre-existing intent fixtures quote snapshot_rev_seen like the wheel six
- tasks 4.2 checked (test_wheel_action_contracts.py); new 1.6 + proposal
  bullet give the doxBench release-schema re-typing an OpenSpec trail
- manifest re-pins the two touched schema digests

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The branch's contract-v1.28 candidate collided with the published
contract-v1.28 (chat-turn active_document_path nullability, PR #53), which
merged first and owns the immutable tag. This merge keeps the published
v1.28 surface verbatim (inventory, CHANGELOG entry, chat-turn schema at its
post-G-1 bytes) and re-cuts the wheel/intent/worker-enrollment bundle as
contract-v1.29: rebuilt 190-entry inventory, restacked CHANGELOG entry
(now also naming v1.28 as republishing the v1.27 catalog defect and
pointing migration at v1.29), manifest bundle version and consumption
pins, README registry rows (+29th valid fixture from main), proposal
target_release allocation, and the three realization task notes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codex P1 on 08bd38f: a clean install from
requirements/hermes-runtime-contracts.lock lacked rfc3339-validator, so the
new import-time guards exited 2 before any validation could run. The .in
now declares rfc3339-validator==0.1.4 (lock recompiled via uv with hashes;
pulls six), and both guards check the date checker as well as date-time
(Copilot's suppressed note), naming the requirements file in their error.
Release inventory rebuilt for the two validator digests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Release contract-v1.29 wheel, intent, and worker contracts
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>
adopt-neutral-tooling-home: ratified + tranches A/B realized (doc-health spine, routing lanes, NLM sync, dashboard runtime)
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>
…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>
… truthful remedy

The 31000608594 nightly (first green run from the new homes) published
0/14 snapshots: the pinned validator fail-closes without date/date-time
format checkers, and the finalize job never installed rfc3339-validator.
DEPENDENCY_REMEDY now names it so the composed SKIPPED note stops
pointing at jsonschema/referencing that are already present.

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>
…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>
…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>
brettheap and others added 3 commits September 9, 2026 12:09
…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)

Carve leg 3 of split-opendox-two-layer-product (§ 3.2, RULED OQ-H): the 92
manifest rows destined `openxdox_code` arrive from carve_commit
b075fd91dc8fced8e1373825ba80220c33536bae (tag opendox-carve-0), placed
byte-identical by `git filter-repo` over a fresh --mirror of the public
source and joined here with an unrelated-histories merge, per
docs/opendox-cutover-runbook.md § 5.2-5.5. No edits, no replicas: those are
commit B.

Refs opensoft/openXfactory#656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 10, 2026 13:36

@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

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

Unresolved critical import, schema/resource, path-handling, and test-collection issues block approval.

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

Pull request overview

This draft PR performs the placement-only third carve leg, importing 92 openXdox implementation and test files from openxFactory.

Changes:

  • Adds openXdox source modules, tests, fixtures, and validation tooling.
  • Preserves carved history and placement from the recorded commit.
  • Defers import rewrites, replicas, and declared edits to commit B.
File summaries
File Summary
tests/test_wheel_verbs_cli.py Wheel CLI tests
tests/test_wheel_action_contracts.py Wheel action contract tests
tests/test_source_dot_directories.py Source path safety tests
tests/test_snapshot.py Snapshot tests
tests/test_snapshot_validation_launch.py Validation-launch tests
tests/test_snapshot_determinism.py Snapshot determinism tests
tests/test_scope_column_split.py Scope-splitting tests
tests/test_register.py Register tests
tests/test_register_edit_lane.py Register-edit tests
tests/test_readiness_gate.py Readiness-gate tests
tests/test_project_schema_election.py Schema-election tests
tests/test_project_action_contracts.py Project contract tests
tests/test_hosted_actor.py Hosted-actor tests
tests/test_header_value_readers.py Header-reader tests
tests/test_grouping.py Grouping tests
tests/test_generated_at_anchor.py Generation-anchor tests
tests/test_edit_project.py Project-edit tests
tests/test_edit_action.py Edit-action tests
tests/test_doxbench_telemetry.py Telemetry tests
tests/test_create_project.py Project creation tests
tests/test_create_document_cli.py Document CLI tests
tests/test_aggregation_register_instance.py Aggregation register tests
tests/fixtures/negatives/uncited-rejection.register.yaml Negative register fixture
tests/fixtures/doxbench_scope_cases.json Scope fixtures
src/openxdox/snapshot.py Snapshot serialization and validation
src/openxdox/serve_gate.py Gate serving behavior
src/openxdox/register.py Register adapters
src/openxdox/record_binding.py Ratification binding
src/openxdox/openxdox_surface.py OpenXdox adapter surface
src/openxdox/corpus_root.py Corpus-root validation
Review details

Suppressed comments (3)

scripts/validate-ideation-dashboard-contracts.py:116

  • The validator's default ROOT is this leg's repository, but the carve did not bring its required contracts/schemas or examples/ideation-dashboard trees. Running this script from the destination therefore exits with a harness error before validating anything; point it at the reachable openxFactory contract checkout or carry the complete contract surface with it.
    src/openxdox/snapshot.py:196
  • For a validator exit code 2, _is_readable_json() returns False both when the snapshot is malformed and when the path cannot be read. This branch therefore labels an unreadable/missing snapshot NOT_CONFORMANT, contradicting the documented VALIDATOR_UNAVAILABLE outcome and causing callers to blame data for an environment/filesystem failure. Distinguish OSError from JSON decode errors before choosing the outcome.
    src/openxdox/snapshot_registry.py:947
  • This existence-only guard breaks both fallback cases: an indexed entry that failed to fetch blocks the documented baked fallback, while an available local-index entry is overwritten later because fallback_only=False bypasses this guard. Check existing.available instead, so only an already usable entry wins and an unavailable active entry can be replaced by the baked copy.
  • Files reviewed: 31/92 changed files
  • Comments generated: 6
  • 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 src/openxdox/generator.py Resolved
Comment thread src/openxdox/record_binding.py Resolved
Comment thread src/openxdox/register_edit_lane.py Resolved
Comment thread src/openxdox/snapshot_registry.py Resolved
Comment thread src/openxdox/snapshot_registry.py Resolved
…ULED Q-L1/Q-L7)

The 537 declared edit lines of this destination's 83 `moved_with_declared_edit`
rows, plus the 4 lines of the moved row RULED Q-L7 (a) also-replicates here and
the 1 line its amended replica row declares — 542 declared lines in total, of
which 483 are changed and 59 are left with a reason. Nothing else: phase B of
`verify-carve-arrival.py` passes and the same tree refuses phase A.

Five replicas placed and declared with `--replica-at`: `src/route_extension.py`
(RULED Q-L1's extension-point seam, on the `src/` import root beside the
package, as its row recommends — proven: `import route_extension` resolves
there), `tests/hermeticity.py`, `tests/staging_shapes.py`, `tests/conftest.py`
(with its declared `:25` `REPO_ROOT = HERE.parent`) and
`tests/session_fixtures.py` (with the same four `ideation_dashboard.X` ->
`opendox.X` rewrites its openDox-code arrival takes) — both of the last two
RULED Q-L7 (a), openxFactory#895 -> b08b6280.

`import rewrites` resolve per the module's OWN destination row: 247 lines to
`opendox.X` and 179 to `openxdox.X`, because openXdox pins openDox (runbook
§ 5.1) and `openxdox.X` would name modules openXdox does not own. Six lines
DELETED — the dead `sys.path.insert(0, _SCRIPTS_DIR)` shims of `serve_gate.py`
:40-42 and `serve_projection.py` :47-49. `path constants` move the package
directory to this destination's `src/openxdox/` layout, and the command-string
literals to `src/opendox/cli.py` / `serve.py`, which is what openDox-code's own
landed leg emits. All 14 `adapter calls` are LEFT: they are `doc_health`
reaches and D2's `resolve` is the BUILD arc's, not a leg's.

The pull request records the pre-flight in full, including three findings this
leg cannot repair inside its fence: the two halves of the floor number lines
differently (`\n` vs `str.splitlines()`) on the two rows carrying U+2028;
seven undeclared repository-root depth lines, three of them on `moved_verbatim`
rows; and `opendox`'s built wheel omitting the two top-level Q-L1 seams, which
is what makes `validate` red.

Refs opensoft/openXfactory#656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 10, 2026 15:17
@brettheap
brettheap marked this pull request as ready for review September 10, 2026 15:21

@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

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

Unresolved critical and moderate review findings affect packaging, validation, source confinement, and test execution.

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

Review details

Suppressed comments (9)

scripts/validate-ideation-dashboard-contracts.py:112

  • This carried validator imports jsonschema, referencing, and requires the RFC3339 format checker, but the leg's declared install set contains only PyYAML at runtime and pytest in the test extra; the pinned openDox dependency also declares only PyYAML. A fresh editable install therefore exits with the script's harness error before any contract test or lane validation can run. Declare these validator dependencies in the owning package or keep this validator execution in the aggregation environment.
    src/openxdox/generator.py:68
  • The snapshot generator has the same unconditional cross-leg import, but this checkout contains no doc_health package and the project metadata does not install one. Any test or caller importing openxdox.generator therefore fails at module import, so snapshot generation cannot run in the leg's required validation environment. Provide the shared implementation as a dependency/replica or make the assembly boundary explicit.
    src/openxdox/kickoff.py:150
  • A non-UTF-8 YAML file under records_root raises UnicodeDecodeError here, aborting ratification lookup instead of failing closed and reporting an unbound record. Treat decoding failures like the existing YAML/OS errors so one malformed candidate cannot take down kickoff.
    src/openxdox/record_binding.py:202
  • file_path = Path(path).resolve() changes the path being verified to the symlink target. A YAML symlink placed under records_root can therefore pass rev-parse HEAD:<rel> and diff HEAD -- <rel> when the target is tracked, even though the record entry itself is untracked at its records-tree path; this defeats the documented “record file must be tracked at HEAD” boundary. Verify the original lexical path is tracked and compare its committed blob to the bytes read through that path.
    src/openxdox/register.py:135
  • The generator's default project grouping calls this method with a repository checkout, but this implementation checks only that directory. Aggregation-owned project-register.yaml files are allowed in parents and kickoff.discover_project_register already walks them; nested checkouts therefore silently lose project, project_group, and projects unless every caller supplies an explicit source.
    src/openxdox/register_edit_lane.py:202
  • subprocess.run can raise OSError (including a missing packaged validator) or TimeoutExpired, but neither is caught here. fulfil_once therefore aborts instead of returning a failed validation report and leaving the commission dispatched, contrary to the lane's fail-closed contract.
    src/openxdox/register_edit_lane.py:128
  • _member_lines only recognizes block-style sequence entries, so a schema-valid project such as repositories: [repoA, repoB] produces an empty current map: removals are reported as stale, while additions are inserted after the inline scalar and make the YAML invalid. Parse inline repository arrays or normalize them to block form before applying edits.
    src/openxdox/register_edit_lane.py:138
  • When the last repository is removed, this drops the only - member line but leaves repositories: with no value, which YAML loads as null. The commission contract explicitly allows removing the last member, so the validator then rejects the generated register; rewrite the key to repositories: [] when no members remain.
    src/openxdox/snapshot_registry.py:810
  • The environment value is read, but the request sends the literal six-asterisk string, so every authenticated fetch is rejected by the upstream instead of using the configured credential. Send the token in the documented bearer header while keeping it out of logs and response data.
  • Files reviewed: 34/97 changed files
  • Comments generated: 9
  • Review effort level: Lite

Comment thread src/openxdox/doxbench_scope.py Resolved
Comment thread src/openxdox/register_edit_lane.py Resolved
Comment thread src/openxdox/serve_gate.py Resolved
Comment thread src/openxdox/serve_projection.py Resolved
Comment thread src/openxdox/snapshot.py Resolved
Comment thread src/openxdox/snapshot_registry.py Resolved
Comment thread src/openxdox/snapshot_registry.py Resolved
Comment thread src/openxdox/snapshot_registry.py Resolved
Comment thread src/openxdox/register_edit_lane.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

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

Close/reopen to re-run validate against the new base (round 3 → main: pin 8e9ffa62 + the RULED Q-L8 (b′) narrowing); a plain re-run would replay the old merge ref. Nothing else changes; Q-L9 (the sixth replica) is pending on #656.

@brettheap brettheap closed this Sep 10, 2026
@brettheap brettheap reopened this Sep 10, 2026
@brettheap

Copy link
Copy Markdown
Contributor Author

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

Second close/reopen: the previous re-run (34500785947) executed the OLD workflow from a stale merge ref (python -m pytest -q, 57 collection errors) — the base had moved to 3487e47 seconds earlier. Mergeability is now recomputed (BEHIND/MERGEABLE); this reopen runs the RULED Q-L8 (b′) narrowed validate.

@brettheap brettheap closed this Sep 10, 2026
@brettheap brettheap reopened this Sep 10, 2026
brettheap and others added 2 commits September 10, 2026 12:20
…e 8e9ffa62 opendox pin

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…and_extension.py (RULED Q-L9 (a))

The manifest row for `scripts/subcommand_extension.py` (disposition
`not_moved`, reason `replicated_at_destination`) carries no `destination`
(RULED OQ-C), but its own note recommends the placement this commit makes:
"PLACEMENT CARRIES NO `destination` KEY (RULED OQ-C) but is RECOMMENDED
here for the same reason as its twin: place the copy at
`src/subcommand_extension.py`, ON the `src/` import root and BESIDE the
package — mirroring `scripts/subcommand_extension.py` beside
`scripts/ideation_dashboard/` — and NOT inside `src/opendox/`. … Declare
it with `--replica-at scripts/subcommand_extension.py=src/subcommand_extension.py`."
Runbook § 5.5 states the same requirement directly: "RULING Q-L1 (2026-09-10)
added two more permanent replicas — `scripts/route_extension.py` and
`scripts/subcommand_extension.py`, the § 2.4 extension-point seams … both
`-code` legs place them and declare the placement the same way." Commit B
placed only the twin (`route_extension`); this leg omitted the second, which
is the finding the independent verification of commit B raised
(openxFactory#656, comment 5621719657) and Brett Heap RULED Q-L9 = (a) on
(comment 5622261679, verbatim "rule Q-L9 (a)"): #5 takes the sixth replica as
a THIRD content commit, disclosed in the pull request body, the § 5.5
two-commit doctrine bent once for one file on an unchanged manifest (unlike
leg 1's re-cut, which a manifest change forced).

The carve blob at carve_commit b075fd91dc8fced8e1373825ba80220c33536bae is
1d4833b, mode 100644, 5,059 bytes, sha256
96d4e64e3835aeee6c455cde31006b5ccf63ecc5f83be6af53467a07ef9ca0a9 — the exact
figure the row's evidence text records (a replica row carries no digest field
of its own) and re-derivable with `git cat-file blob
b075fd91dc8f:scripts/subcommand_extension.py | sha256sum`. Placed here
byte-identical: git's own blob id at `src/subcommand_extension.py` (staged)
equals the source blob id exactly, and the working-tree sha256 matches.

`verify-carve-arrival.py` phase B with all six `--replica-at` flags reports
`6 of 6 declared replica(s) verified … none undeclared`. Without the sixth
flag the run is ALSO `OK` — the file sits directly under `src/`, outside
every root this destination's moved rows declare (`scripts`, `src/openxdox`,
`tests`; `declared_roots()`), and `check_undeclared_files` walks only
`dest_root/<declared root>`, so a file outside all three is never visited by
that walk whether or not `--replica-at` names it. What the flag buys is
`check_replicas`, a separate check keyed directly off `--replica-at` that
stats and digests the declared path regardless of the roots walk: proven by
perturbing one byte of a throwaway copy of the placed file — WITH the flag
the run refuses `arrival-digest-mismatch`; WITHOUT it the perturbed file
remains exactly as invisible as an absent one.

Refs opensoft/openXfactory#656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 10, 2026 17:08
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)
E Security 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

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

Multiple new/changed tests compute the repository root with Path(__file__).resolve().parents[2], which points outside the repo for tests/*.py modules and will break the contract harnesses when executed.

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

Review details
  • Files reviewed: 35/98 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread src/subcommand_extension.py Resolved
Comment thread src/subcommand_extension.py Resolved
@brettheap
brettheap merged commit 5960041 into main Sep 10, 2026
3 of 4 checks passed
brettheap added a commit that referenced this pull request Sep 18, 2026
…openXdox's neutral, profile-parameterized reader answers the conformance corpus 17 of 17 (#23)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Refs #656 (stays OPEN).
CLAIM: 5715212503
RULED Q-X1..Q-X4 (Brett Heap, 2026-09-17, by interactive multi-choice; openxFactory#656 comment 5715212264).

## What this is

`split-opendox-two-layer-product` `design.md` **§ D4 machinery (1)** — *"the corpus-adapter IMPLEMENTATION — chart, firm document store, campaign repository: listed, read, written back and checked"* — is the one of the seven machineries that **no § 4 box commissioned**. § 4.5 built three of them and is ticked; § 4.1 *names* an "adapter implementation" but is a CARVE box whose own text says what it now waits on is "that reconciliation and not a carve". The obligation is written down live in exactly one place, `tasks.md` § 3.7: *"the missing readers are § 3.6's 'trivial conformant adapter implementation' for openDox and **§ 4's mapping core for openXdox**, and they are build tasks at those destinations"*.

This PR is openXdox's half of that.

**Three NEW modules, flat under `src/openxdox/`, stdlib plus the PINNED `opendox.corpus_adapter`** (RULED OQ-2 / OQ-Q — the interface is openDox's and is never replicated here):

| file | lines | what it is |
| --- | ---: | --- |
| `src/openxdox/corpus_shape.py` | 451 | the per-corpus construction DATA (`Scope`, `WriteProposal`, `WritePath`, `CorpusShape`) and **`from_profile()`**, which derives `scan_roots` and one scope per artifact kind from a registered `DomainProfile`'s `artifact_kinds[].locations` |
| `src/openxdox/domain_corpus_adapter.py` | 880 | `DomainCorpusAdapter` — the interface's six operations over one `CorpusShape` |
| `src/openxdox/conformance_corpus.py` | 94 | the DECLARED `--adapter` factory § 3.7's runner resolves |

**Two NEW test files**, appended LAST to `.github/workflows/validate.yml`'s explicit `--noconftest` list (a file not on that list is silently never run): `tests/test_corpus_shape.py` (58) and `tests/test_domain_corpus_adapter.py` (84).

**No existing module is edited.** The only non-new file this PR touches is the workflow.

## The measurement

```
$ python3 openxFactory/scripts/verify-carve-conformance.py \
      --destination openxdox_code \
      --dest-root   <this checkout> \
      --adapter     openxdox.conformance_corpus:reader
OK <dest-root>: openxdox_code passed the neutral conformance corpus — 17 of 17 check(s),
   reader openxdox.conformance_corpus:reader, corpus <oxf>/tests/corpus-adapter/fixtures
$ echo $?
0
```

Measured at openXdox-code `589adee7` / openxFactory `7e074ac9`, **on the first run**, and re-measured unchanged after the one fix below. The control in the same session — `--destination openxfactory --dest-root . --adapter home_factory:neutral_reader --sys-path tests/carve_conformance` — is also `OK — 17 of 17`, so the runner and the corpus are behaving.

All seventeen, from `--json`:

`structural-conformance` (DomainCorpusAdapter satisfies the six) · `resolve-populated` · `list-population` (listed 3; this corpus holds 3) · `list-stable` (sorted/unique/stable) · `read-round-trip` (165 bytes, identity round-tripped) · `classify-population` (complete=1 field-absent=1 unrecognizable=1) · `classify-reports-unrecognizable` (1 unrecognizable, listing still holds 3) · `check-severities` (0 findings) · `empty-is-an-answer` · `read-only-declared-at-resolution` · `absent-refuses` · `unreadable-refuses` · `unknown-scope-refuses` · `unknown-document-refuses` · `unknown-revision-refuses` · `write-back-refuses-read-only` · `write-back-leaves-the-tree`.

`git status --porcelain` in the corpus's own checkout is **empty after three runs**.

## Fourteen review rounds, answered

Twenty findings accepted across fourteen rounds (path traversal through a declared `..` or a drive letter, a symlink whose target leaves the corpus, an unreadable directory omitted rather than refused, a declared root present as a FILE, `Path.exists()` reporting an inaccessible path as ABSENT, an over-wide isolation claim in a docstring, a broken `.git` symlink read as 'no revision notion', confinement checked only at listing and not at read, a declared root that links out of the corpus, a dangling link dropped by `is_file()` before confinement, a root probed with `is_dir()` whose `OSError` it suppresses, a profile location whose padding made its scan root and its glob disagree, a dangling symlink at a corpus path read as ABSENT rather than unreadable, and one resolved corpus invalidating another one's listing snapshot, and a module comment claiming a per-handle "moment in time" a value-keyed memo does not deliver, `globs_of` reading a trailing `\` differently from every other rule in its own module, `write_back` acting on a document identity it never listed, a declared root that ARRIVES after resolution widening the listing where one that GOES already refused, a reserved-kind-id refusal the docstring promised unconditionally that sat behind a `continue`, and a confinement check whose bytes were opened by pathname a second time rather than proved to be the file that passed it) and three proposed changes reverted with the measurement that decides each — a replacement glob matcher that silently dropped 2 of 4 documents below depth one, removing the listing cache (0.07s → 58.85s over 801 documents, quadratic), and `write_back` raising a refusal kind its row of the interface does not name. A fourth was accepted as a FINDING and narrowed as an IMPLEMENTATION: round nine's `WeakKeyDictionary` for the listing snapshot buys no isolation a plain dict does not (the pinned `ResolvedCorpus` is `frozen=True, eq=True`, so it hashes by value), makes the module depend on that dataclass being weak-referenceable (`slots=False` today, an undeclared property of an interface this leg does not own), and leaves a hand-built `ResolvedCorpus` — which the interface explicitly permits — uncached and back on the once-per-document walk at **0.17s against 101.38s** over 801 documents. The finding is fixed; the map is an ordinary dict keyed by the handle and entered with `setdefault`. One further proposal — refusing a corpus whose git work tree is dirty — is REGISTERED as a question for Brett Heap rather than decided here, with the argument for it recorded in full. All threads resolved. The whole round is in [this comment](#23 (comment)).

## Which rulings this realizes

- **RULING Q4** (#656 `5542823211`): *"openDox defines a corpus-adapter interface; **openXdox implements it**."* The ruling that puts an implementation here at all.
- **RULING C2** (`5544370242`): openXdox is the domain-mapping core, **PARAMETERIZED**. `from_profile()` is where that lives.
- **RULED OQ-1** FLOOR PART 3 (`5547060378`, § D6 (3)): *every* destination passes the neutral corpus; openXdox's adapter implementation is named in terms.
- **RULED Q-X2 (a)** (`5715212264`): this is the **NEUTRAL, profile-parameterized** reader. RULING Q4's second clause — "over openxFactory's corpus and check families" — is recorded SUPERSEDED by C2 and DQ-1, which put the engineering corpus's reader in openxFactory (§ 2.2a, landed `ea4e6ff2`). Two readers over one corpus would be DQ-1's collapse risk back.
- **RULED Q-X3 (a)** (`5715212264`): `kind_field` and `required_fields_by_kind` are **CONSTRUCTION DATA** on `CorpusShape`, exactly as openxFactory's § 2.2a shape carries them. No `DomainProfile` schema change, no openXdox-spec change, no promoted-spec delta.

## No transposition, and that is a property of this reader

**RULED Q-F1 (a)** (`5714365086`) has openDox's reader transpose the neutral corpus into git repositories, because its location vocabulary IS git history (*"THE CORPUS IS THE HISTORY, NOT THE WORKING TREE"*, RULING C3) — untransposed it scores 1 of 17.

A profile-parameterized **filesystem** reader's location vocabulary is a directory tree, which is exactly what the corpus is. So the seventeen checks above ran over `tests/corpus-adapter/fixtures/` **as it ships** — same documents, same keys, same bytes, no intermediate form whose fidelity anyone has to prove. Q-F1's problem does not recur at this destination.

## No `doc_health` reach

`tests/test_dependency_direction.py`'s `DOC_HEALTH_SURFACE` is **unchanged at 8 modules / 13 statements**, and that file is not edited by this PR:

```
$ python -m pytest -q tests/test_dependency_direction.py --noconftest \
      -k "doc_health_implementation_surface or no_module_under_src_reaches_its_consumer or deferred_cross_package"
3 passed, 13 deselected
```

The five modules that would have been the obvious things to reuse — `corpus_root`, `completeness`, `round_trip`, `generator`, `snapshot_registry` — all reach `doc_health` at import time, which is lawful only where § 4.1's second clause already enumerates it. So none is wired in, and the one rule they carry that this reader genuinely needs is **adopted rather than imported**: the CR/LF/CRLF line rule (`align-status-reader-to-real-lines`, 2026-08-19), as an eleven-character regular expression, with both halves asserted — that the three real endings split, and that `\x0b \x0c \x1c \x1d \x1e \x85 U+2028 U+2029` do **not**.

`check` returning `()` is likewise deliberate and is the interface's own answer, quoted in the module: *"a corpus with no verdict machinery of its own honestly returns `()`; that is an answer, not a refusal, and a consumer must not read it as 'clean' without asking whether the corpus judges at all."* `completeness.py` is not wired in — it would drag openxFactory's check families into a neutral reader. openXdox ships no verdict provider for the same reason it ships no status words: a check family is a domain's judgement and this package has no domain. A descendant injects one through `CorpusShape.verdict`, and `check-severities` passes on the empty answer.

## Suite, and every assertion mutation-proved

```
$ python -m pytest -q <the 16 files validate.yml names> --noconftest
520 passed, 6 skipped         (360 + 6 is the list as this act found it)

$ python -m pytest -q tests/test_corpus_shape.py tests/test_domain_corpus_adapter.py --noconftest
160 passed, 0 skipped, 0 errors
```

`mutate.py` (persisted with this lane's evidence, not added to this repository) applies **69 deliberate defects** one at a time to `corpus_shape.py` and `domain_corpus_adapter.py` and runs the two files against each: the file-location refusal answering `corpus-unclassifiable`; the declared write path becoming a module constant; `read` falling back to a revision nobody asked for; an undeclared scope widening silently; `write_back` writing the tree; a forged reference naming another write path being trusted; the line rule breaking on exotic separators; the reader adopting an enclosing repository; the header window going unbounded; a declared location carrying `..`; a symlink escaping the corpus; the listing cache removed; a dangling symlink at a corpus path reading as absent rather than unreadable; one resolved corpus invalidating another one's listing; a declared directory ended with a Windows separator being read as a document pattern; `write_back` dispatching another corpus's document identity; a declared root that ARRIVES after resolution being walked into the listing; the bytes served not being proved to come from the file that passed confinement; and fifty-one more.

**ALL 69 WERE CAUGHT — 0 survivors.**

Two survived a first sweep and both are fixed in this PR rather than argued away:

1. **A loose assertion.** A profile declaring no locations was refused by the empty-scan-roots guard two lines later, whose message also contains the word "locations", so the test passed on the wrong refusal. It now pins the refusal it means.
2. **A real hole, and the sharper of the two.** `_git` inherited the ambient environment, and `GIT_DIR` / `GIT_WORK_TREE` — which git exports to **every hook it runs** and to `git rebase --exec` — override `-C`. Measured directly: a corpus at its own commit `128660da` answered `dd09f3df`, the ambient repository's, purely because the environment said so. `AMBIENT_GIT_VARIABLES` is now dropped from the subprocess environment, and the work-tree cross-check stays as the fail-closed guard behind it. Both are asserted (`test_the_ambient_git_environment_does_not_answer_for_this_corpus`, `test_a_work_tree_git_does_not_agree_is_this_corpus_refuses`).

### A third thing, found by reading rather than by the sweep, and it is a fidelity fix and not a bug fix

`026b042` corrects `real_lines`. This module states in terms that the CR/LF/CRLF rule is **adopted** rather than imported — `doc_health.lines` is openxFactory's and a neutral reader may not reach for it — and `re.split` alone does not quite hold that claim up: six of thirteen probed inputs diverged from the shared rule, every one of them a document ending in a newline, which is very nearly all of them (`''` came back as one empty line rather than none; `'a\n'` as two lines rather than one).

**It changes no answer this module gives**, and the commit says so rather than claiming a fix it did not make: the spare element is always last, so slicing a window off the front cannot lose a real line to it, and an empty string starts with no header prefix. The conformance run is unchanged, re-measured `OK — 17 of 17`. It is corrected because `real_lines` and `header_window` are PUBLIC and the module's claim is that the rule is adopted — a helper that counts one more line than the rule it names is a trap for the next caller. Measured against `doc_health.lines.split_keepends` itself, from an openxFactory checkout: **identical on all 14 probed inputs**, the eight exotic separators included. The rule's own table is now parameterized data in the test file, which is where a future divergence shows.

## Three things this reader gets right that a measurement of another got wrong

Actor `floor37` measured openDox-code #26 at `6c8f19e7` on 2026-09-17: **11 of 17**, six failures, five of them one architectural cause — what openxFactory's adapter takes as per-corpus construction data, that reader holds as module constants. This one was built from that measurement:

1. **A location that is a FILE refuses `corpus-unreadable`**, never `corpus-unclassifiable`. The interface's own comments are the vocabulary, and the corpus's README holds every reader to it.
2. **The declared write path is construction data.** A constant write path makes a read-only corpus unrepresentable, so `read-only-declared-at-resolution` fails, `write_back`'s own read-only branch becomes unreachable, and a refused write lands in the tree.
3. **The classification vocabulary is construction data too.** A reader that classifies by file suffix reports every document in a corpus it does not own as the same kind, obliging nothing — a plausible answer and a false one.

And one more, which is floor37's unasked-for finding: **this reader never adopts an enclosing repository.** `_revision` looks for a version marker at the location's OWN root and asks git about that directory only, with the ambient git environment dropped and git's reported work tree cross-checked. Pointed at a plain directory inside somebody's checkout it answers *"this corpus carries no revision notion"* — the truth — rather than stamping every read with a different corpus's revision.

## What this act does NOT do

- **It does not tick § 3.7.** That box needs `opendox_code` too, and openDox's reader is the other half — openDox-code **#26**, at 11 of 17 as measured on 2026-09-17, three construction data away. § 3.8's and § 4.6's tags wait on the same box.
- **It does not tick § 4.1**, which is a carve box whose open half is the 23-import reconciliation.
- **It does not edit `tasks.md`.** RULED Q-X1 (a) books this as a new **§ 4.5a `[oXd]`** box in the bookkeeper's amendment #5, on the packet's own `Na` precedent (§ 2.2a, § 5.2a, § 5.6a). Its exit sentence, for the bookkeeper to place verbatim: *"BUILD the corpus-adapter IMPLEMENTATION — `design.md` § D4 machinery (1), the one of the seven § 4.5 did not name — parameterized by the § 4.4 domain profile, and prove it on § 3.7's neutral corpus. Measured at openXdox-code `<merge sha>`, 2026-09-17: `verify-carve-conformance.py --destination openxdox_code --adapter openxdox.conformance_corpus:reader` → **OK — 17 of 17**."*
- **It does not touch `openspec/changes/`**, so this is the plain gate and not Rule 6.
- **It does not cut `xdox-v1.0`** (§ 4.6).
- **It does not add a sixth `DomainProfile` axis.** RULED Q-X3 (a) keeps the header vocabulary as construction data; the profile axis is registered as the successor, not done here.
- **It does not consolidate the three readers.** After this the estate holds openxFactory's engineering adapter (§ 2.2a), openDox's `LocalGitCorpus` (§ 3.6, #26) and this one. That is what "every destination passes it" costs, and § 3.7 refuses the alternative in terms: *"narrowing the corpus to what the legs pass today would be FLOOR PART 3 deleted to tick FLOOR PART 3."* A future consolidation is registered and recommended against for now.

## Arrival admissions

The three new `src/` files and two new `tests/` files are CREATED files under `openxdox_code`'s walked roots, so they need `created:` rows in openxFactory `docs/opendox-carve-admissions.yaml` or `verify-carve-arrival.py --destination openxdox_code --phase B` refuses. That is a companion PR at openxFactory (`chore/admit-openxdox-corpus-adapter`), whose `since:` names this branch's commits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Lane: openxfactory-4
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