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 residue: an ignore rule cannot shorten the corpus, and the collection 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
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 .gitignorecopied 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 ValueErrors 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:
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.pyextracts 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)
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
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.
openDox-code#31 landed with its Copilot follow-up (comment 5738108117)
REGISTERED rather than taken, and the rehome-lander recorded it as residue.
This is the act that takes it. Every claim below is measured at `776d2a80`,
the head that has the hardening list without this switch.
1. `core.excludesFile=` BESIDE `core.attributesFile=`
`GIT_CONFIG_GLOBAL` is retained deliberately — an operator's own git is this
act's git — so a global ignore file reaches the `git add` that builds the
transposition. It is the fourth channel in the hardening list and the only one
that is not about BYTES: it decides which files are in the corpus at all.
Both shapes measured at `776d2a80`:
an excludes file of `*.md` nothing staged, `git commit` exits 1,
`CalledProcessError` out of `transpose`
one naming only `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. What each was is a raw `CalledProcessError`
where a sentence belongs.
`--force` on the add lands beside the switch because they close different
doors: the switch disables the CONFIGURED ignore file, `--force` 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.
2. BOTH SHAPES NAMED, one case each, each run against the shape it forbids
test_a_global_excludes_file_cannot_take_documents_out_of_the_corpus
`*.md` in a global excludes file, reached through `GIT_CONFIG_GLOBAL`.
Green here; at `776d2a80` it is the total-exclusion `CalledProcessError`.
test_an_exclusion_this_act_cannot_reach_is_named_and_not_a_git_error
`$GIT_DIR/info/exclude`, written after `init` — the entrance `--force`
and the switch both miss on the READ-BACK path. The refusal is a
`ValueError` naming the key and the usual cause.
So `_committed_blob` and the commit step now raise named `ValueError`s. The
failure is real and still refuses in both places; this only decides what the
refusal SAYS, because a reader who meets an exit status learns that a
subprocess failed and not that their corpus is short one document.
3. THE FIXTURE IS THE SHIPPED SEED, not a description of it
`_DOCUMENTS` held three plausible documents. The shipped seed
(`tests/corpus-adapter/fixtures/neutral/`) 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 is
a fixture that cannot fail on a reader which requires them.
It is now the seed's own bytes, and that is verified rather than asserted —
165 / 171 / 175 bytes, sha256-identical to the three files on disk:
notes/alpha.md 165 5a8c06574b3240ad…
notes/beta.md 171 971e78fb9fda1fe7…
papers/gamma.md 175 0473352024f38432…
with `_SHIPPED_SIZES` pinning the three lengths, and two cases holding it
there: one that the fixture IS the seed, one that the awkward pair is reported
and never omitted.
4. 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 this message now says about itself.
Four causes, and the list says it is not closed.
tests/test_conformance_corpus.py 11 passed -> 15 passed
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
openDox-code#29 added `Pin the triple` — the required check's last step, which
sums the three JUnit reports and refuses a run that collected too few cases,
skipped a different number, or is missing a report — and REGISTERED a
regression test for it, because a shell script inside a workflow file is the
one kind of code in this repository that nothing executes until CI does. The
rehome-lander recorded it as residue. This is the act that takes it.
`tests/test_triple_pin.py` EXTRACTS THE STEP and runs it. It reads the
workflow, takes the step'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 of them, and both keep passing. It
also means the numbers under test are whatever the pins currently say, so a
re-pin (this commit performs one) needs no matching edit in the test.
THREE CASES, one per outcome, each isolated so exactly one refusal can fire,
and each RUN AGAINST THE SHAPE IT FORBIDS by mutating the step in a scratch
copy of the workflow:
the pinned state passes
the smallest state satisfying both floors and the exact skip count.
Mutation: the selected floor from `-ge` to `-gt`. The case 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 two reports that DO appear satisfy every number, which is the whole
case: 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.
Mutation: the `MISSING` guard made unreachable. The case FAILS, and the
step prints `triple: selected=1106 passed=1103 skipped=3 … margin 0` and
exits 0 over a run that never wrote a third of the suite. That is the
state this case exists to make impossible.
one skip more than pinned is a refusal
the extra case ships already-skipped, so both floors stay met and only
the exact number moves. Mutation: the `=` test loosened to `-le`. The
case FAILS.
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 of what can
move the skip count.
AND THE RE-PIN, in this commit because the list edit is in this commit.
MEASURED over this tree by running the three invocations and summing them with
the step's own script: selected 1099 -> 1106, passed 1096 -> 1103, skipped
still 3. Seven cases, all this act's: four in
`tests/test_conformance_corpus.py` and the three above. `pytest -q
tests_runtime/` is 573, unmoved — no DB-backed case here.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`acfa3e26` is the tree the numbers were taken on. The hermetic six are
UNCHANGED at 360 passed, 1 skipped — this act's seven cases all land on the
required job's first list, which that figure does not count and the triple
does: `tests/` reads 730 passed 2 skipped, and the triple reads selected 1106,
passed 1103, skipped 3. `pytest -q tests_runtime/` is 573, unmoved.
An entry is added here whenever the figure moves or the tree does, and it
names the commit that produced it because a figure stated for a tree nobody
measured is not a measurement. The previous entry is marked SUPERSEDED, so
exactly one entry on this branch says THE CURRENT FIGURE, and the PR
description states the same numbers at this same commit.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The PR closes two registered residues: it prevents ambient Git ignore configuration from shortening the conformance corpus while producing readable refusal errors, and it adds hermetic tests that execute the workflow’s own collection-pin script, with validation integration and measured pins updated for the seven new cases.
Sequence diagram for ignore-resistant conformance corpus transposition
sequenceDiagram
participant Reader as conformance_corpus.reader
participant Transpose as transpose
participant Git as Git repository
participant Corpus as Corpus files
Reader->>Transpose: transpose(shipped, destination)
Transpose->>Corpus: Copy shipped files
Transpose->>Git: git add -A --force
Transpose->>Git: git commit
Git-->>Transpose: Commit containing all copied files
Transpose->>Git: cat-file blob HEAD:key
Git-->>Transpose: Committed bytes
Transpose-->>Reader: LocalGitCorpus
alt A file is still excluded
Git-->>Transpose: CalledProcessError
Transpose-->>Reader: ValueError naming the missing key or empty commit
end
Loading
Sequence diagram for workflow triple-pin self-test
sequenceDiagram
participant Test as test_triple_pin.py
participant Workflow as validate.yml
participant Shell as bash
participant Reports as JUnit reports
Test->>Workflow: Extract Pin the triple run and env
Test->>Shell: Run extracted script in temporary directory
Shell->>Reports: Read generated JUnit reports
Shell-->>Test: selected, passed, skipped, failures, errors
Test-->>Test: Verify refusal outcomes under mutations
alt Missing report or pin mismatch
Shell-->>Test: Non-zero result with refusal message
else Pinned state
Shell-->>Test: Zero result for expected reports
end
Loading
File-Level Changes
Change
Details
Files
Harden the Git-backed corpus transposition against ambient ignore rules and make exclusion failures actionable.
Disable the configured global excludes file during Git operations.
Force-add copied corpus files to bypass corpus-carried .gitignore and info/exclude.
Convert empty-commit and missing-blob subprocess failures into descriptive ValueErrors.
src/opendox/conformance_corpus.py
Align the conformance fixture with the shipped seed and add regression coverage for corpus completeness and failure reporting.
Replace simplified document bytes with the shipped seed’s exact awkward documents and pin their sizes and front-matter shapes.
Verify all documents remain listed, readable, byte-identical, and correctly classified or reported.
Exercise global excludes and unreachable exclusion paths, including descriptive error chaining.
tests/test_conformance_corpus.py
Add executable coverage for the workflow’s collection pin by running the workflow step itself.
Extract Pin the triple and its environment pins from validate.yml rather than duplicating the shell script.
Test the passing pinned state, missing-report refusal, and exact-skip-count refusal using generated JUnit reports.
Skip cleanly when bash or python3 is unavailable.
tests/test_triple_pin.py
Integrate the triple-pin test into the required validation job and update the measured collection floors and diagnostics.
Add tests/test_triple_pin.py to the required test list.
Raise MIN_SELECTED and MIN_PASSED to 1106 and 1103 while retaining the exact skip pin of 3.
Expand skip diagnostics to enumerate runtime, platform, dependency, and newly skipped-test causes.
.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!
REGISTERED at b5170372 — Copilot's three findings, each measured against the diff
All three are accurate, and two of them are the same defect class this PR
corrects elsewhere. The head is capped by the brief that authorized this
act (two registered items, one push), so they are registered here rather than
taken — with the shape of each fix, so whoever takes them does not re-derive it.
R1 — _committed_blob translates EVERY cat-file failure into an ignore rule (thread)
Accurate.except subprocess.CalledProcessError catches a corrupt object
database, an invalid HEAD and an unreadable git directory alongside the
missing-path case, and tells the operator an ignore rule is the usual cause.
The hedge in the wording ("the usual cause") softens it and does not fix it,
and from failed chains an exception whose str is Command … returned non-zero exit status N — git's own stderr is captured and then dropped,
which is the part that would have named the real failure.
Fix shape: ask the tree, do not infer from the status — git ls-tree HEAD -- <key> (or cat-file -e) empty means the key is genuinely absent and the
ignore-rule sentence is earned; anything else re-raises with failed.stderr
quoted verbatim.
R2 — the commit catch-all states an ABSOLUTE that is false (thread)
Accurate, and worse than the review puts it. The sentence reads "every
file copied into it was excluded before git commit saw it" — stated as
fact, with no hedge, for a failure that an unwritable object database, a full
disk or a permission error produces identically. That is precisely the defect
this PR's own item (a) closes in the skip-pin message, which "named an
ABSOLUTE once and that was false". A PR that corrects a false absolute in one
file and writes a new one in another has not learned the lesson it is claiming.
Fix shape: the index answers this directly — git diff --cached --name-only
empty before the commit means nothing was staged and the exclusion sentence is
earned; otherwise re-raise, quoting git's stderr.
R3 — _SHIPPED_SIZES pins lengths, so a same-length substitution passes (thread)
Accurate. The suite pins three byte COUNTS and the header-field shape of
each document; the sha256 identity with the shipped seed was measured
out-of-band and is recorded in the commit message and in this PR's body, which
is a measurement in a transcript and not an assertion in a suite. The test's
own docstring is honest about asserting "the SHAPE the lander measured", but
the claim around it is stronger than the code.
Fix shape: a _SHIPPED_DIGESTS constant carrying the three sha256 values
measured against openxFactory/tests/corpus-adapter/fixtures/neutral/ — notes/alpha.md5a8c06574b3240ad…, notes/beta.md971e78fb9fda1fe7…, papers/gamma.md0473352024f38432… — asserted per key. It detects drift
without making openxFactory a dependency of this leg, which is the constraint
that produced the copy in the first place.
R4 — from the review overview, with no thread of its own
The overview says the pin test's "failure/error and skip-count assertions need
strengthening". The step has six refusals; this act covers three — the
three its brief named (the measured state passes, a missing report refuses
naming the file, one skip more refuses). FAILURES != 0 and ERRORS != 0
have no case, and the passed-floor refusal is exercised only incidentally.
Registered as the remaining half of the same residue.
…igest
Copilot's three findings on #33 at `b5170372`, all accurate, all this PR's own
diagnostics and its own fixture strength. Each claim below is measured against
a full checkout of `b5170372` — never with `PYTHONPATH`, for the reason
`docs/runtime.md` § 8 records.
R1. A NON-ZERO `cat-file` DOES NOT MEAN AN EXCLUSION — 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:
key absent from HEAD cat-file: does not exist in 'HEAD'
ls-tree: rc 0, EMPTY
key present, object gone cat-file: bad file
ls-tree: rc 0, names the path
HEAD itself unreadable both non-zero
Three shapes, three sentences, and the third no longer borrows the first's
diagnosis. 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. The new case builds that shape — a real transposition, then the object
file unlinked — and fails there.
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. That is the same defect this PR
removes from the workflow's skip-pin message one file over.
`git diff --cached --name-only` answers it, and the two shapes get two
sentences: nothing staged keeps the exclusion sentence (and still names the
populated-state-with-no-files cause beside it); anything staged gets a refusal
that says it is NOT an exclusion, gives the staged count as the evidence, and
ENUMERATES the causes — exclusion (ruled out), no space, a permission, another
git failure including a stale lock.
Both new cases fail at `b5170372`, and the second is the one worth quoting: a
shipped root whose populated state is an empty directory — nothing to do with
any ignore rule anywhere — was answered
the transposition committed nothing: every file copied into it was excluded
before `git commit` saw it
AND GIT IS QUOTED FROM WHICHEVER STREAM CARRIED IT. `_what_git_said` reads
stderr AND stdout because MEASURED they differ by shape: `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 a remote. `init`, `add`, `commit`, `ls-tree` and
`cat-file`, in a directory this process just made.
R3. A LENGTH IS NOT AN IDENTITY
`_SHIPPED_SIZES` plus the header-shape assertions let any SAME-LENGTH
substitution through, and `_DOCUMENTS` is also what `shipped` is built from
and what `_fingerprint` is computed over — so a drifted fixture agrees with
itself all the way down. The sha256 identity was measured and written in a
commit message, which is a measurement in a transcript and not an assertion in
a suite.
`_SHIPPED_DIGESTS` carries the three digests of
`tests/corpus-adapter/fixtures/neutral/**`, asserted per key, 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…
Recording the digests is also the only way to detect drift without making
openxFactory a dependency of this leg, which is the constraint that produced
the copied bytes in the first place: the seed is not reachable from this
repository, so the digest has to be.
tests/test_conformance_corpus.py 15 passed -> 18 passed
R4 — `FAILURES != 0` and `ERRORS != 0` cases for the pin step — stays
REGISTERED (openDox-code#33 comment 5738429484), on the holder's word.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`f9c8e4d5` is the tree the numbers were taken on. The hermetic six are
UNCHANGED at 360 passed, 1 skipped for the second time on this branch — all
three cases land on the required job's first list, which that figure does not
count and the triple does: `tests/` reads 733 passed 2 skipped, and the triple,
summed by the step's own script, reads selected 1109, passed 1106, skipped 3.
`pytest -q tests_runtime/` is 573, re-run rather than carried and unmoved.
Floors: `MIN_SELECTED` 1106 -> 1109, `MIN_PASSED` 1103 -> 1106, `EXPECT_SKIPPED`
still 3. `1106 + 3` is a check on the reading and not its source.
The illustration above the required job's list moves with the pins: the
missing-report mutation was re-run at 1109/1106 and the step reports
`selected=1109 passed=1106 … margin 0` over a run missing a third of the suite.
A quoted figure that no longer matches the pins it illustrates is a figure
nobody measured.
The previous entry is marked SUPERSEDED, so exactly one entry on this branch
says THE CURRENT FIGURE, and the PR description states the same numbers at this
same commit.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The new --force defense is not exercised by these tests. The success case only configures core.excludesFile, which _HARDENING disables; the other case removes both the hardening switch and --force to force the diagnostic path, but never creates a copied .gitignore or $GIT_DIR/info/exclude. Removing --force would therefore leave its normal success behavior untested. Add a real exclusion fixture/after-init case and assert that all corpus keys are committed.
REGISTERED at 20699c54 — Copilot's second round, each finding MEASURED
R1, R2 and R3 are marked resolved since last review. Five findings are new
(four threads plus one "previously missed"). The head is capped — the
holder's word for this push was R1/R2/R3 and R4 stays registered — so these are
recorded with the measurement that settles each, not taken.
F1 — the backticks in the skip-pin message are COMMAND SUBSTITUTION (thread)
Accurate, and it is a defect THIS PR introduces. The clause added to the
enumerated causes — tests/test_triple_pin.py skips where `bash` or `python3` is not on PATH — sits inside the double-quoted argument to echo, so bash
expands the backticks. Measured by running that one line out of the
workflow with stdin < /dev/null:
… skips where or is not on PATH; (3) a new case that ships already-skipped …
The two tool names are gone, replaced by the empty output of running bash
and python3. So the message that fires exactly when the collection pin
catches something is the message that eats two of its own words, and two
programs run to produce nothing. It is latent — the branch only evaluates on a
skip mismatch — and it is squarely the class this PR spent two commits removing
from that same message.
Fix shape:'bash'/'python3' in single quotes, or ``` escaped. Three
characters.
F2 — git diff --cached --name-only running a configured program: MEASURED FALSE at this head, and the remedy is still right (thread)
Measured on git 2.43.0 with a global [diff] external = <script>, a [diff "hostile"] textconv = <script>, and a .gitattributesin the tree
marking *.md diff=hostile:
command
the configured program
git diff --cached --name-only
did not run — nothing in the log, names listed
git diff --cached (no flag)
ran twice, once per staged path
So the stated defect — "an ambient or corpus-supplied program can run while the
error is being classified" — does not hold for the command this act runs. What
does hold is the shape of the objection: the safety is supplied by a FLAG, with
nothing in the file saying so, and an edit that drops --name-only opens
exactly the hole described. git ls-files --cached -z is index-only plumbing
with no diff machinery to disable, so it makes the property structural instead
of flag-dependent — and it closes F3 in the same line.
Fix shape:git ls-files --cached -z, split on NUL.
F3 — .split() splits pathnames that contain spaces (thread)
Accurate. Measured with two staged paths, one of them my notes/a b.md:
The count is the evidence the non-exclusion refusal offers a reader, so a
wrong count undermines the one thing that sentence is for. This module's own
argument for --force is that the shipped corpus is arbitrary files — a
pathname with a space in it is exactly that.
Fix shape: the NUL-split in F2 fixes this too; splitlines() fixes it alone.
F4 — @requires_git on a test that touches no git (thread)
Accurate.test_the_fixture_is_the_shipped_seed_and_not_a_description_of_it
compares bytes to digests; it runs no git. The decorator makes the digest
guard — the one this round added — skip on precisely the machine where nothing
else is checking, and it would move EXPECT_SKIPPED, which the same act pins
exactly.
Fix shape: drop the decorator from that one test; the triple then needs
re-measuring only where git is absent.
F5 ("previously missed") — --force's SUCCESS behaviour is asserted nowhere, and this PR's own prose said otherwise
Accurate, and it makes a claim of mine false. Both exclusion cases drive a global excludes file: the first with the repair in place, the second with
the switch removed from _HARDENING and --force stripped. Neither copies a .gitignore into the corpus, and neither writes $GIT_DIR/info/exclude — so
the two entrances --force exists for are exercised by no test at all, and
removing --force would leave its success behaviour green.
The PR body (now corrected) and the message of commit 521abb7c both described
the second case as driving $GIT_DIR/info/exclude written after init. It does
not. A pushed commit message cannot be corrected without rewriting it, so the
correction is in the body and here.
Fix shape: a case that copies a .gitignore naming *.md into the corpus
and one that writes $GIT_DIR/info/exclude after init, each asserting all
three keys are committed — the success path, not the diagnostic.
F1 is a FACT regression this PR introduces and is flagged to the holder
separately; F5 leaves a false statement in a pushed commit message, with
the correction carried here and in the body. Neither is taken at this head. R4 (FAILURES != 0 / ERRORS != 0 cases for the pin step) remains
registered and untaken on the holder's word.
The minimal final push on this PR: the regression it introduced into a CI
diagnostic, and the index query that was right about the objection and wrong
about the reading. F4 and F5 stay REGISTERED (openDox-code#33 comment
5738550542) on the holder's word.
F1. THE BACKTICKS WERE COMMAND SUBSTITUTION, AND THIS ACT PUT THEM THERE
The clause this branch added to the skip-pin message sat inside the
double-quoted argument to `echo`, so bash expanded it. MEASURED by running that
one line straight out of the workflow with stdin from /dev/null:
before … skips where or is not on PATH; (3) a new case …
after … skips where 'bash' or 'python3' is not on PATH; (3) a new case …
Both tool names were eaten and two programs ran to produce them. The message
that fires exactly when the collection pin catches something was the message
that could not name its own cause — which is the defect this branch spent two
commits removing from that same message. Single quotes; nothing else changed in
it. It is the only backtick in any `run:` block in the file (checked by parsing
the workflow, not by eye).
F2 + F3. `ls-files --cached -z`, AND THE REVIEW WAS HALF RIGHT IN A USEFUL WAY
The review held that `git diff --cached --name-only` could run a configured
`diff.external` or textconv while the failure was being classified. MEASURED on
git 2.43.0, with a global `[diff] external`, a `[diff "hostile"] textconv` and
an in-tree `.gitattributes` marking `*.md diff=hostile`:
git diff --cached --name-only the program did NOT run; names listed
git diff --cached the program RAN, once per staged path
So the claim is false for the command this act ran — and the objection is still
right: the safety came from a FLAG, nothing said so, and an edit dropping
`--name-only` would open exactly that hole. `ls-files --cached -z` is
index-only plumbing with no diff machinery to disable, so there is no flag left
to drop.
The same line closes the pathname finding, which was plainly true. MEASURED end
to end, three documents with one key holding a space, the commit blocked by a
held `index.lock`:
at `20699c54` `… it is NOT an exclusion: 5 path(s) are staged and waiting`
here `… it is NOT an exclusion: 3 path(s) are staged and waiting`
The count is the EVIDENCE that refusal offers its reader, and this module's own
argument for `--force` is that the shipped corpus is arbitrary files — a
pathname with a space in it is exactly that.
`ls-files --cached` also reads the index rather than a comparison with HEAD,
which is the question actually being asked: was anything staged.
NO FIGURE MOVES. The triple was re-run on this tree — `tests/` 733 passed 2
skipped, the S7 residue 13, the hermetic six 360 passed 1 skipped, `triple:
selected=1109 passed=1106 skipped=3 failures=0 errors=0` — unchanged, because
this act adds no case. The floors stay at 1109/1106/3 and the figure entry
keeps naming `f9c8e4d5`, which is still the head those numbers were taken on.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
key is passed to git ls-tree as a pathspec, so valid corpus names containing Git magic or glob characters can be interpreted rather than matched literally; the diagnostic can then report a present key as absent or match another path. The existing Git runner explicitly uses --literal-pathspecs for document keys (src/opendox/runtime/local_git_adapter.py:533-534,624), so apply the same protection here.
REGISTERED at 06b7ed2f — round 3: Findings: None, plus one "previously missed", MEASURED
Copilot marks all four of round 2's findings resolved since last review
(F1 backticks, F2 external programs, F3 pathname splitting, F4 the decorator —
F4 was resolved by the review, not by this act, and stays registered below).
Its new round reports no findings in the changed code. One "previously
missed" item arrives against code that has not changed since round 2, and it is
measured here rather than accepted or dismissed.
F6 — "Pass literal pathspecs when checking corpus keys" (conformance_corpus.py:221)
The claim: key reaches git ls-tree as a pathspec, so a corpus name holding
git magic or glob characters can be interpreted rather than matched, and the
diagnostic could then call a present key absent or match another path.
Measured on git 2.43.0, in a repository holding ab.md, plain.md and a
file literally named notes/a*.md:
asked
answer
ls-tree --name-only HEAD -- 'a*.md'
empty — the glob did not match ab.md
ls-tree --name-only HEAD -- '*.md'
empty — ls-tree does not glob at all
ls-tree --name-only HEAD -- 'ab.md'
ab.md
ls-tree --name-only HEAD -- 'notes/a*.md'
notes/a*.md — the literal key, correctly
cat-file blob 'HEAD:notes/a*.md'
the bytes — HEAD:<path> is a tree lookup, not a pathspec
ls-tree --name-only HEAD -- ':(glob)plain.md'
rc 128, pathspec magic not supported by this command: 'glob'
the same with --literal-pathspecs
rc 0, empty — the correct answer
So the glob half is false for ls-tree — wildcards are not expanded, and a
key containing * is discriminated exactly right, including when a file by
that literal name exists. The read path is unaffected either way: cat-file blob HEAD:<key> is a tree-path lookup with no pathspec in it.
The magic half is real and small. A key that begins with: — legal on
POSIX, and this module's own argument for --force is that the corpus is
arbitrary files — makes ls-tree exit 128, which this act reports as its "this
act cannot even ask its tree what it holds" sentence, quoting git's pathspec magic not supported by this command. That is a true sentence and not a
misclassification, but it is the wrong one for a key that is simply absent, and --literal-pathspecs gives the right one. The precedent the review cites is
real: local_git_adapter passes --literal-pathspecs for document keys.
Fix shape:--literal-pathspecs on the ls-tree probe (one word, before the
subcommand, as the adapter spells it).
Registered and not taken, on the holder's word: this PR is register-only
from here.
Still registered and untaken on this PR
#
what
where
R4
the pin step has six refusals; three have cases — FAILURES != 0 and ERRORS != 0 have none
--force's SUCCESS path is asserted nowhere (no copied .gitignore, no info/exclude), and commit 521abb7c's message misdescribes the second exclusion case — corrected in the body, uncorrectable in the pushed message
§ 3.7 residue: an ignore rule cannot shorten the corpus (core.excludesFile + forced add, named refusals), the shipped seed's bytes as the fixture with sha256 per key, the skip-pin diagnostic enumerating causes (command-substitution bug fixed), tests/test_triple_pin.py extracting the real step; triple 1109/1106/3; R4/F4/F5/F6 registered
…identity marker, --force's success path, and a magic-looking key (#34)
# The openDox-code residue #33's own Copilot review left REGISTERED: R4, F4, F5, F6
Four items, none of them this branch's own invention. All four were found by
Copilot's review of #33, registered rather than taken because that PR was
capped, and stand in `PROGRESS-runtime.md` as "Idle from here" waiting for a
new brief. This is that brief, taken as one hygiene pass since all four are
small and three of the four land in the same file.
| # | what | origin |
|---|---|---|
| R4 | `Pin the triple` has six refusals; three had cases; `FAILURES != 0` and `ERRORS != 0` had none | [#33, comment 5738550542](#33 (comment)) |
| F4 | `@requires_git` sits on the fixture-identity test, which runs no git | same comment |
| F5 | `--force`'s SUCCESS path is asserted nowhere | same comment |
| F6 | `--literal-pathspecs` on the `ls-tree` probe: the magic half is real, the glob half was never measured | [#33, comment 5738611955](#33 (comment)) |
Every measurement below was taken by running the thing, on git 2.43.0 (this
container's version, the same one every prior measurement in this file cites).
## R4 — clause (d)'s two untested refusals (`0fb990d`)
The step has six refusal branches. Three already had cases before this PR
(a missing report, a report below floor, one skip more than pinned); the
other two — `FAILURES != 0` and `ERRORS != 0` — had none.
Two cases added, using the same isolation technique
`test_one_skip_more_than_pinned_is_a_refusal` already established: `total -
19` on the main report keeps SELECTED and PASSED both at or above their
floors and SKIPPED exactly pinned, with one test moved from passed to
failed (or to errored) rather than from collected to skipped, so only the
clause under test can fire.
**Proved against the mutation each forbids**, by neutering one clause in a
scratch copy of the workflow and re-running the suite:
| mutation | result |
|---|---|
| `[ "$FAILURES" = "0" ]` replaced with `true` | only `test_a_failure_is_a_refusal_with_both_floors_and_the_skip_count_met` fails (4 passed, 1 failed) |
| `[ "$ERRORS" = "0" ]` replaced with `true` | only its sibling fails (4 passed, 1 failed) |
| both restored | all 5 pass |
`tests/test_triple_pin.py`: **3 → 5 passed**.
## F4 — the fixture-identity test runs no git, and was marked as if it did (`2b78d54`)
`@requires_git` sat on
`test_the_fixture_is_the_shipped_seed_and_not_a_description_of_it`. Every
assertion in it is `hashlib.sha256` over the module-level `_DOCUMENTS`,
`_SHIPPED_SIZES` and `_SHIPPED_DIGESTS` dicts — nothing in the test shells
out to git. The marker dropped the digest guard — the one check standing
between this file and a fixture that has quietly drifted from the seed it
claims to mirror — on any runner without git, and moved `EXPECT_SKIPPED`
there for a reason that was never this test's own.
Removed. This runner has git, so the `skipif` condition was already false and
the test already ran and already passed — the fix makes the skip count
honest on a runner that does **not** have git; it moves nothing here. No new
case: a marker fix has no mutation of its own to prove against.
## F5 — `--force`'s success path, asserted nowhere until now (`2b78d54`)
Every existing exclusion case in this file reaches a **configured** ignore
file through `GIT_CONFIG_GLOBAL`, which `-c core.excludesFile=` disables.
None of them ever lays a `.gitignore` down **inside** the populated state, or
writes to `$GIT_DIR/info/exclude` — the two entrances `--force` on the `add`
actually exists for. Two cases added, each **measured against `--force`
removed**:
| case | shape | with `--force` removed |
|---|---|---|
| `test_a_gitignore_copied_in_with_the_corpus_does_not_shrink_it` | a real `.gitignore` (`*.md`) written into `shipped / POPULATED` before `transpose` | the commit **succeeds short** (only `.gitignore` staged), and the byte read-back names `notes/alpha.md` as excluded |
| `test_an_info_exclude_written_after_init_does_not_shrink_the_corpus` | `_git` monkeypatched to write `$GIT_DIR/info/exclude` (`*.md`) right after `init`, before `add` | **nothing at all** is staged (every document here is `.md`, and there is no companion file to survive), so the total-exclusion `ValueError` fires |
Restored, both pass and every document plus the `.gitignore` itself is
byte-verified into the transposition.
### The correction commit `521abb7c` cannot make
Commit `521abb7c`'s own message describes
`test_an_exclusion_this_act_cannot_reach_is_named_and_not_a_git_error` as
driving *"`$GIT_DIR/info/exclude`, written after `init`"*. **That is wrong.**
Re-reading the test as it stands (and as it stood at `521abb7c`): both of its
cases drive the same `GIT_CONFIG_GLOBAL` excludes file as the test before
it (`*.md` and `beta.md`), with the switch taken out of `_HARDENING` and
`--force` monkeypatched off — the only way left to reach the "cannot reach"
sentence once the repair is in place. No case anywhere before this PR drove
`$GIT_DIR/info/exclude`, which is exactly the gap F5 names.
That commit is already pushed and merged; its message cannot be edited. This
paragraph is the correction. I checked every docstring and doc file in this
tree for the same misdescription (`grep -rn "info/exclude" --include="*.py"
--include="*.md"`) — nothing else repeats it, so nothing else needed fixing.
`tests/test_conformance_corpus.py` (F4 + F5 + F6 together): **18 → 21
passed**.
## F6 — a magic-looking key is not a repository problem (`40b1f80`, tested in `2b78d54`)
The `ls-tree` probe inside `_committed_blob`'s exception handler parses a
leading `:` in the key as git **pathspec magic** before it ever asks the
tree. A key shaped like `:!doomed.md` — never committed, ordinary in every
other way — makes `cat-file` fail exactly like any absent key (`does not
exist in 'HEAD'`), and then makes the probe itself exit **128** with
`pathspec magic not supported by this command: 'exclude'`. Before this PR,
that 128 read as *"HEAD or the repository itself is the problem"* — true of
the exit status, false of the key, which was simply never committed.
`--literal-pathspecs` on the probe closes it:
| | `ls-tree --name-only HEAD -- ':!doomed.md'` |
|---|---|
| before | exit 128, `fatal: :!doomed.md: pathspec magic not supported by this command: 'exclude'` |
| after | exit 0, empty — indistinguishable from any other absent key |
### Why the glob half is not a bug
The same finding raised a second concern: a key **containing** `*` might be
glob-expanded by `ls-tree` and match more than the caller intended.
Measured, on a tree holding `alpha.md`, `beta.md` and a file literally named
`a*.md`, all at the same directory depth (no nesting to hide an answer
behind):
| pathspec | matched |
|---|---|
| `-- '*.md'` | **nothing** — none of the three |
| `-- 'a*.md'` | only the file actually named that |
`git ls-tree` does not expand a bare pathspec as a glob at all, with or
without `--literal-pathspecs`. So the flag is added here for the `:`-magic
case alone, proved by one new case:
`test_a_magic_looking_key_is_named_absent_and_not_a_repository_problem` —
**measured against the fix reverted**: 1 failed (this case only), 20 passed;
restored, 21 passed.
## Figures, measured at `2b78d54` and stated at that commit in `validate.yml`
| | before (main, `1d4ac83c`) | after (`2b78d54`) |
|---|---|---|
| `tests/` (the required job's first list) | 733 passed, 2 skipped | **738 passed, 2 skipped** |
| the S7 residue | 13 passed | 13 passed — unchanged |
| the hermetic six | 360 passed, 1 skipped | 360 passed, 1 skipped — unchanged |
| the triple, summed by the step's own script | `selected=1109 passed=1106 skipped=3 failures=0 errors=0` | `selected=1114 passed=1111 skipped=3 failures=0 errors=0` |
| `pytest -q tests_runtime/` (DB-backed) | — | untouched by this PR, not re-measured |
**The pin moves with the act** (`7719161`): `MIN_SELECTED` 1109 → **1114**,
`MIN_PASSED` 1106 → **1111**, `EXPECT_SKIPPED` still **3**. Five cases, all
of them this PR's: two on `test_triple_pin.py`, three on
`test_conformance_corpus.py`. `1109 + 5` is a **check** on the reading and
not its source — the reading came from a run, quoted above.
## What this PR does not touch
The OPENDOX pin lockstep and every pin file are untouched, per the brief.
`tests_runtime/` (the DB-backed job) is untouched, so its 573 figure is not
re-measured or re-quoted here.
Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <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.
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.
CalledProcessErrorPin 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 doesEvery measurement below was taken by running the thing, never by reading it.
a. An ignore rule cannot shorten the corpus
GIT_CONFIG_GLOBALis retained on purpose — an operator's own git is thisact's git — so a global ignore file reaches the
git addthat builds thetransposition.
core.excludesFileis the fourth channel in_HARDENINGandthe 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:776d2a80*.mdgit commitexits 1 —CalledProcessErrorout oftransposebeta.mdNeither 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.devnulldisables the configured file.--forceon the add answers the two entrances no config switch reaches:a
.gitignorecopied in with the corpus (the shipped corpus is arbitraryfiles, 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.
_committed_bloband the commit stepraise
ValueErrors naming the key and the usual cause. The failure is realand still refuses; this only decides what the refusal says.
One case per exclusion shape, each run against the shape it forbids:
776d2a80test_a_global_excludes_file_cannot_take_documents_out_of_the_corpus*.mdthroughGIT_CONFIG_GLOBALCalledProcessErrortest_an_exclusion_this_act_cannot_reach_is_named_and_not_a_git_error_HARDENINGand--forcestripped — which is the only way to reach the sentence once the repair is in placeCalledProcessErroron the read-backThe fixture is the shipped seed, not a description of it
_DOCUMENTSheld three plausible documents. The shipped seed holds threeawkward ones, and the awkwardness is the point:
beta.mdhas noTitleand
gamma.mdhas noType. A fixture that quietly gives every document bothfront-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/:notes/alpha.md5a8c06574b3240ad…notes/beta.md971e78fb9fda1fe7…papers/gamma.md0473352024f38432…all three byte-identical to the files on disk.
_SHIPPED_SIZESpins the threelengths 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_ignorewas the cause — and that wasfalse, 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.pyextracts the step and runs it: it reads theworkflow, takes
Pin the triple's ownrunscript and its ownenvpins,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 — thetwo 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:
-ge→-gtMISSINGguard made unreachabletriple: selected=1109 passed=1106 skipped=3 … margin 0and exits 0 over a run that never wrote a third of the suite=loosened to-leThe 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, noopendoximport,--noconftestsafe — and it skips wherebashorpython3is 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)
and then taken on the holder's word. Every claim is measured against a full
checkout of
b5170372.R1 — a non-zero
cat-filedoes not mean an exclusion, so ask the treecat-file blob HEAD:<key>exits non-zero for a key that was never committedand 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-treeseparates them exactly — measured on git 2.43.0 in a one-commit repository:
cat-file blob HEAD:<key>ls-tree --name-only HEAD -- <key>does not exist in 'HEAD'bad fileThree shapes, three sentences. At
b5170372, with the loose object behindnotes/beta.mdremoved, 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 commitsaw it", statedas 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-onlyanswers it, and the two shapes now get two sentences: nothingstaged 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
b5170372a shipped root whose populated state isan empty directory — nothing to do with any ignore rule anywhere — was
answered "every file copied into it was excluded before
git commitsawit".
And git is quoted from whichever stream carried it. Measured:
commit -qwith nothing staged writes
nothing to commit …to stdout with stderrempty, while a held
index.lockwritesfatal: Unable to create …tostderr 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— whichrefuses 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_DIGESTSnow carries the seed's sha256 per key, asserted in thesuite, 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→factorYinnotes/alpha.md:b5170372a7e2e453e7cc…against5a8c06574b32…Each of the three new cases fails at
b5170372, and so does thestrengthened 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 != 0andERRORS != 0have no case.Figures, measured at
f9c8e4d5and stated at that commit invalidate.ymltests/(the required job's first list)selected=1109 passed=1106 skipped=3 failures=0 errors=0pytest -q tests_runtime/(DB-backed)The pin moves with the act:
MIN_SELECTED1099 → 1109,MIN_PASSED1096 → 1106,
EXPECT_SKIPPEDstill 3. Ten cases, all of them thisPR's: seven on the conformance corpus and three on the pin.
1106 + 3is acheck 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
Summary by Sourcery
Harden conformance-corpus transposition and validate the CI collection pin against the workflow step itself.
New Features:
Bug Fixes:
Enhancements:
CI:
Tests: