Skip to content

Plan 034 T041 (P1-J): the declared exclusion, 66 files each held to its reason; stacked on #29 - #30

Merged
brettheap merged 35 commits into
mainfrom
build/034-t041-declared-exclusion
Sep 27, 2026
Merged

brettheap merged 35 commits into
mainfrom
build/034-t041-declared-exclusion

Conversation

@brettheap

@brettheap brettheap commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Plan 034, task T041, the first task of slice P1-J (openXdox green alone, less the declared exclusion). The plan is specs/034-opendox-standalone-operation/tasks.md at opensoft/openxFactory main 133e37d9. This PR realizes box 9.2 (part) of the ratified add-neutral-product-standalone-operability.

What changes

file what
tests/declared_exclusion.yaml new. The declared exclusion: 66 test files, each with its reason, and the count.
conftest.py (repository root) Derives collect_ignore from the file, refuses a declaration that breaks one of its rules, and prints the exclusion at the end of every run that loads it, as an open extraction. A listed file that the run collects all the same, because its command line names it, is printed as collected. The emptied list (count: 0, no reasons, no entries) loads, and the run then prints that nothing is left out.
tests/test_declared_exclusion.py new. The falsifier: T007 batch B's three assertions, the declaration's rules, the conftest's refusals, and each listed file run ALONE.
tests/test_hermeticity_gate_verbs.py new. The two cases openDox-code#51 moves here, which join the exclusion on doc_health.
tests/hermeticity.py Layer 2 of the hermeticity guard turned on at this leg (see the finding below).
tests/test_hermeticity_runner_seams.py new. Layer 2 proved where the whole suite runs: the seam table, openDox-code's own two refusal cases, and the two ports a CLI verb declares, driven with no runner injected.

Twenty-six commits, one of them the merge of main:

  • cb22294 turns layer 2 on;
  • 4d2e5f0 holds the moved cases;
  • aa51a5f is the exclusion;
  • 7ad389f refuses malformed types and ids, for Copilot's first review;
  • 67a67bd proves layer 2 where the whole suite runs, and 4582eac admits only the ruled reasons, one-line texts and keys given once. Both are for Copilot's second review;
  • d1fc5a2 refuses an entry naming the check, a path not written plainly, an only listing a file twice, and a ruled citing another ruling, for Copilot's third;
  • 58e5eb1 refuses a reason that is not an id, and stops unknown keys of two types from crashing the loader, for Copilot's fourth. It keeps a sweep of malformed declarations as a case;
  • f74c6d2 refuses a file that is not UTF-8, or YAML nested past the recursion limit, as unreadable, for Copilot's fifth;
  • 6f9a36a holds the consumer's schemas to tests/test_snapshot.py in the conftest, as R1Q25 (b) rules, for Copilot's sixth;
  • 8dcf00a ties the contracts evidence to the trees the contract family reads, and makes the gate-verb fixture record whichever registry state the pinned openDox keeps. Both are for Copilot's seventh;
  • 0763181 narrows the contracts evidence to the exact contract files the listed files read, for Copilot's eighth;
  • 0651221 makes every reason take its cause as raised, and only when that cause is all the result shows, for Copilot's ninth;
  • 4b9e129 judges each result by the exception that ended the test, for Copilot's tenth;
  • 96db95c holds the causes that arrive inside an assertion to pytest's account of that assertion, and keeps unhashable keys as refusal cases, for Copilot's second review at the same head;
  • 54d06b8 matches each cause whole, so no text can follow it, for Copilot's review at 4b9e1291;
  • d3d634a adds the rail's other-module cases, for Copilot's review at 96db95cf;
  • b1b2b97 reads the whole exception chain, and prints a listed file that the command line names as collected, for Copilot's review at d3d634a5;
  • 387b9e9 holds the validator's result to the consumer's refusal alone, for Copilot's review at b1b2b970;
  • 9e703a7 shows each result an assertion reads whole and matches it exactly, and loads no installed plugin in the child runs, for Copilot's review at 387b9e98;
  • 4f579f8 lets the emptied list load and report that nothing is left out, and rebases the rule cases on a sample declaration, for Copilot's review at 9e703a78;
  • 576b371 refuses an optional key given as null, and makes the sweep fail on any malformed declaration that loads, for Copilot's review at 4f579f82;
  • 30beadb merges main, Plan 034 T040 (P1-I): clear the carve residue, classes B–G, and declare rfc3339-validator; the opendox pin bump waits on P1-R #29's squash d84b5048. It brings one line: the opendox pin, moved to openDox-code 2d116415;
  • 2769e8b takes T042's recursive glob from 759099a (Plan 034 T042 (P1-J): tests/integration/ at the declared composition; stacked on #30, and the 31-entry tree needs a ruling #31) byte for byte, so the whole-suite collection check reads tests/integration/ once Plan 034 T042 (P1-J): tests/integration/ at the declared composition; stacked on #30, and the 31-entry tree needs a ruling #31 adds it;
  • 7000db6 takes doc_health's cause only in the one form a lone checkout's interpreter gives, for Copilot's review at 576b3710;
  • 5b0e1c3 drives layer 2 through the two ports a CLI verb declares, with no runner injected, for Copilot's review at 7000db6d.

No protected suite is edited. No openspec/ path is touched, so no Rule 6 window applies.

The declaration, by reason

reason (id) ruled open until files
doc_health R1Q6 (d) the direction arc (T008) 59
status-exemption-rail R1Q24 (a) T008 3
openxfactory-contracts R1Q24 (a) T008 5
consumer-schemas R1Q25 (b) 7.3 (T061, phase 2) 1, tests/test_snapshot.py alone

That is 66 files, 68 reasons.

  • R1Q24 (a)'s seven are the rail's three (test_doxbench_packet.py, test_doxbench_turns.py, test_doxbench_abstract_envelope.py) and the contract family's four (test_validate_ideation_dashboard_contracts.py, test_wheel_action_contracts.py, test_project_schema_election.py, test_project_action_contracts.py).
  • test_doxbench_blank_reason.py joins the contracts class as the eighth file, as T005's experiment predicted (analyze round 1a, C8).
  • R1Q25 (b)'s one narrow exclusion is tests/test_snapshot.py, whose two schema cases fail on the consumer's schemas.

The two-cause files. The plan gives the rule in T041's own text: "An entry may name two reasons, as test_doxbench_packet.py's does once T040 has cleared its residue (doc_health and the rail), and the test then checks both." This PR follows it for both files that need it:

  • test_doxbench_packet.py: [doc_health, status-exemption-rail]. 54 cases need the rail and 3 reach doc_health.
  • test_doxbench_blank_reason.py: [doc_health, openxfactory-contracts]. One case reaches doc_health, and one reads openxFactory's contracts/manifest.yaml.

For each, the check requires both reasons to be shown, and every red result to be one of the two.

Where this departs from the plan's split, and why. tasks.md T041 says "T041 writes the doc_health entries, and T043's triage adds the entries for the other three reasons", and plan.md's single-writer row says the same. The holder's brief for this PR directs all four reasons' entries here: R1Q24 (a)'s seven, the doc_health modules, and R1Q25 (b)'s schema file.

  • The split cannot hold for the two-cause files in any case. Listed with doc_health alone, they would turn the exclusion test red on their other reason. Left out, the doc_health set would be incomplete.
  • So T043's triage becomes a re-run at T040's pin, which confirms or moves these entries (single-writer order T041 → T043 → T044 → T061).

Written from a run, not from the lists. The file is written from a run of each file ALONE, not from T005's list at e28930bf. Every red result falls under exactly one reason, as the next section's evidence decides, with none unattributed and none matching two.

For T007 batch B: the name and format F9.1 needs

  • Path: tests/declared_exclusion.yaml, in openXdox-code.

  • Format: YAML with these keys and no others. The root conftest refuses an unknown key, and a key given twice in one mapping. A malformed declaration is refused, naming its rule, and never crashes the loader.

    • schema_version: 1 (the integer) and kind: declared-test-exclusion;
    • count: <int>, an integer equal to the number of entries;
    • reasons:, a list (empty once every reason has left), each {id, reason, ruled, open_until} with each text on one line and ruled starting with the ruling that admits it, plus an optional only: [paths] listing each file once. consumer-schemas must carry exactly only: [tests/test_snapshot.py], since R1Q25 (b) admits it for that file alone;
    • entries:, each {path, reasons: [<id>, ...]} with an optional one-line note, one per line, in path order. Each path is written plainly, as tests/<name>. tests/test_declared_exclusion.py, the check, is never an entry.
  • Reason ids: drawn from the four the rulings admit, and the conftest refuses any other. They are doc_health (batch B's), then status-exemption-rail, openxfactory-contracts and consumer-schemas (batch F's three). A reason leaves with its last entry.

  • What the run prints, under -q as well, just before pytest's final count line:

    • a separator line titled open extraction: the declared exclusion;
    • declared exclusion: <count> files, listed in tests/declared_exclusion.yaml and left out of this run. It is an OPEN extraction: ...;
    • one reason <id> (<n> files): <reason>; open until <open_until>; ruled <ruled> line per reason;
    • one excluded <path>: <id>[, <id>] line per entry.

    pytest collects a file that its command line names, whatever collect_ignore says. A listed file that a run names is printed as collected <path>: <id>[, <id>] instead. The second line then reads declared exclusion: <count> files, listed in tests/declared_exclusion.yaml. <n> are left out of this run, and <m> are collected all the same, since pytest collects a file named on the command line whatever collect_ignore says. It is an OPEN extraction: .... A run that names no listed file prints every entry as excluded, and batch B's run is one of those.

    The emptied list is count: 0 with reasons: [] and entries: []. It loads, and the run prints declared exclusion: 0 files, listed in tests/declared_exclusion.yaml. Nothing is left out of this run, and no extraction is open. under the title the declared exclusion. Batch B's three assertions hold there with COUNT=0.

  • Batch B's three assertions, as commands, from the checkout root:

    python - <<'PY'
    import yaml
    d = yaml.safe_load(open("tests/declared_exclusion.yaml"))
    ids = {r["id"] for r in d["reasons"]}
    assert type(d["count"]) is int and d["count"] == len(d["entries"])            # (1) count equals entries
    assert all(e.get("reasons") and set(e["reasons"]) <= ids for e in d["entries"])  # (2) every entry carries its reason
    PY
    python -m pytest -q > out.txt                                                   # (3) the run prints it
    COUNT=$(python -c 'import yaml; print(yaml.safe_load(open("tests/declared_exclusion.yaml"))["count"])')
    grep -F "declared exclusion: ${COUNT} files, listed in tests/declared_exclusion.yaml" out.txt
    test "$(grep -c '^  excluded tests/' out.txt)" = "$COUNT"

    The same three are named tests: tests/test_declared_exclusion.py::test_the_count_equals_the_entries, ::test_every_entry_carries_its_reason and ::test_a_run_that_loads_the_root_conftest_prints_the_exclusion.

How the check attributes a failure

tests/test_declared_exclusion.py::test_each_listed_file_fails_alone_for_exactly_its_reasons[<path>] runs each listed file in a child pytest of its own. pytest collects a path named on its command line whatever collect_ignore says (pytest 8.4.2). The child shows every value an assertion reads whole (-o verbosity_assertions=2), and loads no installed plugin (PYTEST_DISABLE_PLUGIN_AUTOLOAD=1). The check reads each failure and error in the child's JUnit report through three things: its message, the lines pytest marks E, and the lines pytest uses to join a chain's exceptions ("The above exception was the direct cause of the following exception:" and "During handling of the above exception, another exception occurred:"). So a source line that a traceback quotes is never read as evidence. Each reason has one piece of evidence:

Each result is judged by its final exception, the one that ended the test. That is JUnit's message, unwrapped for a setup or teardown error. For a collection failure, whose message names none, it is the last exception the lines show, whole. That exception must BE the reason's cause, matched whole, in one of the shapes the 233 red results take:

reason its cause, matched whole
doc_health ModuleNotFoundError: No module named 'doc_health', and no other module shown. Where doc_health is absent, the interpreter names doc_health itself for any of its modules, so a lone checkout gives no other form.
status-exemption-rail opendox.doxbench_packet.StatusExemptionNotRegistered: plus openDox's own constant STATUS_EXEMPTION_NOT_REGISTERED (T027, openDox-code#41). Or openDox's AttributeError for a rail name, module 'opendox.doxbench_packet' has no attribute '<name>': the status-exemption rail cannot answer it (<the constant>), raised from that refusal, which pytest shows before it. The constant is read from the pinned openDox, and a pin before the seam has none.
openxfactory-contracts FileNotFoundError on one of exactly four contract files. Or the interpreter's can't open file on the validator, followed by pytest's account of the assertion on its return code. That account shows the whole process, which must be CompletedProcess(args=[<interpreter>, <validator>], returncode=2, stdout='', stderr=<the interpreter's line>). The four are the ones the five contracts files report when each runs alone: contracts/schemas/gate-intent.schema.yaml and contracts/schemas/project-register.schema.yaml above the checkout, where the family's parents[2] takes openxFactory's root to be; the validator scripts/validate-ideation-dashboard-contracts.py above the checkout; and contracts/manifest.yaml at the checkout's own root. A path a new run shows joins the set in the pull request that quotes that run.
consumer-schemas the consumer validator's own refusal, which names this checkout's contracts/schemas and runs to "no mode may report success". The test either asserts on it, or meets it where it expected another refusal. If it asserts on it, pytest's account shows the validator's whole result. That result must be the harness error's: ValidationResult(ok=False, returncode=2, stdout='', stderr=<the refusal>, validator=<this checkout's validator>, outcome='validator-unavailable', unavailable_reason=<validate_snapshot's reason for exit 2>). If it meets it, the refusal is the whole Input: of the pattern that did not match, and the openxdox.snapshot.SnapshotInvalid that carried it must be shown before that, whole.

And the cause must be all the result shows. Every exception pytest shows before the final one must be one the cause comes with. For most causes that is none. The exceptions are the rail's refusal, under the AttributeError raised from it, and the SnapshotInvalid, under the consumer's regex mismatch. A reason must also account for every missing module, missing file and refusal its result shows. So each of these is unattributed:

  • a cause followed by an unrelated failure;
  • a cause raised while an unrelated exception was being handled, or raised from one;
  • a cause with anything after it;
  • a cause's words, or its whole exception, quoted in some other assertion;
  • a cause beside an unrelated one;
  • a validator's result or process that shows anything but the cause.

So no two reasons can take one result. All 233 red results the 66 files give, each run alone, fit this. 17 of them show the rail's refusal before its AttributeError, and 1 shows the SnapshotInvalid. The other 215 show one exception each.

A listed file must fail (exit 1 or 2). Every red result must match exactly one reason, and that reason must be one its entry names, and every reason the entry names must be shown. The child drops PYTHONPATH, CONTRACTS_DIR, PYTEST_ADDOPTS, PYTEST_PLUGINS and the parent's hermeticity ledger variable. So the claim checked is the declaration's own: these files fail in a lone checkout. The measured control: tests/test_snapshot.py alone passes 17 of 17 with CONTRACTS_DIR pointed at openXdox-spec's contracts/, and its exclusion case still passes with that variable exported, because the child drops it. The children run in parallel, eight at a time: about 10 seconds for all 66.

The falsifier, passing

Where it was measured. At this head, 5b0e1c3, whose pin is T040's, openDox-code 2d116415, since main was merged in. The venv is fresh and installed as CI installs it: pip install -e ".[test]", which fetches opendox from GitHub at that commit. Python 3.12.3, pytest 8.4.2. Earlier heads were measured at openDox-code 71b631bc in a scratch copy, and at a scratch merge of #29's head. The merge commit 30beadb gives the same results as that scratch merge, apart from each run's own paths and ids.

$ python -m pytest -q tests/test_declared_exclusion.py tests/test_hermeticity_runner_seams.py
212 passed in 19.08s

$ python - <<'PY'   # batch B (1) and (2)
...
count 66 == entries 66; every entry carries a declared reason

$ python -m pytest -q > out.txt; echo rc=$?   # batch B (3), and the whole suite less the exclusion
rc=0
$ grep -F "declared exclusion: 66 files, listed in tests/declared_exclusion.yaml" out.txt
declared exclusion: 66 files, listed in tests/declared_exclusion.yaml and left out of this run. It is an OPEN extraction: ...
$ grep -c '^  excluded tests/' out.txt
66
$ tail -1 out.txt
870 passed, 10 skipped in 40.15s

The module's 207 cases are the following:

  • 141 on the declaration, the conftest and the evidence:
    • batch B's three;
    • the four ruled reasons, and consumer-schemas for tests/test_snapshot.py alone;
    • every path a real tests/test_*.py, written plainly, once, in order;
    • the conftest admitting the same four reasons with their rulings, holding the consumer's schemas to tests/test_snapshot.py, and naming this module as the check;
    • collect_ignore equal to the entries;
    • a sample declaration that keeps every rule, and 39 breakages of it and 2 keys given twice, each refused naming its rule;
    • a sweep of 861 variants of the sample, each of which must be refused, and never crash, unless its value is still well formed where it went;
    • five files the loader cannot read (bytes that are not UTF-8, YAML nested past the recursion limit, a list or a mapping for a key, and a file that is not there), each refused as unreadable;
    • the evidence taking each cause, matched whole and alone, 78 cases;
    • the committed file accepted, and the emptied list accepted and reported as nothing left out;
    • the whole suite collecting every test file except exactly the 66;
    • a run that names two listed files printing them as collected, and the other 64 as excluded.
  • 66 more, one per listed file, run alone.

The other 5 are tests/test_hermeticity_runner_seams.py's. With runner_seams() put back to its carved probe, all 5 fail.

The whole suite less the exclusion is green there. It gives 870 passed and 10 skipped. The 10 skips are the 4 test_aggregation_register_instance.py cases, which have no aggregation checkout, and the 6 seam-suite doc_health pairs that T044 owns. Before this PR, the same run was 106 failed, 1027 passed, 10 skipped, 126 errors, on main at d84b5048 at the same pin and run past its collection errors, and all 232 red results were in 65 of these files. The 66th, tests/test_hermeticity_gate_verbs.py, is new here.

At #29's earlier pin (5c137a90), a run that loads the root conftest could not be green. Every case of the module and the layer-2 file errored at setup with No module named 'ideation_dashboard', because the autouse declared_human_console fixture imports opendox.cli, which does not import before T011 (tasks.md, phase 1's note). That is why this PR waited for T040's pin.

Thirty-two planted defects, each caught

Each plant is one change to the scratch copy, reverted after its run, and a control run passes first. The harness is a scratch script, not committed. At 5b0e1c3, at T040's pin, it catches all 32. Plants 26, 31 and 32 change the scratch copy's venv instead: an installed plugin, and the installed openDox. Plants 13 to 22, 24, 26, 28, 29, 31 and 32 came from Copilot's reviews, and each one passed, hidden, against the evidence at the head where it was found. Plant 23 undoes the printout of a named file, and plant 27 undoes the loader's acceptance of the emptied list. Plant 25 is Copilot's own example from thread 4116820877, which the evidence already refused.

  1. A listed file gains an unrelated failure: its case fails, "fails for a cause none of the four reasons names".
  2. A two-reason entry loses one (test_doxbench_packet.py as [doc_health] only): "fails for ['status-exemption-rail'], which its entry does not name".
  3. An entry names a reason its file does not show (test_canvas.py plus the rail): "names ['status-exemption-rail'], but no result fails for it".
  4. A passing file is listed (test_leg_shape.py): "no longer fails".
  5. A contracts file gains a missing file INSIDE the checkout, outside contracts/: it is unattributed.
  6. A near-miss of the doc_health evidence ('doc_hea1th'): it is unattributed.
  7. A near-miss of the rail's evidence: it is unattributed.
  8. One assertion quoting two reasons' words: it is unattributed, since neither cause is raised. Before 0651221 it was caught as matching two reasons. That commit's message calls it plant 9; it is plant 8.
  9. collect_ignore = []: the derivation case and the whole-suite collection case fail.
  10. The entry lines are dropped from the printout: batch B's print case fails.
  11. The printed count drifts from the file: batch B's print case fails.
  12. An entry removed without its count: the root conftest refuses the run, "its count is 66, but it lists 65 entries" (exit 4).
  13. A contracts file gains an unrelated missing file under /tmp/contracts/: it is unattributed. At 6f9a36a it was hidden.
  14. A contracts file gains an unrelated missing file in the contracts/ above the checkout: it is unattributed. At 8dcf00a it was hidden.
  15. One result misses a known contract file and then an unrelated one: it is unattributed. At 0763181 it was hidden.
  16. An unrelated assertion in tests/test_snapshot.py quotes "CONTRACTS_DIR is not set": it is unattributed. At 0763181 it was hidden.
  17. doc_health's import fails, and an unrelated AssertionError is raised while handling it: it is unattributed. At 0651221 it was hidden.
  18. A bare assertion in tests/test_snapshot.py quotes the consumer's whole refusal, this checkout's path included: it is unattributed. At 4b9e129 it was hidden.
  19. openDox's StatusExemptionNotRegistered is raised with an unrelated diagnostic after its words: it is unattributed. At 96db95c it was hidden.
  20. The rail's refusal is raised while an unrelated KeyError is being handled, in tests/test_doxbench_turns.py: it is unattributed. At d3d634a it was hidden.
  21. A known contract file is read while an unrelated KeyError is being handled, in tests/test_project_schema_election.py: it is unattributed. At d3d634a it was hidden.
  22. doc_health is imported while an unrelated KeyError is being handled, in tests/test_snapshot_validation_launch.py: it is unattributed. At d3d634a it was hidden.
  23. The summary prints a listed file that the command line names as excluded: the named-run print case fails.
  24. A test validates a snapshot the validator cannot read, with the schemas missing. Its result shows outcome='not-conformant' behind the refusal: it is unattributed. At b1b2b97 it was hidden.
  25. The validator prints another stderr line after its refusal: it is unattributed, and it was at 387b9e9 too, since the test's message shows the validator's last line first.
  26. An installed pytest plugin turns a planted unrelated failure green in the child: it is unattributed, since the child loads no installed plugin. At 387b9e9 it was hidden.
  27. The loader refuses the emptied list again: the emptied-list case fails.
  28. The committed declaration gives the rail's reason only: null: the root conftest refuses the run (exit 4). At 4f579f8 it loaded, and the check module passed.
  29. A test raises ModuleNotFoundError: No module named 'doc_health..x': it is unattributed. At 576b371 it was hidden.
  30. A test raises ModuleNotFoundError: No module named 'doc_health.corpus': it is unattributed, since a lone checkout never names a module inside doc_health. At 576b371 it was hidden. Plant 29 is one case of this wider class.
  31. openDox's NotebookAdapter binds the real nlm runner at import, so the notebook port that a CLI verb declares misses layer 2: the notebook port case fails, "DID NOT RAISE". At 7000db6 it was hidden, and the whole suite stayed green.
  32. openDox's GhPullRequests uses a runner subclass that keeps the real run, so the pull-request port misses layer 2: the pull-request port case fails on the port's own PullRequestRefused, which carries layer 1's refusal of gh pr list. At 7000db6 it was hidden, and the whole suite stayed green.

openDox-code#51's two cases land here

openDox-code#51's body lists them for T041: test_an_unguarded_cli_scoped_create_is_refused and test_the_cli_seam_with_a_fake_port_reaches_no_binary. Its proposed destination was tests/test_hermeticity_gate_verbs.py.

  • Both land byte-identical to openDox-code main 68be484a, tests/test_hermeticity.py lines 226-240 and 262-275 (compared by ast source segment).
  • gate is openXdox's verb since the carve, and no test in this leg registered a profile that carries it. So the module adds a stand-in host that contributes exactly cli_gate.GateSubcommands(), as openxFactory's profile_openxfactory.SUBCOMMAND_EXTENSIONS does. It registers per test, and monkeypatch restores the registry after.
  • In a lone checkout the file fails at collection on doc_health (cli_gate → gate_console:63), so its entry is [doc_health].
  • Measured behind that reason, with openxFactory's scripts/ at 133e37d9 on PYTHONPATH to supply doc_health (R1Q23 (a)'s composition): 2 passed, with openDox-code 5c137a90, 71b631bc and 2d116415 installed. The fixture records whichever registry state the pinned openDox keeps. Without the stand-in host, gate is an invalid choice. Without layer 2, below, the unguarded create does not raise.
  • T098: display harnesses (A), and the server's scope labels from the served facet (plan 038, T094's R2-INV-R9) #51 has landed (80acead1), and its final list still names exactly these two cases for T041.

Findings

  1. Layer 2 of the hermeticity guard was OFF at this leg, as T098: display harnesses (A), and the server's scope labels from the served facet (plan 038, T094's R2-INV-R9) #51 found at openDox-code.
    • tests/hermeticity.py is openxFactory's replica here. Its runner_seams() probed ideation_dashboard.*, which this leg does not have, so it returned no seams. The carve manifest's row records the reaches as resolving "to nothing at a destination that lacks them".
    • So an escape through the default nlm runner degraded silently. The moved unguarded-create case shows it: DID NOT RAISE.
    • Commit cb22294 names the pinned openDox's opendox.workbench and opendox.session_pr, with no probe, as T098: display harnesses (A), and the server's scope labels from the served facet (plan 038, T094's R2-INV-R9) #51 did.
    • Measured: the whole suite gives the same outcome for all 1269 nodes with the layer on and with it off, so no test was escaping.
    • The moved regression sits in the exclusion, so a lone checkout never runs it. tests/test_hermeticity_runner_seams.py (67a67bd, 5b0e1c3) holds the layer where the whole suite runs, through the seams and through the two ports a CLI verb declares. Its 5 cases fail with the carved probe put back.
    • Both are their own commits (cb22294, 67a67bd). So the holder can ask for them to move to T043 instead, as revert commits here.
  2. tests/test_snapshot_validation_launch.py, a 5.4a protected suite, joins on doc_health. T043's text expected T016's default registration to clear its ProfileNotRegistered ("read for T006, and is not yet run at the pin"). At the phase-1 commit it does clear it, and the suite then fails 9 cases on doc_health. So it is in the exclusion under R1Q6 (d), and F5.2 runs it in phase 2 in R1Q23 (a)'s environment.
  3. Every carved gate-verb suite here will need a host that carries gate, once doc_health is reachable. test_create_document_cli.py, the session suites and the rest drive cli.main(["gate", ...]), and no test in this leg registers such a profile. They fail on doc_health first today, so nothing shows it. This is for T008's arc, and tests/test_hermeticity_gate_verbs.py's stand-in host is one shape for it.
  4. Causes hidden behind doc_health, one of which openDox-code#51's notes name. tests/test_doxbench_knowledge_service.py::test_the_serve_side_ceiling_is_pinned_to_the_RELEASED_maxLength reads contracts/schemas/xfactory-workbench-chat-turn.schema.yaml at this checkout's root, and this checkout carries no such file. Its file fails at collection on doc_health, so a lone run never reaches the case.
    • Composed (openxFactory's scripts/ on PYTHONPATH), the file fails 38 of its 52 cases, the same at 2d116415 and at 71b631bc.
    • Two of them read that schema: this case and test_every_shipped_reduction_reason_fits_the_released_bound.
    • Two read scripts/ideation_dashboard/serve.py at this checkout's root.
    • Most of the rest meet a turn route that answers 400.
    • So more than one case sits behind doc_health in this file, and its entry carries no note naming one of them.
    • The exclusion cannot see a cause behind a collection failure. These cases surface when T008 clears doc_health: the file's alone case then turns red, and that pull request settles them.
  5. For T047 (P1-K): openxFactory's docs/opendox-carve-admissions.yaml needs created: entries under openxdox_code, with since: set to this PR's landing commit, for:
    • tests/declared_exclusion.yaml
    • tests/test_declared_exclusion.py
    • tests/test_hermeticity_gate_verbs.py
    • tests/test_hermeticity_runner_seams.py

Copilot's reviews

  • The first, at aa51a5ff (review 5331185493, "Changes recommended").
    • Its two threads found that schema_version: true or 1.0, and count: 66.0, loaded. Measured at aa51a5ff, all three load.
    • 7ad389f refuses them. It also takes the rest of that overview: reason ids that are not tokens, unknown keys, and only paths that are not entries naming the reason.
    • Both threads are answered with that evidence and closed as done.
  • The second, at 7ad389f8 (review 5331214591, "Needs a closer look", no findings). Its overview named declaration-validation gaps and missing hermeticity coverage. Comment 5858231394 answers it, with the before and after runs.
    • The coverage is 67a67bd.
    • The validation is 4582eac. Measured at 7ad389f, three breakages load: a fifth reason, a reason text broken by a carriage return, and an entry giving reasons: twice, whose reasons are silently swapped. At 4582eac each is refused, naming its rule, and so is a second entries: list.
  • The third, at 4582eac6 (review 5331400682, "Needs a closer look", no findings). Its overview said two moderate conftest.py validation issues remain, without naming them. So the loader was probed with declarations that should not load, and comment 5858299866 gives the runs. Five loaded at 4582eac, and d1fc5a2 refuses each:
    • the check listed as an entry. At 4582eac, the whole suite then goes green (661 passed, 10 skipped, exit 0) with the check's 102 cases gone;
    • one file listed twice under two spellings (tests/./test_canvas.py beside tests/test_canvas.py). It counts and prints 67, and no case in the module notices;
    • three more, caught only by the test module: a doubled slash, an only listing a file twice, and a ruled citing another ruling.
  • The fourth, at d1fc5a22 (review 5331428675, "Needs a closer look", no findings). It names one item, listed as previously missed: an entry's reasons: [[]] would raise TypeError at set(named). Comment 5858393471 gives the runs.
    • At d1fc5a2 that case is refused, by the undeclared-reason rule, which runs first. 58e5eb1 adds the guard anyway, so the refusal no longer rests on the order of the checks.
    • The class of fault was real elsewhere. A structural sweep crashed 56 of 577 variants of the declaration at d1fc5a2, every one of them a TypeError from sorting unknown keys of two types. 58e5eb1 names them by repr, and the sweep then gives 0 crashes. The case test_the_root_conftest_refuses_rather_than_crashes keeps it, and at d1fc5a2 that case fails, with 36 of 781 crashing.
  • The fifth, at 58e5eb13 (review 5331462163, "Changes recommended", one finding). Thread 4116386894 found that a declaration that is not UTF-8 raised UnicodeDecodeError on import instead of being refused. Measured at 58e5eb1, it crashes, and so does YAML nested 5000 deep, with a RecursionError. f74c6d2 refuses both as unreadable, as a missing file already was. The thread is answered with the runs (reply 4116399992) and closed as done.
  • The sixth, at f74c6d28 (review 5331486776, "Needs a closer look", no findings). It said a manifest-validation issue remains, and that the stacked hermeticity changes need a person's review. Comment 5858527729 answers both.
    • Held against the header rule by rule, the conftest missed one ruling. R1Q25 (b)'s consumer's schemas loaded widened to a second file, moved to another file, or with no only. 6f9a36a refuses all three.
    • The hermeticity commits (cb22294, 67a67bd) are for the holder to judge, as Findings 1 says.
  • The seventh, at 6f9a36a9 (review 5331520413, "Changes recommended", two findings). Both are fixed in 8dcf00a, and each thread is answered with the runs and closed as done.
    • Thread 4116448804: the contracts evidence took any missing path under a contracts/ directory outside the checkout. At 6f9a36a, an unrelated missing /tmp/contracts/... file planted in a contracts entry was hidden, and its alone case passed. The evidence now takes only the three shapes the contracts files show, and eight cases hold it there (reply 4116472044).
    • Thread 4116448815: the gate-verb fixture read _is_default and _built_from_default, which openDox-code 5c137a90 does not have. Composed at that pin, both cases errored in setup with AttributeError. The fixture now records whichever of the registry's state the pin keeps, and composed, both cases pass at 5c137a90 and at 71b631bc (reply 4116472168).
  • The eighth, at 8dcf00a7 (review 5331553252, "Changes recommended", one finding). Thread 4116483580: the tree-based evidence still took an unrelated missing file inside those trees. At 8dcf00a, a planted contracts/t041-unrelated.yaml above the checkout was hidden, and its alone case passed. 0763181 makes the evidence the exact four contract files, with negatives for unrelated files in each contracts/ (reply 4116497328; the thread is closed as done). The overview's CI coverage point is validate.yml's 16-file list, which is T043's, as the next section says.
  • The ninth, at 07631817 (review 5331577450, "Changes recommended", two findings). Both are fixed in 0651221, and each thread is answered with the runs and closed as done (replies 4116538737, 4116538880).
    • Thread 4116509312: consumer-schemas took any text with "CONTRACTS_DIR is not set".
    • Thread 4116509339: the contracts evidence took a result that also showed an unrelated missing file.
    • Both are one weakness, so the fix is one rule for all four reasons: a reason takes its cause as raised, and only when that cause is all the result shows. The evidence case then had 28 cases, the threads' two among them.
  • The tenth, at 06512213 (review 5331617447, "Changes recommended", one finding). Thread 4116549888: a cause followed by an unrelated failure raised while handling it was still taken. 4b9e129 judges each result by its final exception (reply 4116577746).
  • A second review at 06512213 (review 5331631138, two findings).
    • Thread 4116563316: its own case, a whole exception quoted in an assertion, was already refused at 4b9e129. But its wider point held for the two causes that arrive inside an assertion, and 96db95c holds those to pytest's account of the assertion (reply 4116601431).
    • Thread 4116563297: an unhashable key does not crash. PyYAML raises ConstructorError, and the declaration is refused as unreadable, as measured. 96db95c keeps two cases for it (reply 4116601371).
  • At 4b9e1291 (review 5331662913, one finding). Thread 4116591535: the rail's forms, and the two assertion-borne forms, were prefix matches, so text after a cause rode along. 54d06b8 matches each cause whole, the rail against openDox's own constant (reply 4116624587).
  • At 96db95cf (review 5331686800, one finding). Thread 4116613647: at that head the rail took a class of that name from any module. 54d06b8 had already tied it to opendox.doxbench_packet, and d3d634a adds the two negative cases (reply 4116633096).
  • At 54d06b8d (review 5331712809, "Needs a closer look", no findings). It listed both of the previous round's threads as resolved.
  • At d3d634a5 (review 5331724652, "Needs a closer look", no findings). Its summary asks to "correct the exclusion reporting for explicitly selected files and strengthen evidence parsing against unrelated traceback exceptions". Both were measured true, and b1b2b97 does both (comment 5859494679):
    • a run naming tests/test_doxbench_turns.py ran 183 of its tests, yet printed the file as left out;
    • a cause raised while an unrelated exception was being handled was taken (plants 20 to 22).
  • At b1b2b970 (review 5331850219, "Needs a closer look", no findings). Its summary asks to tighten the ValidationResult evidence against mixed diagnostics. Measured true (plant 24), and 387b9e9 reads both ends of the elided result (comment 5859499888).
  • At 387b9e98 (review 5331903928, "Changes recommended", one finding). Thread 4116820877: the elided middle of the result went unread. Its own example was already refused, but 9e703a7 shows each result whole and matches it exactly (reply 4116865399). The summary also names a plugin-isolation finding, with no thread. 9e703a7 takes it as the child's plugins and turns autoloading off there (plant 26; comment 5859623294).
  • At 9e703a78 (review 5331980053, "Needs a closer look", no findings). Its summary: the validator rejects the required terminal state, zero entries. Measured true: with the emptied list in place, every run stopped at conftest import (exit 4). 4f579f8 lets it load and report that nothing is left out, and rebases the check module's rule cases on a sample (comment 5859742399).
  • At 4f579f82 (review 5332073424, "Needs a closer look", no findings). Its summary names only: null. Measured true: an optional key given as null loaded as if absent. 576b371 refuses it and makes the sweep fail on any malformed declaration that loads (comment 5859835940). The summary also asks for a person's review, which is the holder's once this PR is READY.
  • At 576b3710 (review 5332119770, "Needs a closer look", no findings). Its summary names malformed doc_health module names. Measured true. 'doc_health..x', 'doc_health.x.' and the like were taken as doc_health, and so was any module inside it, which a lone checkout never names (plants 29 and 30). 7000db6 takes only the form the interpreter gives when doc_health is absent (comment 5860399243).
  • At 7000db6d (review 5332409910, "Needs a closer look", no findings). Its summary says the runner-seam tests exercise patched functions instead of the production call path. Measured true: with both ports made to skip the seam, the file still gave 3 passed and the whole suite 868 passed. 5b0e1c3 drives the two ports a CLI verb declares with no runner injected, and each then fails under its bypass (plants 31 and 32; comment 5860511479).
  • Every thread on the pull request is answered with its runs and closed as done.

The repository's own check

validate.yml is unchanged, since T043 owns it. Its pytest step names 16 files under --noconftest. So the root conftest never loads there, and the new tests are not in its list. From T043 on, the required check is a conftest-loaded run of the whole suite, which is where they run. At this head (5b0e1c3), at T040's pin (2d116415):

$ python -m pytest -q --junitxml=pytest-report.xml <the 16 files> --noconftest
558 passed, 6 skipped
triple: selected=564 passed=558 skipped=6 failures=0 errors=0

That is #29's triple, unchanged. F9.1 whole, with its two validate.yml assertions, is T043's to quote.

Landing

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

🤖 Generated with Claude Code

Summary by Sourcery

Declare and rigorously validate the 66 tests that remain unavailable in a lone checkout while enabling and proving the pinned openDox hermeticity guard.

New Features:

  • Add a validated declared-exclusion manifest that reports excluded tests as an open extraction and tracks each file to its approved reason.
  • Add hermeticity coverage for the pinned openDox runner seams and gate-related CLI behavior.

Bug Fixes:

  • Prevent malformed or ambiguous exclusion declarations from silently changing the collected test set.
  • Ensure default notebook and pull-request runners refuse unguarded external execution instead of allowing it to proceed.

Enhancements:

  • Derive pytest collection exclusions directly from the declaration and report explicitly selected excluded files as collected.
  • Validate isolated failures for all declared files against exact, reason-specific evidence.

Tests:

  • Add comprehensive validation, reporting, collection, evidence-attribution, and per-file isolation tests for the declared exclusion.
  • Add runner-seam and CLI hermeticity regression tests.

brettheap and others added 12 commits September 26, 2026 22:20
Plan 034 task T040, slice P1-I (openxFactory
specs/034-opendox-standalone-operation/). jsonschema registers its
date-time format checker only when rfc3339-validator is importable, and
this leg's scripts/validate-ideation-dashboard-contracts.py refuses to run
without that checker. T005's whole-suite run at e28930b, with Group 2
simulated, found 23 red results asking for the package (its class M): 21
in tests/test_doxbench_blank_reason.py and 2 in tests/test_snapshot.py.
Declared, the 21 clear. tests/test_validator_schema_home.py, which
importorskips the package, also runs its 12 cases instead of skipping.

It is a TEST dependency and stays out of `dependencies`, for the reason
the file's jsonschema paragraph already records: nothing under src/
imports it. The floor, >=0.1.4, is what openxFactory's validator-input
lock pins (requirements/hermes-runtime-contracts.in), the same source
PyYAML's floor was read from.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… own

Plan 034 task T040, slice P1-I. test_create_project.py, test_edit_project.py
and test_register_edit_lane.py drive their wire half through
`from test_gate_routes import _post, _serving`. That module is openxFactory's
tests/ideation-dashboard/test_gate_routes.py, whose carve-manifest row is
not_moved (stays_openxfactory_adapter), so all three failed collection on
"No module named 'test_gate_routes'" (T005's class B, research R10).

tests/gate_routes_harness.py is the helper of their own. It carries exactly
the two names they import and the four definitions those reach, copied
from openxFactory at the carve tag opendox-carve-0 (b075fd91). An AST
comparison against that source finds every definition identical except the
declared change: the served web root is the pinned openDox bundle,
opendox_bundle.web(), read per call, in place of the pre-carve
scripts/ideation_dashboard/web path. `serve` is opendox.serve, the carve's
own import rewrite, and staging_fragment comes from staging_shapes. It is
not named test_*.py, so pytest never collects it as a suite and 12.5's
protected-suite grep over tests/test_*.py cannot select it.

With it, none of the three fails on test_gate_routes. Each now fails
collection one layer further in, on doc_health, at
openxdox/gate_console.py:63. That is T041's declared exclusion (R1Q6 (d)),
not carve residue.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Plan 034 task T040, slice P1-I. test_doxbench_knowledge_service.py and
test_doxbench_thread_wiring.py import their harness from
`test_doxbench_routes` at module scope, and test_doxbench_blank_reason.py
inside one test. That module is openxFactory's
tests/ideation-dashboard/test_doxbench_routes.py, whose carve-manifest row
is not_moved (stays_openxfactory_adapter), so all three failed on
"No module named 'test_doxbench_routes'" (T005's class C).

tests/doxbench_routes_harness.py is ONE helper for all three, which keeps
the reason they give for importing the harness rather than copying it. It
carries exactly the 21 names they import and the definitions those reach:
52 of the source module's 272 top-level statements, copied from openxFactory
at the carve tag opendox-carve-0 (b075fd91). An AST comparison against that
source finds every definition identical, under the declared rewrites, except
the one declared change, `released_only`:

- the carve's import rewrites: serve, doxbench_hash and doxbench_model are
  opendox.X, and generator is openxdox.generator;
- the served web root is the pinned openDox bundle, opendox_bundle.web(),
  read per call;
- the four wire kinds come from openDox's own declaration,
  opendox.serve_wire.DOXBENCH_*_KIND. Those are the kinds the routes emit
  and the keys they look an injected validator up by, whereas the source
  read them from doxbench_contracts, which stays in openxFactory;
- released_only skips here, naming why: the released-contract rung needs
  openxFactory's doxbench_contracts, and so does build_server's default
  validator seam, and this checkout carries neither.

The two module-scope importers now fail collection one layer further in,
on doc_health, where the harness's fixture snapshot reaches
openxdox/generator.py:66. That is the declared doc_health reach (R1Q6 (d),
T041's exclusion), and the harness does not hide it. In blank_reason the
one test that takes the harness meets the same doc_health.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Plan 034 task T040, slice P1-I. test_doxbench_bridge.py takes
FORBIDDEN_PORT_MEMBERS with `from test_doxbench_model import ...` inside two
tests. That module is openxFactory's tests/ideation-dashboard/
test_doxbench_model.py, whose carve-manifest row is not_moved
(stays_openxfactory_adapter), so both tests failed on
"No module named 'test_doxbench_model'" (T005's class D).

tests/doxbench_port_ban.py carries the one name, the same sixteen members
at the carve tag opendox-carve-0 (b075fd91) and at openxFactory main today.
The AST comparison finds it identical. openxFactory's module is not brought
whole, because at main it imports a further openxFactory-only helper
(carved_reach), which T005's experiment hit when it copied that module in.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e_omp_child.py

Plan 034 task T040, slice P1-I. test_doxbench_bridge.py drives a real child
over real pipes at `Path(__file__).parent / "fixtures" / "fake_omp_child.py"`.
The carve moved that fixture to openDox-code only (its manifest row is
moved_verbatim, destination opendox_code), so here 32 of the suite's cases
failed on BridgeUnavailable or ThreadMirrorFailed (T005's class E).

The file is a byte-identical copy: git blob e51045f, the same blob at
openxFactory's carve tag opendox-carve-0, at openDox-code 5c137a90 (this
leg's pin) and at openDox-code main. Mode 100644, as there. The suite runs
it as `sys.executable <path>`, so it needs no exec bit.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…se-repo

Plan 034 task T040, slice P1-I. tests/conftest.py names
BASE_REPO = tests/fixtures/base-repo, and test_register.py and
test_snapshot_validation_launch.py read it. That corpus is an openxFactory
test fixture (tests/ideation-dashboard/fixtures/base-repo), whose eleven
carve-manifest rows are not_moved (stays_openxfactory_adapter), so it never
arrived: 13 red results (T005's class F), 9 in the launch suite and 4 in
test_register.py.

The tree is a byte-identical copy: git tree cef59fd, the same tree at
openxFactory's carve tag opendox-carve-0 and at its main today, eleven blobs,
each mode 100644. The copy edits no suite, and test_snapshot_validation_launch
is one of 5.4a's protected suites. Its `openspec/changes/` paths are fixture
content, a copy of another repository's layout, not an OpenSpec record of
this one.

With it, test_register.py passes whole (10 passed), and the launch suite finds
its fixture. It then fails its 9 cases one layer further in, on
ProfileNotRegistered at build_parser(), which T016's default registration
addresses at the phase-1 pin (T005's experiment saw the same layer).

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Plan 034 task T040, slice P1-I. Four suites read openDox and openXdox
modules at their pre-carve path, scripts/ideation_dashboard/<module>.py, a
directory this leg does not have (T005's class G). This commit respells
the reads in three of them, test_scope_column_split.py,
test_doxbench_blank_reason.py and test_doxbench_bridge.py, and the conftest
serve surface two of them read through:

- tests/conftest.py: serve_surface_paths() reads each serve file at its
  carved home, through carved_module_path(). openDox's four come through
  the PIN, from the installed opendox package, and openXdox's two from this
  leg's src/openxdox/. carved_module_path() refuses a name found in both
  homes or in neither. The one file of the tuple that did not come to
  either, openxFactory's own lane column serve_openxfactory_lanes.py
  (not_moved), is NAMED in SERVE_SURFACE_NOT_AT_THIS_LEG, not dropped from
  the tuple, so any other absence still refuses the read;
- test_doxbench_bridge.py and test_doxbench_blank_reason.py: the module
  each already imports, read through its __file__, the repair § 3.4 slice
  S8 made for MODULE_PATH;
- test_scope_column_split.py: the package its parser means is both halves
  the carve made of ideation_dashboard, openDox's through the pin and
  openXdox's here, and it reads opendox/openxdox spellings beside the
  pre-carve two. A mutation check fed a reader the back-edge in five
  spellings, including `from openxdox.doxbench_scope import ScopeKey`, and
  every one was caught. It also fed a reader with its types import removed,
  which the non-vacuity assertion caught.

With Group 2 simulated at the current pin: test_scope_column_split 6/6,
test_doxbench_bridge 60/60 (with classes D and E), and blank_reason's three
class G cases pass.

Not respelled: tests/test_doxbench_packet.py's 13 class G reads. That file
is one of the seven that R1Q24 (a) (#656 comment 5850003126) sends to the
declared exclusion under T041/T043, and it is left to that act.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t them

Plan 034 task T040, slice P1-I. tests/test_doxbench_packet.py read openDox's
modules at their pre-carve path, scripts/ideation_dashboard/<module>.py, at
three sites. Those sites are 13 of T005's class G results. d266db3 left the
file alone because it is also one of the seven files R1Q24 (a) sends to the
declared exclusion.

The holder read T040 against R1Q24 (a), and the lane coordinator relayed that
reading to this slice on 2026-09-27. T040's own text and falsifier name these
source paths, so they are T040's. R1Q24 (a) covers only the file's
exemption-rail failures, which stay for T041/T043. This commit makes the
three-site fix and changes nothing else in the file:

- MODULE_PATH is Path(pk.__file__), the installed openDox module the file
  already imports. Slice S8 of section 3.4 made the same repair in
  test_doxbench_turns.py. It covers the read at :309 and the 11-case
  parametrized test at :1054;
- the watch-list sweep (:963) reads each module at its carved home through
  conftest's carved_module_path(). One module of the sweep did not come to
  this leg: doxbench_status_exemption.py, openxFactory's rail (not_moved).
  It is NAMED in SWEEP_NOT_AT_THIS_LEG and stays in the tuple, which is only
  ever widened.

tests/conftest.py: carved_module_homes() factors out the two homes that
carved_module_path() already searched. assert_not_at_this_leg() holds a
"not at this leg" declaration to its word: it refuses once a declared file
is present in either home, so a skip can never hide code this leg carries.
The sweep and serve_surface_paths() both call it, so the serve surface's
SERVE_SURFACE_NOT_AT_THIS_LEG gets the same check.

With Group 2 simulated at the current pin, the whole suite differs from
d266db3 in exactly 13 results. All 13 are in this file, and each went from
failure to passed. The file's 54 exemption-rail failures and 3 doc_health
failures are the same tests with the same causes. A plain run (no shim) is
identical to d266db3. A mutation check of 28 cases showed that each
respelled read catches its needles, and that each declaration refuses once
its file arrives in either home. The required job gives 558 passed and 6
skipped, triple 564/558/6.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Plan 034 task T040, slice P1-I, on Brett Heap's ruling of 2026-09-27
(opensoft/openXfactory#656 comment 5856475254, P1-K's question 1, answered
at (a)): "openxFactory scripts/route_extension.py and openXdox-code
src/route_extension.py are resynced to openDox-code #40's
src/route_extension.py. T007 batch E admits both as named arc edits, each
with its reason. ... openXdox-code's in P1-I (T040, openXdox-code#29)."

src/route_extension.py is the carve's replica of the neutral route
extension point (carve manifest row scripts/route_extension.py, not_moved /
replicated_at_destination, RULING Q-L1). It still held the carve-time blob
3480207 (30,017 bytes). openDox-code's copy moved on in
opensoft/openDox-code#40 (merge 0f10b1f5, plan 034 T010), which declares
the handler-contribution facet (R1Q1 (a)). This commit copies that file
byte for byte:

  blob    3480207 -> 7781665
  size    30,017 -> 62,817 bytes, mode 100644 unchanged
  sha256  d81124e62dba9df33abe44f3eb467188c98156f002cc7a92e297cd689da87515

The blob is the same at that PR's head c8d5c802, at its merge 0f10b1f5, and
at openDox-code main 796838e8. The change is additive. No top-level name is
removed, 30 are added (HANDLER_FACET, collect_handler_contributions,
compose_handler, declared_handler_contributions and their private helpers),
and the only changed definition is RouteBindingError's docstring.

This copy is the one a test session imports. pyproject.toml's pytest
pythonpath and the root conftest put src/ ahead of site-packages, so
openXdox's own columns and the installed openDox both resolve the bare
`import route_extension` to this file (measured: blob 7781665 from
src/route_extension.py, with and without --noconftest). The pinned wheel's
copy in site-packages is shadowed.

Verified at the current pin (5c137a90), Group 2 simulated: the whole suite
gives 107 failed, 1026 passed, 10 skipped and 126 errors, with 0 outcome
differences from 0336288. A plain run (no shim) shows 0 differences. The
required job gives 558 passed and 6 skipped, triple 564/558/6.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tests/hermeticity.py is openxFactory's replica here (a not_moved row,
replicated_at_destination). Its runner_seams() probed
ideation_dashboard.session_pr and .workbench with find_spec. This leg
has no such package, so the probe always returned no seams, and layer 2
was OFF in this suite. The carve manifest's row records both reaches as
resolving "to nothing at a destination that lacks them". Layer 1, the
PATH shim, was still on. But a non-zero nlm exit is the degradation the
notebook adapter swallows, so an escape through the default runner
passed silently.

The seams now name the pinned openDox's opendox.workbench and
opendox.session_pr, with no probe, as openDox-code#51 did for its own
copy (plan 034 T035). The two gate-verb cases #51 moves here, in the
next commit, need it: the unguarded create must RAISE.

Measured with openDox-code 71b631bc installed (the phase-1 commit T040's
pin moves to): the whole suite gives the same outcome for all 1269 nodes
with the layer on and with it off, so no test was escaping. The required
job at this branch's pin (5c137a90) gives 558 passed and 6 skipped,
triple 564/558/6.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
openDox-code#51 (plan 034 T035) takes two cases out of openDox-code's
tests/test_hermeticity.py and lists them for this leg's declared
exclusion (T041): test_an_unguarded_cli_scoped_create_is_refused and
test_the_cli_seam_with_a_fake_port_reaches_no_binary. Both drive
`gate create-document`. Since the carve, `gate` is openXdox's verb
(openxdox.cli_gate.GateSubcommands), and the host profile contributes
it.

They land byte-identical to openDox-code main 68be484a,
tests/test_hermeticity.py lines 226-240 and 262-275. The module around
them is new. It carries a stand-in host profile that contributes exactly
cli_gate.GateSubcommands(), as openxFactory's
profile_openxfactory.SUBCOMMAND_EXTENSIONS does. The host is registered
per test and the previous registration restored after it.

cli_gate imports gate_console, whose module-level
`from doc_health import corpus` needs openxFactory's doc_health. So in
a lone checkout the file fails at collection on doc_health, and it joins
the declared exclusion with that reason in the next commit (R1Q6 (d)).

Measured behind that reason, with openxFactory's scripts/ (133e37d9) on
PYTHONPATH to supply doc_health: 2 passed. Without the stand-in host,
`gate` is an invalid choice. Without the previous commit's layer 2, the
unguarded create does not raise.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lds it

tests/declared_exclusion.yaml lists the 66 test files a lone checkout
cannot run, each with its reason, and their count (requirement 9, first
scenario; R1Q6 (d), R1Q24 (a), R1Q25 (b)):

  doc_health               59 files
  status-exemption-rail     3 files
  openxfactory-contracts    5 files
  consumer-schemas          1 file, tests/test_snapshot.py alone

Two entries name two reasons, and each is checked for both:
test_doxbench_packet.py (doc_health and the rail) and
test_doxbench_blank_reason.py (doc_health and the contracts).

The repository-root conftest.py derives collect_ignore from the file.
It refuses a declaration that breaks one of the file's rules, and it
prints the exclusion at the end of every run that loads it, as an OPEN
extraction: the count, each reason, and each file with its reasons.

tests/test_declared_exclusion.py carries T007 batch B's three
assertions: the count equals the entries, every entry carries its
reason, and the run prints it. It also checks the declaration's rules
and the conftest's refusals. For each listed file it runs that file
ALONE, which must fail, with every red result attributed to exactly one
of the reasons its entry names, and each of those reasons shown at least
once.

Written from a run of each file alone, with the openDox this leg pins
installed at openDox-code 71b631bc (the phase-1 commit), not from a
list. There the check gives 85 passed. The whole suite, loading the
root conftest, gives 743 passed and 10 skipped, and 12 planted defects
are each caught. The required job at this branch's pin (5c137a90,
--noconftest) is unchanged: 558 passed and 6 skipped, triple
564/558/6.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 27, 2026 16:37
@sourcery-ai

sourcery-ai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Reviewer's Guide

This stacked draft declares and enforces the 66-test exclusion required for standalone operation, proves each exclusion is necessary and correctly attributed, reports it transparently, and turns on the relevant hermeticity guard with relocated gate-verb regressions.

Sequence diagram for validating each excluded test file

sequenceDiagram
    participant F as test_declared_exclusion.py
    participant P as Child pytest
    participant J as JUnit report
    participant D as declared_exclusion.yaml
    F->>D: load_declared_exclusion()
    loop Each declared path
        F->>P: Run path alone
        P->>J: Write failure or error evidence
        F->>J: Read failure messages and E lines
        F->>F: Match evidence to declared reasons
    end
    F-->>F: Assert every file fails for exactly its reasons
Loading

Flow diagram for declared test exclusion enforcement

flowchart TD
    D["tests/declared_exclusion.yaml"] --> L[load_declared_exclusion]
    L --> V{Declaration rules valid?}
    V -- No --> R[DeclaredExclusionRefused]
    V -- Yes --> C[collect_ignore derived from entries]
    C --> P[Pytest collects suite excluding 66 files]
    P --> S[pytest_terminal_summary]
    S --> O["Print open extraction: reasons and excluded paths"]
Loading

File-Level Changes

Change Details Files
Introduces a validated, reason-bearing declared exclusion for tests that cannot run in a lone checkout.
  • Adds a YAML declaration containing 66 test paths, four ruled reasons, counts, lifecycle metadata, and two-reason entries.
  • Loads and validates the declaration at conftest import time, derives pytest collection exclusions from it, and refuses malformed or inconsistent declarations.
  • Prints the excluded files and their reasons as an open extraction in terminal summaries, including quiet runs.
conftest.py
tests/declared_exclusion.yaml
Adds a falsifier suite that verifies the declaration, collection behavior, output contract, and each excluded file's actual failure causes.
  • Checks T007 batch B count, reason, and printed-extraction assertions.
  • Tests accepted reasons, path ordering, consumer-schema scoping, conftest-derived collection, and refusal of planted declaration defects.
  • Runs all 66 listed files independently in parallel with scrubbed environments and attributes every failure to exactly the declared evidence.
tests/test_declared_exclusion.py
Enables hermeticity layer 2 against the pinned openDox seams and relocates gate-verb regressions into this repository.
  • Replaces the stale ideation_dashboard seam probe with direct openDox session_pr and workbench imports so runner escapes are refused rather than silently unguarded.
  • Adds a stand-in gate host profile and two CLI hermeticity cases covering refusal without injection and successful operation through a fake notebook port.
tests/hermeticity.py
tests/test_hermeticity_gate_verbs.py

Tips and commands

Interacting with Sourcery

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

Customizing Your Experience

Access your dashboard to:

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

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Conftest validation must reject malformed types, invalid reason IDs, and only paths absent from the entries.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds a declared-exclusion manifest for standalone tests and restores Layer 2 hermeticity coverage for gate CLI operations.

Changes:

  • Defines and validates 66 excluded test files.
  • Applies and reports exclusions through conftest.py.
  • Adds exclusion falsifiers and gate-verb hermeticity tests.
  • Enables pinned openDox runner seam guards.
File Description
tests/​test_hermeticity_gate_verbs.py Tests guarded gate CLI operations.
tests/​test_declared_exclusion.py Validates exclusion declarations and behavior.
tests/​hermeticity.py Enables pinned runner seam guards.
tests/​declared_exclusion.yaml Defines excluded files and reasons.
conftest.py Loads, validates, applies, and reports exclusions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread conftest.py Resolved
Comment thread conftest.py Resolved
Copilot's review of aa51a5f on #30 found that the loader compared
schema_version and count by equality alone. So `schema_version: true`
or `1.0` loaded, because True == 1 and 1.0 == 1. And `count: 66.0`
loaded and printed as "66.0 files", which breaks batch B's shell
comparison of the printed count. Measured against the loader at
aa51a5f, all three load. Now each is refused, naming the rule.

The same pass takes the rest of the review's overview:
- a reason id is one lowercase token, since the run prints ids in a
  comma-separated list;
- an unknown key is refused at the top, on a reason and on an entry, so
  a misspelt `only:` cannot silently restrict nothing;
- `only` lists exactly the files that name its reason, and a reason no
  entry names is refused: a reason leaves with its last entry, as
  consumer-schemas does with T061's;
- a note is a line of text.

The declaration's header states the tightened rules.
tests/test_declared_exclusion.py adds ten refusal cases. Batch B's
first assertion now checks that the count is an integer, and the
reasons check reads "drawn from the four", since a cleared reason
leaves the declaration.

At openDox-code 71b631bc the check gives 95 passed. The whole suite,
loading the root conftest, gives 753 passed and 10 skipped, with no
outcome changed except the new cases, and each of the 12 planted
defects is still caught.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 16:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Moderate declaration-validation gaps and missing hermeticity coverage remain.

Review effort: Lite
Findings: None

Resolved since last review (2)

brettheap and others added 2 commits September 27, 2026 17:40
Copilot's second review of #30, at 7ad389f, named missing hermeticity
coverage. The regression that needs layer 2,
tests/test_hermeticity_gate_verbs.py, sits in the declared exclusion on
doc_health, so a lone checkout never runs it. Nothing the whole suite
collects would fail if runner_seams() went back to returning no seams.

tests/test_hermeticity_runner_seams.py imports only the pinned openDox
and the guard, so it runs wherever the whole suite does. It holds three
cases:
- the seam table names opendox.workbench's _default_runner and
  opendox.session_pr's SubprocessCommandRunner.run, and it fails before
  any refusal is tried if either drops out;
- openDox-code's own two refusal cases, as they read at openDox-code
  main 68be484a (tests/test_hermeticity.py lines 185-198): the default
  notebook runner and the default pull-request runner each raise the
  guard's violation instead of running nlm or gh.

With openDox-code 71b631bc installed (the phase-1 commit T040's pin
moves to), the three pass. With runner_seams() put back to its carved
find_spec probe of ideation_dashboard, all three fail. At this branch's
own pin, 5c137a90, they error in setup on ideation_dashboard, as the
rest of the whole suite does there. The required job is unchanged, at
558 passed and 6 skipped.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot's second review of #30, at 7ad389f, named moderate gaps left
in the declaration's validation. The root conftest's loader at 7ad389f
had three:
- measured at 7ad389f, a fifth reason, declared and named by an entry,
  loads. Only the test module held the reasons to the four the rulings
  admit, and only in a run that selects it. The conftest now carries
  ADMITTED_REASONS, with the rulings that admit each, and refuses any
  other id at load. A new case holds its list and the test module's
  RULED_REASONS to one set, so neither can admit a fifth alone;
- a reason's texts or a note could span lines, though the run prints
  each on one line. Measured at 7ad389f, a reason text broken by a
  carriage return loads. Each is now refused unless str.splitlines()
  gives it back whole, so every kind of line break counts, a trailing
  one too;
- PyYAML keeps the last of two equal keys and drops the first without
  a word. Measured at 7ad389f, an entry giving reasons: twice loads,
  with its reasons silently swapped. A second entries: list was refused
  only by a later, unrelated rule. The declaration is now read through
  a SafeLoader subclass that refuses a key given twice, naming the key
  and its line.

The declaration's header states the new rules. The test module adds
seven cases: four refusal cases, the key-given-twice pair, and the
admitted-set check.

With openDox-code 71b631bc installed, the module and the layer-2 file
give 105 passed. The whole suite, loading the root conftest, gives 763
passed and 10 skipped. Against the run before this commit, the only
differences are the new cases, all passing. Each of the 12 planted
defects is still caught. The required job at this branch's own pin
(5c137a90) is unchanged, at 558 passed and 6 skipped.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 17:40
@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's second overview is review 5331214591 at 7ad389f8: "Needs a closer look", no findings, "Moderate declaration-validation gaps and missing hermeticity coverage remain." This comment takes both points. The fixes are at head 4582eac, and each carries its evidence below.

Hermeticity coverage: 67a67bd. The regression that needs layer 2, tests/test_hermeticity_gate_verbs.py, sits in the declared exclusion on doc_health, so a lone checkout never runs it. So if runner_seams() went back to returning no seams, nothing the whole suite collects would fail. The new tests/test_hermeticity_runner_seams.py imports only the pinned openDox and the guard, so it runs wherever the whole suite does. Its three cases are the seam table, plus openDox-code's own two refusal cases, verbatim from openDox-code 68be484a (tests/test_hermeticity.py lines 185-198). With openDox-code 71b631bc installed:

$ python -m pytest -q tests/test_hermeticity_runner_seams.py
3 passed in 0.30s

# runner_seams() put back to its carved find_spec probe of ideation_dashboard:
FAILED tests/test_hermeticity_runner_seams.py::test_layer_two_names_the_pinned_opendox_seams
FAILED tests/test_hermeticity_runner_seams.py::test_the_default_notebook_runner_refuses_instead_of_running_nlm
FAILED tests/test_hermeticity_runner_seams.py::test_the_default_pull_request_runner_refuses_instead_of_running_gh
3 failed in 0.40s

Declaration validation: 4582eac. Here is the root conftest's loader as pushed at 7ad389f, against four breakages:

7ad389f LOADS a fifth reason named by an entry: ['doc_health', 'status-exemption-rail', 'openxfactory-contracts', 'consumer-schemas', 'some-other-reason']
7ad389f LOADS reasons given twice in one entry: count=66 entries=66 canvas=[{'path': 'tests/test_canvas.py', 'reasons': ['status-exemption-rail']}] reason0="reaches openxFactory's doc_health, which openxFactory packages nowhere and no lone checkout supplies"
7ad389f LOADS a reason text broken by a carriage return: count=66 entries=66 canvas=[{'path': 'tests/test_canvas.py', 'reasons': ['doc_health']}] reason0='one\rtwo'
7ad389f REFUSES a second entries list: gap-probe.yaml is refused: the reason status-exemption-rail is named by no entry. A cleared reason leaves the declaration with its last entry. The run stops here rather than exclude a set nobody declared (plan 034 T041).

What each line shows:

  • The fifth reason. Only the test module held the reasons to the four the rulings admit, and only in a run that selects it.
  • Reasons given twice. PyYAML 6.0.3 keeps the last of two equal keys and drops the first without a word, so test_canvas.py's reasons were silently swapped.
  • The second entries: list. It was refused only by a later, unrelated rule.

Against the same four, at 4582eac:

4582eac REFUSES a second entries list: gap-probe.yaml is refused: it gives the key 'entries' twice in one mapping (line 140), and YAML would keep only the last
4582eac REFUSES reasons given twice in one entry: gap-probe.yaml is refused: it gives the key 'reasons' twice in one mapping (line 76), and YAML would keep only the last
4582eac REFUSES a reason text broken by a carriage return: gap-probe.yaml is refused: the reason doc_health's reason is not one line, and the run prints each reason on one line
4582eac REFUSES a fifth reason named by an entry: gap-probe.yaml is refused: the reason some-other-reason is not one the rulings admit (doc_health, status-exemption-rail, openxfactory-contracts, consumer-schemas); a fifth needs a ruling first

The three new rules:

  • The four admitted reasons. The conftest now carries ADMITTED_REASONS, with the rulings that admit each. A new case holds that list and the test module's RULED_REASONS to one set, so neither can admit a fifth alone.
  • One-line texts. A reason's texts and a note must come back whole from str.splitlines(), so a \r counts, and so does a trailing break.
  • Keys given once. The declaration is read through a SafeLoader subclass that refuses a key given twice in one mapping, naming the key and its line.

The declaration's header states the new rules.

The whole branch, measured. The test module adds seven cases. The measurements with openDox-code 71b631bc installed:

  • The module and the layer-2 file give 105 passed.
  • The whole suite, loading the root conftest, gives 763 passed, 10 skipped. Its only differences from the run at 7ad389f are the new cases, all passing.
  • The 12 planted defects are still caught, 12 of 12.

At #29's pin, 5c137a90, the required job is unchanged, at 558 passed, 6 skipped.

The PR stays a DRAFT, stacked on #29.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Two moderate conftest.py validation issues remain unresolved.

Review effort: Lite
Findings: None

Copilot's third review of #30, at 4582eac, said two moderate
conftest.py validation issues remain, with no findings and no threads.
So the loader at 4582eac was probed with declarations that should not
load. Five of them load:
- the check listed as an entry. Every run that loads the root conftest
  then drops tests/test_declared_exclusion.py, and with it the module's
  own guard against being listed. Measured at 4582eac with the check
  listed (count 67), the whole suite gives 661 passed and 10 skipped,
  exit 0, with the check's 102 cases gone. The conftest now refuses an
  entry naming DECLARED_EXCLUSION_CHECK, and a new case holds that name
  to the module's own;
- one file listed twice under two spellings: tests/./test_canvas.py
  beside tests/test_canvas.py. It loads, counts 67 and prints 67, and
  no check in the module notices. A path with a doubled slash loads
  too. An entry's path must now be written plainly, as PurePosixPath
  gives it back;
- an only listing a file twice. It is now refused;
- a reason whose ruled text cites another ruling. Only the test module
  held ruled to its ruling. ADMITTED_REASONS is now a table of each
  reason's ruling, ruled must start with it, and the test module's
  RULED_REASONS is held to that table.

The declaration's header states the new rules. The test module adds
six cases: five refusal cases, and one for the check's name. It also
asserts that each path is written plainly.

With openDox-code 71b631bc installed, the module and the layer-2 file
give 111 passed. The whole suite, loading the root conftest, gives 769
passed and 10 skipped. Against the run at 4582eac, the only
differences are the new cases, all passing. Each of the 12 planted
defects is still caught. The required job at this branch's own pin
(5c137a90) is unchanged, at 558 passed and 6 skipped.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 17:52
@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's third overview is review 5331400682 at 4582eac6: "Needs a closer look", no findings and no threads, "Two moderate conftest.py validation issues remain unresolved." It names neither issue. So I probed the loader at 4582eac with declarations that should not load. Five of them loaded, and d1fc5a2 refuses each one, naming its rule.

Two of the five, which nothing else caught:

  1. The check listed as an entry. Every run that loads the root conftest then drops tests/test_declared_exclusion.py, and with it the module's own guard against being listed. Here is the loader at 4582eac, with the check listed and the count moved to 67:

    $ python -m pytest -q > out.txt; echo rc=$?
    rc=0
    $ grep -F "excluded tests/test_declared_exclusion.py" out.txt
      excluded tests/test_declared_exclusion.py: doc_health
    $ tail -1 out.txt
    661 passed, 10 skipped in 25.97s
    

    The run is green, and the check's 102 cases are gone.

  2. One file listed twice under two spellings. tests/./test_canvas.py beside tests/test_canvas.py loads. The file counts 67 and the run prints "67 files", and no case in the module notices.

The other three. The test module caught these, but the conftest did not: a path with a doubled slash, an only that lists a file twice, and a reason whose ruled cites another ruling.

At d1fc5a2, each of the five is refused:

new REFUSES  the falsifier lists itself: tests/test_declared_exclusion.py is the check that holds this declaration, and as an entry it would drop out of every run that loads this conftest
new REFUSES  one file listed twice under two spellings: tests/./test_canvas.py is not written plainly, as tests/test_canvas.py, so one file could be listed twice under two spellings
new REFUSES  a path with a doubled slash: tests//test_canvas.py is not written plainly, as tests/test_canvas.py, so one file could be listed twice under two spellings
new REFUSES  only lists one file twice: the reason consumer-schemas's only lists a file twice
new REFUSES  a reason cites another ruling: the reason status-exemption-rail is ruled by R1Q24 (a), but its ruled reads 'R1Q6 (d), openxFactory#656 comment 5817152735'

The rules:

  • An entry's path must be written plainly, as PurePosixPath gives it back.
  • DECLARED_EXCLUSION_CHECK (tests/test_declared_exclusion.py) is never an entry. A new case holds that name to the module's own.
  • only lists each file once.
  • ADMITTED_REASONS is now a table of each reason's ruling, and a reason's ruled must start with its ruling. The module's RULED_REASONS is held to that table.

The declaration's header states the new rules.

The whole branch, measured. There are six new cases. With openDox-code 71b631bc installed:

  • The module and the layer-2 file give 111 passed.
  • The whole suite, loading the root conftest, gives 769 passed, 10 skipped. Its only differences from the run at 4582eac are the new cases, all passing.
  • The 12 planted defects are still caught, 12 of 12.

At #29's pin, 5c137a90, the required job is unchanged, at 558 passed, 6 skipped.

The PR stays a DRAFT, stacked on #29.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The stacked draft has an unresolved moderate validation issue (only: null) and requires human review before approval.

Review effort: Lite
Findings: None

Copilot's review of #30 at 4f579f8 (5332073424) left no thread. Its
summary names a moderate validation issue, "only: null". Measured true:
the loader read an optional key given as YAML null as if it were not
there. only: null on the doc_health or rail reason loaded, and so did
note: null on any entry. The consumer's schemas already refused it,
under R1Q25 (b)'s rule. With only: null added to the committed
declaration's rail reason, the root conftest at 4f579f8 loads it, and
the check module gives 201 passed.

The loader now holds a given only and a given note to their forms, null
included. The same plant then stops the run at the root conftest (exit
4), naming the rule.

The structural sweep only caught crashes, so a malformed value that
loaded went unseen. It now also fails on any variant that loads while
its value is malformed. A value is well formed where it went if it is
the value the place held, or one line of text where free text goes. It
also gives each optional key the sample lacks each odd value. At
4f579f8's loader it names the 7 null variants that load, and at this
one none load. It runs 861 variants.

Two broken declarations are new, an only and a note each given as null.
The plant is plant 28 in the mutation harness, and all 28 are caught.

With openDox-code 71b631bc installed, the module and the layer-2 file
give 206 passed. The whole suite, loading the root conftest, gives 864
passed and 10 skipped. Against the run at 4f579f8, the only differences
are the 2 new cases, and its printout is byte for byte what it was. The
evidence is unchanged, and the structural sweep of the committed
declaration still gives 0 crashes in 577. The required job at this
branch's own pin (5c137a90) is unchanged, at 558 passed and 6 skipped.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 21:07
@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's review at 4f579f82 (5332073424) left no thread. Its summary names "an unresolved moderate validation issue (only: null)". I measured it and it is true. 576b371 changes it.

The loader read an optional key given as YAML null as if the key were not there. Against 4f579f8's loader:

LOADS   only: null on doc_health
LOADS   only: null on the rail
REFUSES only: null on the consumer's schemas: ... is ruled for ['tests/test_snapshot.py'] alone, so its only must list exactly that, not None
LOADS   note: null on an entry
LOADS   note: null on the two-reason entry

I also put only: null on the committed declaration's rail reason. There, 4f579f8's root conftest loads it, and the check module gives 201 passed.

The loader now holds any only or note that is given to its form, null included. Each probe above is refused, naming its rule. The committed-declaration plant now stops the run at the root conftest (exit 4): "the reason status-exemption-rail's only is not a list of paths".

The structural sweep only caught crashes, so a malformed value that loaded went unseen. It now also fails on any variant that loads while its value is malformed. A value counts as well formed only if it is the value the place held, or one line of text where free text goes. The sweep also gives each optional key the sample lacks each odd value, so it now runs 861 variants. Run against 4f579f8's loader, it names the 7 null variants that load:

E       AssertionError: 7 of 861 malformed declarations load instead of being refused:
E         ('entries', 1, 'note') := None
E         ('reasons', 0) + only None
E         ('reasons', 1) + only None
E         ('reasons', 2) + only None
E         ('entries', 0) + note None
E         ('entries', 2) + note None
E         ('entries', 3) + note None

At 576b371, none of them load. There are two new broken declarations, an only and a note each given as null. The committed-declaration plant is plant 28 in the mutation harness, and all 28 plants are caught.

The summary also says the pull request needs a person's review before approval. It stays a DRAFT, stacked on #29, and goes to the holder once #29 lands and it has been re-measured at T040's pin.

With openDox-code 71b631bc installed:

  • The module and the layer-2 file give 206 passed.
  • The whole suite gives 864 passed, 10 skipped.

At this branch's own pin, 5c137a90, the required job still gives 558 passed, 6 skipped.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Fix the moderate failure-attribution gap allowing malformed doc_health module names.

Review effort: Lite
Findings: None

brettheap added a commit that referenced this pull request Sep 27, 2026
T041's new commit refuses an optional key given as null and holds the loads
to the sweep (root conftest.py, tests/test_declared_exclusion.py). It does
not touch this branch's one line in that module, the recursive glob in
test_the_whole_suite_collects_less_the_exclusion.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@brettheap
brettheap changed the base branch from build/034-t040-openxdox-pin-and-residue to main September 27, 2026 22:06
brettheap and others added 3 commits September 27, 2026 22:06
…o 2d116415

#29 (T040) landed as the squash commit d84b504, whose tree is #29's head
37fac9f's tree. This branch already carried every #29 commit but the last,
37fac9f ("bump the opendox pin to openDox-code 2d116415"), so the merge brings
one line: pyproject.toml's opendox pin, openDox-code 5c137a90 -> 2d116415.

The merge result's tree equals fe7c8d7, the local tree (576b371 with 37fac9f
merged) the PR body measured ahead at this pin. #30's base is now main.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…59099a)

test_the_whole_suite_collects_less_the_exclusion compares what a
collect-only run of the whole suite collects with the test files present,
and it globbed tests/test_*.py flat. Plan 034 T042 (#31, stacked on this
branch) adds tests/integration/, whose files pytest collects in the whole
suite, and its commit 759099a makes the glob recursive so the check reads
them as test files.

This takes that hunk here byte for byte: the file's blob is a75dc48, as on
#31's branch. So #31's diff to this file empties once it merges this head.
At this head no test file sits below tests/. The flat and recursive globs
give the same 90 files, and the case passes.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ives it

Copilot's review at 576b371 asks to close a failure-attribution gap that
let malformed doc_health module names through. Measured true at 576b371,
at the real pin (openDox-code 2d116415). The evidence took
No module named 'doc_health..x', 'doc_health.x.', 'doc_health..' and
'doc_health.x..y', raised in a test or at collection. A test planted in
tests/test_snapshot_validation_launch.py that raises the first of them was
hidden, and that file's alone case passed.

The gap was wider than malformed names. The evidence took any
doc_health.<name>, and a lone checkout never shows one. Where doc_health is
absent, the interpreter names doc_health itself, whichever of its modules
is imported. import doc_health.corpus, from doc_health import corpus, and
importlib on doc_health..x or doc_health.x. each raise
No module named 'doc_health' (Python 3.12.3). All 69 doc_health results the
listed files give alone show exactly that, at this pin and at 71b631bc. So
the evidence is now that one exception, matched whole, and a doc_health
result may show no other module. A result that names a module inside
doc_health, well formed or not, is unattributed.

Five evidence cases hold it, and 576b371's evidence took each of them:
- a module inside doc_health, in a test;
- the same, at collection;
- a doubled dot;
- a trailing dot;
- doc_health shown beside a module inside it.
The 233 real results are each taken by the same declared reason as
before, and all 66 files show exactly their reasons. The harness gains two
plants, one with a malformed name and one with a well-formed name. Both
were hidden at 576b371, and at this commit all 30 plants are caught.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 22:24
@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's review at 576b3710 (5332119770) left no thread. Its summary asks to "fix the moderate failure-attribution gap allowing malformed doc_health module names". I measured it and it is true, and the gap was wider than malformed names. 7000db6 fixes it.

Both runs are at the real pin, openDox-code 2d116415, after main was merged in (30beadb). The evidence probe, against 576b371's check module:

'doc_health'           in a test: ['doc_health']  at collection: ['doc_health']
'doc_health.corpus'    in a test: ['doc_health']  at collection: ['doc_health']
'doc_health..x'        in a test: ['doc_health']  at collection: ['doc_health']
'doc_health.x.'        in a test: ['doc_health']  at collection: ['doc_health']
'doc_health..'         in a test: ['doc_health']  at collection: ['doc_health']
'doc_health.x..y'      in a test: ['doc_health']  at collection: ['doc_health']
'doc_health.1x'        in a test: ['doc_health']  at collection: ['doc_health']
doc_health, with a module inside it shown too: ['doc_health']

I planted a test in tests/test_snapshot_validation_launch.py that raises ModuleNotFoundError("No module named 'doc_health..x'"). It was hidden: that file's alone case gave 1 passed. The same happened with 'doc_health.corpus'.

Why a module inside doc_health is refused too, and not only a malformed one. A lone checkout never shows one. Where doc_health is absent, the interpreter names doc_health itself, whichever of its modules is imported. On Python 3.12.3, each of these gives ModuleNotFoundError: No module named 'doc_health':

  • import doc_health.corpus;
  • from doc_health import corpus;
  • importlib.import_module('doc_health..x');
  • importlib.import_module('doc_health.x.').

All 69 doc_health results that the listed files give alone show exactly that exception, at this pin and at 71b631bc. No stored run has ever shown another name. The (?:\.[\w.]+)? in the old pattern came from the first commit, and no run called for it. So a well-formed doc_health.<name> gets into a result by the same route as a malformed one: something other than the import raised it. Refusing only the malformed names would have left that route open.

The fix. The cause is now that one exception, matched whole, and a doc_health result may show no other module. Five evidence cases hold it, and 576b371's evidence took each of them:

  • a module inside doc_health, in a test;
  • the same, at collection;
  • a doubled dot;
  • a trailing dot;
  • doc_health shown beside a module inside it.

At 7000db6, the probe above takes 'doc_health' alone. The plant is now refused:

E       AssertionError: tests/test_snapshot_validation_launch.py fails for a cause none of the four reasons names. The exclusion must not hide it:
E           test_planted_malformed_doc_health_module (failure): ModuleNotFoundError: No module named 'doc_health..x'

At 7000db6, installed as CI installs it (pip install -e ".[test]", Python 3.12.3, pytest 8.4.2):

  • The real results. Each of the 233 red results that the 66 files give alone is taken by the same declared reason as before, and every file shows exactly its reasons.
  • The module and the layer-2 file. 210 passed, which is 206 plus the four new cases.
  • The whole suite. 868 passed, 10 skipped, with 66 lines excluded. The exclusion printout is byte for byte the same as before.
  • The harness. Two plants are new: 29 is the malformed name and 30 is the well-formed one. Both were hidden at 576b371, and all 30 plants are caught.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Runner-seam tests currently exercise patched functions instead of the production call path.

Review effort: Lite
Findings: None

brettheap added a commit that referenced this pull request Sep 27, 2026
#30 now carries main (#29's squash, d84b504), so this branch's pin moves to
openDox-code 2d116415, the composition this PR lands in. It also took this
branch's recursive glob byte for byte (2769e8b), so this PR's diff to
tests/test_declared_exclusion.py empties, and it now takes doc_health's cause
only as a lone checkout's interpreter gives it (7000db6).

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ams alone

Copilot's review at 7000db6 says the runner-seam tests exercise patched
functions instead of the production call path. Measured true at 7000db6, at
the real pin (openDox-code 2d116415). The two refusal cases call the
patched seams by hand, workbench._default_runner and
SubprocessCommandRunner.run, so they pass whatever the production code
does.

In a scratch venv, two changes to openDox made both ports miss layer 2.
NotebookAdapter was made to bind the real nlm runner at import.
GhPullRequests was made to use a SubprocessCommandRunner subclass that
keeps the real run. Layer 1's shim then exits non-zero, and each port
degrades in silence. Under both changes, tests/test_hermeticity_runner_seams.py
still gave 3 passed. The whole suite less the exclusion still gave
868 passed, 10 skipped.

Two cases now drive the production call path, cli._notebook_port(...) and
cli._pull_request_port(...). Neither has a runner injected, and each goes
through a read (list_titled_result, find_open). Each must raise
HermeticityViolation through the port's own degradation. Under the
bypasses, each fails:
- the notebook case with DID NOT RAISE;
- the pull-request case with the port's own PullRequestRefused, which
  carries layer 1's refusal of gh pr list.
The whole suite then gives 2 failed, 868 passed, 10 skipped, and the two
failures are the new cases.

Without a bypass, the file gives 5 passed. The whole suite gives
870 passed, 10 skipped. The harness gains the two bypasses as plants 31
and 32. Both were hidden at 7000db6, and at this commit all 32 plants are
caught.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2026 22:41
@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's review at 7000db6d (5332409910) left no thread. Its summary says "runner-seam tests currently exercise patched functions instead of the production call path". I measured it and it is true. 5b0e1c3 adds two production-path cases.

Every run below is at the real pin, openDox-code 2d116415.

The gap. The two refusal cases call the patched seams directly: workbench._default_runner(...) and SubprocessCommandRunner().run(...). So they pass whatever the production code does. I checked this in a scratch venv, where openDox's two ports were made to skip the seam:

  • NotebookAdapter was made to bind the real nlm runner at import time;
  • GhPullRequests was made to use a SubprocessCommandRunner subclass that keeps the real run.

Both ports then miss layer 2. Layer 1's shim exits 97, and each port degrades in silence. At 7000db6, with both bypasses in place:

$ python -m pytest -q tests/test_hermeticity_runner_seams.py
3 passed
$ python -m pytest -q
868 passed, 10 skipped

The fix. Two cases now drive the production call path. They use cli._notebook_port(REPO_ROOT) and cli._pull_request_port(REPO_ROOT), the ports a CLI verb declares, with no runner injected. Each goes through a read, so a guard that failed would write nothing:

  • the notebook case calls list_titled_result;
  • the pull-request case calls find_open.

Each must raise HermeticityViolation through the port's own degradation. With the bypasses in place, at 5b0e1c3:

FAILED ...::test_the_cli_notebook_port_reaches_the_refusal_by_its_default_runner
E       Failed: DID NOT RAISE <class 'hermeticity.HermeticityViolation'>
FAILED ...::test_the_cli_pull_request_port_reaches_the_refusal_by_its_default_runner
E           opendox.session_pr.PullRequestRefused: XF-HERMETIC test hermeticity: refusing to run the real 'gh' binary.
E             refused argv:   gh pr list --repo opensoft/openXdox-code --head t041-hermeticity-probe --state open --json number,url,state --limit 1
2 failed, 868 passed, 10 skipped

The two failures are the new cases. The pull-request case shows the escape itself: the port turned layer 1's refusal into its own PullRequestRefused, which is the swallowed signal that layer 2 exists to stop.

At 5b0e1c3, installed as CI installs it:

  • Without a bypass. The file gives 5 passed, and the whole suite gives 870 passed, 10 skipped, with the exclusion printout the same as before.
  • With runner_seams() put back to its carved probe. All 5 of the file's cases fail.
  • The harness. The two bypasses are plants 31 and 32. Both were hidden at 7000db6, and all 32 plants are caught.

The two refusal cases stay as openDox-code's own copies. They still check what they always checked: that each seam, once patched, raises.

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

@sonarqubecloud

Copy link
Copy Markdown

brettheap added a commit that referenced this pull request Sep 27, 2026
T041's new commit adds cases to tests/test_hermeticity_runner_seams.py,
which is neither on the required job's named list nor in tests/integration/,
so the pinned triple does not move.

Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The changes affect exclusion semantics and hermeticity across 66 tests and warrant final human review.

Review effort: Lite
Findings: None

@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's review at 5b0e1c38 (5332487455) left no thread and names no defect. Its summary says the exclusion semantics and hermeticity changes "warrant final human review". That review belongs to the holder, and this PR now goes to it.

At this head, at T040's pin (openDox-code 2d116415):

  • validate and SonarCloud are green.
  • All 14 review threads are answered and resolved.
  • Each review summary since 576b3710 has its own answer: comments 5860399243 and 5860511479.
  • The measurements are in the body: the 233 real results, 212 passed, 870 passed, 10 skipped, 558 passed, 6 skipped, and 32 of 32 plants caught.

The points that need a person's call are in the body's Findings:

  • Findings 1: whether the two layer-2 commits (cb22294, 67a67bd, now with 5b0e1c3) stay here or move to T043.
  • Findings 2: the 5.4a suite tests/test_snapshot_validation_launch.py joins the exclusion on doc_health.
  • The departure from the plan's T041/T043 split, which the brief directed.

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

@brettheap

Copy link
Copy Markdown
Contributor Author

READY at 5b0e1c3 — Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 4 days and 15 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@brettheap

Copy link
Copy Markdown
Contributor Author

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

LANDED — lane openxfactory-4, 2026-09-27T22:49:07Z, PR #30 → 5fbd188 (opensoft/openXdox-code main; plain gate)

Brett: land the phase 1 PRs when green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants