You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
§ 3.7 FLOOR PART 3, openDox side: the declared conformance factory and Q-F1's transposition - #31
CLAIM 5736795055 — split-opendox-two-layer-product § 3.7 FLOOR PART 3, the openDox side. The other two sides are landed: openxFactory's half of RULED Q-F1 (a) (#1086 → 049d54a9) and openXdox's reader (openXdox-code#23 → 3ee8cd31).
§ 3.7 FLOOR PART 3 — openDox's conformance reader
The box asks for one thing and names two parts of it. Its own words:
§ 3.7 also owes a DECLARED factory and Q-F1's transposition — tasks.md:1392-1394
a reader that exists is not a pass recorded. The exit line — the three-argument command returning OK — 17 of 17 … is owed — tasks.md:1489-1493
Q-F1 (a) — how FLOOR PART 3 runs against a GIT-HISTORY reader: the DESTINATION transposes the corpus into git and says so (conformance_corpus.transpose(), run with --corpus <transposition>), documents, keys and bytes unchanged — tasks.md:1357-1361
So this PR is a factory, a transposition, and a recorded pass — not a CI step. openDox's implementation already existed (LocalGitCorpus, landed by #26 with Q-F2's three construction data on __init__); what was missing was the module that points it at somebody else's corpus. The ledger's reading of this side was blunt and correct: "openDox — NOT EVIDENCED, and unlike openXdox this one has NOT moved: openDox-code carries no conformance reader at all" (:1516-1519).
The pass, measured
openxFactory's runner at eb1880cb, against this tree and a transposition built by this module:
$ python3 scripts/verify-carve-conformance.py \
--destination opendox_code \
--dest-root <this checkout> \
--adapter opendox.conformance_corpus:reader \
--corpus <the transposition>
OK …: opendox_code passed the neutral conformance corpus — 17 of 17 check(s),
reader opendox.conformance_corpus:reader, corpus …,
TRANSPOSED and FAITHFUL to …/tests/corpus-adapter/fixtures — 3 document(s) at
revision 91c6319e…, key/sha256 table 744c9183…, unmoved across the run
EXIT=0
TRANSPOSED and FAITHFUL is the half that cannot be faked: the runner computes {key: sha256(bytes)} off openxFactory's files and compares it against what this reader serves, so a transposition that dropped, added, renamed or re-encoded a document refuses conformance-corpus-unfaithful instead of passing.
What the module is
152 lines, two functions.
reader(name, location)
the declared factory. Neither argument is used, and that is the property being measured rather than an oversight: one reader built from the corpus's terms alone is pointed at all four of the corpus's states in a single run, which the three resolution-time negative confirmations require.
transpose(shipped, dst)
Q-F1 (a)'s permission, taken with its proof — the same documents laid into git, bytes and keys unchanged.
write_path=None is load-bearing, and is the one place this could have quietly failed. LocalGitCorpus declares openDox's governed write path; the corpus's read-only-declared-at-resolution check asserts that resolution reports none, and has a name for a reader that brings one anyway: "a reader is inventing one". kind_field / required_fields are the corpus's own two-field header (Type, Title) — a corpus that "has never heard of a factory", in the words of its own first document — so they are values here, never defaults inherited from openDox.
All four states are built, because the seventeen checks resolve four locations and three of them are negative confirmations:
neutral — a git repository holding exactly the shipped files
empty — a repository committed with --allow-empty and no tracked path; a .gitkeep would be listed by ls-tree -r and the empty corpus would hold a document
not-a-directory — a file
the absent state — built by not creating it, which is the only honest way to build it
The tests, and what they deliberately do not do
8 tests, added to the required job's named list. They prove the property the runner checks, not the run: the runner needs openxFactory's checkout and its fixtures, which this leg does not have and must not acquire to satisfy a test. So they reproduce the runner's own asymmetric comparison — a {key: sha256} table off the files against what the reader serves — over a corpus built in a tmpdir with the shipped one's shape, plus: the transposition adds no key of its own; the empty state answers rather than refuses; both refusal states refuse with the right kind.
Bytes are compared as Document.contentbytes, never decoded — a transposition that re-encoded a document would round-trip through str and compare equal while the bytes on disk had changed.
Honest size: M
The factory is small (openXdox's analogue is 94 lines) because the adapter already exists here. transpose() is the part openXdox never needed, and the faithfulness proof is unforgiving about keys, so it is a medium change rather than a small one.
The pin
The required job's collection triple is pinned by this lane's #29 → 373b05aa. Adding a test file moves it, so the floors are re-measured from this PR's own CI run and raised with the reason in the same commit — pytest-suite.yml's own procedure, and the mechanism its comment names: what moves these numbers here is editing the explicit list, and nothing else.
Coordination
#30 @58852e1f is open on this repository and overlaps two files (validate.yml, local_git_adapter.py). Different subject, different claim; named before authoring rather than discovered at a conflict. If it lands first this branch takes git merge origin/main — never a rebase — and re-measures the pin afterwards, because #30's own test additions move the same three numbers.
This does not tick § 3.7, which needs both destinations; openXdox's pass is evidenced (5736681367) and this supplies openDox's. It is also § 8.2 part 3, whose other three parts are already on record.
Provide openDox's declared conformance reader and faithfully transpose the neutral corpus into git for Q-F1 validation.
New Features:
Add an openDox conformance reader factory for the neutral corpus and a faithful git-based corpus transposition covering populated, empty, unreadable, and absent states.
Enhancements:
Harden git-based transposition against ambient repository, configuration, attributes, hooks, signing, and line-ending settings while verifying committed bytes match the source corpus.
Declare the neutral corpus schema and read-only behavior required for conformance resolution.
CI:
Add the conformance corpus tests to the required validation suite and raise the collection and pass floors to reflect the expanded and remeasured test set.
Tests:
Add tests covering factory configuration, key and byte fidelity, empty and refusal states, and hostile git environment conditions.
…osition
First of two commits; the pin bump follows with the numbers CI prints for
this one. § 3.7 asks that EVERY destination PASS the neutral conformance
corpus, and its own words say what that takes from this leg: "§ 3.7 also
owes a DECLARED factory and Q-F1's transposition", and "a reader that
exists is not a pass recorded".
`src/opendox/conformance_corpus.py`, 152 lines, two functions:
reader(name, location) the factory the runner imports. Neither argument
is used, which is the property being measured:
one reader built from the corpus's terms alone is
pointed at all four of the corpus's states in a
single run, which the three resolution-time
negative confirmations require.
transpose(shipped, dst) RULED Q-F1 (a)'s permission, taken with its
proof: the same documents laid into git, bytes
and keys unchanged.
`write_path=None` IS LOAD-BEARING and is the one place this could have
quietly failed. `LocalGitCorpus` declares openDox's own governed write
path; the corpus's `read-only-declared-at-resolution` check asserts that
resolution reports NONE, and names a reader that brings one anyway: "a
reader is inventing one". `kind_field` and `required_fields` are the
corpus's own two-field header (`Type`, `Title`) — the corpus "has never
heard of a factory", in the words of its own first document — so they are
values here and not defaults taken from openDox.
ALL FOUR STATES ARE BUILT, because the seventeen checks resolve four
locations and three are negative confirmations: `neutral` a git
repository holding exactly the shipped files, `empty` a repository with
`--allow-empty` and no tracked path (a `.gitkeep` would be listed by
`ls-tree -r` and the empty corpus would hold a document), `not-a-directory`
a file, and the absent state built by NOT creating it — the only honest
way to build it.
MEASURED, not intended — openxFactory's runner at `eb1880cb` against this
tree and a transposition built by this module:
python3 scripts/verify-carve-conformance.py --destination opendox_code \
--dest-root <this checkout> --adapter opendox.conformance_corpus:reader \
--corpus <the transposition>
OK … opendox_code passed the neutral conformance corpus — 17 of 17
check(s) … TRANSPOSED and FAITHFUL … 3 document(s) at revision
91c6319e…, key/sha256 table 744c9183…, unmoved across the run
EXIT=0
`tests/test_conformance_corpus.py`, 8 tests, added to the required job's
named list. THE SUITE PROVES THE PROPERTY THE RUNNER CHECKS, NOT THE RUN:
the runner needs openxFactory's checkout and its fixtures, which this leg
does not have and must not acquire to satisfy a test. So the tests
reproduce the runner's own asymmetric comparison — a `{key: sha256}`
table off the FILES against what the READER serves — over a corpus built
in a tmpdir with the shipped one's shape, and separately assert that the
transposition adds no key of its own, that the empty state answers rather
than refuses, and that the two refusal states refuse with the right kind.
Bytes are compared as `Document.content` bytes, never decoded: a
transposition that re-encoded would round-trip through `str` and compare
equal while the bytes on disk had changed.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This PR completes openDox’s FLOOR PART 3 conformance side by adding a declared, read-only corpus factory and a byte/key-faithful git transposition covering populated, empty, unreadable, and absent states. It validates the behavior with isolated tests that mirror the runner’s fidelity checks and registers those tests in required CI validation.
File-Level Changes
Change
Details
Files
Add the openDox conformance reader factory with neutral-corpus configuration.
Expose a two-argument factory that ignores caller-provided name and location and returns a LocalGitCorpus.
Set write_path=None and explicitly configure the corpus’s Type/Title header vocabulary.
Keep the adapter surface limited to the declared reader and transposition functions.
src/opendox/conformance_corpus.py
Implement a faithful git transposition for all conformance corpus states.
Copy every populated-corpus file byte-for-byte into a freshly initialized git repository and commit it with a deterministic per-command identity.
Create an allow-empty git repository for the empty state and a file for the non-directory state.
Leave the absent state uncreated and reject a missing populated source root.
src/opendox/conformance_corpus.py
Add focused tests for factory configuration, transposition fidelity, and resolution failures.
Reproduce the runner’s key/SHA-256 comparison without depending on openxFactory fixtures.
Verify no documents are added, empty repositories resolve successfully, and non-directory/absent locations produce the expected refusal kinds.
Verify invalid shipped roots fail and gate git-dependent tests when git is unavailable.
tests/test_conformance_corpus.py
Include the new conformance test in the required validation suite.
Add tests/test_conformance_corpus.py to the workflow’s explicit named test list.
.github/workflows/validate.yml
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!
Second of two commits. `tests/test_conformance_corpus.py` joins the
required job's list in the commit before this one, and the floors move
with it so the margin keeps meaning something — `pytest-suite.yml`'s own
procedure, and the mechanism this file's pin comment already names: what
moves these numbers here is editing the explicit list, and nothing else.
MEASURED ON CI, NOT DERIVED. Run 35400706354, this pull request's own
first run, printed:
triple: selected=1084 passed=1081 skipped=3 failures=0 errors=0
pins: selected>=1076 (margin 8) passed>=1073 (margin 8) skipped==3
so 1076 -> 1084 and 1073 -> 1081. I did not add eight to the previous
pair and write that down: the whole point of the pin is that its numbers
are read rather than computed, and the two happening to agree here is a
check on the reading, not a substitute for it.
EXPECT_SKIPPED STAYS AT 3, and that is a measurement too rather than an
omission: all eight new tests RAN. Six of them are guarded by a
`git --version` probe and would skip on a runner without git — on this
one git is present, so the guard stood down and the exact pin is
unchanged. If that ever moves, the pin moves with its reason, which is
the same rule this file already carries.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds an openDox conformance reader, Git transposition, fidelity tests, and required-workflow registration.
Changes:
Implements the reader factory and corpus states.
Adds key/byte fidelity and refusal-state tests.
Registers the suite in validation.
File
Review findings
tests/test_conformance_corpus.py
Moderate (1 vote): Tests use fixture data that differs from the shipped corpus, so fidelity coverage is not representative.
src/opendox/conformance_corpus.py
Critical (1 vote): Git filters may alter committed bytes. Critical (1 vote): Ambient Git environment/configuration may redirect operations or inject hooks. Moderate (1 vote): Checkout repositories do not exercise the production bare-repository shape.
.github/workflows/validate.yml
Moderate (3 votes): Test-count floors and the measured-count comment remain stale; remeasure and update them.
…lack
The floors moved twice in this pull request and the second measurement is
the one that governs.
First: eight tests joined the list with
`tests/test_conformance_corpus.py` — run 35400706354, 1076 -> 1084 and
1073 -> 1081.
Then #30 landed (merge `5c867137`, 22:12:50Z), this branch merged
`origin/main`, and the number moved again — run 35400771494 over the
merged head: selected 1093, passed 1090, skipped 3.
NINE OF THOSE ARE #30'S, AND IT LEFT THE FLOORS WHERE IT FOUND THEM.
Its tests went into files ALREADY in the required job's lists —
`tests_runtime/test_deploy_shape.py`, `test_local_git_adapter.py`,
`test_runtime_cli.py` — which is the one way to add tests here without
touching the list, and therefore the one way to grow the pin's slack
without noticing. Main was left with `selected>=1076 (margin 9)`: green,
and blind to any regression smaller than nine tests. That is not a
criticism of the landing so much as evidence that the procedure needs to
be attached to "adding tests" rather than to "editing the list", and the
pin's comment now says so where the next reader will be standing.
Closed here because this act was re-measuring anyway. A floor with slack
in it is a floor that has stopped catching the regression it was set to
catch.
Neither figure is derived: 1084 + 9 = 1093 is a check on the reading, not
its source. EXPECT_SKIPPED stays 3 across all three runs.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… prove the bytes
Both findings are TRUE of the code I wrote, and both are about the same
thing: the promise this module makes is byte-and-key preservation, and it
was making that promise while leaving two channels open for the ambient
machine to break it.
1. THE ENVIRONMENT. `_git` passed `os.environ` through. `GIT_DIR`,
`GIT_WORK_TREE`, `GIT_INDEX_FILE`, `GIT_OBJECT_DIRECTORY` and their
relatives OUTRANK `cwd`, so a process started with one of them set — a
CI job inside another checkout, a git hook, an alias, all ordinary
places for this to run — would have had `init`, `add` and `commit`
operate on a DIFFERENT repository while this function reported
building the transposition. It now uses `local_git_adapter`'s own
`_sanitized_git_environment()`, imported rather than restated so the
two lists cannot drift, plus `GIT_NO_REPLACE_OBJECTS=1` (replacement
objects can make git serve content other than what was committed) and
`GIT_ATTR_NOSYSTEM=1`.
2. THE BYTES. `git add -A` runs clean filters and EOL normalization on
the way into the object store, so a machine configured for CRLF would
commit bytes that are not the ones `copyfile` laid down. Pinned off at
the invocation — `core.autocrlf=false`, `core.eol=lf`,
`core.safecrlf=false`, `core.attributesFile=/dev/null`, and hooks and
signing with them, following what `local_git_adapter` already does for
the runtime.
AND THE BYTES ARE NOW VERIFIED RATHER THAN TRUSTED TO THOSE SETTINGS.
After the commit, every blob is read back with `cat-file` and hashed
against the file it came from; a mismatch raises and names the key. The
settings are a defence and the read-back is a proof — and without it the
first thing to notice would have been the runner refusing
`conformance-corpus-unfaithful`, which reports the same fact against the
CORPUS rather than against the thing that changed the bytes.
TWO TESTS, EACH SETTING A REAL HOSTILE VALUE rather than asserting the
code looks right:
* an ambient `GIT_DIR` pointing at a decoy bare repository — the
transposition still lands where it says, and the decoy stays empty.
* `GIT_CONFIG_GLOBAL` naming a config with `core.autocrlf=input`, over a
document that actually contains CRLF — the committed blob is still the
file's bytes. `GIT_CONFIG_GLOBAL` is deliberately NOT stripped by the
runtime's sanitizer (it names the operator's own configuration), so it
is a live channel and the right one to test with.
THE FIRST VERSION OF THE `GIT_DIR` TEST FAILED, AND THE FAILURE WAS THE
POINT. It ran its own `git ls-files` with the decoy still in the
environment, read the decoy, and failed — an unsanitized git in the test
file redirected by exactly the variable the code under test now strips.
The test drops `GIT_DIR` for its own verification commands and says so
where it does it; the hazard demonstrating itself is a better argument
for the fix than the assertion was.
Copilot's third finding — the stale pin floors — was already taken at
474144e, which raised them to the merged measurement 1093/1090. These
two tests move them again; the next commit re-measures.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Third and last move of these numbers in this pull request, measured on
run 35410846287: selected 1095, passed 1092, skipped 3.
The two tests are the ones Copilot's review asked for — an ambient
`GIT_DIR` that must not redirect the transposition, and an ambient
`core.autocrlf` that must not rewrite its bytes — so the floors move with
them, which is the rule this pin's own comment states.
1093 + 2 = 1095 is a check on the reading, not its source. EXPECT_SKIPPED
stays 3 across all four runs of this PR: both new tests are git-guarded
and git is present on this runner, so the guard stands down.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot's round-2 finding, and it is correct. `git init` copies
`init.templateDir` into the new `$GIT_DIR`, and a template carrying
`info/attributes` installs REPOSITORY-LOCAL attributes — which
`core.attributesFile` does not override, because it is not the file being
consulted.
MEASURED ON THIS TREE BEFORE THE FIX, because a claim about a defence is
worth nothing unattacked. A template whose `info/attributes` reads
`* filter=evil`, with a global `filter.evil.clean`, rewrote a document's
bytes straight through `core.attributesFile=/dev/null`:
ValueError: the transposition does not carry 'notes/alpha.md' byte for
byte: the file hashes 92ae631b… and the committed blob hashes 9ff66686…
TWO THINGS FOLLOW, AND THE SECOND IS WHY THIS COMMIT EXISTS. The byte
read-back added in the previous commit CAUGHT it — the module failed
closed and named the key, which is the right failure. But refusing is
still the wrong outcome: on such a machine the transposition could not be
built at all, and § 3.7's pass would be unobtainable for a reason that
has nothing to do with openDox. `-c init.templateDir=` makes the same run
commit the file's own bytes, measured: `blob == file bytes: True`.
A REGRESSION CASE, as asked: `test_a_hostile_init_template_cannot_rewrite
_the_committed_bytes` builds that exact template and filter and asserts
the committed blob is the file's bytes. The suite is now 11 tests, and
the three ambient-machine cases between them cover the three channels —
`GIT_DIR` (which repository), `core.autocrlf` (EOL normalization), and
`init.templateDir` (repository-local attributes).
The read-back guard is unchanged and still fires: with `_committed_blob`
stubbed to return different bytes, `transpose` refuses and names the key.
Defence and proof are separate on purpose — this finding is precisely the
case where the defence was incomplete and the proof held.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ause
Floors: measured on head b48dd4b — selected 1096, passed 1093, skipped 3
— for the `init.templateDir` regression case. 1095 + 1 = 1096 is a check
on the reading, not its source.
AND THE SKIPPED REFUSAL'S MESSAGE WAS STILL WRONG, in the one place it
matters most. It told a reader whose pin had just fired that the expected
cause was "the root conftest's collect_ignore lifting as the openXdox leg
or the BUILD arc lands". That is false, and this repository's own #29
established why: all three report-producing commands pass `--noconftest`,
so the root conftest is never loaded, and no `collect_ignore` entry is
among the files they name — the overlap is EMPTY. I corrected the
explanatory comment there and left the failure message carrying the same
claim, which is the worse of the two places to leave it: the comment is
read by someone studying the file, the message by someone whose build
just went red and who will act on it.
It now names the only mechanism that can move these numbers here — an
edit to one of the three explicit lists — and says plainly that
collect_ignore cannot reach them.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mirror shipped fixture bytes and missing-field cases
tests/test_conformance_corpus.py:45
This substitute corpus does not match the shipped neutral fixture: the real alpha.md has the longer body, beta.md omits Title, and gamma.md omits Type. Because both shipped and _fingerprint are derived from these simplified values, this suite never exercises the reader's missing-field/unclassifiable cases or proves byte fidelity against the actual seed; mirror the seed bytes exactly (while keeping openxFactory out of the test dependency graph).
REGISTERED, NOT TAKEN — the round cap is reached (two substantive head-moving rounds: the git-environment sanitizing, and emptying init.templateDir). One item is outstanding and it is TRUE.
The registered item: the test corpus does not mirror the shipped one
Copilot's "previously missed" finding at tests/test_conformance_corpus.py:45. Measured against the real seed rather than accepted:
notes/alpha.md 165 B Type: yes Title: yes
notes/beta.md 171 B Type: yes Title: NO
papers/gamma.md 175 B Type: NO Title: yes
My _DOCUMENTS gives all three both header fields. So the shipped corpus deliberately carries one document missing Title and one missing Type — the classification vocabulary's missing-field and unclassifiable cases — and my in-repo suite never exercises them, because both the fixture and its _fingerprint are derived from the same simplified values.
What this does and does not affect. It does not touch the pass: the recorded OK — 17 of 17 was taken by openxFactory's runner against the real shipped corpus, whose seventeen checks include those very cases, so the reader demonstrably handles them. What is thinner than it should be is this repository's own regression coverage — the suite proves byte fidelity and the three ambient-machine channels over a corpus shaped like the seed, but not over the seed's awkward parts.
Sized for whoever takes it: replace _DOCUMENTS with the three documents' exact bytes (they are 165 / 171 / 175 bytes and carry no openxFactory dependency once copied), and add the two classification cases. ~30 lines in one file, plus a MIN_SELECTED/MIN_PASSED bump measured the way this PR's four moves were. Keeping openxFactory out of the dependency graph is the constraint and copying the bytes satisfies it.
Nothing else is outstanding
All four earlier findings are resolved with measured replies, and Copilot's review at 0cb218c0 reports Findings: None with all four listed as resolved since last review:
GIT_CONFIG_GLOBAL with core.autocrlf=input over a CRLF document
Raise the collection floors
474144ef → 776d2a80
four measured moves, final margin 0
Disable git templates
b48dd4b4
the attack reproduced (ValueError, both hashes), then defeated
No credential leak and no refusal bypass exists in this PR's code — the two classes that would stop a READY regardless of the cap. Every refusal path added here tightens rather than relaxes: the byte read-back raises where it previously would have returned quietly, and the three hardening switches remove ambient channels without opening one. Nothing in the diff reads, writes, logs or transports a secret; the only environment handling strips variables rather than adding them.
Test corpus misses required-field and unclassifiable document cases
tests/test_conformance_corpus.py:46
The stand-in corpus here does not match the neutral fixtures this adapter is required to transpose: the shipped beta.md has only Type (missing Title) and gamma.md has no Type header, while this dictionary gives all three documents both headers. Because the transposition tests are all fed from _DOCUMENTS, they never exercise the required-field or unclassifiable-document paths, so an incorrect kind_field/required_fields configuration can still pass this required suite. Mirror the shipped bytes and add independent classification assertions for alpha, beta, and gamma.
… build/3-7-followup-2-worktree-and-refusals
ONE CONFLICT, in the triple's floors, and it is resolved to MAIN'S SIDE: #31
re-pinned them three times as it measured — 1084/1081, then 1090 over the
merged #30 (closing a nine-test slack #30 had left), then 1093 for its own
hardening cases and the `init.templateDir` one — and those are the true floors
at `93ccc3dd`. This branch's own move, which was measured before any of #31's
tests existed, is DISCARDED here and re-measured on the merged tree in the next
commit. A floor is a measurement, not an arithmetic.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`d6cb2621` — this branch with openDox-code#31 merged in — is the tree that was
measured, by running the three invocations the required job runs and summing
their JUnit reports:
tests/ (29 files, #31's conformance corpus among them) 725 selected, 2 skipped
the S7 residue 13 selected
the hermetic six 360 selected, 1 skipped
------------------------------------------------------------------------
TRIPLE selected 1098, passed 1095, skipped 3
So `MIN_SELECTED` goes 1096 -> 1098 and `MIN_PASSED` 1093 -> 1095. The two are
this branch's own hermetic cases; its other two are in the DB-backed job, which
this triple does not count. `EXPECT_SKIPPED` does not move: no file turned into
skips, which is the thing that number exists to catch.
1096 + 2 = 1098 is a CHECK on the reading, not its source — the rule #31 wrote
into this block when it moved the floors three times, and the reason the merge
commit discarded this branch's earlier floors rather than adding to them: they
were measured before any of #31's tests existed.
The hermetic figure is re-stated at this head for the same reason. It did not
move — 359 passed, 1 skipped — but the TREE did, and a figure that was not
taken on the tree it is stated for is a figure nobody measured.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… that is a refusal (#32)
# Follow-up #2 to openDox-code#30: the four it registered and did not take
#30 landed with four findings **registered**, because its head was capped after the second push. This is the act that takes them. Each is measured against a full checkout of **`5c867137`** — never with `PYTHONPATH`, for the reason `docs/runtime.md` § 8 now records.
| # | what | origin |
|---|---|---|
| 1 | a **linked worktree**'s metadata was not bound by descriptor, so its index stayed pathname-bound | [#30 thread on `local_git_adapter.py:2124`](#30 (comment)) — **ruled by the holder** |
| 2 | `identity.RefusedError` was translated **nowhere**, so a store refusal the act did not pre-empt was a **500** | [#30 thread on `config.py:584`](#30 (comment)) |
| 3 | the whitespace fallback read a **local path** as an authority | same thread |
| 4 | the served-database guard's other two acts had **no case** | [#30 thread on `cli.py:829`](#30 (comment)) |
## 1. A linked worktree is the third shape, and the binding did not reach it
`-C /proc/self/fd/<n>` binds the working directory, and for the two shapes this act creates that **is** the repository — a bare repository is its own git directory, a checkout's is `.git` inside it — so `rev-parse --git-dir` answers a **relative** name and the index joins onto the held root. A linked worktree is neither. **Measured on git 2.43.0:**
| | linked worktree |
|---|---|
| `<worktree>/.git` | a **file** naming an absolute path |
| `rev-parse --git-dir` (through `-C`) | `<main>/.git/worktrees/<name>` — **absolute**, holds the INDEX, holds neither `objects/` nor `refs/` |
| `rev-parse --path-format=absolute --git-common-dir` | where `objects/` and `refs/` actually are |
`resolve` serves that shape **writable**, with a case landed since § 3.6, so the pathname branch was live for a supported corpus.
**Ruled by the holder on #30:** bind both directories by descriptor and **keep linked worktrees writable** — making them read-only would reverse what § 3.6 landed with its own case. `metadata_held_open` opens the two `O_NOFOLLOW` and names them `GIT_DIR` and `GIT_COMMON_DIR` as `/proc/self/fd/<n>`, inherited by every call. **Measured end to end** before it was written: `rev-parse`, `hash-object -w`, `read-tree`, `update-index`, `write-tree`, `commit-tree` and `update-ref` all behave as they do without them, the commit lands on the worktree's own branch, the main branch is untouched, and the temporary index lands inside the held git directory.
**What the case does not do, and why it says so.** It does not rename the git directory under a running write: git enumerates worktrees through `<common>/worktrees/<name>` to decide whether a branch is checked out elsewhere, so re-pointing that name mid-write makes `update-ref` refuse with `cannot lock ref … unable to resolve reference` — git's own bookkeeping, through a name no descriptor of ours binds, and nothing to do with this finding. An absence that is measured and written down is not the same as one nobody noticed.
## 2. A store refusal is a refusal, not a crash — the class, not the instance
`repository_act` refuses a credential-bearing remote and so does `identity.CoordinationStore`: layering, not duplication, and the two readings are deliberately not identical. Nothing translated the store's — `app.py` caught `RepositoryActRefused` and **nothing else** — so a value one of them refuses and the other accepts left the route as an unhandled exception, which FastAPI answers **500**.
It has happened twice, and both times it was closed one shape at a time: `…?mode=1;token=…` on #26, where the act accepted what the store refused, and `/srv/repos/a:b@c.git`, **measured a 500 at `5c867137`** (the new case reproduces it there as a raw `identity.RefusedError`). `except identity.RefusedError` → **409** on the three routes that call an act writing through the store ends the class: a refusal is a refusal, named by shape and never by value.
## 3. A local path is not an authority
The whitespace fallback #30 added — for `user:pa ss@host:path`, which both the refusal's class and the redactor's excluded — read the whole head before the last `@`. So `/srv/my repos/a:b@c.git`, a directory whose name holds a colon and an at-sign and a perfectly legal `git push` destination, was **refused** by the store and **replaced with `<redacted-url>`** by the printer.
**Git's own rule is the test, and it is about the first colon:** the `[user@]host:path` form is recognised only when nothing before that colon is a `/`. It separates the two cases exactly, which is why it is this rule and not "a head holding any slash":
| value | before the first `:` | verdict |
|---|---|---|
| `ci:hun/ter2@github.com:o/r.git` | `ci` | an authority — #25's password-containing-a-slash hole **stays closed** |
| `/srv/my repos/a:b@c.git` | a path | a local path, not judged |
Both halves of the pair take it, because both made the same misreading.
## 4. The database guard's other two acts are measured
`refuse_a_database_the_api_will_not_read` is called from `apply()`, from `runtime migrate --plan` and from `runtime reset`, and only `apply()` had a case — "one line each and visible in the diff" is not a measurement. The new case is the schema guard's twin: a real schema with a coordination table in it, a migration DSN that reaches this database, a declaration naming another, both verbs refusing with the table still there, and both going through once the declaration agrees.
**It passes against `5c867137`, and the docstring says so** rather than letting it read as a regression test: it pins wiring that was untested, and it earns its place by what it catches later — which is exactly how the schema guard came to be missing from two of its three acts.
## 5. And the regression this PR's own item 1 introduced, closed here
`write_back` declares exactly two kinds — `CORPUS_READ_ONLY` and `WRITE_PATH_UNREACHABLE` — and a caller may branch on `err.refusal.kind`; the module has been repaired for this before (round 13's `_repository_root`, which refused with a kind this operation does not declare). Entering `metadata_held_open` at the `with` statement put its work **outside** `_write_back_bound`'s handler, and one of those calls had been **inside** it: the `rev-parse --git-dir` that used to be a single line computing `named_git_dir`. **Measured at `97a1b37e` with the real adapter, both raw:**
| what fails | what escaped `write_back` |
|---|---|
| `open_no_follow_chain` on the worktree's git directory | `FileNotFoundError` |
| `rev-parse --git-dir` — the probe itself | `GitCommandFailed` |
The second row is the wider half and the review did not reach it: that probe runs for **every** shape, so an ordinary bare repository or checkout could leak it too — this branch regressed the promise on the **common path**, which is the same class item 2 above closes at the API boundary.
The translation belongs to the helper, because the helper owns both the probes and the opens: it catches `GitCommandFailed`, `OSError` and `RuntimeError` (a symlink loop raises the last, which is why the root probe catches it), closes any descriptor it had already taken, and refuses with `WRITE_PATH_UNREACHABLE` naming the failure **class** and not git's stderr. One case drives both rows, the probe row on an **ordinary** repository, and it fails against `97a1b37e` with the raw `GitCommandFailed`.
## Measured (python 3.12.3, pytest 8.4.2, postgres 16.15, git 2.43.0)
Every figure was measured at **`acbb6d46`** — this branch with `origin/main` **merged** in (openDox-code#31, § 3.7's conformance factory; no rebase) — with the `runtime` extra made UNIMPORTABLE and no ambient git configuration, and holds at the current head **`f8678ad`**, which adds only the workflow's record of it and the triple's floors. **This description is edited in the same act as that record.**
| run | result |
|---|---|
| the required `validate` job's own invocation (`--noconftest`, the six hermetic modules) | **360 passed, 1 skipped** |
| of which `tests_runtime/test_local_git_adapter.py` | 138 passed |
| `python -m pytest -q tests_runtime/` with `OPENDOX_TEST_DATABASE_URL` set | **573 passed** |
| `python -m pyflakes src/opendox/runtime/*.py tests_runtime/*.py` | clean |
| the required job's **triple** (`tests/` 725+2 skipped, S7 residue 13, hermetic six 361+1 skipped) | selected **1099**, passed **1096**, skipped **3** |
**The triple's floors move up with the cases that raised them** — `MIN_SELECTED` 1096 → 1098 → **1099**, `MIN_PASSED` 1093 → 1095 → **1096**, `EXPECT_SKIPPED` unchanged at 3 because no file turned into skips. Clause (d)'s floors are a ratchet: an act that adds cases raises them, so a number that later goes down is what they exist to catch.
**And they were measured on the merged tree, not derived from it.** This branch had moved them once already, to 1087/1084, measured before any of #31's tests existed; the merge **discarded that side** and took main's 1096/1093, and then the floors were moved again from a real run of the three invocations. `1096 + 2 = 1098` is a check on the reading — the rule #31 wrote into that block when it moved the floors three times — and not its source.
**Three of the four new cases fail at `5c867137`** — `'GitRunner' object has no attribute 'held_environment'`, `/srv/my repos/a:b@c.git` refused as an authority, and the raw `identity.RefusedError` that is the 500. The fourth is the coverage case above, which passes there by design.
## Sequencing
openDox-code#31 (§ 3.7, the conformance factory) landed first (`93ccc3dd`), and this branch took it by **merge** (`d6cb2621`), never by rebase. The one conflict was the triple's floors and it is resolved **to main's side**, because #31 had re-pinned them three times as it measured and those are the true floors at `93ccc3dd`; this branch's own move was then re-made from a run over the merged tree. Nothing else in that file collided: #31 added a line to the first list, and this branch's hunks are the figure block and the floors.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ection pin gets a test (#33)
# The openDox-code residue the rehome-lander registered: #31's follow-up and #29's test
Two registered items, neither of them this branch's own invention. Both were
found by a Copilot review, registered rather than taken because the PR that
found them was capped, and recorded as residue by the rehome-lander.
| # | what | origin |
|---|---|---|
| a | a global ignore file could take documents **out of** the transposed conformance corpus, and both shapes ended in a raw `CalledProcessError` | [#31 follow-up, comment 5738108117](#31 (comment)) |
| b | `Pin the triple` — the required check's collection pin — had **no test**, because a shell script in a workflow file is the one kind of code here that nothing executes until CI does | openDox-code#29's own registered residue |
Every measurement below was taken by running the thing, never by reading it.
## a. An ignore rule cannot shorten the corpus
`GIT_CONFIG_GLOBAL` is retained on purpose — an operator's own git is this
act's git — so a global ignore file reaches the `git add` that builds the
transposition. `core.excludesFile` is the fourth channel in `_HARDENING` and
the only one that is not about bytes: it decides which files are in the corpus
**at all**. Measured at **`776d2a80`**, the head with the list as #31 left it:
| ambient excludes file | at `776d2a80` |
|---|---|
| `*.md` | nothing staged, `git commit` exits 1 — `CalledProcessError` out of `transpose` |
| `beta.md` | the commit **succeeds** with a short tree, and the byte read-back fails on the key git never committed |
Neither was ever a *silent* short transposition: the read-back is what makes
that impossible and it held both times. What each was is a subprocess error
where a sentence belongs.
- **`-c core.excludesFile=` + `os.devnull`** disables the configured file.
- **`--force` on the add** answers the two entrances no config switch reaches:
a `.gitignore` **copied in with the corpus** (the shipped corpus is arbitrary
files, and one of them may be exactly that) and `$GIT_DIR/info/exclude`.
Forcing is right here and would be wrong in the runtime — this repository is
built by this function, one commit old, and holds nothing a rule could
sensibly exclude.
- **Both failure paths name themselves.** `_committed_blob` and the commit step
raise `ValueError`s naming the key and the usual cause. The failure is real
and still refuses; this only decides what the refusal *says*.
**One case per exclusion shape, each run against the shape it forbids:**
| case | the shape | at `776d2a80` |
|---|---|---|
| `test_a_global_excludes_file_cannot_take_documents_out_of_the_corpus` | `*.md` through `GIT_CONFIG_GLOBAL` | the total-exclusion `CalledProcessError` |
| `test_an_exclusion_this_act_cannot_reach_is_named_and_not_a_git_error` | the same excludes file with **both halves of the repair removed** — the switch taken out of `_HARDENING` and `--force` stripped — which is the only way to reach the sentence once the repair is in place | a `CalledProcessError` on the read-back |
> **Correction, and it is this PR's own overstatement.** An earlier version of this row, and the message of commit `521abb7c`, described that second case as driving `$GIT_DIR/info/exclude` written after `init`. It does not: both cases drive a global excludes file. **No case here exercises a `.gitignore` copied in with the corpus or an `info/exclude`**, which means `--force`'s success behaviour is asserted nowhere — found by Copilot at this head and REGISTERED as F5 below. The commit message cannot be corrected without rewriting a pushed commit, so the correction lives here.
### The fixture is the shipped seed, not a description of it
`_DOCUMENTS` held three plausible documents. The shipped seed holds three
**awkward** ones, and the awkwardness is the point: `beta.md` has no `Title`
and `gamma.md` has no `Type`. A fixture that quietly gives every document both
front-matter keys cannot fail on a reader that requires them.
It is now the seed's own bytes — **verified, not asserted**, against
`tests/corpus-adapter/fixtures/neutral/`:
| key | bytes | sha256 |
|---|---|---|
| `notes/alpha.md` | 165 | `5a8c06574b3240ad…` |
| `notes/beta.md` | 171 | `971e78fb9fda1fe7…` |
| `papers/gamma.md` | 175 | `0473352024f38432…` |
all three byte-identical to the files on disk. `_SHIPPED_SIZES` pins the three
lengths and `_SHIPPED_DIGESTS` (added below, under R3) pins the three digests,
with two cases holding them there: one that the fixture **is** the seed, one
that the awkward pair is reported and never omitted. (The brief allowed this
half to be registered if the seed bytes could not be reproduced exactly. They
could, so it is taken.)
`tests/test_conformance_corpus.py`: **11 → 15 passed**.
### And the skip-pin message enumerates its causes
It stated an absolute — that a `collect_ignore` was the cause — and that was
false, which Copilot said on #31 and which the message now says **about
itself**. Four causes, and the list says it is not closed.
## b. The collection pin gets a test that can fail
`tests/test_triple_pin.py` **extracts the step and runs it**: it reads the
workflow, takes `Pin the triple`'s own `run` script and its own `env` pins,
writes JUnit reports into a temporary directory and runs `bash -c <the
script>` there. A copy of the script inside a test is a test of the copy — the
two drift the first time somebody edits one, and both keep passing. It also
means the numbers under test are whatever the pins currently say, so the
re-pin in this PR needed no matching edit in the test.
**Three cases, one per outcome, each isolated so exactly one refusal can fire
— and each proved against the mutation it forbids**, by patching the step in a
scratch copy of the workflow and re-running:
| case | mutation | result |
|---|---|---|
| the pinned state passes | the selected floor `-ge` → `-gt` | **fails** — a pin that refuses its own measured state is a red required check on every PR |
| a report that did not appear is a refusal **naming the file** | the `MISSING` guard made unreachable | **fails**, and the step prints `triple: selected=1109 passed=1106 skipped=3 … margin 0` and exits **0** over a run that never wrote a third of the suite |
| one skip more than pinned is a refusal | the exact `=` loosened to `-le` | **fails** |
The missing-report case is the sharp one: the two reports that *do* appear
satisfy **every number**. A step that failed to write its report has taken its
tests out of the sum, and the sum of the rest is not a smaller run but a blind
one.
It is hermetic on the same footing as its neighbours on the required list —
standard library plus `PyYAML`, this package's own base dependency, no
`opendox` import, `--noconftest` safe — and it **skips** where `bash` or
`python3` is absent, which is now cause (2) in the step's own enumeration.
## c. Copilot's three findings on this PR, taken in one push
All three were registered at `b5170372`
([comment](#33 (comment)))
and then **taken** on the holder's word. Every claim is measured against a full
checkout of `b5170372`.
### R1 — a non-zero `cat-file` does not mean an exclusion, so ask the tree
`cat-file blob HEAD:<key>` exits non-zero for a key that was never committed
**and** for a key whose object the database can no longer produce, and the
first cut answered both with "an ignore rule is the usual cause". `ls-tree`
separates them exactly — measured on git 2.43.0 in a one-commit repository:
| state | `cat-file blob HEAD:<key>` | `ls-tree --name-only HEAD -- <key>` |
|---|---|---|
| key absent from HEAD | `does not exist in 'HEAD'` | rc 0, **empty** |
| key present, object gone | `bad file` | rc 0, **names the path** |
| HEAD itself unreadable | non-zero | non-zero |
Three shapes, three sentences. At `b5170372`, with the loose object behind
`notes/beta.md` removed, the refusal read *"the transposition does not hold
'notes/beta.md' at all … An ignore rule is the usual cause"* — for a
repository that holds it perfectly well in its tree and has lost the blob.
### R2 — the commit catch-all stated an absolute, and the index knows better
*"every file copied into it was excluded before `git commit` saw it"*, stated
as fact, for a failure a full disk, an unwritable object database or a lock
left by a crashed process produces identically — **the same defect this PR
removes from the skip-pin message one file over**. `git diff --cached
--name-only` answers it, and the two shapes now get two sentences: nothing
staged keeps the exclusion sentence; anything staged gets a refusal that says
it is **not** an exclusion, gives the staged count as evidence, and enumerates
the causes (exclusion — ruled out, no space, a permission, another git failure
including a stale lock).
The case worth quoting: at `b5170372` a shipped root whose populated state is
an **empty directory** — nothing to do with any ignore rule anywhere — was
answered *"every file copied into it was excluded before `git commit` saw
it"*.
**And git is quoted from whichever stream carried it.** Measured: `commit -q`
with nothing staged writes `nothing to commit …` to **stdout** with stderr
empty, while a held `index.lock` writes `fatal: Unable to create …` to
**stderr** with stdout empty. A refusal quoting only stderr would quote an
empty string in exactly the exclusion case these messages exist to name.
Quoting git is safe here and the asymmetry with `local_git_adapter` — which
refuses to put git's stderr in a refusal — is deliberate: that module pushes to
a **remote**, and a remote URL can carry an authority and a credential.
Nothing in this module touches one.
### R3 — a length is not an identity
`_SHIPPED_DIGESTS` now carries the seed's sha256 **per key**, asserted in the
suite, with the sizes kept beside them (when a digest fails, the size says
whether the drift was an edit or a replacement). Proved both ways with one byte
changed and the length held — `factory` → `factorY` in `notes/alpha.md`:
| | |
|---|---|
| at `b5170372` | the case **passes** |
| here | it **fails**, naming `a7e2e453e7cc…` against `5a8c06574b32…` |
**Each of the three new cases fails at `b5170372`**, and so does the
strengthened exclusion case, which now requires git's own words in the
refusal. `tests/test_conformance_corpus.py`: **15 → 18 passed**.
**R4 stays REGISTERED** on the holder's word: the pin step has six refusals and
this PR covers three — `FAILURES != 0` and `ERRORS != 0` have no case.
## Figures, measured at `f9c8e4d5` and stated at that commit in `validate.yml`
| | |
|---|---|
| `tests/` (the required job's first list) | **733 passed, 2 skipped** (was 723 / 2 on main) |
| the S7 residue | **13 passed** |
| the hermetic six | **360 passed, 1 skipped** — unchanged |
| the triple, summed by the step's own script | `selected=1109 passed=1106 skipped=3 failures=0 errors=0` |
| `pytest -q tests_runtime/` (DB-backed) | **573 passed** — re-run, unmoved |
**The pin moves with the act**: `MIN_SELECTED` 1099 → **1109**, `MIN_PASSED`
1096 → **1106**, `EXPECT_SKIPPED` still **3**. Ten cases, all of them this
PR's: seven on the conformance corpus and three on the pin. `1106 + 3` is a
**check** on the reading and not its source — the reading came from a run.
And the pin now counts three cases that hold the pin. That is deliberate and
recorded beside the numbers, so a later move does not have to rediscover why
they are in the sum: they assert the step's **outcomes** over reports of their
own making, and they do not assert the figures.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ition (plan 034) (#55)
Plan 034, task **T037**, slice P1-G (the whole suite in CI). The plan is `specs/034-opendox-standalone-operation/tasks.md` at opensoft/openxFactory `main` `a9e7db75`; T037's entry is unchanged since `133e37d9`. This PR realizes box **9.4**, openDox's half, of the ratified `add-neutral-product-standalone-operability`: "Restore the margin, and stop the skips carrying the gap".
- **Ruled:** R1Q22 (a), as the task entry cites. See question 3 below about the "carved" wording.
- **Claim:** openxFactory#656 comment `5856501803`.
- **After:** T036 (#52), landed as `55194335`. This branch merged that `main` at `952af2cb`, with no force-push. The merged tree is byte-identical to the branch's tree before the merge, because #52 landed as a squash of the commits this branch already carried.
The task entry reads: *"Restore the margin over the floors. The two skips that mirror openXdox's gap assert for real."* FR-006 adds: *"Behaviour that needs both legs SHALL be declared integration tests at the declared composition"* and *"The margins SHALL be restored, with no skip carrying the gap."*
## The two skips
Of the 13 skips T036's whole suite pins, two carry the gap. Both are in `tests/test_binding_stylesheets.py`, a created file:
| case | why it skipped, on every run of this leg |
|---|---|
| `test_the_gate_exclusive_set_is_re_derived_where_the_modules_are_present` | "no assembly has placed openXdox's six contributed modules in this bundle (RULED Q5)" |
| `test_no_contributed_sheet_declares_a_design_token` | "no assembly has placed a contributed stylesheet in this bundle (RULED Q5); openDox ships none of its own" |
These are the "mirror image" the proposal names. openXdox's six skip for want of `doc_health`; these two skip for want of openXdox. In a lone openDox checkout they cannot assert for real. The modules and sheets are openXdox's package data, and openDox-code cannot install openXdox, because openXdox depends on openDox. So each needs both legs, and FR-006 sends that to the declared composition: openXdox-code, whose `pyproject.toml` pins this leg.
The other 11 skips are 8 in `test_doxbench_bridge_live.py` (no `omp` harness) and 3 in `test_openprofiler_broker_e2e.py` (no broker binary, another product's build artefact). Neither set needs openXdox, and neither is this task's.
## What this PR moves, and where each case goes
**Stays, and now asserts on every run:** `test_opendox_own_bundle_names_no_gate_exclusive_class`. This was the openDox-only loop inside the re-derivation: openDox's own bundle (its views, `app.js` and `index.html`, comments blanked, the six excluded by name) names none of the 54 gate-loop classes. It needs no assembly. Measured over a corpus of 1.46 million characters, it holds.
**Added, for Copilot's review at `7f98b46f`:** `test_the_own_bundle_corpus_leaves_out_an_assembled_contributed_module`. No run of this leg's suite has the six in its bundle, so the by-name exclusion was load-bearing and never exercised in the suite. The case assembles a throwaway bundle (one view of openDox's own, `app.js`, `index.html`, and all six modules, each naming a gate-only class). It asserts that the corpus reads the view and none of the six.
**Leaves this leg:**
| case | destination | state |
|---|---|---|
| `test_the_gate_exclusive_set_is_re_derived_where_the_modules_are_present`, the half that reads the six | openXdox-code `tests/integration/` (T042). There the six are placed in the pinned openDox's bundle on every run, so the derivation asserts for real: no class the six alone name is left in `styles.css`, and each of the 54 is named by one of the six | to land in T042 |
| `test_a_partial_assembly_is_a_failure_and_not_a_skip`, with `_assembled_views()` | the same place, with the derivation. The rule existed so that a partial assembly could not hide behind that case's skip | to land in T042 |
| `test_no_contributed_sheet_declares_a_design_token` | openXdox-code `tests/test_gate_loop_views.py::test_no_contributed_sheet_declares_a_design_token`, over every sheet that leg declares, on its required list. This leg's version also scanned an assembled bundle's `views/**/*.css` recursively; that scan goes to T042 with the derivation | already there at openXdox-code `e28930bf` |
| `test_the_design_token_guard_sees_an_inline_declaration`, with `_declared_st_tokens()` | openXdox-code `tests/test_gate_loop_views.py::test_the_design_token_guard_sees_an_inline_declaration`, with the same regex | already there at `e28930bf` |
T049 checks that each arrived. The file's closing comment carries the same list.
**Refactored, no behaviour change:** the orphan scan's corpus and namer become `_own_bundle_text()` and `_class_namer()`, shared with the new case. Old and new give the same corpus, byte for byte, and the same answer on 628 tokens.
## The margin
**`EXPECT_SKIPPED` 13 → 11**, and the floors move three below CI's reading instead of sitting on it. That is the reference implementation's rule, openxFactory `pytest-suite.yml`: "three below the lower of the two greens". The trade is stated in the pin, as the reference states it. A loss of up to three collected tests does not red on the floors alone. It still reds on the exact SKIPPED pin if the lost tests became skips, and on failures or errors if they failed.
**Read from CI's two greens of one tree**, and read twice:
| tree | runs (jobs) | both printed | floors |
|---|---|---|---|
| `8c03966a` | 36339183129 (108675776512), re-run (108676424965) | `selected=2478 passed=2467 skipped=11` | `2475 / 2464` |
| `3dd66679` | 36340595113 (108679779797), re-run (108680366270) | `selected=2479 passed=2468 skipped=11` | `2476 / 2465`, one higher for the exclusion case |
No jitter was measured between any two runs of one tree. A local replica read the same, which is a check, not the source. At `b6b07351`, where the floors moved to `2476 / 2465`, run 36341050224 (job 108681071640) printed the same triple with `margin 3` for both floors. So did run 36341364941 (job 108681982884) at this head, `5664fec3`, whose one later commit changes comments only.
## Measured
- `tests/test_binding_stylesheets.py`: 18 passed, 0 skipped. It was 18 passed and 2 skipped: four cases left and two arrived.
- The whole suite on CI: `2479 / 2468 / 11`. That is T036's `2481 / 2468 / 13` less 2 selected and 2 skipped, with PASSED unchanged.
- Planted, each caught (the controls stay green):
- `app.js` emits `"gatebar"`: the new case fails;
- a view builds `"refusalpanel-" + k`: it fails on the prefix form;
- `index.html` carries `class="swb-notice"`: it fails;
- a comment naming `gatebar` is a control, and stays green;
- an assembled `gate.js` in the bundle is a control, and stays green, because it is excluded by name;
- with that exclusion removed and `gate.js` placed, it fails, and so does the new exclusion case on its own throwaway bundle;
- a class left behind in `styles.css`: the refactored orphan scan fails.
## Also here: T036's docstrings, from Copilot's review of this PR
Thirteen test files still said, in the present tense, that `validate` runs them from an explicit list with `--noconftest`. That list ended with T036. Each claim now says the job ran the file that way until plan 034 T036 (`f0d6170e`, docstrings and comments only, no count moves). Where the property still holds, the file still says it is `--noconftest` safe. `src/opendox/cli.py:1120` is left as it is, because its `validate` is openXdox-code's, and that one still runs two shape suites that way.
## Copilot's reviews of this PR
| head | overview | what it found | where it went |
|---|---|---|---|
| `8c03966a` | Changes recommended | the provisional local pin; present-tense `--noconftest` claims in test docstrings | pins read from CI's two greens (`15923378`); thirteen files swept (`f0d6170e`); both resolved |
| `952af2cb` | Needs a closer look | one more present-tense paragraph, in `test_intent_binding_dom.py` | fixed at `7f98b46f`, resolved |
| `7f98b46f` | Needs a closer look | the by-name exclusion was never exercised in the suite | the exclusion case, `3dd66679`; floors raised by one from two more runs, `b6b07351` |
| `3dd66679` | Changes recommended | the pin's arithmetic still read four out and one in | fixed at `5664fec3`, answered on the thread |
| `5664fec3` | Needs a closer look, no findings | "Composition checks are removed before their T042 replacements exist in this checkout" | that is questions 2 and 3 below |
## Questions for Brett
1. **Which reading of "Restore the margin".** I read it as floors sitting below CI's reading, with a stated slack, on the reference's rule. That reverses a choice this repository made on 2026-09-18 (PR #31: "a floor with slack in it is a floor that stops catching the regression it was set to catch"). The other reading keeps the floors on the reading, and treats the margin as the two skips becoming passes. That fails here, because the relocations lower SELECTED. With a different figure or reading, the change is the two numbers and a paragraph.
2. **T042's text lists only T035's relocations.** P1-J's slice row says "P1-G's relocated modules". This PR adds two cases to T042's list: the derivation half and the partial-assembly rule. T042 needs to take them, or a batch needs to add them.
3. **openXdox-code has no `tests/integration/` yet.** T042 creates it. Until then, the two to-land rows above exist only as this list, and T049 is what checks that they arrive.
4. **"The two skips sit in carved test files" (T037's entry).** `tests/test_binding_stylesheets.py` is a created file with no carve-manifest row (RULED OQ-C), so R1Q22 (a) is not needed for it.
## Landing
- T036 (#52) has landed, and `main` is merged in.
- P1-R (the openDox root pin) waits on this task.
- Squash or merge, never rebase. Each commit carries both trailers, and so does this body.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
CLAIM
5736795055—split-opendox-two-layer-product§ 3.7 FLOOR PART 3, the openDox side. The other two sides are landed: openxFactory's half of RULED Q-F1 (a) (#1086→049d54a9) and openXdox's reader (openXdox-code#23 →3ee8cd31).§ 3.7 FLOOR PART 3 — openDox's conformance reader
The box asks for one thing and names two parts of it. Its own words:
So this PR is a factory, a transposition, and a recorded pass — not a CI step. openDox's implementation already existed (
LocalGitCorpus, landed by #26 with Q-F2's three construction data on__init__); what was missing was the module that points it at somebody else's corpus. The ledger's reading of this side was blunt and correct: "openDox — NOT EVIDENCED, and unlike openXdox this one has NOT moved:openDox-codecarries no conformance reader at all" (:1516-1519).The pass, measured
openxFactory's runner at
eb1880cb, against this tree and a transposition built by this module:TRANSPOSED and FAITHFULis the half that cannot be faked: the runner computes{key: sha256(bytes)}off openxFactory's files and compares it against what this reader serves, so a transposition that dropped, added, renamed or re-encoded a document refusesconformance-corpus-unfaithfulinstead of passing.What the module is
152 lines, two functions.
reader(name, location)transpose(shipped, dst)write_path=Noneis load-bearing, and is the one place this could have quietly failed.LocalGitCorpusdeclares openDox's governed write path; the corpus'sread-only-declared-at-resolutioncheck asserts that resolution reports none, and has a name for a reader that brings one anyway: "a reader is inventing one".kind_field/required_fieldsare the corpus's own two-field header (Type,Title) — a corpus that "has never heard of a factory", in the words of its own first document — so they are values here, never defaults inherited from openDox.All four states are built, because the seventeen checks resolve four locations and three of them are negative confirmations:
neutral— a git repository holding exactly the shipped filesempty— a repository committed with--allow-emptyand no tracked path; a.gitkeepwould be listed byls-tree -rand the empty corpus would hold a documentnot-a-directory— a fileThe tests, and what they deliberately do not do
8 tests, added to the required job's named list. They prove the property the runner checks, not the run: the runner needs openxFactory's checkout and its fixtures, which this leg does not have and must not acquire to satisfy a test. So they reproduce the runner's own asymmetric comparison — a
{key: sha256}table off the files against what the reader serves — over a corpus built in a tmpdir with the shipped one's shape, plus: the transposition adds no key of its own; the empty state answers rather than refuses; both refusal states refuse with the right kind.Bytes are compared as
Document.contentbytes, never decoded — a transposition that re-encoded a document would round-trip throughstrand compare equal while the bytes on disk had changed.Honest size: M
The factory is small (openXdox's analogue is 94 lines) because the adapter already exists here.
transpose()is the part openXdox never needed, and the faithfulness proof is unforgiving about keys, so it is a medium change rather than a small one.The pin
The required job's collection triple is pinned by this lane's #29 →
373b05aa. Adding a test file moves it, so the floors are re-measured from this PR's own CI run and raised with the reason in the same commit —pytest-suite.yml's own procedure, and the mechanism its comment names: what moves these numbers here is editing the explicit list, and nothing else.Coordination
#30 @
58852e1fis open on this repository and overlaps two files (validate.yml,local_git_adapter.py). Different subject, different claim; named before authoring rather than discovered at a conflict. If it lands first this branch takesgit merge origin/main— never a rebase — and re-measures the pin afterwards, because #30's own test additions move the same three numbers.This does not tick § 3.7, which needs both destinations; openXdox's pass is evidenced (
5736681367) and this supplies openDox's. It is also § 8.2 part 3, whose other three parts are already on record.🤖 Generated with Claude Code
Summary by Sourcery
Provide openDox's declared conformance reader and faithfully transpose the neutral corpus into git for Q-F1 validation.
New Features:
Enhancements:
CI:
Tests: