Skip to content

openxFactory: mount opensoft/openXdox as a submodule and pin it (split-opendox task 5.1, RULED OQ-L, RULING F) - #917

Merged
brettheap merged 4 commits into
mainfrom
change/openxdox-submodule-pin
Sep 10, 2026
Merged

brettheap merged 4 commits into
mainfrom
change/openxdox-submodule-pin

Conversation

@brettheap

@brettheap brettheap commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Refs #656 — split-opendox-two-layer-product task 5.1, docs/opendox-cutover-runbook.md § 7 (Phase 4).

Mounts opensoft/openXdox as a submodule at openXdox and pins it by commit and whole-tree digest. One commit; the gitlink and the pin file are halves of one invariant.

The words this stands on

The three values

openXdox root merge sha (the gitlink and commit:) db58fffa58d49d92f58db40bd7e63cad3205052f
tree digest, sorted-ls-tree-r-v1 43c60b29693820d3e8c066e9c6a088f306bf0a7c0f2d818d72ceb62657c53209
carve_commit: (record 2, RULED OQ-I) b075fd91dc8fced8e1373825ba80220c33536bae

Bound only after opensoft/openXdox PR #4 (carve/openxdox-root-pin, Phase 3) merged to its own main — checked before starting, not trusted from the brief.

Proofs, verbatim

The § 7 "the pin names a real object" proof — git records a gitlink without checking the object exists, so a wrong pin commits and pushes clean:

$ git -C openXdox cat-file -t db58fffa58d49d92f58db40bd7e63cad3205052f
commit

scripts/verify-openxdox-pin.py's own output — the running code, not the one-off computation:

$ python3 scripts/verify-openxdox-pin.py
OK openxdox-pin verified: openXdox@db58fffa58d49d92f58db40bd7e63cad3205052f, gitlink read from HEAD, sorted-ls-tree-r-v1 tree digest recomputed (43c60b29693820d3e8c066e9c6a088f306bf0a7c0f2d818d72ceb62657c53209)
$ echo $?
0

Refusals are fail-closed and named. Two negative probes, run against this tree:

$ # tree_sha256 set to 64 zeroes
REFUSE openxdox-pin-digest-mismatch: openXdox: TREE DIGEST DRIFT (sorted-ls-tree-r-v1)
  recorded   0000000000000000000000000000000000000000000000000000000000000000
  recomputed 43c60b29693820d3e8c066e9c6a088f306bf0a7c0f2d818d72ceb62657c53209
... exit 2

$ # revision_kind: tag
REFUSE openxdox-pin-tag-only: the pin declares revision_kind 'tag', not 'commit'; the trusted
referent is a commit plus a tree digest, and resolving a movable name would require exactly the
network read this verifier refuses to perform
... exit 2

RULING F is honored, and it is checkable

No gitlink, no pin file, and no declaration of opensoft/openDox (or of openXdox-code / openXdox-spec) appears anywhere in this diff. openDox's commit stays a DERIVED value read through openXdox's own contracts/opendox-pin.yaml. .gitmodules gains exactly one entry:

[submodule "openXdox"]
	path = openXdox
	url = [email protected]:opensoft/openXdox.git

SSH form and no branch =, matching the existing openXwallet entry exactly.

contracts/openxdox-pin.yaml, as written

the file (comments included — the reasoning is the file)
schema_version: 1
kind: pinned_contract_manifest

# ============================================================================
# openxdox-pin.yaml — content-addressed consumption of opensoft/openXdox.
#
# openxFactory does not OWN openXdox; it MOUNTS the assembly root as a
# submodule and CONSUMES it at a commit and a whole-tree digest. This file is
# the whole of that claim, and `scripts/verify-openxdox-pin.py` is the running
# code that checks it.
#
# RULING F (Brett Heap, `opensoft/openxFactory#656`, 2026-09-05, "rule F
# openXdox only"): openxFactory pins openXdox and NOTHING ELSE. openDox's
# commit is a DERIVED value, read through openXdox's own
# `contracts/opendox-pin.yaml` at the commit named below, and it is never
# separately declared, pinned or mounted here. There is deliberately no
# `contracts/opendox-pin.yaml` in this repository and no second gitlink:
# `neutral-product-pin`'s chain clause makes each level declare its OWN direct
# upstream and forbids re-declaring a transitive one, because two levels free
# to declare the same product's commit is two answers to "which bytes are
# pinned", which is no answer.
#
# RULED OQ-L (Brett Heap, #656, 2026-09-09): a GIT SUBMODULE of the openXdox
# ASSEMBLY ROOT, chosen over the memo's recommended installable package. THE
# GITLINK IS THE COMMIT PIN — this file and the gitlink at `submodule_path`
# are halves of ONE invariant and move in ONE commit, on the estate's standing
# submodule discipline (`docs/opendox-cutover-runbook.md` § 7).
#
# WHY THERE IS NO `files:` AND NO `pinned_by_commit_only:`, unlike
# `contracts/openxwallet-pin.yaml`. Three reasons, and none of them is economy:
#
#   1. openXdox's own `contracts/manifest.yaml` declares
#      `contract_bundle_version: none` and `entries: []`. `neutral-product-pin`
#      keys the per-file obligation to "every artifact the product's own
#      manifest digests per file", and that set is EMPTY. The list has no
#      members to carry rather than members left out.
#   2. The whole-tree digest discharges the completeness obligation those two
#      lists exist to serve, and discharges it MORE STRONGLY. The capability's
#      own words for the published-artifact medium reach a whole-tree digest
#      over a source tree unchanged: "ONE digest addresses EVERY byte inside
#      it, so no member can be undeclared and none can be added or altered
#      without changing the referent."
#   3. It is the shape this carve's own pin family already uses.
#      `openXdox/contracts/code-pin.yaml`, `spec-pin.yaml` and
#      `opendox-pin.yaml` each carry `digest_definition: sorted-ls-tree-r-v1`
#      and `digests.tree_sha256` and no per-file list at all, and runbook § 7
#      names what this file carries as "`carve_commit:` … beside the commit and
#      tree digest". The wallet's eight `sha256`s exist for a migration history
#      this consumption has no analogue of — they are the rows openxFactory's
#      own manifest carried before the wallet carve — and inventing an
#      enumeration here would add rows the publisher never published.
#
# NO `contract_bundle_tag:`. openXdox has cut no bundle: `xdox-v1.0` is Phase 6
# (runbook § 9), strictly after this phase and after Phase 5, and is Brett
# Heap's own act. A label recorded before the thing it labels exists would be a
# claim, not a label, so the key is ABSENT rather than present-and-empty.
#
# OFFLINE LAW. The verifier reads this file, the gitlink, and the submodule's
# own object store. It never reads the network, never reads an upstream tree,
# and never reads openXdox's own `contracts/manifest.yaml`. A gate that reaches
# the network to decide whether it passes is a gate whose answer depends on the
# network.
# ============================================================================

source_repository: opensoft/openXdox

# The gitlink this pin governs, at the aggregation-neutral root beside
# `openXwallet` — a neutral product pins at the neutral root (DTN-022), never
# under `xFactories/`. A pin with no path cannot be checked against a gitlink.
submodule_path: openXdox

# The openXdox ASSEMBLY ROOT's commit — the one object whose single commit
# names both legs. Exactly 40 hex characters. NEVER a leg: `openXdox-code` and
# `openXdox-spec` are the assembly root's own job to pin, and openxFactory
# never pins or mounts a leg (split-opendox-two-layer-product task 5.1).
commit: "db58fffa58d49d92f58db40bd7e63cad3205052f"
revision_kind: commit

digest_algorithm: sha256

# WHAT IS DIGESTED, exactly. `sorted-ls-tree-r-v1`:
#   records = `git ls-tree -r -z <commit>` split on NUL, empties dropped
#   each record is `<mode> SP <type> SP <oid> TAB <path>`, path UNQUOTED
#   sort the records bytewise ascending
#   digest  = sha256(b"".join(record + b"\n" for record in records))
# Reproduced verbatim from `openXdox/contracts/code-pin.yaml`'s own comment
# block so the two spellings can be diffed by eye. Mode is included, so a
# permission change is drift; the oid is included, so any content change is
# drift; a nested submodule appears as `160000 commit <oid>`, so openXdox's own
# `code` or `spec` pin moving is drift too — which is what lets this ONE digest
# cover a three-repository product without mounting the other two.
digest_definition: sorted-ls-tree-r-v1
digests:
  tree_sha256: "43c60b29693820d3e8c066e9c6a088f306bf0a7c0f2d818d72ceb62657c53209"

# The BYTE-IDENTITY REFERENT, and record 2 of the three RULED OQ-I requires
# (Brett Heap, #656, 2026-09-09; `docs/opendox-cutover-runbook.md` § 1). In the
# FILE and not only in the runbook, because the referent must survive into the
# tree the gate reads — "HEAD" is no referent across a multi-pull-request wave,
# and this one spans at least eleven. This is the openxFactory commit openDox
# and openXdox were carved out of: `main` at the merge of the last pre-carve
# split (#855), with its `pytest-suite` green. `opendox-carve-0` is a LABEL
# beside it and never the referent.
carve_commit: "b075fd91dc8fced8e1373825ba80220c33536bae"

# openXdox carries NO `docs/pin-resync-runbook.md` of its own — unlike
# openXwallet, whose pin names one. Its `## The lockstep invariant` section is
# the procedure that exists and is what openXdox's OWN leg pins point at
# (`contracts/code-pin.yaml`, `contracts/spec-pin.yaml`, both
# `README.md#the-lockstep-invariant`), reached here through the mount exactly
# as the wallet pin reaches `openXwallet/docs/pin-resync-runbook.md`. The
# CARVE-time procedure — how this pin came to exist at all — is
# `docs/opendox-cutover-runbook.md` § 7. A resync runbook written for THIS
# consumption is owed and does not yet exist; naming a document that does not
# exist would be worse than naming the gap.
resync_runbook: "openXdox/README.md#the-lockstep-invariant"

# NAMED here so the pin is running code rather than an obligation stated in
# prose, matching the sibling pins' own `verify_pin:` key. Not yet wired into
# any required check: a consumer gate that runs it is task 5.3, Phase 5.
verify_pin: scripts/verify-openxdox-pin.py

On the shape, and where it is inference

Runbook § 7 settles the referent in one sentence — the pin "carries carve_commit: … beside the commit and tree digest" — and "tree digest" (singular, whole-repository) is the sorted-ls-tree-r-v1 vocabulary, not openxwallet-pin.yaml's per-file sha256 vocabulary. So this file is a hybrid: metadata fields (kind, source_repository, submodule_path, carve_commit, resync_runbook, verify_pin) follow contracts/openxwallet-pin.yaml, this repository's own pin conventions; digest fields (digest_algorithm, digest_definition, digests.tree_sha256) follow openXdox/contracts/code-pin.yaml and spec-pin.yaml, whose comment block defining sorted-ls-tree-r-v1 is reproduced here verbatim so the two spellings can be diffed by eye.

No files: and no pinned_by_commit_only:. neutral-product-pin keys the per-file obligation to "every artifact the product's own manifest digests per file", and openXdox's own contracts/manifest.yaml declares contract_bundle_version: none and entries: [] — that set is empty. The completeness the two lists exist to serve is discharged by the whole-tree digest, on the capability's own reasoning for the artifact medium: "ONE digest addresses EVERY byte inside it, so no member can be undeclared." All three sibling pins in this family (code-pin.yaml, spec-pin.yaml, opendox-pin.yaml) carry no per-file list either.

This exact hybrid has no byte-for-byte precedent. It is a reading of runbook § 7 plus the family's two existing shapes. design.md names the file (line 984) but does not specify its fields, and no #656 comment settles the layout. If a reviewer knows of a later ruling or a design.md passage that does, prefer it over this and say so — the shape is cheap to change, and it is better changed now than after Phase 5 consumes it.

No contract_bundle_tag:. xdox-v1.0 is Phase 6 (runbook § 9), after this phase and after Phase 5, and is Brett Heap's own act. Absent rather than present-and-empty.

resync_runbook: needed a fallback, and this discloses it. openXdox carries no docs/pin-resync-runbook.md — its docs/ holds only branch-protection.md — unlike openXwallet, whose pin names one. The field points at openXdox/README.md#the-lockstep-invariant (§ 95 of that README): the procedure that does exist, and the same target openXdox's own leg pins use, reached through the mount exactly as the wallet pin reaches into openXwallet/. A resync runbook written for this consumption is owed and does not exist; naming a document that does not exist would be worse than naming the gap.

A fifth path the brief did not have: the doc-health pin registry

The brief scoped this to four paths. Measuring rather than assuming turned up a fifth, and leaving it out would have landed a regression in openxFactory's own self-gate.

scripts/doc_health/pin_class.py holds the declared pin-class registry, and a commit-shaped value at an undeclared path is reported UNCOVERED. Measured on this tree, before and after:

before:  ... 0 uncovered site(s) ...
after adding the pin only:
  [UNCOVERED] contracts/openxdox-pin.yaml:76 (commit) -> db58fffa58d49d92f58db40bd7e63cad3205052f
  [UNCOVERED] contracts/openxdox-pin.yaml:104 (carve_commit) -> b075fd91dc8fced8e1373825ba80220c33536bae
  ... 2 uncovered site(s) ...
after registering the two members:
  [ok  ] contracts/openxdox-pin.yaml:104 (carve_commit) -> b075fd91... — ancestor of refs/remotes/origin/main
  [n/a ] contracts/openxdox-pin.yaml:76 (commit) -> db58fffa58d49d92f58db40bd7e63cad3205052f — cross-repository pin; answered by another authority
  ... 0 uncovered site(s) ...

Two members, not one, on openxwallet-pin.yaml's split rather than openreposhape-pin.yaml's. The openRepoShape member's own note draws the test: openxFactory authored none of openRepoShape's bytes, so that pin has no carve_commit and cannot have one. openXdox's bytes were carved out of this repository, so this pin names both the product's commit (CROSS_REPOSITORY) and the openxFactory commit it was taken at (REPO_LOCAL, and it must stay reachable here — it is RULED OQ-I's record 2). One member would have made whichever value it did not declare either a false orphan or an unverified pin.

The openRepoShape member records that its own site "announced itself" as UNCOVERED on the CI run of the pull request that added the pin. Declaring these in the same commit is that announcement not raised.

Checks run

Check Result
python3 scripts/verify-openxdox-pin.py exit 0 (output above)
git -C openXdox cat-file -t db58fffa58d49d92f58db40bd7e63cad3205052f commit
pytest tests/carve_manifest tests/carve_arrival 198 passed
pytest tests/openxwallet_pin tests/pin_registrations tests/openreposhape_pin 123 passed (incl. tests/openxwallet_pin 42 — the wallet pin still verifies with a second submodule declared)
pytest tests/doc-health/test_pin_reachability.py 71 passed
openspec validate --all --strict 96 passed, 4 failed — byte-identical to base bd1c54c6, no new failure
doc-health pin coverage 0 uncovered before, 0 uncovered after
full pytest tests/ -q -m "not postgres" running locally at the time of opening; the required pytest-suite check is the authority

The four standing openspec failures (change/disposition-codexfactory-declared-renames, change/disposition-codexfactory-floor-relocation-retitle, spec/neutral-product-pin, spec/repo-boundary-governance) were confirmed on a pristine worktree at base and are untouched by this diff.

Test counts do not move. Superseded by 00531d10 — see § 3 of the continuation below. Test counts move up: the verifier's hermetic suite adds 43 tests and 0 skips, so pytest-suite's MIN_SELECTED/MIN_PASSED floors gain margin and its exactly-pinned EXPECT_SKIPPED: "21" is still untouched — which remains the constraint that matters, because EXPECT_SKIPPED is a SUM pinned exactly and one conditionally-skipped test would red the required check.

The new submodule cannot break CI checkout. Superseded by 6fa8b36f — see § 4 of the continuation below. The survey was accurate (four workflows, each a hardcoded scoped --init openXwallet, none using submodules: true or recursive) and the conclusion drawn from it is what changed: pytest-suite now initializes openXdox too, because the pin's own test suite reads it. The other three still init openXwallet alone — they run scoped verifiers, not pytest tests/.

A contradiction in the runbook, flagged rather than resolved

§ 7 heads Phase 4 "the openXdox SUBMODULE in openxFactory"; § 10's rollback table gives Phase 4 as "git submodule deinit + revert the pin commit | one revert in the consumer"; § 12 row 3 puts "openxFactory's new openxdox-pin.yaml" at "Phases 3, 4". All three place this commit here.

But § 10 also says, two lines below its own table: "openxFactory is untouched until Phase 5" — and § 8's Phase 5 bullet list opens with "contracts/openxdox-pin.yaml + the gitlink" under the reasoning that "no ordering of two commits leaves a green intermediate".

Those cannot both be literal. This PR takes the § 7 / § 10-table / § 12 reading, and the green-intermediate worry is answered empirically above: this commit adds no tests, moves no floor, sheds nothing, and leaves openspec validate byte-identical — the intermediate is green. If Phase 5's own launch gate expects to author this file, that is this reading being wrong; stop and ask rather than authoring it twice.

NOT DONE — deliberately, and named so it is not assumed

  • No consumer-gate workflow. Nothing runs scripts/verify-openxdox-pin.py in CI. That is task 5.3, Phase 5. openreposhape-pin-gate.yml's "NOT A REQUIRED CHECK, and saying so is part of the change" is the precedent for saying it out loud.
  • No --aggregation-root mode on the verifier, and the aggregation parity is OWED. neutral-product-pin requires the aggregation's root gitlink for a pinned product to equal openxFactory's nested one. opensoft/xFactory records no openXdox gitlink at all today, so shipping that mode would ship a check that refuses by construction; adding the gitlink is a change to a different repository. Named as owed, not discharged.
  • No shed, no floor re-cut, no workflow conversion, no openspec/ edit. All Phase 5. Task 5.1's checkbox is therefore left unticked: this commit lands the pin, and openspec/changes/ is not touched by this PR at all.
  • No contracts/README.md row and no contracts/manifest.yaml type: pin row. Neither is machine-required: scripts/validate-pin-registrations.py is manifest-DRIVEN (it walks existing type: pin rows, of which there is exactly one, openspec-cli-pin), so an unregistered pin file raises nothing. The closest precedent — contracts/openreposhape-pin.yaml, the other pin on a whole external product openxFactory does not own — carries neither a README row nor a manifest row. Following it. Flagged in case the reviewer wants both added.

Continuation: independent re-verification of this head, and a red required check found and fixed

The author who pushed 7f76f978 did not survive to complete the round. A second author took the branch over and verified rather than re-authored it: every claim above was re-measured from a fresh clone with the submodule initialized, and nothing in contracts/openxdox-pin.yaml, the gitlink or scripts/verify-openxdox-pin.py was changed. Four things did need fixing, in 4b1bc824, 00531d10 and 6fa8b36f, none of them touching the consumption itself.

1. pytest-suite — the required check — was RED on 7f76f978, and correctly so

run 34516816733 on 7f76f978:
  1 failed, 10937 passed, 21 skipped, 338 deselected, 9 warnings, 180 subtests passed in 1061.74s

FAILED tests/doc-health/test_sentinel_vocabulary.py::test_the_pin_counts_did_not_move_and_no_site_is_classified_twice
E       assert (73, 26) == (71, 24)

That test carries a frozen census of the standing pin population, deliberately built as a tripwire against a pin-class member arriving unrecorded — "the only repair a reader could apply is to bump the number, which is exactly the reflex a frozen census exists to prevent." Declaring two new members legitimately moves it, so the fix is the one the test's own narrative prescribes: write the step down first, in that narrative's form, and only then advance the pair.

71 -> 73 is the first step in this census that moves the member count by two. contracts/openxdox-pin.yaml is the first artifact to declare two members at once, because one file carries two values with two localities — carve_commit (REPO_LOCAL, RULED OQ-I's record 2) and commit (CROSS_REPOSITORY). The 67 -> 69 step above it moved the site count by two but the member count by one, because only one of its two sites was new in kind. Enumerated with pin_class.verify() on the committed tree, never by arithmetic:

head 4b1bc824:      79 results / 27 members, standing census (73, 26)
main at ea34f22a:   77 results / 25 members, standing census (71, 24)
lost 1 (unchanged); uncovered (), vanished (), arrived () — all unchanged

That test's own header also read "70" and "four paragraphs" — already stale before this branch, since the 2026-09-08 step took the census to 71 and the paragraph count to six. Corrected to 73 and seven with the drift named out loud, on this same file's 70 -> 70 rule that a comment going stale while the assertion stayed true is corrected rather than left to be found.

2. Copilot's one finding — FACTUAL, and correct

The new registry comment called the openRepoShape member "below-but-one"; the insertion actually places openreposhape-pin-product-commit (line 842) immediately above the new block (line 891). Rewritten to name the member by identifier and by direction, so the reference cannot rot again if something is inserted between them. Comment text only. Copilot's verdict on the change itself was "🟢 Approval recommended".

3. Copilot round two — the verifier had no tests, and writing them found a false claim in it

"The new openXdox pin verifier isn't covered by tests. In this repo the analogous scripts/verify-openxwallet-pin.py has a dedicated suite… via a hermetic scratch repo." Correct, and not a style point — this was the only pin verifier in the repository without one:

suite verifier
tests/openxwallet_pin/ verify-openxwallet-pin.py
tests/openreposhape_pin/ validate-openreposhape-pin.py
tests/openspec_cli_pin/ validate-openspec-cli-pin.py
tests/pin_registrations/ the manifest-driven registration sweep
tests/review_lane_pin/ review-lane-pin.yaml
(nothing) verify-openxdox-pin.py

tests/openxdox_pin/test_openxdox_pin_verifier.py closes it on the wallet suite's shape — 43 tests, hermetic, nothing skipped (43 passed). The positive is adjudicated against the real repository root; the five refusals are adjudicated in a throwaway superproject under tmp_path whose nested repository carries a nested 160000 gitlink of its own, so the pin's central claim — one digest covering a three-repository product without mounting the other two — is provable rather than asserted. Departures from the wallet suite are consequences of the artifact and each is itself asserted: five openxdox-prefixed codes rather than six ratified ones (with a test that the two vocabularies share no token, since consumers refuse BY CODE), one whole-tree digest rather than a per-file loop, and no --aggregation-root mode.

Writing the suite found a claim in the verifier's docstring that was not true. It said a file deleted from the working tree "changes the recomputed tree digest and is reported as openxdox-pin-digest-mismatch". It does not — tree_digest runs git ls-tree -r -z <commit>, which reads the commit's tree object. Measured, not reasoned:

$ rm openXdox/README.md
$ python3 scripts/verify-openxdox-pin.py
OK openxdox-pin verified: openXdox@db58fffa58d49d92f58db40bd7e63cad3205052f, ...
exit 0

That is a real narrowing against verify-openxwallet-pin.py, whose pin-member-missing does catch a working-tree deletion, and the docstring claimed parity where there is none. It now states the true scope — this verifier answers "does the consumed commit contain the bytes the pin says", not "is the working tree still those bytes" — test_a_working_tree_deletion_is_deliberately_not_drift pins the behaviour so it cannot rot back, and whether the consumer gate wired in task 5.3 (Phase 5) also needs a dirty-checkout refusal is recorded as OWED for that task rather than argued away here. In CI the exposure is close to moot (the checkout is materialized from the gitlink on every run); the real stake is a local run telling its reader the truth about what it checked.

Three smaller things the writing turned up, each now pinned by a test rather than only fixed: <mode> is the first field of every digest record, so a chmod alone is drift; a nested leg gitlink moving inside openXdox is drift, which is exactly what lets one digest cover three repositories; and RULING F is now CHECKABLE rather than only stated in prose — test_ruling_f_is_checkable_no_opendox_pin_and_no_second_gitlink fails if anyone adds contracts/opendox-pin.yaml or a second gitlink to this repository.

The file is test_openxdox_pin_verifier.py and not test_verify_pin.py because tests/openxwallet_pin/ already owns that basename and neither directory carries __init__.py; the two collided at collection (import file mismatch) and reddened the whole suite. The sibling pin suites all use unique basenames for the same reason.

Test counts move up only: 43 added, 0 skipped — MIN_SELECTED/MIN_PASSED are floors and gain margin, and the exactly-pinned EXPECT_SKIPPED: "21" is untouched.

4. Copilot round three — CI could not see the submodule the new tests read

"The required pytest-suite workflow only runs git submodule update --init openXwallet (not openXdox), so python3 -m pytest tests/ … will fail in CI once this file is included." Right, and it would have been red. Fixed in 6fa8b36f by initializing the gitlink, not by weakening the tests:

- name: Init the openXwallet and openXdox gitlinks only
  run: git submodule update --init openXwallet openXdox

Six cases in the new suite read REPO_ROOT / "openXdox", and the load-bearing one recomputes the shipped sorted-ls-tree-r-v1 digest with a second implementation — the assertion that makes the pin a measured fact rather than a self-consistent one. A suite that cannot see the submodule cannot make it.

The other available repair — weakening those six to a skip — is the one this gate's own design rules out in as many words: a skip reports as a green bar, indistinguishable from a pass to every reader and every gate, and EXPECT_SKIPPED is pinned as an exact SUM precisely so nobody adds one quietly. "A check that cannot be reached reports as satisfied" is the whole class of defect the pin, the verifier and this suite exist to close; reaching for it to make CI green would have been that defect wearing the costume of a fix.

Scope kept tight, and stated so it is not assumed:

  • This is NOT task 5.3's consumer gate. Materializing a submodule so the test suite can read it is a different act from wiring scripts/verify-openxdox-pin.py as its own required check. That gate is Phase 5's, is unwritten, and stays named as owed below.
  • submodules: true stays absent and --recursive stays rejected: installs/omnigent-install is still not fetched (no test reads it), and openXdox's own code/spec legs are still not fetched — ls-tree -r reads a nested gitlink as an opaque 160000 record, so the whole-tree digest is correct without materializing either leg. That is the same property that lets ONE digest cover a three-repository product.
  • Only pytest-suite.yml moves. The three other workflows that init openXwallet (clearing-dispatch-gate, signed-execution-chain-gate, openxwallet-consumer-gate) run scoped verifiers rather than pytest tests/, so none of them reads the new directory.

Re-ran the suites that read a workflow file, since an edit to one is what could redden them — 697 passed. The gate-wiring assertions in tests/factory_identity/ and tests/signed_execution_chain/ target their own workflows and are untouched.

Everything else, re-measured

Re-verified Result
gitlink object exists git -C openXdox cat-file -t db58fffa58d49d92f58db40bd7e63cad3205052f -> commit
gitlink == opensoft/openXdox main db58fffa58d49d92f58db40bd7e63cad3205052f on both sides; openXdox PR #4 (carve/openxdox-root-pin) merged 2026-09-10T18:45:40Z
Phase 3 really landed in the pinned tree openXdox/contracts/manifest.yaml carries carved_from: {repository: opensoft/openxFactory, commit: b075fd91…, carve_tag: opendox-carve-0, legs: {code: 92, spec: 47}}; openXdox/contracts/opendox-pin.yaml carries commit: 49a99df2… (no longer the pre-Phase-3 bad2d2ad…) and carve_commit: b075fd91…
tree digest, recomputed from scratch (not by the verifier) 43c60b29693820d3e8c066e9c6a088f306bf0a7c0f2d818d72ceb62657c53209 over 29 sorted ls-tree -r -z records — equal to digests.tree_sha256
scripts/verify-openxdox-pin.py exit 0, output identical to the one quoted above, and again after 4b1bc824
pytest tests/carve_manifest tests/carve_arrival 198 passed
pytest tests/openxwallet_pin tests/pin_registrations tests/openreposhape_pin 123 passed — the wallet pin still verifies with a second submodule declared (OK openxwallet-pin verified: openXwallet@f3eb929b… (tag label wallet-v1.5), 8 digest(s) recomputed)
validate-pin-registrations.py / validate-manifest-digests.py / validate-carve-manifest.py / validate-trust-anchor.py exit 0 each (1 pin registration(s) cohere; 189 per-file digest(s) verify; carve manifest OK; 0 error(s), 0 warning(s))
doc-health --family submodule-pin-drift No findings, exit 0 — the new mount introduces no pin drift

openspec delta: ZERO, measured against main at ea34f22a (newer than this branch's merge-base). OPENSPEC_TELEMETRY=0 openspec validate --all --strict returns Totals: 96 passed, 4 failed (100 items) on both the branch and a pristine origin/main worktree, with the same four pre-existing failures (change/disposition-codexfactory-declared-renames, change/disposition-codexfactory-floor-relocation-retitle, spec/neutral-product-pin, spec/repo-boundary-governance). One correction to the table above: those counts come from a CLI 1.2.0 run. The authority is the pinned 1.12.0 binary the required openspec-cli-pin gate installs, which on this branch reads Totals: 98 passed, 2 failed (100 items) with both failures dispositioned — OK openspec-cli-pin: @fission-ai/[email protected] verified against its content address; every target validated --strict with 0 UNDISPOSITIONED failures. Either way the delta is zero, and it can only be zero: this diff touches no path under openspec/ at all.

Gate class: PLAIN, not the Rule 6 landing window. This PR touches no openspec/changes/ path. The full changed set is .gitmodules, contracts/openxdox-pin.yaml, the openXdox gitlink, scripts/verify-openxdox-pin.py, scripts/doc_health/pin_class.py, tests/doc-health/test_sentinel_vocabulary.py and tests/openxdox_pin/test_openxdox_pin_verifier.py — so the lane-collision protocol's landing-window rule (amended 2026-09-03) does not attach and no LANDING/LANDED pair is owed.

No README or doc-index row is owed, and that was checked rather than assumed. This PR adds nothing under docs/, so the "new docs get linked into the README doc index" rule has no subject. The closest precedent — contracts/openreposhape-pin.yaml, the other pin on a whole external product openxFactory does not own — carries no contracts/README.md row (zero matches in that file) and no type: pin row in contracts/manifest.yaml (which holds exactly one such row, openspec-cli-pin), and scripts/validate-pin-registrations.py is manifest-driven, so it raises nothing either. Following that precedent, and happy to add both rows if the reviewer wants them.

Not required, and red for a reason unrelated to this diff: SonarCloud Code Analysis fails its quality gate on duplication in new code — the new verifier deliberately re-implements verify-openxwallet-pin.py's ordered-check skeleton rather than importing it, for the reasons the module docstring gives. SonarCloud is not among the six required checks (signed-execution-chain-gate, lane-line, openspec-cli-pin, wallet-validation, pytest-suite, release-tag-gate).

Lands on Brett Heap's word "merge the OQ-L submodule pin when green" via the lane's gate; unblocks #872.

🤖 Generated with Claude Code

Summary by Sourcery

Pin openXdox as a content-addressed submodule consumption while keeping transitive openDox ownership with the upstream assembly.

New Features:

  • Mount opensoft/openXdox as a repository submodule and record its pinned assembly-root commit and whole-tree digest.
  • Add an offline verifier that validates the pin manifest, gitlink, checked-out revision, and tree digest with fail-closed refusals.

Enhancements:

  • Register the openXdox product and carve commits with doc-health pin coverage to prevent uncovered pin references.

…t-opendox task 5.1, RULED OQ-L, RULING F)

RULED OQ-L (Brett Heap, #656, 2026-09-09): a GIT SUBMODULE
of the openXdox ASSEMBLY ROOT, chosen over the memo's recommended installable
package. The gitlink IS the commit pin, so the gitlink and contracts/openxdox-pin.yaml
move in ONE commit (docs/opendox-cutover-runbook.md § 7).

RULING F (Brett Heap, #656, 2026-09-05, "rule F openXdox only"): openxFactory
pins openXdox and NOTHING ELSE. openDox's commit stays a DERIVED value, read
through openXdox's own contracts/opendox-pin.yaml (49a99df2 at the pinned
commit), and is never separately declared, pinned or mounted here. No openDox
gitlink and no contracts/opendox-pin.yaml appear in this diff.

  openXdox root commit  db58fffa58d49d92f58db40bd7e63cad3205052f
  tree digest           43c60b29693820d3e8c066e9c6a088f306bf0a7c0f2d818d72ceb62657c53209
                        (sorted-ls-tree-r-v1, the definition the family's own
                        code-pin.yaml/spec-pin.yaml state)
  carve_commit          b075fd9
                        (record 2 of RULED OQ-I's three provenance records)

db58fffa is opensoft/openXdox main after its Phase-3 root-pin pull request #4
merged (2026-09-10T18:45Z). Verified before pinning: its contracts/manifest.yaml
carries a real carved_from: block (openxFactory / b075fd9 / opendox-carve-0 /
legs {code: 92, spec: 47}) and its contracts/opendox-pin.yaml no longer names
the pre-Phase-3 bad2d2ad and does carry carve_commit:.

The § 7 "the pin names a real object" proof — git records a gitlink without
checking the object exists, so a wrong pin commits and pushes clean:

  $ git -C openXdox cat-file -t db58fffa58d49d92f58db40bd7e63cad3205052f
  commit

scripts/verify-openxdox-pin.py is the running code that checks the claim, and
it passes on this tree:

  OK openxdox-pin verified: openXdox@db58fffa58d49d92f58db40bd7e63cad3205052f,
  gitlink read from HEAD, sorted-ls-tree-r-v1 tree digest recomputed
  (43c60b29693820d3e8c066e9c6a088f306bf0a7c0f2d818d72ceb62657c53209)

It follows scripts/verify-openxwallet-pin.py structurally — ordered checks, first
failure wins, verify() raises and only main() prints or exits, exit 0 or 2 with
no exit 1 — and departs from it in three named ways: five openxdox-prefixed
refusal codes rather than the wallet's ratified six borrowed by token, ONE
whole-tree digest rather than a per-file loop (openXdox's own manifest digests
no artifact per file — contract_bundle_version: none, entries: []), and no
--aggregation-root mode, because opensoft/xFactory records no openXdox gitlink
at all and a mode that refuses by construction is not a check.

scripts/doc_health/pin_class.py gains the two class members the new pin needs.
Measured on this tree: 0 uncovered sites before, 2 after adding the pin alone
(contracts/openxdox-pin.yaml:76 commit and :104 carve_commit), 0 after
declaring them. TWO members and not one, on openxwallet-pin.yaml's split rather
than openreposhape-pin.yaml's: openxFactory authored none of openRepoShape's
bytes so that pin has no carve_commit, whereas openXdox's bytes were carved out
of THIS repository, so the two values have different localities and one member
would have made whichever it did not declare a false orphan or an unverified
pin. The openRepoShape member records that its own site announced itself as
UNCOVERED on the CI run of the pull request that added it; declaring these here
is that announcement not raised.

NOT in this commit, and named so it is not assumed: no consumer-gate workflow
runs the verifier (task 5.3, Phase 5); no shed, no floor re-cut, no workflow
conversion; nothing under openspec/ is touched, so task 5.1's checkbox stays
unticked. Test counts do not move — this commit adds no def test_, so
pytest-suite's MIN_SELECTED/MIN_PASSED floors and its exactly-pinned
EXPECT_SKIPPED: "21" are unaffected.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 10, 2026 18:50
@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

Mounts opensoft/openXdox as a single SSH submodule and pins its assembly-root gitlink to a specific commit plus whole-tree digest, with provenance metadata, an offline fail-closed verifier, and doc-health registry coverage. CI gating and aggregation parity remain intentionally deferred to the subsequent Phase 5 work.

Sequence diagram for offline openXdox pin verification

sequenceDiagram
    participant Caller
    participant Verifier as verify-openxdox-pin.py
    participant Pin as openxdox-pin.yaml
    participant Factory as openxFactory git tree
    participant Submodule as openXdox object store

    Caller->>Verifier: verify()
    Verifier->>Pin: load_pin()
    Verifier->>Factory: read recorded gitlink
    Verifier->>Submodule: rev-parse HEAD
    Verifier->>Submodule: tree_digest(commit)
    alt commit, checkout, and digest match
        Verifier-->>Caller: success, exit 0
    else any mismatch or unavailable data
        Verifier-->>Caller: PinRefusal, exit 2
    end
Loading

Flow diagram for the openXdox pin invariant

flowchart TD
    Start[Run verifier] --> Pin[Read and validate pin]
    Pin --> Init{Submodule initialized?}
    Init -->|No| Refuse[REFUSE and exit 2]
    Init -->|Yes| Gitlink{Gitlink equals pinned commit?}
    Gitlink -->|No| Refuse
    Gitlink -->|Yes| Checkout{Checkout equals pinned commit?}
    Checkout -->|No| Refuse
    Checkout -->|Yes| Digest{Whole-tree digest matches?}
    Digest -->|No| Refuse
    Digest -->|Yes| Pass[Report verified and exit 0]
Loading

File-Level Changes

Change Details Files
Adds the openXdox assembly root as a pinned submodule consumption with commit and whole-tree digest invariants.
  • Adds the SSH submodule entry and gitlink for openXdox at the specified commit.
  • Defines the source repository, submodule path, commit, carve provenance, digest algorithm/definition, tree digest, resync reference, and verifier in the pin manifest.
  • Deliberately pins only openXdox; openDox and its code/spec legs remain transitive or upstream-owned values.
.gitmodules
openXdox
contracts/openxdox-pin.yaml
Introduces an offline, fail-closed verifier for the openXdox pin.
  • Validates the pin schema and commit-only revision policy.
  • Checks submodule initialization, recorded gitlink, checked-out revision, and recomputed sorted-ls-tree-r-v1 digest.
  • Provides distinct refusal codes, remediation guidance, library use, and exit code 2 for all failures.
scripts/verify-openxdox-pin.py
Registers both openXdox pin commit fields with doc-health reachability checks.
  • Registers the repository-local carve_commit and cross-repository product commit with their respective locality semantics.
  • Prevents the new pin values from being reported as uncovered while preserving reachability validation for the carve commit.
scripts/doc_health/pin_class.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap
brettheap marked this pull request as ready for review September 10, 2026 18:50

@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 @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 6 hours and 10 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

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.

🟢 Approval recommended

The changes appear internally consistent and follow existing pin/submodule verifier patterns, with only a minor documentation comment correction suggested.

Pull request overview

This PR introduces an offline-verifiable, content-addressed pin of opensoft/openXdox by mounting it as a Git submodule at the repo root and recording its commit + whole-tree digest in a new pin manifest, with supporting verification tooling and doc-health pin coverage registration.

Changes:

  • Add openXdox as a Git submodule (via .gitmodules) to establish the mounting point for the pin.
  • Add contracts/openxdox-pin.yaml to record the pinned commit, digest definition, tree digest, and carve referent.
  • Add scripts/verify-openxdox-pin.py to verify (offline) the pin against recorded gitlink, checked-out revision, and recomputed whole-tree digest; register the pin’s commit-shaped fields in doc-health’s pin registry.
File summaries
File Description
.gitmodules Adds the openXdox submodule entry to support submodule-based consumption.
contracts/openxdox-pin.yaml Defines the openXdox pin manifest (commit + tree digest + carve commit) and verifier wiring.
scripts/verify-openxdox-pin.py Implements offline verification of the openXdox pin (gitlink, checkout, digest).
scripts/doc_health/pin_class.py Registers openxdox pin commit-shaped fields with doc-health pin coverage to avoid UNCOVERED findings.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • 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 scripts/doc_health/pin_class.py Resolved
…mber by direction rather than by distance

TWO FIXES, ONE ROUND, ON A HEAD ANOTHER AUTHOR PUSHED AND DID NOT LIVE TO
VERIFY. Neither touches the pin, the gitlink or the verifier: the openXdox
consumption 7f76f97 lands is unchanged and re-verified byte for byte.

1. THE REQUIRED pytest-suite WAS RED, AND CORRECTLY SO. The frozen census in
tests/doc-health/test_sentinel_vocabulary.py asserts the standing pin
population as a pair that must not move without a recorded step, and
7f76f97 moved it by declaring two new pin-class members:

  $ python3 -m pytest -q tests/doc-health/test_sentinel_vocabulary.py
  E       assert (73, 26) == (71, 24)

  run 34516816733 on 7f76f97:
  1 failed, 10937 passed, 21 skipped, 338 deselected, 180 subtests passed

That is the census working as designed — it is a tripwire against a member
arriving unrecorded, not a number to bump quietly — so the step is WRITTEN
DOWN in the running narrative the test carries, in that narrative's own form,
and only then is the pair advanced.

71 -> 73 is the first step in this census that moves the MEMBER count by two.
contracts/openxdox-pin.yaml is the third neutral-product pin and the first
artifact to declare two members at once, because one file carries two values
with two localities: carve_commit is an openxFactory commit that must stay
reachable HERE (REPO_LOCAL, RULED OQ-I's record 2), and commit is
opensoft/openXdox's, answered against another remote by another authority
(CROSS_REPOSITORY). The 67 -> 69 step above it also moved the SITE count by
two but the MEMBER count by one, because only one of its two sites was new in
kind. Both new sites are population=CURRENT, so they belong inside the frozen
pair rather than beside it like the rolling gate intents.

ENUMERATED WITH pin_class.verify() ON THE COMMITTED TREE, never by arithmetic
(the discipline the narrative states for every prior step):

  head:  79 results / 27 members, standing census (73, 26)
  main at ea34f22:  77 results / 25 members, standing census (71, 24)

lost stays 1; uncovered, vanished and arrived stay empty.

The test's HEADER said "70" and "four paragraphs" — already stale before this
branch, since the 2026-09-08 step took the census to 71 and the paragraph
count to six. Corrected to 73 and seven with the drift named, on this same
file's own 70 -> 70 rule that a comment going stale while the assertion stayed
true is corrected rather than left to be found.

2. COPILOT'S ONE FINDING, FACTUAL AND CORRECT. The new registry comment called
the openRepoShape member "below-but-one"; the insertion actually places
openreposhape-pin-product-commit (line 842) IMMEDIATELY ABOVE the new block
(line 891). Rewritten to name the member by identifier and by direction, so
the reference cannot rot again the next time something is inserted between
them. Comment text only.

Re-measured after both edits: 0 uncovered site(s), 0 orphaned, and
scripts/verify-openxdox-pin.py still exits 0 on the pinned tree.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 10, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new openXdox pin verifier is not covered by automated tests, increasing regression risk before it’s wired into gates.

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

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread scripts/verify-openxdox-pin.py Resolved
…ct the one claim in it that was not true

Copilot's second round: "The new openXdox pin verifier isn't covered by tests.
In this repo the analogous scripts/verify-openxwallet-pin.py has a dedicated
suite that exercises the positive path and all refusal codes via a hermetic
scratch repo." Correct, and not a style point — this was the ONLY pin verifier
in the repository without one:

  tests/openxwallet_pin/     verify-openxwallet-pin.py
  tests/openreposhape_pin/   validate-openreposhape-pin.py
  tests/openspec_cli_pin/    validate-openspec-cli-pin.py
  tests/pin_registrations/   the manifest-driven registration sweep
  tests/review_lane_pin/     review-lane-pin.yaml
  (nothing)                  verify-openxdox-pin.py

tests/openxdox_pin/test_openxdox_pin_verifier.py closes that, on the wallet
suite's shape: 43 tests, hermetic, NOTHING SKIPPED. The positive is adjudicated
against the real repository root; the five refusals are adjudicated in a
throwaway superproject under tmp_path whose nested repository carries a nested
160000 gitlink of its own, so the pin's central claim — that ONE digest covers
a three-repository product without mounting the other two — is provable rather
than asserted. Named departures from the wallet suite, all of them consequences
of the artifact: five openxdox-prefixed codes rather than six ratified ones
(and a test asserting the two vocabularies share no token, since consumers
refuse BY CODE), one whole-tree digest rather than a per-file loop, and no
--aggregation-root mode (asserted absent, with the reason).

  $ python3 -m pytest -q tests/openxdox_pin
  43 passed

THE SUITE FOUND A FALSE CLAIM IN THE VERIFIER'S OWN DOCSTRING, which is the
best argument for having written it. The module said:

  "A file deleted from the working tree after checkout changes the recomputed
   tree digest and is reported as `openxdox-pin-digest-mismatch`."

It does not. tree_digest runs `git ls-tree -r -z <commit>`, which reads the
COMMIT'S TREE OBJECT, so a working-tree deletion is invisible to it. Measured,
not reasoned:

  $ rm openXdox/README.md
  $ python3 scripts/verify-openxdox-pin.py
  OK openxdox-pin verified: openXdox@db58fffa58d49d92f58db40bd7e63cad3205052f, ...
  exit 0

That is a REAL NARROWING against verify-openxwallet-pin.py, whose
pin-member-missing does catch a working-tree deletion — and the docstring
claimed parity where there is none. Rewritten to state the true scope: this
verifier answers "does the consumed COMMIT contain the bytes the pin says",
not "is the working tree still those bytes". The behaviour is pinned by
test_a_working_tree_deletion_is_deliberately_not_drift so the claim cannot rot
back, and whether the consumer gate wired in task 5.3 (Phase 5) also needs a
dirty-checkout refusal is recorded as OWED for that task rather than argued
away here. In CI the exposure is close to moot — the checkout is materialized
from the gitlink every run — so what is really at stake is a local run telling
its reader the truth about what it checked.

Three smaller things the writing turned up, each pinned by a test rather than
just fixed: the digest includes <mode>, so a chmod alone is drift; a nested leg
gitlink moving inside openXdox is drift, which is what lets one digest cover
three repositories; and RULING F is now CHECKABLE rather than only stated in
prose — test_ruling_f_is_checkable_no_opendox_pin_and_no_second_gitlink fails
if anyone adds contracts/opendox-pin.yaml or a second gitlink here.

The file is tests/openxdox_pin/test_openxdox_pin_verifier.py and not
test_verify_pin.py because tests/openxwallet_pin/ already owns that basename
and neither directory carries __init__.py, so the two collided at collection
(`import file mismatch`) and reddened the whole suite. The sibling pin suites
all use unique basenames for the same reason.

Test counts move UP only: 43 added, 0 skipped, so pytest-suite's MIN_SELECTED
and MIN_PASSED floors are satisfied with more margin and its exactly-pinned
EXPECT_SKIPPED: "21" is untouched.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new “real repository” openXdox verifier tests require the openXdox submodule to be initialized, but the required pytest-suite workflow currently initializes only openXwallet, so CI will fail unless the workflow (or the tests) are adjusted.

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

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

…rifies the pin can see what it verifies

Copilot's third round, and it is right: "the required pytest-suite workflow only
runs `git submodule update --init openXwallet` (not openXdox), so
`python3 -m pytest tests/ ...` will fail in CI once this file is included."

tests/openxdox_pin/ adjudicates its positive case against the REAL checkout —
six of its cases read `REPO_ROOT / "openXdox"`, including the load-bearing one
that recomputes the shipped `sorted-ls-tree-r-v1` digest with a SECOND
implementation. That is the assertion which makes the pin a measured fact
rather than a self-consistent one, and a suite that cannot see the submodule
cannot make it. This commit adds `openXdox` to the one workflow that runs
`pytest tests/`.

The alternative was to weaken those six to a skip, and this gate's own design
rejects it in as many words: a skip reports as a GREEN BAR, indistinguishable
from a pass to every reader and every gate, and `EXPECT_SKIPPED` is pinned as
an exact SUM precisely so nobody can add one quietly. "A check that cannot be
reached reports as satisfied" is the whole class of defect the pin, the
verifier and its suite exist to close; reaching for it here to make CI green
would have been that defect, wearing the costume of a fix.

WHAT DID NOT CHANGE, AND IS NOT SMUGGLED IN. This is NOT task 5.3's consumer
gate. Materializing a submodule so the test suite can read it is a different
act from wiring `scripts/verify-openxdox-pin.py` as its own required check;
that gate is Phase 5's, is unwritten, and stays named as owed in the pull
request body. `submodules: true` stays absent and `--recursive` stays
rejected, for the reasons the block above the step already gives:
`installs/omnigent-install` is still not fetched because no test reads it, and
openXdox's own `code`/`spec` legs are still not fetched because `ls-tree -r`
reads a nested gitlink as an opaque `160000` record — the whole-tree digest is
correct without materializing either leg, which is the property that lets ONE
digest cover a three-repository product.

Only pytest-suite.yml moves. The three other workflows that init openXwallet —
clearing-dispatch-gate, signed-execution-chain-gate, openxwallet-consumer-gate
— run scoped verifiers rather than `pytest tests/`, so none of them reads the
new directory and none needed the second gitlink.

  $ python3 -m pytest -q tests/openxwallet_pin tests/factory_identity \
      tests/signed_execution_chain tests/sequenced_after tests/openxdox_pin \
      tests/scope_globs
  697 passed

(those are the suites that read a workflow file, so they are the ones an edit
to one could redden; the gate-wiring assertions in factory_identity and
signed_execution_chain target their OWN workflows and are untouched.)

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 10, 2026 19:38

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.

🟢 Approval recommended

The submodule pin, offline verifier, doc-health registration, and CI/test wiring are consistent and self-verifying, with comprehensive hermetic tests covering both success and refusal behavior.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
6.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@brettheap
brettheap merged commit edf0e24 into main Sep 10, 2026
13 of 14 checks passed
brettheap pushed a commit that referenced this pull request Sep 10, 2026
PR #917 merged (edf0e24): the openXdox
gitlink, .gitmodules and contracts/openxdox-pin.yaml moved together in
one commit, name the assembly root, and leave no second pin file or
gitlink. python3 scripts/verify-openxdox-pin.py passes live against
that commit. Task 5.1's own text is fully met; ticked citing #917 → M
per the packet's tick standard (PR #897 → 021c3d3).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 10, 2026
…e 5.1 tick at edf0e24 (records-only) (#924)

Phase 5 of the openDox carve (runbook § 8; split-opendox § 5), one atomic pull request on Brett Heap's words "then start the § 5 remainder when the OQ-L pin lands" / "merge the § 5 remainder when green" / "merge 924 when green" (2026-09-10 21:1xZ, #656 comment 5625573095): RECORDS-ONLY — two files: (1) `review/reality-check-2026-09-10-section-4-and-the-shed.md` (`Status: record`, `Kind: verification record`), the measured finding that NONE of the six § 4 boxes is fully met (each left open with its failing clause named) and that the § 5.2 shed CANNOT land while `docs/opendox-carve-manifest.yaml` stands (`check_surface` refuses any tree with a deleted manifest source path — `carve-path-absent`, 319 rows by construction; the one `deleted_at_carve` row is not separable because `scripts/ideation_dashboard/cli.py:104` imports it unconditionally) and that the adapter re-point is blocked (two-deep mount; CI initialised only `openXwallet` until #917; the surface import raises `ModuleNotFoundError: doc_health`) — the finding that produced Brett Heap's RULING (a) POST-SHED MODE; (2) `tasks.md`: task 5.1 TICKED citing #917 → `edf0e24f45b6e7baf5322023cbc1c43d28ff46cd` (gitlink `openXdox` → `db58fffa…`, `.gitmodules`, `contracts/openxdox-pin.yaml` moved in one commit; the assembly root named, no leg pinned or mounted; `verify-openxdox-pin.py` OK live). Deletes nothing, re-points nothing. Two evidentiary-precision notes owed a correction on the next tasks.md touch (PR-2): the tick's aside "nothing else in that diff" about commit 7f76f97 is overstated (that commit also carried `.gitmodules`, `pin_class.py`, `verify-openxdox-pin.py`; task 5.1's own text — pin file + gitlink in the SAME commit — holds), and the record's probe-1 figure "4 errors" undercounts a full-directory reproduction (27 collection errors; the finding is stronger, not weaker). Landed under a Rule 6 window (touches openspec/changes/). Independent verification: independent sonnet-max re-verifier, 2026-09-10 — head, the two files, every 5.1 clause against live main at `edf0e24f`, the record's lifecycle header (`scripts/doc-health.py --family status-validity`: zero findings on these files), probe 1 reproduced as a throwaway git-object commit (`carve-path-absent` + the `cli.py:104` ImportError), 4.3 and 4.6 reproduced, `openspec validate --all --strict` failure set identical to current main (zero new), 0 closing references in body and commits, 1 thread resolved with a real fix (5232db7), CI run 34529426780 SUCCESS, six required checks green.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap pushed a commit that referenced this pull request Sep 10, 2026
…kfile-first-line after the ratification encode

THE THIRD MERGE, AND THE FIRST ONE TAKEN AFTER THE ENCODE. `main` advanced by
four first-parent commits AFTER the ratification encode `d6877c00` was
committed — the encode already carried `main` @ `52e42be9` through two merges
taken FIRST, `acecc773` (merging `05c706d6`, before the bench) and `45b02e31`
(merging `52e42be9`, before the encode), the latter being the one
`review/verification-2026-09-10.md` § 0 recorded and measured on:

  `edf0e24f`  #917 — mounts `opensoft/openXdox` as a submodule and pins it
  `90beb006`  #912 — signs the Gate-Rules Council admitting record
  `d32509d3`  #908 — MERGES `amend-marker-declaring-nothing`, ratified, WITH
              its realization: the fourth and fifth marker-defect grounds
  `17a3b816`  #925 — archives `relocate-review-authority-floor-mirror`

so `origin/main` moved `52e42be9` -> `17a3b816` and the pull request went
CONFLICTING. The merge is taken as ITS OWN COMMIT rather than folded into any
edit of the packet.

ONE CONFLICT, IN THE README `## OpenSpec Records` BLOCK, AND IT IS RESOLVED AS
A UNION. Both sides inserted an 84-line row at the same position, the head of
`Active changes:` — main's ratified `amend-marker-declaring-nothing` (landed
through #908) and this branch's ratified
`amend-neutral-product-pin-lockfile-first-line` — and the two rows share four
identical continuation lines, which is why git split one insertion collision
into two hunks. **BOTH ROWS ARE KEPT WHOLE AND MAIN'S IS LEFT WHERE MAIN PUT
IT** — another lane's row is not reordered by this lane — with this packet's
row directly below it, and NO BYTE OF EITHER ROW IS EDITED. Proven rather than
asserted: the resolution's lines 574-657 hash `40a679e7…`, identical to
`origin/main`'s row; its lines 658-741 hash `c127e8a3…`, identical to the row
`d6877c00` wrote; and the resolution with this packet's 84 lines removed is
BYTE-EQUAL to `origin/main`'s README, 9,214 lines on both sides. So main's own
other README movement is preserved untouched, `17a3b816` relocating
`relocate-review-authority-floor-mirror` from the active list to the archived
one included.

`tests/sequenced_after/corpus-ledger.yaml` AUTO-MERGED AS THE SAME UNION, both
sides' rows kept. Against `d6877c00` the merge adds only main's two: the new
`amend-marker-declaring-nothing` row (`moved_by: "#908"`) and
`relocate-review-authority-floor-mirror` flipping `active` -> `archived`
(`moved_by: "#925"`). Against `17a3b816` it adds only this branch's two, both
seeded at `44020530` through the sanctioned `--seed-ledger --moved-by '#923'`
path: this change's row and the partner flip on the archived promoter
`pin-openspec-cli-dependency-closure`. Every other file in the merge is taken
from `main` unchanged.

THIS PACKET'S OWN SURFACE IS BYTE-UNMOVED BY THE MERGE.
`git diff --cached --stat d6877c0 -- openspec/changes/amend-neutral-product-pin-lockfile-first-line`
is EMPTY, so no committed `review/*.md` record is edited, the `.openspec.yaml`
`origin:` block is untouched and the `## MODIFIED` delta the bench reviewed and
the word ratified is unchanged.
`git diff --cached --stat d6877c0 -- openspec/specs/neutral-product-pin/` is
EMPTY too: the promoted requirement this amendment answers still opens its body
with the condition, so `spec/neutral-product-pin` still fails 1.2.0 `--strict`
and the ARCHIVE is still what clears it.

BUT THE MERGE MOVES THREE GATES AND ONE OF THEM READS THIS VERY BLOCK, SO THE
FIGURES ARE RE-MEASURED RATHER THAN RESTATED. `d32509d3` lands #908's
realization: `scripts/doc_health/modified_block_currency.py` gains grounds FOUR
and FIVE, and `tests/doc-health/test_modified_block_currency.py` goes 139 ->
144. This packet's `tasks.md` § 3.6 claimed its marker cannot fire either new
ground, and it claimed it against a DRAFT; that draft is now the SHIPPING
predicate, so the claim is measured again on the merged tree. `17a3b816` and
`d32509d3` also move the corpus every `--all --strict`, ledger and doc-health
total is taken over. The figures in `review/verification-2026-09-10.md` are the
`45b02e31` tree's and are NOT edited: that capture is a dated one-shot `record`.
The post-merge run is captured at its OWN path,
`review/verification-2026-09-10-post-merge.md`, exactly as PR #908 did at
`60a3b23e` and PR #887 at `e65aed15`.

Refs #882

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
brettheap pushed a commit that referenced this pull request Sep 10, 2026
Two Copilot review threads on this pull request flagged internal
inconsistencies in the verbatim measurement body: Section 3.1's plain-text
and --json validator captures name different spike commits for what reads
as one result, and Section 4.3(iii)'s CI claim reads as stale against
current main. Both findings are correct about their target commit, but
the measurement body is required to stay byte-for-byte as filed -- Brett
Heap's replies on both threads already declined to silently edit it.

Adds one editor's note beside each passage -- dated, attributed to the
filing, and naming the shas this reply establishes from the spike's
throwaway clone (spike/exit-a: base 52e42be -> 05ef9236 -> 88caf62e ->
b27f0555) and from openxFactory's own history (PR #917 -> edf0e24, one
commit after the spike's base, added the openXdox gitlink init to
pytest-suite.yml) -- without touching the measured text itself.

Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap pushed a commit that referenced this pull request Sep 10, 2026
A Copilot review comment on the previous commit noted that the Appendix's
"how to reproduce" recipe clones whatever commit is current on `main`
rather than checking out the pinned commit this note measures against --
main has moved since (the same PR #917 / edf0e24 the prior commit's
Section 4.3(iii) note already documents, among later commits). Adds one
editor's note after the recipe's code block, naming the pinned sha and
the checkout step to add, without touching the verbatim recipe itself.

Refs #656.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 10, 2026
…endox; brainstorm) (#929)

Files the § 5.2 shed-exit design note (the measurement agent's spike report of 2026-09-10) into `ideation/brainstorm/` and indexes it in `ideation/README.md`, so the measurement behind Brett Heap's RULING (a) POST-SHED MODE survives scratchpad loss. What it measured: exit (a) works — the carve-manifest validator answers OK over the full 319-row shed tree, both carve suites green at 209 passed, zero disposition changes, a 482-added / 17-removed diff across 4 files (realized as #928). The shed also exposes an unbudgeted adapter re-point — 104 import sites across 32 files naming 32 shed modules, 17 of them unreachable without an openDox mount (→ RULED Q7, the second submodule), the retained `tests/ideation-dashboard/conftest.py:106` import that aborts collection (→ RULED Q6), and a six-schema `contracts/schemas/` family still named by 127 tracked files (→ RULED Q2) — and costs exits (b) RE-CUT and (c) RETIREMENT. Provenance: #656 comments 5624521801 (ruling request), 5625144570 (measured addendum), 5625573095 (RULING (a)). The measurement text is verbatim from the lane's scratchpad note; the header and `## Provenance` are adapted to the brainstorm-doc format; three dated editor's notes (`> **Editor's note (filing, 2026-09-10):**`) correct a `verified_at` sha inconsistency (88caf62e vs b27f0555 — two distinct commits on the spike chain), date the since-superseded "CI inits only openXwallet" claim (#917 → edf0e24 widened the init), and pin the Appendix's reproduction clone — all added beside the original text without rewriting it, as the brainstorm stage allows. No `openspec/changes/` path. Independent check (sonnet fix round, 2026-09-10): 6 Copilot threads all resolved with real edits or notes; 0 closing references in body and commits; pytest-suite run 34538910209 success; six required checks green.

Refs #656 (stays OPEN).

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 10, 2026
… 5 review threads

Mirrors PR #917 file-for-file for the remaining pieces task 5.1's extension
owes (docs/opendox-cutover-runbook.md § 7; RULED Q7, #656 comment
5626248666):

- scripts/doc_health/pin_class.py: two new PinMember entries beside the
  openxdox-pin-* pair (opendox-pin-carve-commit REPO_LOCAL,
  opendox-pin-product-commit CROSS_REPOSITORY), both keyed on
  contracts/opendox-pin.yaml. Measured with pin_class.verify(): standing
  census 73,26 -> 75,28 (81 results / 29 members on this tree; 79 / 27 on
  origin/main at 85fb856), uncovered/vanished/arrived all untouched.
- tests/doc-health/test_sentinel_vocabulary.py: the census step recorded and
  the frozen-pair assertion moved to (75, 28), measured the same way against
  main, never by arithmetic.
- .github/workflows/pytest-suite.yml: the init step now also initializes
  openDox, so tests/opendox_pin/'s positive case (and its lockstep check,
  which reads openXdox's own derived pin) run against the real checkout in
  CI. openDox/code is not initialized and is not needed here.
- docs/opendox-cutover-runbook.md § 7: a dated amendment recording that
  RULED Q7 supersedes RULING F for openDox alone, quoting the ruling, naming
  the lockstep invariant, and noting design.md's matching sentence is
  amended by PR-2's packet patch rather than here.
- contracts/README.md: a doc-index row for contracts/opendox-pin.yaml in the
  Native openxFactory contracts table, alongside openxwallet-pin.yaml's and
  openspec-cli-pin.yaml's own rows (openxdox-pin.yaml has no row of its own
  to sit beside; the row says so rather than papering over it).

Addresses all 5 open review threads on the first commit:

1/2. tests/openxdox_pin/test_openxdox_pin_verifier.py's
   test_ruling_f_is_checkable_no_opendox_pin_and_no_second_gitlink asserted
   RULING F (no second pin, no second gitlink), which RULED Q7 supersedes for
   openDox. Renamed to test_ruling_q7_two_direct_upstreams_in_lockstep: it
   now asserts exactly two product gitlinks (openDox, openXdox) and the
   LOCKSTEP equality between contracts/opendox-pin.yaml's commit and the
   commit openXdox/contracts/opendox-pin.yaml names, read as a git blob at
   the openXdox gitlink's own commit rather than through the working tree.
   The docstring carries the supersession (ruling ids, date).
3. scripts/verify-opendox-pin.py's _openxdox_derived_commit read
   openXdox/contracts/opendox-pin.yaml from the mutable working tree, so an
   edit there that never moved the openXdox gitlink could satisfy or defeat
   the lockstep check regardless of what is actually pinned. Rewritten to
   resolve the openXdox gitlink (_recorded_gitlink, HEAD then the index,
   exactly as check 2 does for openDox) and read the blob at that commit
   with `git show <oid>:contracts/opendox-pin.yaml` against the openXdox
   submodule's own object store. Every failure to locate the gitlink or read
   or parse the blob refuses pin-unreadable (an environment fact, not one of
   the six governed codes) naming the init command.
4. load_pin()'s `except (OSError, yaml.YAMLError)` did not catch
   UnicodeDecodeError, so a non-UTF-8 pin file would crash main() with a
   traceback instead of the documented fail-closed refusal. Added
   UnicodeDecodeError to that clause; the rewritten _openxdox_derived_commit
   decodes the git-show blob by hand and catches the same error there.
5. Added tests/opendox_pin/test_opendox_pin_verifier.py, a hermetic suite of
   the same shape as tests/openxdox_pin/'s own: every one of the six
   opendox-pin-* refusal codes exercised (the five mirrored from
   openxdox-pin-*, plus the new lockstep-mismatch), a scratch fixture with
   TWO nested repositories (openDox, with its own nested leg gitlink, and
   openXdox, holding only the derived pin file check 5 reads), and the
   regression test the fix above exists to pass:
   test_editing_the_openxdox_working_tree_pin_does_not_fool_lockstep edits
   that file on disk, without moving the openXdox gitlink or committing, and
   asserts verify() is unmoved because it never reads that file.

Verified locally: both submodules initialized (git submodule update --init
openDox openXdox); `python3 scripts/verify-opendox-pin.py` and
verify-openxdox-pin.py both OK; `pytest tests/opendox_pin tests/openxdox_pin
tests/doc-health/test_sentinel_vocabulary.py` 140 passed;
validate-carve-manifest.py OK (456 rows, unchanged); `pytest tests/carve_manifest
tests/carve_arrival` 209 passed (grown from PR #917's own measured 198 by
#928, landed on main after #917 and before this branch was rebased onto it;
neither directory is touched by this commit). openDox main sha bound live
via `gh api repos/opensoft/openDox/branches/main`, matches the pinned
49a99df2...; the sorted-ls-tree-r-v1 digest independently recomputed from a
separate fresh clone equals the pin's recorded 96655ad2...; openXdox's own
contracts/opendox-pin.yaml at db58fffa... names the same 49a99df2... commit
this pin does.

Refs #656 (stays OPEN). Refs #872.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 11, 2026
… in lockstep with openXdox's pin (RULED Q7, #656) (#932)

The second direct upstream, on Brett Heap's rulings of 2026-09-10 22:3x–22:4xZ — Q7 "SECOND SUBMODULE — openxFactory mounts the openDox assembly root" (#656 comment 5626248666) and "openDox pin placement: OWN PR FIRST, MERGE WHEN GREEN" (5626260214) — superseding RULING F ("openXdox only", 2026-09-05) for the second upstream, recorded in runbook § 7. Mirrors #917 file-for-file: `.gitmodules`; the `openDox` gitlink → opensoft/openDox main `49a99df2561bf70e49337c999d79b36836718349` (`cat-file -t` = commit; equal to live main); `contracts/opendox-pin.yaml` (commit + `sorted-ls-tree-r-v1` digest `96655ad2d2b2b70e5d23b613d5f0e73232e39c75069959044b665313f2c76ee4` + `carve_commit b075fd9…`); `scripts/verify-opendox-pin.py` (four mirrored checks + LOCKSTEP as check 5; six refusal codes) with the hermetic suite `tests/opendox_pin/` (58 tests); `scripts/doc_health/pin_class.py` +2 members (`opendox-pin-carve-commit` REPO_LOCAL, `opendox-pin-product-commit` CROSS_REPOSITORY; census 73,26 → 75,28 MEASURED); `.github/workflows/pytest-suite.yml` inits `openDox` beside `openXwallet` and `openXdox`; `contracts/README.md` row; `docs/opendox-cutover-runbook.md` § 7 dated supersession. ONE NEW INVARIANT — LOCKSTEP: openxFactory's direct openDox pin MUST EQUAL the commit `openXdox/contracts/opendox-pin.yaml` names, read as a git BLOB at the commit the `openXdox` gitlink records (never the working tree); refused otherwise. The RULING-F test `test_ruling_f_is_checkable_no_opendox_pin_and_no_second_gitlink` is rewritten as `test_ruling_q7_two_direct_upstreams_in_lockstep` (exactly two product gitlinks; lockstep equality via an independent implementation). Fix rounds (d4ac93a, a3f1b8b; 9 Copilot threads resolved): the gitlink is read from the INDEX when it disagrees with HEAD — including a staged deletion or a staged type-change — so a one-commit resync of a replaced gitlink verifies before commit (3 regression tests; the sibling `verify-openxdox-pin.py` carries the same HEAD-first gap, unchanged here and owed a follow-up); the "sixth check" ordinal corrected everywhere; the pin file's text now says the blob-at-commit read the code performs. Validators at a3f1b8b: `OK opendox-pin verified: openDox@49a99df2…, … digest recomputed (96655ad2…), lockstep with openXdox confirmed`; `verify-openxdox-pin.py` OK; `validate-carve-manifest.py` `OK … phase carve, 456 row(s) … 318 digest(s)`; 143 pin/census tests + 209 carve tests passed. Unblocks #872 (PR #934: the `corpus_adapter.py` replica re-points to the pinned openDox copy, RULED OQ-Q) and PR-2 (the § 5.2 shed, RULED (a)). Independent verification: sonnet-max fix-round + re-verifier, 2026-09-11 — gitlink, live main and an independently recomputed digest all agree; lockstep holds at the recorded openXdox commit; 0 closing references in body and commits; six required checks green.

Refs #656 (stays OPEN). Refs #872.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 16, 2026
…the commit it passes at, which three paragraphs of amendment had separated from its referent

Self-verification of round 14's own insert. § 5.1's closing evidence line read
"passes live at that commit" — a referent that was one paragraph away when it was
written and is now four, with `cb2d3a2c`, `d5dd1ca5`, `3819625e` and `a6500141`
named in between. It names #917's `edf0e24f` instead, which is the commit the box
ticked on and the one whose gitlink reads the `db58fffa` in the quoted output.

Ledger unchanged: 47 [x] / 23 [ ] / 1 [~].
`openspec validate split-opendox-two-layer-product --strict` → valid.

Refs #656 (stays OPEN).

Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 22, 2026
…is qualified, the pin-shape ruling is recorded at the box that owns the direct pins, and STEP 2's openXdox target is corrected (#1135)

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

Refs #656 (stays OPEN).

**`split-opendox-two-layer-product` `tasks.md` AMENDMENT #11 — a small pre-archive amendment: one registered citation qualified, one ruling recorded at the box that owns its object, and one figure corrected where two boxes of amendment #10 disagreed.**

Branched from the landed `main` at **`6b298a1e`**. **Ledger 67 `[x]` / 3 `[ ]` / 2 `[~]` of 72 BEFORE and AFTER — ZERO marker changes**, verified rather than asserted: the file's `^- \[.\]` lines are **byte-identical to `main`'s in text and in order** (`diff` empty). One file, **+133 / −2**; the two deletions are the two lines the § 8.4 citation is repaired in. The three still open are §§ **5.6, 8.4, 8.9**; §§ 7.3 and 7.4 hold their `[~]`. Rule 6 applies.

> **Nothing here ticks anything, and that is the shape of the act.** Two of the three items were REGISTERED at amendment #10's head and deliberately not pushed; this is the amendment that carries them, which is the half of "register it" that makes registering honest.

## § 8.4 — the `assert_landed_pin` citation is qualified IN PLACE (`#656` `5768299637`)

Copilot's finding at amendment #10's head `525fe5b2` — LOW, *"Unresolvable citation path for assert_landed_pin"* — **was correct**. § 8.4 cited `specs_floor_block.py::assert_landed_pin` bare, and **no file of that name exists anywhere in `openxFactory`**: the function is codexFactory's, and this same document already qualifies it properly at § 5.6.

Folded **verbatim in the words Brett Heap wrote out for this amendment**: codexFactory's `scripts/merge_master/specs_floor_block.py::assert_landed_pin`.

**It is repaired in place rather than kept-and-superseded, and the rule is the packet's own**: a bookkeeping amendment fixes stale or under-qualified **COORDINATES** — § 7.3's locator took exactly this treatment at amendment #10 — and does not re-word what ratification was over. *The rule's words are unchanged; only the path that finds it is.*

**Why it waited one amendment, written into the box so the delay does not read as neglect**: the finding under-qualifies a citation in a box that **does not tick** — § 8.4 is one of the three still `[ ]` — so it falsified no tick and no evidence line, and this lane moves a reviewed head only for a finding showing that a **tick is wrong**. Six pushes had already re-run that gate. *The cost of that rule is exactly this: a true finding waits one amendment, and it is carried in writing so that waiting cannot become losing.*

## § 5.1 — the PIN SHAPE is ruled, and it lands at the box that owns the direct pins (`#656` `5768144952`)

**RULED 2026-09-21T22:03:33Z by Brett Heap, verbatim *"(b) for the pin shape, keep going"***, answering the RULING NEEDED at `5768088579`.

**`files:` and `pinned_by_commit_only:` stay DEFERRED in BOTH direct pins**, on the ONE-LINK-UP precedent this chain already runs on and which `scripts/verify-openxdox-pin.py` reached first: the whole-tree `sorted-ls-tree-r-v1` digest addresses **every byte** of the pinned root, so no member can be undeclared and none can be added or altered without changing the referent. It discharges the completeness obligation those two lists exist to serve, and discharges it **more strongly** than an enumeration; the legs the digested artifacts sit in are themselves pinned by commit **and** digest by their assembly root. *An enumeration here would add a second, weaker statement of one fact — and a second statement is a thing that can drift.*

**The trigger the header set for itself DID fire, and the ruling answers it rather than avoids it.** The revisit condition is the first commit whose pinned manifest carries a non-empty `entries:` row:

| measured | |
| --- | --- |
| commit | openDox **`dc7aa08f`** (the commit `dox-v1.0` tags), 2026-09-21 |
| manifest | `contract_bundle_version: dox-v1.0`, **3** entries |
| the three | `xfactory-workbench-chat-turn`, `xfactory-workbench-model-catalog`, `ideation-workbench` |
| where they live | `contracts/schemas/…` in `opensoft/openDox-spec` at **`8fe8c4c7`**, digested per file |

So **the revisit is recorded DONE with the digest reading as its resolution**, and the trigger sentence — *"that artifact then moves into a `files:` list here"* — is **amended rather than left standing contradicted**. *Two recorded readings in this family disagreed, and a ruling that leaves both in the tree leaves the next reader to pick one; that is why the amendment is written into the pin FILE, beside the sentence it supersedes, and not only onto the issue.*

**Why § 5.1 and not § 4.2**: the ruling is about the shape of a **DIRECT** pin, and the two direct pins `openxFactory` declares — `contracts/openxdox-pin.yaml` and, since RULED **Q7**, `contracts/opendox-pin.yaml` — are § 5.1's own object, with the two gitlinks they move with. § 4.2 owns openXdox's pin of openDox, one link further down the same chain, and takes its own record.

**The marker does not move.** § 5.1 is `[x]` on `#917` → `edf0e24f`, and a later advance of a pin it already ticked on does not re-open it.

## § 4.2 — the judgment stands and its FIRST REASON does not

The recorded hand-act judgment — that the per-file `sha256` and `pinned_by_commit_only:` lists are both empty — rested on **two** reasons, and the first has expired: openDox's manifest no longer reads `contract_bundle_version: none` with `entries: []`. The same ruling **keeps the judgment on its second reason**, the whole-tree digest.

**What this box now OWES, registered and not discharged**: `openXdox/contracts/opendox-pin.yaml` still carries the **un-amended trigger sentence** at openXdox `main` **`646f1dc0`**. The identical header amendment the `openxFactory` side takes inside STEP 2's own pull request is owed here in a small follow-up by the same actor after STEP 3. *Named at the box that owns the FILE, because an obligation recorded only where it was ruled is an obligation the file's next reader never meets — and the ruling's own words state the gap (the claim posted as `5767868394` was an earlier draft that lacked this finding) rather than closing it quietly.*

**The tick is undisturbed**: § 4.2 ticked on the file's **fields** at openXdox root `eca0b597` — product, source repository, an assembly-root `commit:`, `revision_kind`, the `sorted-ls-tree-r-v1` digest and the RULED ASK-1 migration triple — and a later advance of the `commit:` removes none of them. *A pin that moves is a pin that works.*

## § 8.7 — STEP 2's openXdox target is corrected, `2073e3a9` → `646f1dc0`

Amendment #10's AGGREGATION-SIDE RECORD A2 wrote step 2 as *"`openDox` → `dc7aa08f`, `openXdox` → `2073e3a9`"*, while **§ 4.6 of the same amendment wrote `646f1dc0`**. `646f1dc0` is right, and the gap between the two commits is the whole of STEP 1:

- `2073e3a9` is the commit **`xdox-v1.0`** tags, and its `contracts/opendox-pin.yaml` still pins openDox at `c4c5014d`;
- `openxFactory`'s `scripts/verify-opendox-pin.py` enforces a **LOCKSTEP** — its own direct openDox `commit:` must equal the `commit:` read from `openXdox/contracts/opendox-pin.yaml` at the pinned gitlink — so pinning `dox-v1.0` and `2073e3a9` together is **REFUSED**;
- `openXdox` **`#15` → `646f1dc0`** is the act that makes step 2 possible, and `openxFactory` **#1134** moves the `openXdox` gitlink to `646f1dc0` exactly.

**The sentence above the correction is kept**, because it is the reading the claim was written under. *The forced order at `#656` `5767733963` names its own openXdox target as **X**, a variable step 1 resolves; that record resolved it from the TAG instead of from the LANDING, which is the one substitution the order forbids.*

## STEP 2 and STEP 3 are recorded as POSITIONS, not landings

| step | state, measured at the forge | recorded at |
| --- | --- | --- |
| **2** — `openxFactory`'s nested leg-advance | **#1134**, `change/advance-nested-opendox-openxdox-legs`, head **`ca2c8a82`**, DRAFT, base `main`. **Six files**: both pin files (`commit:` + `digests.tree_sha256`), the `openDox` gitlink `c4c5014d → dc7aa08f`, the `openXdox` gitlink `88a1047e → 646f1dc0`, and both verifiers' tests. It carries the `openxFactory` half of the pin-shape amendment **in the same landing as the pin it amends**. | § 5.1 |
| **3** — the aggregation three-pointer sync (claim `5767572080`) | **has not opened**: `opensoft/xFactory`'s five open pull requests at 00:40Z are #396, #160, #22, #21, #5, none a pointer sync. | § 8.7 |

**Amendment #12 carries both shas.** This amendment records the act, its object and its head, and refuses to record a merge that has not happened — the same standard §§ 3.8/4.6 held to for their tags.

## What is deliberately NOT in this amendment

**The landings of 2026-09-21 that arrived after amendment #10's head are already in the file** — checked against `origin/main` rather than assumed: `openXdox` **#15 → `646f1dc0`** is recorded at § 4.6 (`#656` `5768022822`) and the **fourth MIGRATION_PIN ceremony**, `xFactory` **#475 → `c88d1fdd`**, at § 5.6 with its four gates (`#656` `5768064136`). Amendment #10 carried both; re-recording them would be a duplicate, not a record.

**#1131's own landing is carried by the ledger count alone** — this amendment IS that record.

## Copilot round 1 — TWO FACT findings, both right, both taken as fixes (head `22b9af23`)

**Finding `r4067623184` (MEDIUM) — *"Empty pin resolution omits required per-file hashes"* — is right in the delta, and the amendment's prose was wrong to read as settled.** Measured in this packet's OWN ratified `neutral-product-pin` MODIFIED requirement:

| `specs/neutral-product-pin/spec.md` | what it says |
| --- | --- |
| **`:87-100`** | the **SOURCE-TREE** clause: the pin *"SHALL carry the product's COMMIT, its `revision_kind`, a per-file `sha256` for every artifact the product's own manifest digests per file, and `pinned_by_commit_only:` for every artifact the product content-addresses by commit alone"* |
| **`:102-121`** | the one-digest-addresses-every-byte reasoning **is in the requirement** — and it is scoped to *"WHERE THE PRODUCT IS DISTRIBUTED AS A PUBLISHED, CONTENT-ADDRESSED ARTIFACT RATHER THAN AS A SOURCE TREE"* |
| **`:123-138`** | the runtime clause **this packet itself added**: the deployment declaration *"SHALL NOT be read as permission to skip the digests — commit and per-file `sha256` remain the trusted referent exactly as for a file-read pin"* |

**openDox is pinned as a SOURCE TREE, by commit**, so `dc7aa08f`'s three per-file entries make that obligation **non-vacuous for the first time** — exactly what the pin header's own trigger anticipated.

**SETTLED and NOT SETTLED are now stated separately in the box.** Settled: what the two pin FILES carry today — Brett's word at `5768144952`, already executed. Not settled: whether the source-tree clause is discharged by a whole-tree digest — **normative text**, therefore a spec-delta-class act, on the disposition RULED `5700622683` gave § 7.1's scenario-4 defect and § 7.3 records for its own ratified trigger phrase: registered, owed from an act that CLAIMS the delta, never repaired by a bookkeeping amendment.

> **RULING NEEDED** (registered in the box, not left on a pull request): **(a)** both direct pins carry the three per-file `sha256` entries plus an explicit `pinned_by_commit_only: []`, the deferral narrowing to the SHAPE of the lists rather than their existence; **(b)** the source-tree clause is amended to admit a whole-tree `sorted-ls-tree-r-v1` digest as an EQUIVALENT discharge — the reading the ruling already applies one medium over; **(c)** the ruling stands as a recorded EXCEPTION, named at the box and at the delta. **REC (b)**, because it leaves ONE rule in the corpus instead of a rule and an exception.

§ 4.2 carries a pointer to the same tension, so the actor taking that file's follow-up meets it **before** editing the header rather than after.

**Finding 2 (Copilot's overview — the intervening `6df0a030`) is also right.** § 8.7's correction said the two commits are *"one commit apart"*. **Measured on the root's own history they are two**, and only the second is STEP 1:

`2073e3a9` (#13, release surface, 20:56:18Z) → **`6df0a030`** (#14, CHANGELOG `draft` → `standard`, 21:39:17Z, **touching no pin**) → **`646f1dc0`** (#15, 21:51:39Z, the pin advance that IS step 1).

*A reader counting back one from `646f1dc0` lands on a CHANGELOG edit rather than on the tag — the off-by-one locator class this packet has already spent three amendments on. Fixed rather than tidied away, and the correction-of-a-correction is left on the page.*

**Markers are still untouched after both fixes**: `67 [x] / 3 [ ] / 2 [~] of 72`, and the `^- \[.\]` lines remain byte-identical to `main`'s in text and in order.


### Copilot round 2 — one LOW finding, right, taken as a fix (head `439843f6`)

**`r4067646318` — *"Pin-file trigger amendments remain incomplete"*.** § 5.1 wrote that the trigger sentence *"is AMENDED"*, which reads as a landed fact, while the same box's execution paragraph two below records the `openxFactory` half as **in flight** in `#1134` and the openXdox half as **owed**. One box stated a thing as done and, further down, as pending.

It now reads **"is RULED AMENDED"**, with a paragraph stating the split in terms: **as this amendment is written, NEITHER pin file carries the amended header on a landed commit** — the `openxFactory` side is in flight inside STEP 2's pull request, the openXdox side is not yet authored. *What is DONE is the ruling and the revisit it answers; what is PENDING is the execution, in two pull requests.*

**The finding's reasoning about the archive is why it earned a head**: a ledger that reads *"amended"* where it means *"ruled to be amended"* is how an archive comes to treat outstanding work as closed. This packet has refused that at § 3.7 (three candidate heads), § 4.5a (an abbreviated command) and §§ 3.8/4.6 (a live read of a tag ref), each time by recording nothing but a landed sha as landed — and neither STEP 2 nor STEP 3 is recorded as landed anywhere in this amendment.

**Three findings across two rounds, all three FACT-class on this amendment's own prose, all three taken as fixes; zero registered.** Markers untouched throughout.


## Round 3 — STEP 2 has LANDED, and three of its handed figures are corrected

**`openxFactory` #1134 → `aaddda666165655a60abc1720f271e2e967e3bdc`, `mergedAt` 2026-09-22T01:12:58Z** — the STEP 2 nested leg advance. Six files; both gitlinks at **`dc7aa08f`** and **`646f1dc0`** exactly. **The in-flight sentences are SUPERSEDED and KEPT with their clock** (measured 00:36Z, landed thirty-six minutes later), which is this packet's standing treatment of a position overtaken by an act.

| handed | measured | why it is recorded |
| --- | --- | --- |
| `mergedAt` 01:13:04Z | **`mergedAt` 01:12:58Z**, commit date **01:12:57Z** | the seconds change no gate — **the FIELD does**, which is why this packet names the field beside every clock |
| (unstated) | **a SQUASH**: ONE parent, subject ending `(#1134)` | not the two-parent MERGE COMMIT the two assembly-root pin landings took |
| head `ca2c8a82` (measured 00:36Z) | **`a28d68a6`** is `#1134`'s final PR head — the **source ref** that was squashed; **`aaddda66`** is the commit on `main` | three shas, none of them each other: a head is a MOVING reference until a landing fixes a different sha. *Corrected on Copilot finding `r4067741174`, which caught an earlier round writing "the head that landed" — the one error class this packet is built to catch, since it ticks on landed shas and nothing else.* |

**One narrative defect in `#1134`'s own body is REGISTERED and not fixed** (another actor's text; no sha turns on it): it says the openXdox target is *"one commit past `xdox-v1.0`"*, and **measured it is two**. **That is the identical off-by-one this amendment corrected at § 8.7**, reached independently on the other side of the same landing — the argument for recording defect CLASSES and not only defects.

**§ 8.7 — STEP 3 re-measured at 01:17Z, after step 2 landed: still not opened.** `opensoft/xFactory` now carries six open pull requests; the new one is **#477**, the ceremony-history DOCS follow-up § 5.6 already registered, **not** the sync.

**§ 3.6 — the openDox-code hygiene arc has landed twice, at the box that already carries its register**, and neither landing moves it: **#33 → `1d4ac83c`** (2026-09-19T02:29:06Z) and **#34 → `f8a1eced`** (2026-09-22T01:07:19Z, a squash). The triple is **measured, not reported** — `1114 / 1111 / 3` at `.github/workflows/validate.yml`:2128 with `MIN_SELECTED`/`MIN_PASSED` at :2136-2137, where #33 read `1109/1106/3` and the root-pinned `d816cf06` reads `1099/1096/3`. **And the reason neither touches an obligation is verified rather than asserted**: the `openDox` assembly root still pins `code` at `d816cf06`, and `f8a1eced` is **ahead_by 2, behind_by 0** of it. *(Clock correction owed to the report: #34 was handed as 01:07:26Z; both fields that exist read 01:07:19Z.)*

**`origin/main` `aaddda66` is merged into this branch**, and the markers are re-verified against it: `67 [x] / 3 [ ] / 2 [~] of 72`, `^- \[.\]` lines byte-identical in text and order.


### Round 5 — the last head-moving round: *"direct pins"* named two different pairs

Copilot's round-4 overview reported **Findings: None** with the headline *"the pin-trigger evidence must be attributed to the correct direct and transitive pin files"*. No thread, nothing to register — and the headline is right about the prose: § 5.1 used **"direct pins"** for **two different pairs**, four paragraphs apart, and only ONE file belongs to both.

| the phrase | the pair | |
| --- | --- | --- |
| the **ruling's** — *"both direct pins"* | `openxFactory`'s `contracts/opendox-pin.yaml` + `openXdox`'s file of the same name | each DIRECT from its own consumer's position; the second is TRANSITIVE as seen from `openxFactory` |
| **this box's own** | `contracts/openxdox-pin.yaml` + `contracts/opendox-pin.yaml` | the two pins `openxFactory` DECLARES — what RULED **Q7** made two |

The deferral sentence now **names its two files** instead of saying *"both direct pins"*, and a **PHRASE COLLISION** paragraph flags the ambiguity once — on the same treatment the `R-5` collision gets at § 5.6: every mention names its files and **neither phrase is renamed**, because renaming a ruling's label in a ledger breaks every record that cites it.

**This is the final head-moving round on this amendment.** Anything further is registered for #12.


## Round 6 — a FOLD, not a review round: STEP 3 lands and the forced order is COMPLETE

**`opensoft/xFactory` #478 → `1385f380117f54f1e266e239a9e467e730ce3f29`, `mergedAt` 2026-09-22T01:33:07Z, a MERGE COMMIT (two parents).** The three pointers are read **at that commit**, not from its title: `openxFactory` → **`aaddda66`**, `openDox` → **`dc7aa08f`**, `openXdox` → **`646f1dc0`**. The equality § 8.7's own line checks holds again for **both** legs — STEP 1 broke it by design and STEP 3 restores it, which is what makes the order *forced* rather than preferred.

| the forced order, `#656` `5767733963` | landing | UTC |
| --- | --- | --- |
| **STEP 1** `openXdox` #15 | `646f1dc0` | 2026-09-21T21:51:39Z |
| **STEP 2** `openxFactory` #1134 | `aaddda66` (squash) | 01:12:58Z |
| **STEP 3** `xFactory` #478 | `1385f380` (merge commit) | 01:33:07Z |

**Four files is not a breach of #474's two-file invariant — it is a different sync.** #474 was the openxFactory-**pointer** sync (that gitlink plus `.github/clearing/openxfactory/PIN.yaml`); this is the **three-pointer** sync, so its shape is three gitlinks plus that same clearing PIN, and #474's pair moves here too for #474's own reason: the nightly runs its scripts from the `openxFactory` gitlink.

**§§ 5.1 and 4.2 — both halves of the header amendment have landed**, so round 2's *"NEITHER pin file carries the amended header on a landed commit"* is superseded and kept with its clock. The openXdox half is **`openXdox` #16 → `7194c06ca456d1675e32e890b4acf640b14bfc60`**, `mergedAt` 01:33:20Z, a squash, one file. **Measured in the landed bytes rather than taken from the title**: it cites the ruling `5768144952` **twice**, the trigger sentence *"that artifact then moves into a `files:` list here"* **no longer occurs in it at all**, and `commit:` still reads `dc7aa08f` — the header moved, the referent did not. **§ 4.2's obligation was registered as owed at 00:45Z and discharged at 01:33Z**, inside one amendment, and both are recorded: *a ledger that records only what is still outstanding cannot be used to check what was.*

> **A clock pattern worth more than its four figures.** #1134 handed 01:13:04Z / measured **01:12:58Z**; `openDox-code` #34 handed 01:07:26Z / **01:07:19Z**; #478 handed 01:33:14Z / **01:33:07Z**; `openXdox` #16 handed 01:33:28Z / **01:33:20Z**. **Four reports, every one six to eight seconds fast** — a systematic offset in whatever field the reports read, not four slips. It changes no gate; this packet names the FIELD beside every clock precisely so an offset like that is visible instead of invisible.

**The Copilot finding budget stays closed at round 5.** This round folds landings the holder sent while the amendment was open.


### Round 7 — round 6's fold left its own plan standing as live, and the marker goes in the same round

**`r4067822689` (MEDIUM) is right.** Round 6 recorded `openXdox` #16 as landed and § 4.2's obligation as discharged, and left § 5.1's *"EXECUTION IN TWO HALVES, AND THE SECOND IS OWED"* standing beneath it with no superseded timestamp and no discharge reference — one box saying both halves landed and, four paragraphs down, scheduling the second as future work. **The same defect class round 2 corrected, re-created by a later fold in the same section.**

The plan is **kept** — this packet keeps superseded readings in the present tense of their own act — and it is now **marked** *SUPERSEDED 2026-09-22T01:33:20Z*, naming `openXdox` #16 → `7194c06c` as the discharge and § 4.2 as the other place it is recorded. **The general lesson is written into the marker, not merely applied**: a fold that lands an obligation must mark every plan that schedules it, in the same round as the fold, or the contradiction outlives the round that made it.


### Round 8 — the mirror, found in the review BODY rather than in a thread

Copilot's round-7 review reported **Findings: None** open and **0 unresolved threads**, and carried a **"Previously missed"** finding in its body, in text round 7 did not touch: § 4.2's heading *"WHAT THIS BOX OWES, REGISTERED AND NOT DISCHARGED HERE"* still presented the obligation as live with its own discharge in the very next paragraph.

**It is right, and it is the exact mirror of what round 7 fixed at § 5.1**, so it takes the identical treatment: the reading is **kept** in the present tense of its own act and **marked** *SUPERSEDED 2026-09-22T01:33:20Z*, naming `openXdox` #16 → `7194c06c`. **The marker rule now stands at both boxes rather than only at the one that was reported.**

*Recorded because of where it was visible: a zero-unresolved-threads count is not evidence, and this lane's gate reads the review BODY for exactly this block.*


## Gates

`openspec validate split-opendox-two-layer-product --strict` **valid** · `proposal-support.py . verify` **ok** · `validate-sequenced-after.py . --ledger-diff` **clean (222 rows)**.

`openspec validate --all --strict` → **106 passed, 1 failed** — and **the one is not this branch's**: `add-chain-attestation`'s `signed-execution-chain` MODIFIED block omits *"a tranche-two link does not exist yet"*. **Measured identical at this branch's own base `6b298a1e` AND at `main` `aaddda66` after the merge**, so it is inherited `main`-red; it is asked of lane **`openxfactory-1`** by name at `#656` comment `5767267092`, and it is § 8.9's registered residue (vi).


Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <[email protected]>
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