Repository navigation
FLOOR PART 4: the eight registered hardening items, and runbook § 2.3 - #1115
Conversation
…each The rest of the list owed to this successor act (#1105 comment 5730120150 and round 10's full twelve; #1110 took the four suppressed ones), under Brett's RULED Q-P5 = (a), `#656` comment 5731951297. A plain gate: two files, no change packet, no pin, no gitlink, no manifest. 1. `ls-files -s` STAGE 0 ONLY. During an unresolved merge git lists stages 1, 2 and 3, so reading the first `160000` row took the MERGE BASE's gitlink as the pin this repository records. A conflicted index has no recorded pin; it is now named as that state instead of guessed through. 2. THE TWO SPEC MOUNTS JOIN THE PIN SET and the cleanliness sweep. `leg_of()` matches the longest verified pin root containing a module's file, so a module under `openDox/spec` — which a `re_destined:` block may lawfully put there — resolved to the openDox ASSEMBLY ROOT and the verdict named the assembly's commit for a module the assembly does not contain (measured on #1105 round 6). 3. THE CHAIN IS RESOLVED FROM THE EXACT OUTER COMMIT. The index-first rule is right for the pin this repository declares and wrong one level down: a gitlink staged inside `openDox` is in no commit openxFactory has declared, yet it was read as the recorded pin while openDox's own HEAD still matched, so the level above stayed green. 4. `GIT_NO_LAZY_FETCH=1`, and the failure it produces NAMED. In a partial clone a read of an absent blob fetches from the promisor remote, so the archive hangs for as long as the network takes inside a runner whose contract is to refuse rather than hang. Measured on a `--filter=blob:none` clone archiving a tag the checkout never materialized: rc 128 `fatal: could not fetch <oid> from promisor remote` with it, rc 0 after a silent fetch without it. New code `equivalence-object-store-incomplete`, because the remedy is a deliberate `git fetch origin <commit>` and the old message sent that operator to replace a good `--pre-ref`. 5. THE CLEANLINESS SWEEP IN ITS WORKING FORM: `git diff --name-only HEAD -- src`, `ls-files --others --exclude-standard`, and an `ls-files -v` scan for `assume-unchanged` / `skip-worktree` — flags that make git report an EDITED file as clean, which `status --porcelain` alone could not see. `--ignored`, the proposed remedy, stays rejected on the measurement: it reports this runner's own `__pycache__` and would refuse on every run after the first. 6. A NON-IMPORTING MATERIALIZATION PROBE BEFORE `post_stack()`. Composing the stack installs a meta-path finder, mutates the import system for the rest of the process and writes `__pycache__` INTO the leg whose cleanliness the next check asserts — all to discover that a submodule directory is empty, and then to say so in terms of a module name. 7. THE SUPERPROJECT'S REVISION AND DIRT IN THE EVIDENCE, never a refusal: the post side is composed out of ROOT's `carved_reach.py`, `opendox_host.py` and the § 4.4 profile, none of them pinned by the gitlinks the verdict names, and this is the tree the runner is edited in. 8. THE PRE CHILD'S INPUTS TRAVEL BY NAME, NOT BY POSITION — SonarCloud's last `pythonsecurity:S8705` on this file. argv is the one channel where position decides meaning, and a shifted unpack would make the corpus the output path. Eighteen tests, at least one per item and a control beside the sharp ones: a real conflicted index written with `update-index --index-info`, a real staged-vs-committed gitlink, a real `--filter=blob:none` clone refusing by name, a real `assume-unchanged` edit that `status` calls clean, and the probe proven to run before the stack is composed. 78 passed, 0 skipped; `EXPECT_SKIPPED` untouched. The verdict is unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735, exit 0. Mutation sweep over the eight: 16 mutants, 16 caught, 0 survived. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The operator's section for the runner #1105 landed, written where the other three floor parts are documented — § 2.1 the arrival verifier, § 2.2 the conformance runner, and now § 2.3 — and held until #1086 landed, because until then the § 2 family was contended. What it says, and only what is measured: the claim (design § D6 (4), RULED OQ-1 — the same corpus through both sides must render the SAME SNAPSHOT, which §§ 2.1–2.2 cannot notice because they measure files and interfaces); the two sides and why each is composed as it is (the archived tag in a child interpreter, and why an archive rather than a worktree; the pinned stack in THIS process, and why the § 4.4 profile must be registered for it); the pinned anchor, without which the two sides diverge on it alone; the command with its expected verdict; the four corpus states, two of which must move the digest, which is how the run is known to have teeth; what is verified before any digest exists; and the superproject's own unpinned revision, which the evidence now carries. § 2.3 IS NOT § 5.5, and the section says so. The box FLOOR PART 4 ticks is § 5.5 of `split-opendox-two-layer-product`'s `tasks.md`; this runbook's own § 5.5 is the two commits a leg arrives in. The two have been confused once already, which is why the disambiguation is in the text rather than in a reviewer's memory. The README doc index gains the runner beside `scripts/carve_conformance.py`, in that entry's form and for its reason: the index lists what proves each floor part, and FLOOR PART 4's prover was missing from it. § 2's own disposition block is untouched — two paragraphs before this commit and two after. doc-health over the tree names neither file. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Reviewer's GuideHardens the snapshot-equivalence runner across all eight registered findings: pin and nested-gitlink verification now follows declared commits and handles conflicts/spec mounts, extraction refuses incomplete object stores without lazy network access, cleanliness and materialization checks are side-effect-aware, evidence includes unpinned superproject state, and child inputs are name-bound. The PR also adds the complete FLOOR PART 4 runbook § 2.3 and README index entry, with extensive regression coverage. Sequence diagram for snapshot-equivalence verificationsequenceDiagram
participant Runner
participant Root as Superproject
participant Git
participant Legs as Pinned legs
participant Pre as PRE child
participant Post as POST stack
Runner->>Root: unmaterialized_legs()
Runner->>Root: post_stack()
Runner->>Git: verify_pins()
Git-->>Runner: stage-0 pins and declared commits
Runner->>Git: git archive pre_ref
Git-->>Runner: archived PRE tree
Runner->>Pre: _run_pre_child(corpus, source_revision)
Pre-->>Runner: PRE snapshot
Runner->>Post: render(corpus)
Post-->>Runner: POST snapshot
Runner->>Root: superproject_state()
Root-->>Runner: revision and dirt evidence
Runner->>Runner: compare snapshots
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟡 Changes recommended
Pathspec archive failures still receive the object-store diagnosis and remediation.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Hardens the snapshot-equivalence runner and documents FLOOR PART 4.
Changes:
- Adds six-mount pin, cleanliness, materialization, and partial-clone checks.
- Makes child inputs environment-named and records superproject evidence.
- Expands tests and documents the runner in README and the cutover runbook.
File summaries
| File | Description |
|---|---|
scripts/verify-snapshot-equivalence.py |
Adds runner hardening and evidence reporting |
tests/snapshot_equivalence/test_snapshot_equivalence.py |
Adds focused regression coverage |
README.md |
Adds the runner to the documentation index |
docs/opendox-cutover-runbook.md |
Documents FLOOR PART 4 |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…d as one Copilot on #1115, and FACT. Classifying the object store left the FALLBACK still worded for it — "this is the OBJECT STORE", "fetch the missing objects before changing --pre-ref" — and what now falls into that fallback is precisely the opposite condition: `git archive` fails before writing anything when NO path matches, so a tree that carries neither archive path never reaches the per-row post-shed check below and was told to fetch objects instead of to name a pre-shed ref. The regression test asserted the CODE and not the detail, so it passed on the wrong message. Both halves are classified now. A pathspec failure refuses as the post-shed ref it is, naming `opendox-carve-0` and saying outright that the objects are not the problem — the ref resolved and git read its tree well enough to know those paths are not in it. What is left is UNDIAGNOSED and says so: a permission error, a full disk, a git that broke in a way this file has not met, gets its stderr and both remedies as POSSIBILITIES, because a confident wrong diagnosis is what the two classified branches exist to stop. Two tests, both asserting the DETAIL and not only the code: the pathspec case must not say OBJECT STORE or offer a fetch, and the unclassified case must claim neither diagnosis. 79 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Mutation sweep over the two branches: 2 mutants, 2 caught, 0 survived. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Post-side Git reads can still lazy-fetch, ignored imported files can evade the cleanliness sweep, and hidden-flag remediation does not fully clean edited files.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:408
GIT_NO_LAZY_FETCH=1is only placed in the environment returned to this file's_git()calls. The post side invokescarved_reach._git_run()frompost_stack(), whose sanitizer rebuilds its own environment and does not set this variable (scripts/carved_reach.py:809-820), so resolving manifest/tree entries in a partial clone can still lazy-fetch or wait on the promisor remote. Propagate the guard to that shared reader (or set it for the process beforepost_stack()) so the no-network guarantee covers the whole measurement.
scripts/verify-snapshot-equivalence.py:1284- The hidden-flag remediation only clears the index bits; it does not restore, stash, or commit the edited file. For the exact
h! pathcase this function reports, clearing the flags makes the same edit appear asM path, so the promised re-run still fails and the operator gets a second refusal. Include a follow-up commit/stash/checkout action for these paths.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
…d is not clean Copilot round 2 on #1115 — one threaded finding and two suppressed, all three FACT, all three measured before they were taken. This closes the class at its two-round cap. 1. AN IGNORED `.py` UNDER `src` IS STILL IMPORTABLE. `--exclude-standard` drops every ignored path, not only the `__pycache__` this runner makes, so a leg could render bytes that are in no commit while the verdict named one — the exact failure the sweep exists to prevent, arriving through the one door the sweep had propped open. The ignored files under the IMPORT SURFACE are scanned now, with an allowlist of exactly CPython's compiled bytecode. Measured: the two code legs carry 45 and 21 ignored files under `src` and every one of them is a `.pyc`, so the allowlist reports nothing today and anything else would. 2. THE NO-NETWORK GUARANTEE DID NOT COVER THE WHOLE MEASUREMENT. This file's `_git()` set `GIT_NO_LAZY_FETCH=1` in its own environment, but the post side reads through `carved_reach._git_run()`, a SHARED reader with its own sanitizer. Measured: that sanitizer builds from `os.environ` minus a scrub list (`carved_reach.py:796-806`) which does not carry this name, so setting it on THE PROCESS before the reach is imported covers it — `"GIT_NO_LAZY_FETCH" in _sanitized_git_environment()` is False before and True after, and the test asserts both ends plus the absence from that scrub list. A manifest or tree read on the post side could otherwise still lazy-fetch from a promisor remote, in the half of the run this file does not issue the git commands for. 3. CLEARING A HIDDEN FLAG REVEALS THE EDIT RATHER THAN REMOVING IT. The remediation named `update-index --no-assume-unchanged` and stopped, so the promised re-run met the same edit as an ordinary ` M` and refused a second time. It names the restore with it now. The four sweep kinds are classified by one helper rather than by prefix tests scattered through the advice, because `h!` and `!!` both carry a `!` and the third kind must not inherit the second's remedy. Three tests. 82 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Mutation sweep over the three: 4 mutants, 4 caught, 0 survived (the first spelling of the fourth was a WEAK mutant — it cut the conjunction and left the remedy standing, so it was rewritten to remove the clause and then it was caught). One consequence worth naming: the guard is process-wide and outlives the call, so the partial-clone test's own `git clone --filter=blob:none` now strips it for its SETUP — its checkout needs the tip's blobs. That is the cheapest demonstration that the guard reaches every child of this interpreter and not only the runner's own reads. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Round 2's two SUPPRESSED findings, both FACT, both fixed at
|
There was a problem hiding this comment.
🟡 Changes recommended
The archive diagnosis can misreport partially missing renderer paths, and the bytecode allowlist permits other ignored importable files.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:571
git archivereports a pathspec error when any requested path is absent, not only when both archive roots are absent. A pre-shed tree containing one ofARCHIVE_PATHScan therefore enter this branch and be described inaccurately as carryingNEITHER; keep this detail neutral (for example, say it does not carry all required archive paths) or inspect which path was missing.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
…as a real hole THE GATE WENT RED AND IT WAS RIGHT TO. SonarCloud's quality gate failed on `new_reliability_rating` 3 against a threshold of 1, and the issue behind it was `python:S5850` — "group parts of the regex together to make the intended operator precedence explicit" — on `_GENERATED_BYTECODE`, the allowlist added one commit earlier. The unparenthesised top-level `|` meant the second alternative `\.pyc$` matched a `.pyc` ANYWHERE under the import surface, and a sourceless `src/shadow.pyc` sitting where `shadow.py` would sit is an ordinary import candidate: the allowlist for the one artifact this runner CREATES would have admitted a module it never checked. Copilot found the same hole from the other end in the same hour. `(?:^|/)__pycache__/[^/]+\.pyc$` now, with a test that an ignored `src/shadow.pyc` is dirt and a `__pycache__/*.pyc` is not. Also FACT, also Copilot, also taken: `git archive` fails as soon as ONE pathspec matches nothing, so the refusal saying the tree carried NEITHER archive path was inaccurate for a tree that had shed one of them. `_absence()` asks `ls-tree` which, and says "carries A but NOT B" — or stays neutral where git could not answer, which is this file's rule everywhere else. And the maintainability findings on the same analysis, none of which failed the gate but all of which are debt this act added: * `python:S3776` ×2 — `recorded_gitlink` at 22 and `worktree_dirt` at 19 against the 15 allowed. Split, not suppressed: `_gitlink_at_commit` / `_gitlink_index_first` / `_staged_gitlink`, and `_names` / `_flagged`. The seams are the ones the prose already describes, so each function is now one question. * `python:S1192` — "HEAD or the index" three times, now `_NO_RECORD_SOURCE`. * `python:S3358` — the nested conditional in the evidence line, lifted. * `python:S9073` ×3 and `python:S8997` ×2 in the suite — composite assertions split so a failure names which half failed, and the one test that assigned to a module attribute by hand uses `monkeypatch`. 84 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Mutation sweep: 3 mutants, 3 caught, 0 survived (the allowlist widened again, the absence reported as NEITHER regardless, and the conflict stages read as the pin — that last one re-proved after the split). Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The cleanliness sweep and superproject evidence can miss hidden edits, and cached bytecode is trusted solely by pathname.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
scripts/verify-snapshot-equivalence.py:1342
worktree_dirt()scopes the tracked diff and ignored-file scan tosrc, but_flagged(leg)scans every tracked path. A clean file outside the import surface with anassume-unchangedorskip-worktreebit therefore makes a code leg refuse even though it cannot affectcarved_reach's imports. Apply the same scope when collecting hidden-flag entries, while retaining the whole-tree behavior for legs withoutsrc.
hidden = _flagged(leg)
if hidden is None:
return None
return rows + hidden
scripts/verify-snapshot-equivalence.py:1479
- The new evidence read uses plain
git status, which has the same blind spot this PR fixes for the legs: an edit to a tracked composition file hidden byassume-unchangedorskip-worktreeis reported as a clean superproject. The rendered snapshot can then differ becausecarved_reach.py,opendox_host.py, or the profile changed, while the evidence line saysworking tree clean; include hidden-flag detection in this non-refusing root-state read (or mark the state unknown).
done = _git(ROOT, "status", "--porcelain", "--untracked-files=normal")
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
…s the same sight Copilot's two suppressed findings at `e77726ac`, both FACT, and both are INCONSISTENCIES IN CODE THIS PULL REQUEST INTRODUCED rather than new ground — which is why they are taken although the class is past its round cap. 1. `_flagged(leg)` scanned the WHOLE leg while the tracked diff and the ignored scan were scoped to `src`. An `assume-unchanged` bit on a file that cannot reach `carved_reach`'s imports would have refused a required gate — a false refusal, which is a worse failure than the one it guards against. It takes the same scope now, and a leg without `src` keeps the whole-tree behaviour it already had. 2. The superproject evidence read a plain `git status`, which has EXACTLY the blind spot this act fixes one layer down: an edit to `carved_reach.py`, `opendox_host.py` or the profile hidden behind a flag would have printed `working tree clean` in the line that exists to carry the UNPINNED half of the composition. The root is still never refused on; it is reported truthfully, or reported as unknown when either read fails. Two tests. The second one's FIRST spelling survived its own mutant — it asserted `dirty` while the ambient checkout was already dirty, so the flag proved nothing — and it now forces the status read clean, which is the only way the flag can be what makes the difference. A test that passes for a reason it did not name is the thing mutation sweeps exist to find. 86 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Sweep: 2 mutants, 2 caught, 0 survived. REGISTERED, NOT TAKEN: Copilot's third finding — that an allowlisted `__pycache__/*.pyc` is trusted by PATHNAME, so a crafted cache whose header still matches the tracked source is loaded and executed before the sweep runs. It is true, and the remedy is `sys.pycache_prefix` set before the legs are imported, which would ALSO stop this runner writing into the legs at all and so retire the allowlist. It is not taken here because it changes where every subsequent import in the process caches — a process-wide behaviour change that deserves its own act rather than the last commit of this one — and because the exposure needs a writer in the checkout, who could equally edit the runner. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Nested tree-read failures and archive diagnostics can still misidentify the remediation, and the runbook understates the cleanliness scope.
Review details
Suppressed comments (3)
Previously missed (2) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:607
_absence()deliberately returns a neutral phrase when itsls-treequery cannot answer, but this branch still appends the definitive post-shed diagnosis and says the objects are not the problem. If that second read times out or fails, the refusal can misdiagnose an unreadable object store and send the operator to change--pre-ref; only use the post-shed wording after positively establishing which archive paths are absent, otherwise retain the neutral fallback.
This issue also appears on line 1176 of the same file.
docs/opendox-cutover-runbook.md:906
- This documentation understates the cleanliness check:
verify_pins()now sweeps every entry inIMPORTED_LEGS, includingopenDox/specandopenXdox/spec, not only the two-codetrees. The runbook should describe the code and spec mounts consistently with the implementation.
scripts/verify-snapshot-equivalence.py:1179
- When
rev-parse <outer>:<path>cannot answer because the parent commit's tree/object store is incomplete, this helper returns the same(None, source)as an absent gitlink.verify_pins()then reports that the verified parent records no gitlink, misdiagnosing an unreadable pin and omitting the needed object-store remediation. Probe the committed tree separately (ascarved_reachdoes withls-tree) and preserve the distinction between absent and unreadable.
done = _git(parent, "rev-parse", "--verify", "--quiet",
"--end-of-options", f"{outer}:{path}")
if done is None or done.returncode != 0 or not done.stdout.strip():
return None, source
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
…he sweep does Copilot's three suppressed findings at `c26083ee`. I had said this pull request would take no further head-moving round; the third of them is MY OWN § 2.3 contradicting MY OWN code in the same pull request, which has to be fixed, and once the doc commit exists the other two cost nothing to carry. That is the whole reason this round happened, said plainly rather than dressed up as a policy. 1. THE RUNBOOK UNDERSTATED THE SWEEP. § 2.3 said the two `-code` trees are swept clean while `IMPORTED_LEGS` now carries the two `spec` mounts as well — documentation, in this same act, describing the code this same act replaced. It names the four mounts a module can arrive at, says why the spec mounts are among them, and describes the sweep as the three reads it is rather than as a `git status`. 2. `_absence()` ANSWERING "I CANNOT TELL" WAS TREATED AS A PHRASING PROBLEM. It returned a neutral phrase and the surrounding refusal still delivered the post-shed diagnosis — including "the objects are not the problem", which is exactly what an unanswered tree read cannot establish. It answers `None` now and the caller drops the whole diagnosis, telling the operator to ask `ls-tree` directly before changing `--pre-ref`. 3. `rev-parse --quiet` ANSWERS THE SAME WAY FOR ABSENT AND FOR UNREADABLE, and `_gitlink_at_commit()` reported both as "records no gitlink" — so an incomplete object store, the one condition this file gave its own code, was reported as a missing submodule declaration one level down. The tree is asked directly, and only a clean answer that does not list the path is an absence; anything else refuses `equivalence-object-store-incomplete` and names the fetch. Two tests and a correction: the refusal-count sentence I wrote in the same edit said EIGHT named codes, because the tuple has eight entries and one of them is the blanket. Seven named and one blanket, as it always was. 88 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Sweep: 2 mutants, 2 caught, 0 survived. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Copilot's three suppressed findings at The third of them is my own § 2.3 contradicting my own code, in this same pull request. The runbook said the two
|
There was a problem hiding this comment.
🟡 Changes recommended
Nested pin validation and metadata-only checkout handling have correctness gaps, with one stale refusal diagnostic remaining.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:1496
any(leg.iterdir())counts the.gitmarker itself, so a mount containing only submodule metadata (for example, an initialized/no-checkout or interrupted update) is treated as materialized. The pre-import probe then misses this empty checkout andpost_stack()reports the missing module later; exclude.gitfrom the emptiness test so metadata-only mounts are named here.
scripts/verify-snapshot-equivalence.py:1609- After this new multi-command sweep returns
None,verify_pins()still reports thatgit status --porcelainfailed, even though this path now usesgit diff, ignored/untracked scans, andls-files -v. That stale detail misidentifies the unanswered operation; update the refusal to name the cleanliness sweep generically.
scripts/verify-snapshot-equivalence.py:1752 - The new call below probes
unmaterialized_legs()beforepost_stack(), but this surrounding comment still says the post side is composed first and thatpost_stack()wins. That is the opposite of the implemented, tested ordering and will mislead maintainers about why the side-effect-free probe exists; update the rationale to say the filesystem probe runs first.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
…t made stale Copilot's four findings at `033506a3` — one correctness gap in the nested read this pull request introduced, and three pieces of text that this pull request itself made wrong. All four are inside what this act wrote. 1. `rev-parse <commit>:<path>` RETURNS AN OID FOR ANY TREE ENTRY, and the nested read took it as the pin. A parent commit carrying a regular file or a directory at `code` after a type-changing update therefore yielded that blob or tree id AS THE NESTED PIN, and the run reported an off-pin checkout instead of saying no gitlink is recorded. The index-first path has always required mode `160000` and `verify-openxdox-pin.py` requires it too; this path was the one that did not. It is ONE `ls-tree` now, which answers all three questions at once — is the path there, is it a gitlink, what is its id — so the absent / not-a-submodule / unreadable distinctions come out of a single read instead of two. 2. `any(leg.iterdir())` COUNTED THE `.git` MARKER, so a mount holding nothing but submodule metadata — `submodule update --no-checkout`, or an update interrupted between the clone and the checkout — read as materialized and the probe missed exactly the state it exists to name. 3. The dirt refusal still said `git status --porcelain` FAILED after that single read became three, misidentifying the operation that went unanswered. It names the sweep it actually runs. 4. The comment above `unmaterialized_legs()` still said `post_stack()` comes first and wins — the OPPOSITE of the order this act implemented and tested two commits earlier. A comment that contradicts its own code is worse than no comment: it is the reason a later reader moves the call back. Three tests and one rewritten: the probe's fixture now gives each mount a working-tree file, so "holds only `.git`" is a state it can distinguish rather than the state every mount was in. 89 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Sweep: 3 mutants, 3 caught, 0 survived. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Gitlink conflict/type handling and spec-mount import tracking still contain correctness gaps.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:1308
- These mounts are now treated as imported and swept, but the reach used by this runner still installs only
openDox/code/srcandopenXdox/code/src(scripts/carved_reach.py:122-124, 307-317). If a legalre_destined:row points a module atopenDox/specoropenXdox/spec,carved_reach.module()cannot import that copy from the spec tree; it can fail or resolve another code root while this tuple labels/checks the spec pin. Either add the spec roots to the reach with an end-to-end test, or do not classify them as imported legs.
scripts/verify-snapshot-equivalence.py:1269
_staged_gitlink()only records nonzero stages after filtering to mode160000. A merge conflict between a gitlink and a regular file/tree has stages 1/2/3 with mixed modes, soconflictedstays empty and_gitlink_index_first()reportsHEAD or the indexinstead of naming the unresolved conflict (and may fall back to HEAD). Detect every nonzero stage first, then accept only a stage-0 mode-160000 row.
if len(fields) < 3 or fields[0] != "160000":
continue
if fields[2] == "0":
return fields[1], conflicted
conflicted.append(f"stage {fields[2]} {fields[1][:12]}")
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
…re not imported Copilot's three findings at `ce976cbe` — and the third of them says an earlier commit of mine in this same act OVER-REACHED, so this one is mostly a SUBTRACTION. 1. THE SPEC MOUNTS LEAVE `IMPORTED_LEGS`. Measured rather than argued: `carved_reach.LEGS` installs exactly two roots, `openDox/code/src` and `openXdox/code/src`, and `module()` refuses a row that is not a `.py` at a code leg — so NOTHING can be imported out of a spec mount through this reach. Sweeping a tree this run cannot import from can only refuse a run for a state that cannot change its result, which is precisely the false-refusal defect this same act fixed two commits ago for the flag scan. They STAY in `LEG_GITLINKS`: they are pins the superproject records, and verifying them is honest. The test asserts the measurement (`carved_reach.LEGS` installs `code` and only `code`) rather than the conclusion, so it fails if the reach ever grows a spec root. 2. THE HEAD READ IS MODE-AWARE TOO. `rev-parse HEAD:<path>` answers for any tree entry, so when the index read FAILED and the index-first path fell back to HEAD, a type-changed file or directory at a pin path came back as a recorded gitlink — the defect closed one function away last commit, left standing in its sibling. Both paths now share `_gitlink_in_tree()`, one `ls-tree --full-tree` answering presence, MODE and id together. 3. EVERY NONZERO STAGE IS A CONFLICT, WHATEVER ITS MODE. Filtering to `160000` before collecting the stages meant a merge between a gitlink and a regular file left `conflicted` empty, so an unresolved conflict was reported as "no record" and could fall back to HEAD. The stages are collected first and the mode is required only of the stage-0 row, which is the one that would be used. The refusal names the mixed mode. Runbook § 2.3 follows the code: two swept legs, not four, with the reason. 91 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Sweep: 3 mutants, 3 caught, 0 survived. THE HEAD-MOVING ROUNDS END HERE. Rounds 3-7 were each findings in code this act wrote, and each push draws a fresh review; from this commit anything further is answered and registered against the successor act, so that the floor this pull request measures can land. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The index-first pin path can reject a valid staged pin when the HEAD tree is unreadable, and one fallback diagnostic promises a tree inspection that never occurs.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:642
- The fallback refusal says that whether the tree carries the renderer is "answered separately, below," but this branch raises immediately and never performs that tree inspection; the only
ls-treecheck is in the pathspec-specific branch above. An operator seeing this unclassified failure therefore gets a promise of evidence that is not emitted. Reword this to say that the fallback does not establish renderer presence, or perform the promised check before raising.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
…n, undone I said the previous commit was the last head-moving round. This one is not a new finding; it is a REGRESSION that commit introduced, and shipping a known regression to keep my own word would be the wrong way round. Making the HEAD read mode-aware also made it RAISE for an unreadable tree. Reading HEAD first was harmless while that read answered `None` on failure; it stopped being harmless the moment it began refusing, because a staged stage-0 gitlink is the AUTHORITATIVE record for a re-pin that is not committed yet — that is the entire reason this path is index-first, and `verify-openxdox-pin.py` says so in its own terms. In a partial or incomplete checkout the runner could therefore reject a valid staged pin having never read it. The index is read FIRST now. HEAD is still read, because the SOURCE this function answers with depends on whether the two agree, but an unreadable HEAD tree no longer vetoes a pin the index has already given; with nothing staged there is nothing to fall back on, so the unreadable tree is still reported rather than read as an absence. Both cases are tested. Also, Copilot's suppressed finding on the same review, and the same kind of defect: the unclassified archive fallback still promised that whether the tree carries the renderer is "answered separately, below". That was true while the branch fell through and false once it raised — an operator was promised evidence that is never emitted. It says outright now that it does not establish which, and why: the archive failed, so the per-row check never ran. 93 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Sweep: 2 mutants, 2 caught, 0 survived. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The cleanliness sweep can falsely reject untracked files outside the import surface, and its tracked-file remediation does not clear staged changes.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:1428
- When
srcexists,scopeis['--', 'src'], but this untracked-file read omits it and therefore reports every non-ignored untracked path anywhere in the leg. A file such asdocs/NOTE.mdcannot be imported throughcarved_reachbut will still makeverify_pins()refuse, unlike the other scoped reads; pass the same scope here to avoid a false refusal.
scripts/verify-snapshot-equivalence.py:1495 git diff --name-only HEADincludes staged changes, so a staged edit is classified astrackedhere.git checkout -- .restores the worktree from the index but leaves that staged diff againstHEAD, meaning the remediation can leave the next run refusing. Use a command that restores both the index and worktree (or otherwise explicitly reset the index) while retaining the commit option.
docs/opendox-cutover-runbook.md:907- The current implementation deliberately keeps the two
specmounts inLEG_GITLINKSbut out ofIMPORTED_LEGS, so only the-codetrees are swept. That contradicts the PR description's item 2, which says the spec mounts join the sweep and thatIMPORTED_LEGSfollows the pin; please reconcile the description with the measured reach reflected here.
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
…y clears the index Copilot's two remaining code findings at `630af798`, both of them the third and fourth instances of defects this act already fixed twice elsewhere — which is the argument for taking them rather than registering them: a successor inheriting a known defect at a third address is worse than one more commit. 1. THE UNTRACKED READ OMITTED THE SCOPE its two siblings take, so an untracked `docs/NOTE.md` — which `carved_reach` cannot import through any path — refused a required gate. That is the same false-refusal defect as the whole-leg flag scan and as the spec mounts in the sweep, at its third address. Every read in the sweep now takes the same scope. 2. `git diff --name-only HEAD` SEES STAGED CHANGES, and `git checkout -- .` restores the worktree FROM THE INDEX — so for a staged edit the remediation changed nothing and the promised re-run refused again, exactly as the hidden-flag remediation did before it was fixed. It offers `restore --staged --worktree` now and says why in the same breath. 94 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Sweep: 2 mutants, 2 caught, 0 survived; 39 of 39 across this pull request. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The staged gitlink parser can mistake a nested gitlink for the requested root pin, and one regression assertion does not verify both imported legs.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/snapshot_equivalence/test_snapshot_equivalence.py:1339
- This assertion collapses both
LEGSentries to the single string"code", so it remains green if one leg is removed or the two entries are duplicated. That leaves the claimed measurement of exactly two installed code roots unprotected; assert the(gitlink, leg)pairs and the expected length instead.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
…tops collapsing
The last two, both small, and the second is a test of mine that did not
protect what it claimed to.
1. `git ls-files -s -- <path>` is RECURSIVE when `<path>` is a directory,
and the parser accepted any mode-`160000` row in the output. A root pin
replaced by a plain directory containing a nested gitlink would therefore
have had that NESTED row read as its own recorded pin. The path column is
required to match, which is what `verify-openxdox-pin.py::_gitlink_from`
does and why.
2. `{leg for _gitlink, leg, _src, _package in carved_reach.LEGS} == {"code"}`
collapsed both entries to one string, so it stayed green if a leg were
removed or the two duplicated — while claiming to protect the measurement
that exactly two code roots are installed, which is the measurement the
spec mounts were taken out of the sweep ON. It asserts the pairs and
their order now.
95 passed, 0 skipped. Verdict unchanged — 14,849 bytes, sha256
764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735. Sweep: 1
mutant, 1 caught; 40 of 40 across this pull request.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The partial-archive refusal still says neither archive path matched when one may be present, contradicting its path-specific diagnosis.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
scripts/verify-snapshot-equivalence.py:608
_absence()can returncarries <kept> but NOT <shed>, so this prefix is false whenever exactly one archive path exists:git archivefailed because the missing pathspec did not match, not because neither path matched. Use wording neutral to which path matched so the refusal does not contradict its own path-specific diagnosis.
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) FACT, and REGISTERED rather than taken — with the exact one-line remedy, because this pull request has stopped moving its head. Copilot's review at
|
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 6 days and 12 hours by commenting @sourcery-ai review. Upgrade to get a review now.
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) LANDED — lane openxfactory-4, 2026-09-18T22:17:38Z, PR #1115 → 4101fbe (opensoft/openxFactory main; plain gate) FLOOR PART 4 follow-up 2: the eight Q-P5 items registered at the snapshot-equivalence runner (#1105/#1110) plus runbook § 2.3; plain gate; two Copilot findings registered |
…es at all three destinations, and the four-part floor has one evidence line per part Ledger 62 [x] / 9 [ ] / 1 [~] -> 64 / 7 / 1 of 72; five marker changes in this amendment (3.7, 4.5a, 5.4, 8.2, 8.5). SECTION 3.7 TICKS. All three destinations now have a recorded pass at a LANDED head, which is the box's own word -- "EVERY DESTINATION PASSES IT": openxFactory's own adapter at eb1880c, the only mechanical proof that the home corpus has no privileged route and the reason the box names it separately; openXdox-code at 3ee8cd31 (#656 comment 5736681367); and openDox-code at 93ccc3dd, OK - 17 of 17, exit 0, transposed and faithful, #31 merged 2026-09-19T01:11:53Z (#656 comment 5738152229, the re-read AT MAIN, addendum to 5738117973). The pass is quoted at the LANDED commit and not at the candidate, on purpose. 5738117973 recorded the same pass at candidate head 776d2a80 and itself superseded 5736880991 at 474144ef -- three heads for one destination in a day. A pass at a candidate head is a pass at a commit that no longer exists on main. This packet has now had a reader mistaken for a pass, a candidate mistaken for a landing, and a wrong token mistaken for absence, all on this one box. The durable figure is recorded as the corpus digest rather than the transposition's revision: the revision moved again, a fourth distinct value, as it does on every build, while the key/sha256 table digest 744c9183 held for the fourth time. That is what identifies the corpus and what a later reader recomputes. Registered as residue and not resolved (#656 5738108117): the core.excludesFile switch, the corpus-mirroring fixture, the enumerated skip diagnostic. SECTION 8.2 TICKS. All four evidence lines are on record, one per part and no part standing in for another: (1) the carve manifest, #865 -> 1716748, 454 rows at carve_commit b075fd9; (2) the test mapping, section 5.4 ticked in this amendment, (a)(b)(c) at #1080 -> 4b53ea9 and (d) pinned at all three; (3) the neutral conformance corpus green in every destination, section 3.7 above; (4) the snapshot-equivalence run, section 5.5 on the gated runner #1105 -> 0296747 with follow-ups #1110 and #1115, and per RULED Q-P4 (a) that line also says section 4.4's domain profile reproduces openxFactory's own vocabulary. They are listed with their own artifacts because the box's standing objection is that "none of these is 'the tests passed'" and that no part substitutes for another. Two single-instrument alternatives were rejected on the record; a tick quoting one artifact four times would be the same mistake wearing a different hat. Section 3.6's follow-up 2 is named as openDox-code #32, a draft at b7d9d7a9. The section 5.6 Phase 0 record gains its residue: openxFactory #1123, lockstep.status re-diverged after the repin lane's advance, at the gate, registered and not a condition of either box. The superseded 2026-09-18 per-repository reading is kept beneath the tick, because it shows the box closing in under a day from a state where neither destination was evidenced. All four validators exit 0. Refs #656 (stays OPEN). Lane: openxfactory-4 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…, § 8.2, § 8.5) and the RULED four-part floor complete (#1124) Lane: openxfactory-4 (openXfactory-4-openDox_extraction) Refs #656 (stays OPEN). **`split-opendox-two-layer-product` `tasks.md` AMENDMENT #8 — FIVE ticks (§ 3.7, § 4.5a, § 5.4, § 8.2, § 8.5), and the four-part floor complete.** Branched from the landed `main` at **`fc837dff`** (#1120's squash); `origin/main` merged in at `38f826c2`. **Ledger 59 `[x]` / 12 `[ ]` / 1 `[~]` → 64 / 7 / 1 of 72.** One file. **Exactly five marker changes — § 3.7, § 4.5a, § 5.4, § 8.2 and § 8.5.** Rule 6 applies. > **THE RULED FOUR-PART FLOOR IS COMPLETE.** § 8.2 carries one evidence line per part, and no part stands in for another. ## § 5.4 — FLOOR PART 2 ticks, and the blocker the box itself named is discharged Its own STATUS said (a), (b) and (c) had landed at **#1080 → `4b53ea99`**, and that **clause (d)'s LEG half was blocked on the BUILD arc** — both legs running a named file list under `--noconftest` **with no JUnit and no triple**. Both halves of that blocker are gone. The BUILD arc landed (§ 3.5 on `openDox-code` #25, § 3.6 on #26, both `[x]`), and clause (d)'s **three** pins are in place — *per destination, never as one cross-repository equality*, which is the clause's own rule: | leg | pin | evidence | | --- | --- | --- | | `openDox-code` | `MIN_SELECTED 1076` · `MIN_PASSED 1073` · `EXPECT_SKIPPED 3` | **#29 → `373b05aa`**, run `35398182026` | | `openXdox-code` | `MIN_SELECTED 539` · `MIN_PASSED 533` · `EXPECT_SKIPPED 6` | **#25 → `ab04453d`**, run `35399041710` | | `openxFactory` | its own `pytest-suite.yml` | already pinned — the model the clause names | **Verified in each leg's own workflow rather than taken from the report**: both files carry those pin variables *and quote clause (d) verbatim*, so the shape is the clause's rather than an approximation of it. **Four of four is the clause set, so the box closes.** > **Residue registered, not resolved**: all three of `openDox-code`'s report-producing commands run **named file lists under `--noconftest`**, so `collect_ignore` never applies there, and **26 of the 61 `test_*.py` on disk are collected by no required command**. That does not touch clause (d), which pins what the required job *does* collect — it is booked because a reader could mistake the pinned triple for a statement about the whole tree, and it is not one. ## § 4.5a — ticks on the exit line the box asked for **`OK — 17 of 17`, exit 0**, at `openXdox-code` `3ee8cd31` with the runner at `openxFactory` `eb1880cb` (`#656` `5736681367`), over the BUILD at **#23 → `3ee8cd31`** with admissions rows at **#1091 → `eb2d4569`**. **The bare-checkout precondition is written INTO the evidence line as procedure, not left as a caveat**: the git-pinned `opendox` dependency (`pyproject.toml:106`) must be installed first, or the run exits **2** with `conformance-adapter-unresolvable` before the corpus is reached. > This is **the box's own standard applied to itself**. Its existing parenthetical already refused an abbreviated form of this very command — ***"a command that cannot be run is not exit evidence"*** — when the missing piece was `--dest-root`. The missing piece is now an install rather than a flag, and **the standard does not change with the shape of what is missing.** ## § 3.7 — FLOOR PART 3 ticks: all three destinations pass at a LANDED head *"EVERY DESTINATION PASSES IT"* is the box's own word, and all three now do — **`openxFactory`'s own adapter at `eb1880cb`** (*the only mechanical proof the home corpus has no privileged route*, which is why the box names it separately), **`openXdox-code` at `3ee8cd31`** (`5736681367`), and **`openDox-code` at `93ccc3dd`** — `OK — 17 of 17`, exit 0, transposed and faithful, #31 merged 01:11:53Z (`#656` **`5738152229`**, the re-read AT MAIN). **The pass is quoted at the LANDED commit, not the candidate, on purpose.** `5738117973` recorded the same pass at candidate `776d2a80`, and itself superseded `5736880991` at `474144ef` — **three heads for one destination in a day**. *A pass at a candidate head is a pass at a commit that no longer exists on `main`.* This packet has now had a reader mistaken for a pass, a candidate mistaken for a landing, and a wrong token mistaken for absence, all on this one box. **The durable figure is the corpus digest, not the transposition's revision**: the revision moved again (a fourth distinct value, as it does on every build) while the **key/sha256 table digest `744c9183…` held for the fourth time**. That is what a later reader recomputes. > **Residue registered, not resolved** (`5738108117`): the `core.excludesFile` switch, the corpus-mirroring fixture, the enumerated skip diagnostic. ## § 8.2 — the four-part floor ticks, one evidence line per part **(1) carve manifest** `#865 → 1716748` (454 rows at `carve_commit b075fd9`) · **(2) test mapping** § 5.4 above · **(3) conformance corpus green in every destination** § 3.7 above · **(4) snapshot-equivalence** § 5.5 on the gated runner `#1105 → 0296747` with `#1110` and `#1115`, and per RULED **Q-P4 (a)** that line also says § 4.4's domain profile reproduces `openxFactory`'s own vocabulary. > Listed with their own artifacts because the box's standing objection is that **"none of these is 'the tests passed'"** and that no part substitutes for another. Two single-instrument alternatives were rejected on the record; **a tick quoting one artifact four times would be the same mistake wearing a different hat.** ## § 8.5 — TICKED on HOLDER RULING `5738064190` Amendment #7 reported two destination halves missing. **They were missing from the *ledger*, not the corpus.** All four are named now — § 6.1 `openXdox-spec` **#15 → `f088b097`**, § 6.3 `openDox-spec` **#13 → `3b7f80c4`**, § 6.4 **#12 → `edeed08c`**, § 6.5 **#14 → `66d59778`** — plus § 6.2's forward half at `openDox-spec` **#15 → `8fe8c4c7`**. **Clause (a) is closed**: amendment #7 reported two destination halves missing — **they were missing from the *ledger*, not the corpus**. All four are named (§ 6.1 `openXdox-spec #15 → f088b097`, § 6.3 `openDox-spec #13 → 3b7f80c4`, § 6.4 `#12 → edeed08c`, § 6.5 `#14 → 66d59778`), plus § 6.2's forward half (`#15 → 8fe8c4c7`) and the aggregation side (`xFactory #454 → 0b0c88f4`). **Clause (b) is RULED — Reading B** (`#656` `5738064190`): *"first"* means **before this packet's own archive (§ 8)**, the only ordering the ratified text states (`specs/ideation-dashboard/spec.md:88-90` orders *this change* against the five, not the five among themselves) and the one § 6.2's own box already names, *"Sequenced BEFORE § 8"*. **Reading A — before the other four — is refuted by the record**: § 6.2's `#1066` merged **20:24:53Z**, LAST of the five (`#1056` 10:50:06Z, `#1057` 13:31:51Z, `#1060` 17:30:27Z, `#1065` 17:54:08Z). **The box's wording is sharpened** to *"…on its own evidence **before this packet's own archive (§ 8)**"*. The word *"first"* was **the ledger's own** — absent from the ratified source sentence at `proposal.md:476` and from every `specs/` delta — so the ruling settled *which evidence line satisfies a box*, not what a requirement means. > Both readings are kept on the page with the merge times that decided between them. **A ledger that shows only the reading that won teaches nothing about why the other lost**, and this box will be read again by someone facing the same kind of call. ## Five follow-up landings, none moving a box * **§ 3.6** — `openDox-code` **#30 → `5c867137`** takes the seven findings #26 registered plus eight cases; **follow-up 2 in flight** (linked-worktree descriptor binding, RULED `5736683962`; `RefusedError` → 409; fallback narrowing; mismatched-DB cases). * **§ 5.5** — **#1115 → `4101fbe9`** takes the eight hardening items; two residues registered (`:608` wording, `sys.pycache_prefix`, `5736824535`). * **§ 3.7 openDox side** — `openDox-code` **#31** open at `4b9714d0`. * **Q-A2** — folded into `openXdox-code` #25; opened and closed in one line, which is the only honest way to record something that never reached the page while it was open. * **§ 5.6 Phase 0 has landed, and it landed itself** — `codexFactory` **#491 → `b21f0100`** regenerated the floor block (62 → 63) at 22:50:17Z, and the repin **#1122 → `38f826c2`** advanced the pinned decision core to it at **2026-09-19T00:53:37Z**. *Corrected against the report, which had #1122 open with auto-merge armed: it is merged and on `main`. An armed auto-merge can land without anyone watching, so its state is worth reading rather than inferring.* ## Gates `openspec validate … --strict` **valid** · `proposal-support.py verify` **ok** · `validate-sequenced-after.py --ledger-diff` **clean** · `verify-opendox-pin.py` **OK**. **AFTER THIS HEAD — REGISTERED, NOT PUSHED** (comment `5738349034`; all of it folds at amendment #9, because this amendment's head-moving budget is closed and none of it shows a tick is wrong): § 5.6's registered residue is CLOSED and **PHASE 0 IS COMPLETE** — `openxFactory` **#1123 → `8184d74a`** landed **01:27:44Z**, after `codexFactory` #491 → `b21f0100` and `openxFactory` #1122 → `38f826c2`; the `opensoft/xFactory` aggregation re-sync (**R-5**) is registered for Brett's word, and Phase 1 still waits on this packet's own archive (RULED **Q-D1 (a)**). § 3.6 follow-up #2 landed — `openDox-code` **#32 → `d816cf06`**, `mergedAt` **01:30:28Z**. The assembly roots now name every landed leg — `opensoft/openXdox` **#12 → `9be407bd`**, `opensoft/openDox` **#10 → `d05e204e`** — and the `dox-v1.0` / `xdox-v1.0` cuts are **Brett's act** (runbook § 9 Phase 6), which is why **§ 3.8 and § 4.6 stay `[ ]` here**. Copilot's one finding (`r4051734088`, the same discussion at all three heads) is **answered by measurement and resolved**: the install step it asked § 4.5a for is checked in — `openXdox-code` `.github/workflows/validate.yml:58-59`, `python -m pip install -e ".[test]"` against `pyproject.toml:106`'s pinned `opendox` — and it does not falsify the exit line the box ticked on. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Lane: openxfactory-4 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ere the prefix is — Copilot round 4, and the last
FACT, MEASURED. `PYTHONPYCACHEPREFIX=/` passed `inside_a_pinned_mount()` as
"outside every pin", and it is the opposite: in prefix mode CPython does not
put the cache AT the prefix — `cache_from_source()` builds the directory as
`_path_join(sys.pycache_prefix, head.lstrip(path_separators))`, the source's
OWN absolute directory appended to the prefix, and drops the `__pycache__`
component entirely. So the filesystem root maps a leg module straight back
beside its own source:
$ PYTHONPYCACHEPREFIX=/ python3 -c 'import importlib.util; print(
importlib.util.cache_from_source(".../openXdox/code/src/openxdox/
generator.py"))'
.../openXdox/code/src/openxdox/generator.cpython-312.pyc
— inside the pin, read during `post_stack()` before `verify_pins()` sweeps
anything, and with no `__pycache__` component, so not even the class the
sweep passes over.
The predicate now asks the question it was always about: for each pinned
mount it maps the mount's own directory through CPython's rule and refuses a
prefix whose cache would land inside the pin. The root is then refused as
the case it is rather than as a special case, and any other prefix with the
same property is refused with it. `test_a_host_prefix_inside_a_pin_is_
replaced_rather_than_kept` gains `/` as a sixth spelling; the mount-set test
and the reach's fresh-interpreter probe assert it on both sides.
113 passed, 0 skipped. Verdict unchanged: 14,849 bytes,
`sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735`.
THE HEAD STOPS MOVING FOR THIS FINDING CLASS HERE. Four rounds of
cache-prefix findings have each been a real defect in code the round before
introduced, and each has been fixed; from here anything further in this
class is answered and REGISTERED for a successor act rather than pushed, on
#1115's rule — every push draws a fresh full-file review, and the floor this
pull request measures has to be able to land.
Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…d the refusal stops overclaiming (#1132) Lane: openxfactory-4 (openXfactory-4-openDox_extraction) **The SUCCESSOR ACT to #1115** (landed `4101fbe9`, 2026-09-18), carrying the two items its author registered rather than pushed — [the registered list, `#1115` comment `5736824535`](#1115 (comment)) — under the same § 5.5 CLAIM [`#656` comment `5728621421`](#656 (comment)) and RULED Q-P5 = (a) ([`#656` comment `5731951297`](#656 (comment))). Nothing else is in it. **THE VERDICT DOES NOT MOVE, and for a hardening act that is the number that matters.** At this head the equivalence runner still renders **14,849 bytes, `sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735`**, exit 0, and `EXPECT_SKIPPED: "6"` is untouched. --- ## 1. `sys.pycache_prefix`, set before the legs are imported — and the bytecode allowlist retires [`r4049745762`](#1115 (comment)). An allowlisted `__pycache__/*.pyc` is trusted BY PATHNAME, and CPython validates a cached `.pyc` against the mtime and size recorded in its own HEADER — so a crafted cache still matching the tracked source is loaded and EXECUTED. The legs are imported in `post_stack()`, before `verify_pins()` sweeps anything, so that bytecode would have rendered the post side while the verdict named a commit it did not come from; and the sweep could not have caught it even if it had looked, because the class was allowlisted precisely on the grounds that this runner's own imports created it. **`sys.pycache_prefix` removes the condition rather than policing it**: with it set CPython neither READS nor writes a `__pycache__` beside the source. `sys.dont_write_bytecode` is not the remedy and was not proposed as one — it stops the writing and leaves the reading, which is the half the finding is about. ### It is set in two places, and the second is not belt and braces * **`post_stack()`, before `import carved_reach`** — for the reason the `GIT_NO_LAZY_FETCH` guard three lines above it is set there: a guarantee this runner's verdict rests on is made BY this runner, on the process, before the shared reader is imported, rather than inherited from a reader that could stop providing it. * **`carved_reach.install()`** — because the registered item's premise, that this runner creates those files, is true but **not exhaustive, and the difference is a red required gate**. MEASURED: `tests/ideation-dashboard/test_lens.py` on its own left **46 `.pyc` files** under the two `src/` roots, and `tests/ideation-dashboard` sorts BEFORE `tests/snapshot_equivalence` in the single `pytest tests/` process `pytest-suite` runs. Retiring the allowlist in the runner alone would have made every end-to-end run in that gate refuse — on bytecode a sibling suite wrote. Proven before it was fixed: with the allowlist stubbed out and the legs carrying that suite's bytecode, `python3 scripts/verify-snapshot-equivalence.py` refuses `equivalence-reach-unavailable` and lists `!! src/opendox/__pycache__/…`. `install()` is the one gate every route into the legs passes through (`module()` calls it), so it is where the guarantee belongs, and it covers the importers a conftest cannot: `tests/ideation-dashboard/test_cli_column_split.py`'s `BOOTSTRAP` and `tests/domain_profile`'s probe each bootstrap the reach in a FRESH interpreter. A prefix the process has already chosen — `PYTHONPYCACHEPREFIX`, or a host — is **left alone**: any prefix satisfies the requirement, and one pointed INTO a leg is caught by the sweep it would be trying to fool. ### Where the cache goes, and why inside the checkout `<repo>/.pycache`. The exposure needs a writer in the working tree, and such a writer could edit `scripts/carved_reach.py` itself — the threat-model argument already on this lane's record — while a fixed path under a shared `/tmp` is a directory another user can create FIRST and fill with exactly the crafted caches above. The root `.gitignore` already carries `*.py[cod]`, so every file written there is ignored and `git status --porcelain -unormal` is unchanged (measured); nothing is added to it. If the directory cannot be written, CPython silently skips caching — the failure mode is a slower import, never a broken one. ### The allowlist does not retire — it is RE-FOUNDED, and the gate is why **This is the one place the act departs from the registered wording, and it departs because the premise failed a measurement.** Item 1 expected that once the runner stops writing bytecode into the legs there is nothing left to pass over. It was retired outright at `e85d15384`, and **`pytest-suite` failed 23 tests** — all in `tests/snapshot_equivalence`, all cascading from `equivalence-reach-unavailable … !! src/opendox/__pycache__/{__init__,corpus_adapter}.cpython-312.pyc` ([run 35660132139](https://github.com/opensoft/openxFactory/actions/runs/35660132139)). Those two files come from a **second, independent reach**: `scripts/corpus_adapter_openxfactory/` puts `openDox/code/src` on `sys.path` itself and never mentions `carved_reach` (RULED OQ-Q, `#872`). Reproduced exactly here — `import corpus_adapter_openxfactory.adapter` with no prefix set leaves precisely those two `.pyc` files. That is the second time the premise failed (the first was `test_lens.py`'s 46 files, answered by fixing `install()`), and it settles the question: **the enumeration of importers is not closable by inspection** — any consumer, any future script, a developer running the leg's own suite inside the leg — and a required gate must not rest on "nothing anywhere ever writes a `.pyc` into a pinned checkout". So what changes is the GROUND, which is what the finding was actually about: | | the old rule | the rule now | | --- | --- | --- | | passes over | `__pycache__/<name>.pyc` | `__pycache__/<name>.pyc` | | because | *this runner's own imports created it* — trust by PROVENANCE, which a pathname cannot establish and a crafted cache defeats | *this process cannot read it* — `sys.pycache_prefix` is set before any leg import, so CPython consults no `__pycache__` beside a source | | asserted by | nothing | `test_a_leg_module_is_never_cached_beside_its_source`, through `importlib.util.cache_from_source()` on a real leg module | It is the rule this file has already applied three times to scope — the spec mounts, the flag scan, the untracked read: **a state that cannot change this run's result must not refuse it.** And everything the pass-over does not cover stays dirt, tested: an ignored `.py` under `src`, and a sourceless `src/shadow.pyc` at a module's own path, which the prefix does NOT make unreachable because it moves cache lookups and not the module search path. Three texts this act made stale are corrected with it, in round 6's idiom: `worktree_dirt()`'s "THREE READS" (it asks FOUR, and the ignored read was missing from its own list), and the two places — `unmaterialized_legs()` and `main()` — that said composing the stack writes `__pycache__` into the tree whose cleanliness the next check asserts. Runbook § 2.3 takes the same correction and states what the sweep passes over and why. **It promises no one-time cleanup, and this sentence used to** (Copilot at `34ab803e4`, "previously missed"): the cleanup was owed by the version of this act that retired the pass-over outright, and it stopped being owed when the pass-over came back at `d45522ddc` — a checkout carrying bytecode from before this change is passed over, not reported. The runbook was corrected in that commit; the description was not, until now. (A stale description is fixed in the description: it costs no push, on #1115 round 9's precedent.) ## 2. `:608` — the refusal that exists so as not to overclaim stops opening with an overclaim Copilot's suppressed finding at `50a3e574`, with the remedy exactly as registered. The branch is the one added two rounds earlier so that a FAILED tree read would stop delivering a diagnosis it cannot support, and its first clause then said `git archive` **"matched none of"** the two archive paths — which asserts that NEITHER matched. `git archive` fails as soon as ONE pathspec matches nothing, and `_absence()` returning `None` is precisely the state in which this runner cannot say which; the next sentence of the same refusal says so outright. It now reads **"did not match at least one of"**, with `" and "` joining the list rather than `" or "`, since the two are no longer being offered as alternatives. The code, the remedy and the `ls-tree` the operator is sent to are unchanged. --- ## Measured | | | | --- | --- | | `pytest tests/snapshot_equivalence` | **113 passed, 0 skipped** (95 at #1115's head, + 18) | | the runner, end to end | `OK — 1 of 1 corpus state(s) equivalent`, exit 0, **14,849 bytes / `764b077b…0735`** | | bytecode in the legs after a full suite run | **0** `.pyc`, 0 `__pycache__` directories | | the CI failure, reproduced and then not reproduced | with `opendox/__pycache__/{__init__,corpus_adapter}.cpython-312.pyc` present, the runner is `ok` at the same digest and the suite is 109 passed | | the gate's own ordering, one process — `pytest tests/ideation-dashboard tests/domain_profile tests/snapshot_equivalence` | **1248 passed, 13 skipped**, legs still clean | | mutation sweep | **26 of 26 caught, 0 survived** | | the LEG ADVANCE #1134 brought (openXdox-code `2529c10a` → `ab04453d`, openDox-code → `d816cf06`) | the runner still `OK`, **same 14,849 bytes / `764b077b…0735`** — the floor doing exactly what it exists for, across a real leg bump | | doc-health | names neither `docs/opendox-cutover-runbook.md` nor any file this PR touches | The six new tests: the ORDER (a fake reach records `sys.pycache_prefix` at `require()`, `install()` and the first `module()` — the real reach sets the same prefix, so only a fake can say which of the two did it); a host's own prefix left alone; a real end-to-end run leaving both pinned trees byte for byte as it found them; `cache_from_source()` for a leg module landing outside the leg, which is the exposure stated the way CPython states it; the runner's and the reach's spellings of the cache home held together; and the reach taking every importer's bytecode out of the legs, probed in two fresh interpreters. **A note on the sweep, because it went wrong first and the second run is the one quoted.** The mutant that puts the cache home INSIDE a leg leaves `.pyc` files there that restoring the SOURCE does not remove, so the three mutants after it were "caught" by their predecessor's mess rather than by their own defect (24 failures each, in 17s). The harness now clears both `__pycache__` and a stray `.pycache` from the legs before every run; in the honest sweep those same mutants fail exactly one test each. 12 of 12, with each result its own. ## Copilot, two rounds, both FACT and both taken **Round 1** — keeping every non-`None` prefix was a hole: `PYTHONPYCACHEPREFIX` inside a pinned mount defeats the guarantee it is being kept for, a LEG-ROOT prefix puts the cache inside the pin *and* outside the `src` the sweep scans, and even an in-`src` prefix is read during `post_stack()`, which imports the legs BEFORE `verify_pins()` sweeps anything — so "caught later" is not caught for an exposure whose content is that code ran. A chosen prefix is now kept only while it resolves outside every pinned mount; relative prefixes go too (CPython resolves a relative head at WRITE time against a working directory this runner does not control) and symlinks are resolved on both sides. **Round 2** — the fallback was not held to the rule it enforces: a pre-existing `<repo>/.pycache` that is a SYMLINK into a pinned mount lands the cache exactly where the function exists to keep it out of. Both are checked now, with a freshly created `mkdtemp()` as the last resort — a directory this process just made cannot hold a crafted cache to read, and `install()` runs in every conftest here, so a stray symlink in one checkout must not become an ImportError in all of them. **Round 3** — and this one is a defect one commit old: round 2 promised that a stray symlink must not become an ImportError in every conftest here, then asked `Path.resolve()` for an answer it RAISES on. Measured on this repository's own interpreter, CPython 3.12.3: `Path("a").resolve()` on a cyclic link raises `RuntimeError: Symlink loop`, with `strict=False` as well as `strict=True` — while `os.path.realpath()` swallows it and returns the path unresolved, which is exactly why reading one's behaviour off the other is wrong. `_resolved()` answers `None` where the filesystem will not answer and the caller fails safe on it: a path that cannot be SHOWN to be outside every pinned mount is treated as inside. **Round 4** — and this is the one that looked safe: `PYTHONPYCACHEPREFIX=/` passed the predicate as "outside every pin", and is the opposite. In prefix mode CPython does not put the cache AT the prefix — `cache_from_source()` appends the source's OWN absolute directory and drops the `__pycache__` component — so the filesystem root maps a leg module straight back beside its own source. Measured: with `PYTHONPYCACHEPREFIX=/`, `cache_from_source(<leg>/src/openxdox/generator.py)` is `<leg>/src/openxdox/generator.cpython-312.pyc`, inside the pin and read before `verify_pins()` sweeps. The predicate now maps each mount through CPython's own rule and refuses a prefix whose cache would LAND in the pin, so the root is refused as the case it is rather than as a special case. Replacing rather than refusing, in all four rounds, is `GIT_ATTR_NOSYSTEM`'s precedent in this same file: an ambient variable that would weaken a guarantee is overridden, never turned into a required gate's refusal. **Round 5 is REGISTERED, not taken** ([comment 5769773339](#1132 (comment))), and the head stops moving for this class as `d815f2970` said it would. Its first half is true — honouring a host prefix trusts whoever can write inside it, and `inside_a_pinned_mount()` is a LOCATION predicate, never a trust one. Its second half is what round 4 closed: no accepted prefix can redirect a lookup into a pinned leg. What remains is environment trust, which an actor who can set `PYTHONPYCACHEPREFIX` defeats through `PYTHONPATH` or `PYTHONSTARTUP` in the same breath — this lane's own threat model, on the record at `r4049745762`. Remedy registered with both options and a recommendation. **The naming nit is answered rather than taken:** `every_importers_bytecode` is the quantifier the test is about — EVERY importer's bytecode, not all of some bytecode — and `all_importers_bytecode` moves the quantifier onto the wrong noun. --- Lane: openxfactory-4 Co-Authored-By: Claude Fable 5.1 <[email protected]>



Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Refs #656 (stays OPEN).
CLAIM: 5728621421
The SECOND and last follow-up on FLOOR PART 4, on Brett's RULING Q-P5 = (a) (
#656comment5731951297): #1105 landed the runner, #1110 took the four findings its review SUPPRESSED, and this takes the eight remaining registered items plus runbook § 2.3. Registered across #1105's rounds and listed in full in comment5731868859(round 10's twelve, minus #1110's four). Nothing is left owed after this.A plain gate: four files, no
openspec/changes/path, no README OpenSpec Records block, no pin, no gitlink, no manifest.origin/mainis MERGED in ate3647b6d(never rebased), which is how #1086's runbook lands under § 2.3.The eight
1.
ls-files -sreads STAGE 0, or names the conflict. During an unresolved merge git lists stages 1, 2 and 3 for a path, so taking the first160000row read the MERGE BASE's gitlink — or THEIRS — as the pin this repository records, and then refused or passed against a commit nobody has declared. There is no recorded pin during a conflict; that is a state to name, not to guess through. Tested against a real conflicted index written withupdate-index --index-info.2. The two
specmounts join the pin set (and, for a while, the sweep — see the correction below).leg_of()matches the longest VERIFIED pin root containing a module's file, so a module underopenDox/spec— which are_destined:block may lawfully put there — resolved to theopenDoxASSEMBLY ROOT, and the verdict named the assembly's commit for a module the assembly does not contain. Measured on #1105 round 6 with a module placed there; the pin set is six mounts now.3. The chain is resolved from the EXACT OUTER COMMIT. Index-first is right for the pin this repository declares — a re-pin must be checkable before it is committed — and wrong one level down. A
codegitlink staged insideopenDoxis in no commit openxFactory has declared, yet the index-first read took it as the recorded pin whileopenDox's own HEAD still matched, so the level above stayed green. Each nested row is now read out of<the commit its parent verified>:<path>. Two tests: the helper, against a real staged-vs-committed gitlink, and the WIRING — thatverify_pins()actually hands each nested row its parent's verified oid.4.
GIT_NO_LAZY_FETCH=1, and the failure it produces named. In a partial clone a read of an absent blob is fetched from the promisor remote, sogit archivereaches for the NETWORK in the middle of a measurement — and hangs for as long as that takes, or for ever, inside a runner whose whole contract is to refuse rather than hang. Measured on a--filter=blob:noneclone archiving a tag the checkout never materialized (this runner's own case, sinceopendox-carve-0is far behind any working tree):New code
equivalence-object-store-incomplete, because the remedy is a deliberategit fetch origin <commit>and the old message told that operator their tree carried no renderer — sending them to replace a good--pre-ref.And the other half, after Copilot's round on this PR (
d6244aa4): classifying the store left the FALLBACK worded for it, and what now landed there was the opposite condition —git archivefails before writing anything when no path matches, so a tree carrying neither archive path never reached the per-row post-shed check below and was told to fetch objects instead of to name a pre-shed ref. A pathspec failure is classified as the POST-SHED REF it is; what is left is UNDIAGNOSED and says so, carrying its stderr and both remedies as possibilities rather than one as a verdict. Both new tests assert the DETAIL and not only the code, which is how the first one passed on the wrong message.5. The cleanliness sweep in its working form.
git diff --name-only HEAD -- src,ls-files --others --exclude-standard, and anls-files -vscan forassume-unchanged/skip-worktree. Those flags make git report an EDITED file as clean, so a leg carrying one could be edited withstatus --porcelain— the first spelling — answering nothing at all; the test proves exactly that, withstatusreturning empty while the sweep reports the file.--ignored, the originally proposed remedy, stays REJECTED on the measurement that killed it: it reports this runner's own__pycache__(3 and 4 entries) and would refuse on every run after the first._clean_advice()grows the third remediation, becausecheckout -- .cannot clear a flag bit.6. A non-importing materialization probe, BEFORE
post_stack(). Composing the stack installs a meta-path finder, mutates the import system for the rest of the process, and writes__pycache__INTO the leg whose cleanliness the next check asserts. Doing all that to discover that a submodule directory is empty — and then saying so in terms of a module name — is work with side effects performed to reach a worse message. Three shapes are named: absent, empty (recorded and never initialized), and no.git(a copied source tree). The ORDER is tested, not just the function.7. The superproject's revision and dirt in the evidence, never a refusal. The post side is composed out of ROOT's
carved_reach.py,opendox_host.pyand the § 4.4 profile — none of them pinned by the gitlinks the verdict names — so two runs can differ by them alone while every pinned leg matches. It is reported and not refused on, and the asymmetry is the point: this is the tree the runner is EDITED in, and a gate that refused on its dirt would be unusable by the only people who change it.8. The PRE child's inputs travel by NAME, not by position — SonarCloud's last
pythonsecurity:S8705on this file. The program goes to-c, so everything after it issys.argv[1:], and a mis-ordered or empty element silently shifts the unpack: the corpus becoming the output path. Environment entries are read by name, and a missing one raisesKeyErrorin the child rather than rendering something else.Runbook § 2.3, and the README index
§ 2.3 FLOOR PART 4 — the snapshot-equivalence run, written where the other floor parts are documented (§ 2.1 the arrival verifier, § 2.2 the conformance runner), and held until #1086 landed because until then the § 2 family was contended. It carries the claim, both sides and why each is composed as it is, the pinned anchor, the command with its expected verdict, the four corpus states of which two must move the digest, what is verified before any digest exists, and what the run does NOT prove.
§ 2.3 IS NOT § 5.5, and the section says so: the box FLOOR PART 4 ticks is § 5.5 of
split-opendox-two-layer-product'stasks.md, while this runbook's own § 5.5 is the two commits a leg arrives in. § 2 is otherwise untouched — the runbook diff is one hunk at line 849 with zero deletions, so every paragraph of § 2, its disposition table and the two-paragraph disposition block above it are byte-identical.The README doc index gains the runner beside
scripts/carve_conformance.py, in that entry's form and for its reason: the index lists what proves each floor part, and FLOOR PART 4's prover was missing from it.Verification
OK — 1 of 1 corpus state(s) equivalent, exit 0, 14,849 bytes,sha256 764b077b84031ec9bb13538f400904119141d954636cee6d53eee052b3840735.pytest -q tests/snapshot_equivalence→ 94 passed, 0 skipped (60 at02967478+ FLOOR PART 4 follow-up: the four suppressed findings #1105 landed without #1110, plus thirty-four here).EXPECT_SKIPPED: "6"untouched;MIN_SELECTED/MIN_PASSEDare floors.--exclude-standarddropped; the untracked half dropped; the probe skipped; an empty leg read as materialized; the unpinned half dropped from the evidence; an unreadable root status read as clean; the child's inputs back in argv; and the child reading a positional tuple again; then two over the round-1 fix — the pathspec failure left unclassified, and the fallback claiming the object store again — and four over round 2's.Copilot round 2 (
c7ed6828) — the class closes at its capOne threaded finding and two suppressed, all three FACT, all three measured before they were taken (thread, the suppressed pair).
.pyundersrcis still importable.--exclude-standardwas bought for one measured problem — this runner's own__pycache__— and paid for it by dropping the whole class, so a leg could render bytes in no commit while the verdict named one. The ignored files under the import surface are scanned now, with an allowlist of exactly CPython's bytecode: measured, the two code legs carry 45 and 21 such files and every one is a.pyc.carved_reach._git_run(), a SHARED reader whose sanitizer builds fromos.environminus a scrub list that does not carry this name — so the guard is set on THE PROCESS before the reach is imported, and"GIT_NO_LAZY_FETCH" in _sanitized_git_environment()goes False → True across it.update-indexpromised a clean re-run that would refuse again. The restore is named with it.SonarCloud went red, and it was right to (
e77726ac)The quality gate failed on
new_reliability_rating3 against a threshold of 1, and the issue behind it waspython:S5850on_GENERATED_BYTECODE— the unparenthesised top-level|meant\.pyc$allowlisted a.pycANYWHERE under the import surface, and a sourcelesssrc/shadow.pycis an ordinary import candidate. Copilot found the same hole from the other end in the same hour. The pattern is one anchored shape now, with a test thatsrc/shadow.pycis dirt and__pycache__/m.cpython-312.pycis not. Also in that commit:git archivefails on ANY absent pathspec, so the refusal now asksls-treeWHICH path the tree lacks instead of asserting it carries neither; and the maintainability findings on the same analysis — twoS3776complexity splits, anS1192constant, anS3358lift, threeS9073assertion splits and twoS8997monkeypatch conversions — are cleared rather than suppressed.The last round (
c26083ee), and what is registered rather than takenTwo suppressed findings, both INCONSISTENCIES IN CODE THIS PR INTRODUCED:
_flagged()scanned the whole leg while its two sibling reads were scoped tosrc, which would have made a required gate refuse for a bit on a file that cannot reach the imports — a false refusal; and the superproject evidence read a plaingit status, carrying the exact blind spot this act fixes one layer down, so a flag-hidden edit tocarved_reach.pywould have printedworking tree clean. Both fixed. The second test's first spelling survived its own mutant (it asserteddirtywhile the ambient checkout was already dirty) and now forces the status read clean, which is the only way the flag can be what makes the difference.Registered, not taken (thread): an allowlisted
__pycache__/*.pycis trusted by PATHNAME, so a crafted cache whose header matches the tracked source is executed before the sweep runs. True, and the remedy issys.pycache_prefixset before the legs are imported — which would also stop this runner writing into the legs at all and retire the allowlist. It is a process-wide behaviour change that deserves its own act rather than the last commit of this one, and the exposure needs a writer in the checkout, who could equally editcarved_reach.py, which no pin covers.docs/opendox-cutover-runbook.mdnorREADME.md(nor the runner): the standing findings are the repository's own and this act adds none.Rounds 6-9, and where the line was drawn
Copilot reviewed at every head and kept finding real defects — in code this act wrote. The rule I held: a defect this act INTRODUCED gets fixed however late; a finding about ground this act did not break is answered and registered.
ce976cbe—rev-parse <commit>:<path>returns an oid for ANY tree entry, so a parent commit with a file or directory atcodehad it read AS THE NESTED PIN; mode160000is required now, through onels-treethat answers presence, mode and id together. Plus three texts this act made stale:any(leg.iterdir())counted.git(a metadata-only mount read as materialized), the dirt refusal still namedgit status --porcelainafter that read became three, and the comment above the probe still saidpost_stack()comes first — the opposite of the implemented order.3ab57af5— mostly a SUBTRACTION (the spec-mount correction above), plus the HEAD read made mode-aware like its sibling and every nonzero index stage treated as a conflict whatever its mode.630af798— a REGRESSION3ab57af5introduced, undone: making the HEAD read mode-aware also made it RAISE, and HEAD was read BEFORE the index, so an unreadable HEAD tree could reject a VALID staged pin — which is precisely what index-first exists to prevent.b959a071— the untracked read took no scope while its two siblings did (a false refusal for an untrackeddocs/NOTE.md), and the tracked remedy offeredcheckout -- .for a diff taken against HEAD, which leaves a STAGED edit exactly where it is.Registered against the successor act, not taken here: the tampered-
__pycache__exposure — an allowlisted__pycache__/*.pycis trusted by PATHNAME, and CPython executes a crafted cache whose header still matches the source. The remedy issys.pycache_prefixset before the legs are imported, which would also stop this runner writing into the legs and RETIRE the allowlist that produced three findings. It is a process-wide behaviour change and belongs to an act that is about it.Summary by Sourcery
Harden snapshot-equivalence verification and document its FLOOR PART 4 operating procedure.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
🤖 Generated with Claude Code