You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
T037: restore the margin; the two mirrored skips leave for the composition (plan 034) - #55
Plan 034, task T037, slice P1-G (the whole suite in CI). The plan is specs/034-opendox-standalone-operation/tasks.md at opensoft/openxFactory maina9e7db75; T037's entry is unchanged since 133e37d9. This PR realizes box 9.4, openDox's half, of the ratified add-neutral-product-standalone-operability: "Restore the margin, and stop the skips carrying the gap".
Ruled: R1Q22 (a), as the task entry cites. See question 3 below about the "carved" wording.
The task entry reads: "Restore the margin over the floors. The two skips that mirror openXdox's gap assert for real." FR-006 adds: "Behaviour that needs both legs SHALL be declared integration tests at the declared composition" and "The margins SHALL be restored, with no skip carrying the gap."
The two skips
Of the 13 skips T036's whole suite pins, two carry the gap. Both are in tests/test_binding_stylesheets.py, a created file:
"no assembly has placed openXdox's six contributed modules in this bundle (RULED Q5)"
test_no_contributed_sheet_declares_a_design_token
"no assembly has placed a contributed stylesheet in this bundle (RULED Q5); openDox ships none of its own"
These are the "mirror image" the proposal names. openXdox's six skip for want of doc_health; these two skip for want of openXdox. In a lone openDox checkout they cannot assert for real. The modules and sheets are openXdox's package data, and openDox-code cannot install openXdox, because openXdox depends on openDox. So each needs both legs, and FR-006 sends that to the declared composition: openXdox-code, whose pyproject.toml pins this leg.
The other 11 skips are 8 in test_doxbench_bridge_live.py (no omp harness) and 3 in test_openprofiler_broker_e2e.py (no broker binary, another product's build artefact). Neither set needs openXdox, and neither is this task's.
What this PR moves, and where each case goes
Stays, and now asserts on every run:test_opendox_own_bundle_names_no_gate_exclusive_class. This was the openDox-only loop inside the re-derivation: openDox's own bundle (its views, app.js and index.html, comments blanked, the six excluded by name) names none of the 54 gate-loop classes. It needs no assembly. Measured over a corpus of 1.46 million characters, it holds.
Added, for Copilot's review at 7f98b46f:test_the_own_bundle_corpus_leaves_out_an_assembled_contributed_module. No run of this leg's suite has the six in its bundle, so the by-name exclusion was load-bearing and never exercised in the suite. The case assembles a throwaway bundle (one view of openDox's own, app.js, index.html, and all six modules, each naming a gate-only class). It asserts that the corpus reads the view and none of the six.
Leaves this leg:
case
destination
state
test_the_gate_exclusive_set_is_re_derived_where_the_modules_are_present, the half that reads the six
openXdox-code tests/integration/ (T042). There the six are placed in the pinned openDox's bundle on every run, so the derivation asserts for real: no class the six alone name is left in styles.css, and each of the 54 is named by one of the six
to land in T042
test_a_partial_assembly_is_a_failure_and_not_a_skip, with _assembled_views()
the same place, with the derivation. The rule existed so that a partial assembly could not hide behind that case's skip
to land in T042
test_no_contributed_sheet_declares_a_design_token
openXdox-code tests/test_gate_loop_views.py::test_no_contributed_sheet_declares_a_design_token, over every sheet that leg declares, on its required list. This leg's version also scanned an assembled bundle's views/**/*.css recursively; that scan goes to T042 with the derivation
already there at openXdox-code e28930bf
test_the_design_token_guard_sees_an_inline_declaration, with _declared_st_tokens()
openXdox-code tests/test_gate_loop_views.py::test_the_design_token_guard_sees_an_inline_declaration, with the same regex
already there at e28930bf
T049 checks that each arrived. The file's closing comment carries the same list.
Refactored, no behaviour change: the orphan scan's corpus and namer become _own_bundle_text() and _class_namer(), shared with the new case. Old and new give the same corpus, byte for byte, and the same answer on 628 tokens.
The margin
EXPECT_SKIPPED 13 → 11, and the floors move three below CI's reading instead of sitting on it. That is the reference implementation's rule, openxFactory pytest-suite.yml: "three below the lower of the two greens". The trade is stated in the pin, as the reference states it. A loss of up to three collected tests does not red on the floors alone. It still reds on the exact SKIPPED pin if the lost tests became skips, and on failures or errors if they failed.
Read from CI's two greens of one tree, and read twice:
tree
runs (jobs)
both printed
floors
8c03966a
36339183129 (108675776512), re-run (108676424965)
selected=2478 passed=2467 skipped=11
2475 / 2464
3dd66679
36340595113 (108679779797), re-run (108680366270)
selected=2479 passed=2468 skipped=11
2476 / 2465, one higher for the exclusion case
No jitter was measured between any two runs of one tree. A local replica read the same, which is a check, not the source. At b6b07351, where the floors moved to 2476 / 2465, run 36341050224 (job 108681071640) printed the same triple with margin 3 for both floors. So did run 36341364941 (job 108681982884) at this head, 5664fec3, whose one later commit changes comments only.
Measured
tests/test_binding_stylesheets.py: 18 passed, 0 skipped. It was 18 passed and 2 skipped: four cases left and two arrived.
The whole suite on CI: 2479 / 2468 / 11. That is T036's 2481 / 2468 / 13 less 2 selected and 2 skipped, with PASSED unchanged.
Planted, each caught (the controls stay green):
app.js emits "gatebar": the new case fails;
a view builds "refusalpanel-" + k: it fails on the prefix form;
index.html carries class="swb-notice": it fails;
a comment naming gatebar is a control, and stays green;
an assembled gate.js in the bundle is a control, and stays green, because it is excluded by name;
with that exclusion removed and gate.js placed, it fails, and so does the new exclusion case on its own throwaway bundle;
a class left behind in styles.css: the refactored orphan scan fails.
Also here: T036's docstrings, from Copilot's review of this PR
Thirteen test files still said, in the present tense, that validate runs them from an explicit list with --noconftest. That list ended with T036. Each claim now says the job ran the file that way until plan 034 T036 (f0d6170e, docstrings and comments only, no count moves). Where the property still holds, the file still says it is --noconftest safe. src/opendox/cli.py:1120 is left as it is, because its validate is openXdox-code's, and that one still runs two shape suites that way.
Copilot's reviews of this PR
head
overview
what it found
where it went
8c03966a
Changes recommended
the provisional local pin; present-tense --noconftest claims in test docstrings
pins read from CI's two greens (15923378); thirteen files swept (f0d6170e); both resolved
952af2cb
Needs a closer look
one more present-tense paragraph, in test_intent_binding_dom.py
fixed at 7f98b46f, resolved
7f98b46f
Needs a closer look
the by-name exclusion was never exercised in the suite
the exclusion case, 3dd66679; floors raised by one from two more runs, b6b07351
3dd66679
Changes recommended
the pin's arithmetic still read four out and one in
fixed at 5664fec3, answered on the thread
5664fec3
Needs a closer look, no findings
"Composition checks are removed before their T042 replacements exist in this checkout"
that is questions 2 and 3 below
Questions for Brett
Which reading of "Restore the margin". I read it as floors sitting below CI's reading, with a stated slack, on the reference's rule. That reverses a choice this repository made on 2026-09-18 (PR § 3.7 FLOOR PART 3, openDox side: the declared conformance factory and Q-F1's transposition #31: "a floor with slack in it is a floor that stops catching the regression it was set to catch"). The other reading keeps the floors on the reading, and treats the margin as the two skips becoming passes. That fails here, because the relocations lower SELECTED. With a different figure or reading, the change is the two numbers and a paragraph.
T042's text lists only T035's relocations. P1-J's slice row says "P1-G's relocated modules". This PR adds two cases to T042's list: the derivation half and the partial-assembly rule. T042 needs to take them, or a batch needs to add them.
openXdox-code has no tests/integration/ yet. T042 creates it. Until then, the two to-land rows above exist only as this list, and T049 is what checks that they arrive.
"The two skips sit in carved test files" (T037's entry).tests/test_binding_stylesheets.py is a created file with no carve-manifest row (RULED OQ-C), so R1Q22 (a) is not needed for it.
validate.yml's three pytest steps, their file lists and the comment
blocks beside them are gone; so is every line that named the flag that
switched the conftest chain off. The required job runs
`python -m pytest -q`, and pyproject.toml's testpaths (tests,
tests_runtime) is the suite (#1144 requirement 9, FR-006).
RULED R1Q8 (a): tests_runtime is part of the whole suite, with
PostgreSQL in the required job. The advisory runtime job is folded in,
as T036 allows: validate now carries its postgres:16 service, its
.[runtime,test] install and its DSN, so the DB-backed cases run once, in
the required check, and fail rather than skip under CI.
- pyproject.toml: testpaths = ["tests", "tests_runtime"]; the test extra
names opendox[runtime], because F9.1 installs .[test] alone.
- Pin the triple reads one report. A missing report is the only refusal
that fires then. The skip message names no test file (F9.1's second
assertion). The floors are PROVISIONAL (0/0/0) until CI's own reading
at the merged head.
- tests/test_triple_pin.py: one report, and a new case that holds the
report the pin reads equal to the one the pytest step writes.
- tests_runtime/test_deploy_shape.py: pins the one-job shape, the
service and extras in the required job, and one locked install.
- Prose the fold made false: tests_runtime/conftest.py,
test_runtime_surface.py, test_runtime_cli.py, docs/runtime.md and the
lock's header.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…an 034 T031)
Box 2.6: README.md:37-42 gave the narrowing's reason as the openDox ->
openXdox dependency. That dependency was inverted at import time first;
the live cause was the carved code's reaches into ideation_dashboard.
T036 ends the narrowing, so the paragraph now says what validate runs
(the whole suite, no exclusion) and records the cause.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
T035 emptied collect_ignore, so the seven modules it repaired now join
the whole suite this branch's `validate` runs. The pins are re-read from
CI's own run over this merge, not derived.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Run 36333569456 (job 108660020012) printed, over 56d51ed (main
80acead with T035's empty collect_ignore, merged into this change):
triple: selected=2459 passed=2446 skipped=13 failures=0 errors=0
The floors move from the provisional local replica (2170 / 2157) to
2459 / 2446, and SKIPPED stays exactly 13. T035's 289 cases
(`tests/` 1571 -> 1860 passed) are the whole difference; that is a
check on the reading, not its source.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… 034 T036)
From Copilot's review at 83fb977.
The one-run guard in tests_runtime/test_deploy_shape.py split a step's
script on `&&`, `;` and newlines only, so `python -m pytest ... ||
python -m pytest ...` read as one run: a failed first run followed by a
second, pinned one would have passed it. The count now splits on every
shell separator (`||`, a pipe, a background `&`, a subshell and a command
substitution as well; a redirection's `&` is not one) and also counts a
bare `pytest` command word. The new parametrized case
test_the_run_count_sees_every_shell_separator drives the count over
twelve scripts. Planted in the workflow, `||`, `|`, `|| pytest` and a
subshell pair each turn the shape case red; the old split counted the
`||` chain as one run.
Prose that still said the required `validate` job installs `.[test]`
alone is corrected. That covers the two places the review named
(tests_runtime/test_runtime_cli.py, tests_runtime/test_runtime_surface.py)
and the same claim wherever else it stood:
src/opendox/runtime/{__init__,config,db,migrations,cli}.py,
tests_runtime/{test_migration_shape,test_oidc_verifier,test_deploy_shape,
test_local_git_adapter}.py, tests/test_consumer_reach.py and a
pyproject.toml comment. The import-weight contract is unchanged:
test_runtime_surface.py measures it in a fresh interpreter, by the leak
it looks for, with the extra installed or not.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…n 034 T036)
From Copilot's reviews at 485e085 and b8623bf. The run count
recognized a bare `pytest` only as a command's first word, so
`env CI=true pytest -q tests_runtime` chained onto the step still read
as one run. It now counts the word wherever it stands in a command:
`python -m pytest`, a bare `pytest`, `env`, `timeout`, `uv run` and
`xargs` wrappers, `.venv/bin/pytest`, `sh -c` and `bash -c` programs,
and `pytest.main(` in a `python -c` one. The word inside a longer name
(`pytest-report.xml`, `pytest.ini`) is not counted.
It errs toward counting, and the parametrized case pins that direction:
a sentence that names the word bare counts. So the Pin step's
missing-report message now says "the test run" instead. The case now
drives the count over 22 scripts. Planted in the workflow, nine chained
or wrapped second runs each turn the shape case red. The previous
counter counted the review's `env` case as one run.
Also corrected: a comment in tests_runtime/test_runtime_cli.py that
still said the required job does not install the `runtime` extra.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Run 36337919108 (job 108672216615) printed, over db3e8a4:
triple: selected=2481 passed=2468 skipped=13 failures=0 errors=0
pins: selected>=2471 (margin 10) passed>=2458 (margin 10) skipped==13
The ten are the wrapped-run scripts test_the_run_count_sees_every_shell_separator
gained for Copilot's reviews at 485e085 and b8623bf. The floors move to
CI's reading, 2481 / 2468, and SKIPPED stays exactly 13.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
From Copilot's review at 13383a6: the note above `_COMMAND_SEPARATORS`
read as if the split still took only `&&`, `;` and newlines. It now says
the split takes every separator, and that the three-separator reading
was the first version's. Comment only; no count moves.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
From Copilot's review at ab86203, and a wider sweep for the same
claims:
- tests_runtime/test_api_endpoints.py, test_migrations_apply.py and
test_repository_act.py said they run in the `runtime` CI job. They
run in the required `validate` job, and fail rather than skip there
without a database.
- tests_runtime/test_deploy_shape.py said the REQUIRED job does not
install the `runtime` extra, and its missing-lock message named
"the three installs". There are two: the required job's and the
image's.
- src/opendox/runtime/identity.py, tests_runtime/test_runtime_surface.py,
tests_runtime/test_schema_shape.py and tests/test_consumer_reach.py
said the same thing about the required job's install.
Docstrings, comments and one assertion message only; no count moves.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ition (plan 034 T037)
Requirement 9.4, openDox's half: "Restore the margin, and stop the
skips carrying the gap". FR-006: "The margins SHALL be restored, with no
skip carrying the gap", and "Behaviour that needs both legs SHALL be
declared integration tests at the declared composition".
The two skips that mirror openXdox's gap were in
tests/test_binding_stylesheets.py. Both needed openXdox's six contributed
modules or its sheets, which this leg never ships (RULED Q5 places them
at assembly), so both skipped on every run of this leg's suite.
- test_the_gate_exclusive_set_is_re_derived_where_the_modules_are_present
leaves for openXdox-code's tests/integration/ (T042), where the six
are placed in the pinned openDox's bundle on every run. Its
openDox-only loop stays here as a new case that runs on every run:
test_opendox_own_bundle_names_no_gate_exclusive_class. It asserts
that openDox's own bundle names none of the 54 classes.
- test_no_contributed_sheet_declares_a_design_token is asserted for
real where the sheets are: openXdox-code's tests/test_gate_loop_views.py
carries a case of the same name, on that leg's required list.
- The two cases that served only them leave with them:
test_a_partial_assembly_is_a_failure_and_not_a_skip, with
_assembled_views(), goes to T042 too, and the token guard's negative
control is identical at openXdox-code.
The orphan scan's corpus and namer are factored into _own_bundle_text()
and _class_namer(). They are shared with the new case and give the same
answer on 628 tokens.
The pin: SELECTED -3, PASSED -1, SKIPPED 13 -> 11. The floors sit three
below the reading, the reference implementation's rule (openxFactory
pytest-suite.yml, "three below the lower of the two greens"), with the
trade stated. They are PROVISIONAL at this commit: three below a local
replica (2478 / 2467 / 11). CI's own two readings replace it.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This PR consolidates CI around the full PostgreSQL-backed test suite, relocates composition-dependent stylesheet checks, and restores collection-margin slack.
Changes:
Updates CI workflow, dependency extras, test paths, and triple-pin handling.
Retains standalone stylesheet checks while moving cross-leg coverage.
Refreshes runtime documentation and import-contract references.
File
Description
tests/test_triple_pin.py
Adapts pin tests to the consolidated report.
tests/test_consumer_reach.py
Updates runtime-extra documentation.
tests/test_binding_stylesheets.py
Retains standalone checks; composition coverage is not yet present in the current composition.
tests_runtime/test_schema_shape.py
Updates CI environment documentation.
tests_runtime/test_runtime_surface.py
Updates import-contract coverage; the extra-free absence assertion needs correction.
tests_runtime/test_runtime_cli.py
Updates runtime test references.
tests_runtime/test_repository_act.py
Updates CI job documentation.
tests_runtime/test_oidc_verifier.py
Updates CI job documentation.
tests_runtime/test_migrations_apply.py
Updates database test documentation.
tests_runtime/test_migration_shape.py
Updates hermetic-test documentation.
tests_runtime/test_local_git_adapter.py
Corrects historical CI wording.
tests_runtime/test_deploy_shape.py
Validates the consolidated workflow.
tests_runtime/test_api_endpoints.py
Updates database test documentation.
tests_runtime/conftest.py
Repoints database fixtures to validate.
src/opendox/runtime/migrations.py
Updates import-weight documentation.
src/opendox/runtime/identity.py
Updates import-weight documentation.
src/opendox/runtime/db.py
Updates runtime-extra documentation.
src/opendox/runtime/config.py
Updates import-contract documentation.
src/opendox/runtime/cli.py
Updates runtime-extra documentation.
src/opendox/runtime/__init__.py
Clarifies the import-weight contract.
README.md
Documents whole-suite validation.
pyproject.toml
Adds runtime test dependencies and test paths.
docs/runtime.md
Updates test layout and CI status.
constraints-cpython312-linux.txt
Updates dependency-lock documentation.
.github/workflows/validate.yml
Consolidates CI and adjusts floors; the provisional local pin and stale CI-shape documentation remain unresolved.
Run 36339183129 (job 108675776512) over 8c03966, and its re-run (job
108676424965) over the same tree, both printed:
triple: selected=2478 passed=2467 skipped=11 failures=0 errors=0
pins: selected>=2475 (margin 3) passed>=2464 (margin 3) skipped==11
No jitter was measured, and three below the lower of the two is 2475 /
2464. The numbers are unchanged; the pin comment now cites the runs
instead of the local replica.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
From Copilot's review of #55 at 8c03966. Test docstrings still said, in
the present tense, that `validate` runs them from an explicit list with
`--noconftest`. That list ended with T036, whose required job runs the
whole suite with the conftest chain. Each claim now says the job ran the
file that way until plan 034 T036. Where the property still holds, the
file still says it is `--noconftest` safe.
Files: tests/test_{binding_stylesheets,consumer_reach,doxbench_seams,
gate_loop_contributed,health_check_seam,intent_binding_dom,
intent_binding_shape,profile_registration,session_notebook_membership,
source_core_arm,split_route_tails,view_registry,web_boundary}.py.
Docstrings and comments only; no count moves. src/opendox/cli.py:1120
is left as it is: its `validate` is openXdox-code's, which still runs
two shape suites that way.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
T036 landed as a squash of the commits this branch already carries, so
main's tree equals 1808146's, the head it landed from. Three regions of
the Pin step conflicted, where this branch moves what T036 set: the
rise-rule sentence, the floors' heading, and the floors themselves. They
resolve to this branch's side. The merged tree is byte-identical to this
branch's tree before the merge (edbecc0).
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…36, T037)
From Copilot's review of #55 at 952af2c. tests/test_intent_binding_dom.py
still said, in its header, that it is in validate's explicit list and
that the required check runs it from there. The list ended with T036,
and the paragraph now says so: S8 put the file on the list, T036 ended
the list, and the required check now runs the whole suite. Docstring
only.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add coverage for excluding gate-only classes from assembled bundles
tests/test_binding_stylesheets.py:315
This exclusion is the load-bearing behavior for an assembled bundle, but the changed code has no automated test that exercises it. On this leg src/opendox/web/views/ contains none of the six names, so both _own_bundle_text() and test_opendox_own_bundle_names_no_gate_exclusive_class() always take the no-assembly path; removing if p.name not in GATE_MODULES would therefore leave this suite green while reintroducing the false ownership bug. Add a focused temporary-bundle test (or equivalent integration coverage in the declared composition) that places a contributed module containing a gate-only class and verifies the own-bundle corpus does not report that class.
From Copilot's review of #55 at 7f98b46. No run of this leg's suite has
openXdox's six modules in its bundle, so `_own_bundle_text()` never had
anything to leave out, and dropping its by-name exclusion left the suite
green. The new case assembles a throwaway bundle: one view of openDox's
own, `app.js`, `index.html`, and all six contributed modules, each naming
a gate-only class. It asserts that the corpus reads the view and none of
the six. With the exclusion removed, the case fails.
One case more: SELECTED +1, PASSED +1. The floors follow in the next
commit, read from CI.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Run 36340595113 (job 108679779797) over 3dd6667, and its re-run (job
108680366270) over the same tree, both printed:
triple: selected=2479 passed=2468 skipped=11 failures=0 errors=0
pins: selected>=2475 (margin 4) passed>=2464 (margin 4) skipped==11
The one case added is
test_the_own_bundle_corpus_leaves_out_an_assembled_contributed_module. So
that the margin stays three, the floors rise by one, to 2476 / 2465.
SKIPPED stays exactly 11.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
From Copilot's reviews of #55 at 3dd6667 and b6b0735. The pin's first
reason still gave the arithmetic from before the exclusion case: four
cases out and one in. It now says four out and two in, so SELECTED -2,
PASSED 0 and SKIPPED -2, which is what CI reads (2481 / 2468 / 13 ->
2479 / 2468 / 11). The `GATE_MODULES` note now says that the exclusion
case writes stand-ins under those names. Its `=` also gets back the
space an earlier edit dropped. Comments only; no count moves.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
T052's branch was cut from main 80acead. main has since landed T036 (the
required check runs the whole suite) and T037 (the margin). This takes
main at 2d11641, so the PR is measured against the whole-suite check it
will be judged by. There is no conflict: T052's five files and main's
changes are disjoint.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Phase 1 is closing (T049, openxFactory#1204), and phase-2 PRs go READY
after it. This branch was one commit behind main. The merge brings in
T037's floors and its binding-stylesheet cases, and touches no file this
branch adds.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Phase 1 has closed (T049, openxFactory#1204 -> 9d2e5bc3), and phase-2 PRs
go READY after it. This branch was one commit behind main. The merge brings
in T037's floors and its binding-stylesheet cases, and touches no file this
branch adds.
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 **T050**, slice P2-F (fixtures). Plan read at opensoft/openxFactory `main` `133e37d9` (`specs/034-opendox-standalone-operation/tasks.md` § "Phase 2 writer slices"), after #1167 (the phase-1 gate) merged, and re-read at `main` `9d2e5bc3`: T050's entry is unchanged. Authored ahead under the phase-2 draft-ahead ruling (`openxFactory#656` comment `5857365170`, Brett Heap: *"Start phase 2's independent tasks (Recommended)"* and *"Draft ahead in phase 1"*).
**T049 has landed** (openxFactory#1204 → `9d2e5bc3`, 2026-09-29T16:08:37Z), so phase 2 is open. T050 is `After: T049, T009`, and both are done. It is the one phase-2 openDox-code task that does not wait for T053. This PR stays a draft until the holder un-drafts it.
Claim: `openxFactory#656` comment [`5857512479`](opensoft/openXfactory#656 (comment)).
## What this realizes
Box **5.0** — `tests/fixtures/plain-documents/`, a handful of `.md` documents spread across the six stations, per RULED **R1Q13 (a) with (c)** (`5850003126`): *"A neutral front-matter key names the stage role... and a document that declares nothing is a source, and groups derive from shared topics. The fixture yields at least one group."*
- Three **sources** (no `stage:` header at all): `notes-rain-barrel-leak.md` and `notes-rain-barrel-overflow.md` share the phrase "rain barrel" verbatim, so a future topic-based grouping pass (T054) has a pair to find; `notes-toolshed-inventory.md` shares no topic with them, so the fixture doesn't group by accident.
- One document each declaring `stage: grouping`, `stage: candidate`, `stage: selection`, `stage: submission`, `stage: completion` — the exact `opendox.display_profile.STAGE_ROLES` spellings.
- Every document carries the small neutral field set the task line names (`title`, `summary`).
## Falsifier
T050's task line: *"A test keeps the fixture free of those words... **Falsifier**: the vocabulary test."* `tests/test_plain_documents_fixture.py`, passing:
```
$ python -m pytest -q tests/test_plain_documents_fixture.py --noconftest
.................... [100%]
20 passed in 0.09s
```
It asserts, over every file in the fixture:
1. no occurrence (case-insensitive, whole word) of the eight controlled `Status:` words this project's own root `CLAUDE.md` names (`brainstorm | staged | draft | ratified | standard | superseded | retired | record`) or the change/spec/delta nouns (`change(s)`, `spec(s)`, `delta(s)`, `openspec`, `proposal(s)`) — the same two families `tests/test_default_profile.py`, `tests/test_web_boundary.py` and `tests/test_display_facet.py` already carry, copied on the same footing (a fixture must be readable as plain prose with no import, exactly as the eventual acceptance harness reads it);
2. every one of the six stations is occupied, with exactly one document per explicit station;
3. at least two (but not all) sources share `"rain barrel"`.
## Updated after T036 + T031 landed (#52) — merged main in, no conflicts
Opened against a pre-T036 `main`. `main` then landed **T036 + T031** ("the required check runs the whole suite"): `validate.yml`'s explicit pytest file list is gone, `python -m pytest -q` now runs `testpaths` (`tests`, `tests_runtime`) whole, and there is no narrowed list left to join. Merged `main` (`5519433`) into this branch, no conflicts (only new files were added here). Consequences:
- `tests/test_plain_documents_fixture.py` is picked up by the required `validate` check automatically now — no separate wiring step needed, and the earlier note below about joining an explicit list no longer applies.
- Re-ran locally post-merge with the full conftest chain active (not `--noconftest`): `python -m pytest -q tests/test_plain_documents_fixture.py` → `20 passed in 0.39s`.
- `validate`'s new "Pin the triple" step floors `selected`/`passed` at `>=` and pins `skipped` at `==13` exactly. This PR only adds 20 new, passing, non-skipped cases, which raises `selected`/`passed` (floors permit a rise) and leaves `skipped` at 13 (unchanged) — so the pin does not need to move.
Original proof, still valid at the pre-merge head (`d5d1aa4e`), retained for the record:
```
$ python -m pytest -q tests/test_plain_documents_fixture.py --noconftest
.................... [100%]
20 passed in 0.09s
```
```
$ python -m pytest -q tests/test_leg_shape.py tests/test_consumer_reach.py tests/test_profile_registration.py tests/test_web_boundary.py tests/test_intent_binding_shape.py tests/test_view_registry.py tests/test_split_route_tails.py tests/test_source_core_arm.py tests/test_gate_loop_contributed.py tests/test_display_facet.py tests/test_account_menu_dom.py tests/test_doc_wheel.py tests/test_doxbench_accessibility.py tests/test_doxbench_context_panes.py tests/test_doxbench_document_abstract.py tests/test_doxbench_hash.py tests/test_doxbench_knowledge.py tests/test_doxbench_privacy.py tests/test_doxbench_proposal_discard.py tests/test_doxbench_proposals.py tests/test_doxbench_state.py tests/test_doxbench_thread_switch.py tests/test_doxbench_workspace.py tests/test_intent_binding_dom.py tests/test_lens_labels_at_scale.py tests/test_smoke_signals.py tests/test_wheel_paint_and_reach.py tests/test_binding_stylesheets.py tests/test_conformance_corpus.py tests/test_triple_pin.py --noconftest
772 passed, 2 skipped in 30.70s
```
(That allowlist was `validate.yml`'s own explicit file list at the pre-merge head; it no longer exists as such post-T036, superseded by the whole-suite run above.)
## Updated after T049 landed: main merged in, and one stale paragraph corrected
- **Merged `main` `2d116415`** (T037, #55) as `8defc37`. The branch was one commit behind. The merge touches no file this PR adds.
- **`521de95`: the module docstring's T036 paragraph.** It said this suite was "not yet wired" into `validate.yml`'s explicit list and ran by node id. That has been false since T036 (#52) made `validate` run the whole suite. It now says that the required check collects this suite like every other. The text is #57's correction of the same paragraph, byte for byte. Copilot raised it there (r4117299033). It is taken here because the paragraph is already false at `main`. When #57 takes this head, that hunk merges clean.
- The opening sentence ("T052 and T054 ... have not landed") is unchanged. It stays true until T054 lands, and #57 corrects it.
At `521de95`, locally, as CI runs it (`CI=true`, `LANG=C.UTF-8`, PostgreSQL 16, `-e ".[runtime,test]"` under the lock):
```
$ python -m pytest -q tests/test_plain_documents_fixture.py
20 passed in 0.27s
$ python -m pytest -q --junitxml=… # the whole suite, as `validate` runs it
2488 passed, 11 skipped, 2 warnings in 199.75s (0:03:19)
triple: selected=2499 passed=2488 skipped=11 failures=0 errors=0
```
That is `main`'s triple plus this PR's 20 passing cases. SKIPPED stays at the pinned 11.
## Review rounds after T049: Copilot, two threads, both taken
The claim above, that `notes-toolshed-inventory.md` "shares no topic with them", was stronger than the case that held it. The case showed only that the note lacks the literal phrase "rain barrel".
- **r4135803935 (at `521de95c`)**: a fixture edit that gave the sources another shared topic would still pass. `7028f613` compared the words of each document's name and direct naming between the two sides.
- **r4135883800 (at `7028f613`)**: that still missed a topic shared through a third document. If both sides name the same other document, both inherit its name words. `4ba410ff` takes it.
- The case now derives each source's whole topic set: the words of its name, plus the name words of every other fixture document it names, whatever that document's station.
- It then compares whole sets, which catches a common name word, one source naming the other, and both naming the same third document.
- Only "the" and "and" are dropped, so the comparison is stricter than a topic rule with a longer stop list, never looser.
- **The same review's overview** asked that the intended source declaration and count be enforced. The module docstring states both, so the cases now hold them:
- no document declares `stage: source`, because a source here is a document that declares nothing (R1Q13 (a) with (c));
- there are three sources, two of which share "rain barrel".
Six plants each turn the cases red at `4ba410ff`:
| plant | at `4ba410ff` | at `7028f613` |
|---|---|---|
| "garden" in the toolshed title and the leak title | red | red |
| the toolshed note names `notes-rain-barrel-leak.md` | red | red |
| the overflow note names "What is actually in the toolshed" | red | red |
| both the toolshed note and the leak note name `grouping-compost-corner.md` | red | passed |
| `stage: source` on the toolshed note | red | red |
| a fourth source | red | passed |
- The real fixture passes, still 20 cases, so the triple does not move.
- The projection's own reading, that the toolshed note lands in no group, needs T054's topic rule, which is not in this tree. #57's next round adds that assertion to T054's projection test.
## Sibling task T051
T051 (`tests/fixtures/malformed`) is this same slice (P2-F). It depends on **P2-S/T053** (the neutral snapshot schema, `openDox-spec`), which was unclaimed when this PR opened, so T051 was held rather than guessed at. T053 is now stable (`openDox-spec#16` at `cd49eb25`, per the holder), and T051 is opened as its own DRAFT PR.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Plan 034, task **T051**, slice P2-F (fixtures). Plan read at opensoft/openxFactory `main` `133e37d9` (`specs/034-opendox-standalone-operation/tasks.md` § "Phase 2 writer slices"), and re-read at `main` `9d2e5bc3`: T051's entry is unchanged. Authored ahead under the phase-2 draft-ahead ruling (`openxFactory#656` comment `5857365170`).
**T049 has landed** (openxFactory#1204 → `9d2e5bc3`), so phase 2 is open. T051 is `After: T050, T053`, and **both have landed**: #53 (T050) → `dc3765dd`, and openDox-spec#16 (T053) → `f7ee3c76`. The landed `contracts/schemas/opendox-snapshot.schema.yaml` is byte for byte the file at `cd49eb25` that this fixture was built against (sha256 `f9e3e111…`), so the fixture and `EXPECTED_RULE` stand as written. This PR stays a draft until the holder un-drafts it.
Claim: `openxFactory#656` comment [`5857512479`](opensoft/openXfactory#656 (comment)) (P2-F, both T050 and T051). Held on opening until T053 (P2-S) was readable; the coordinator confirmed it as **`openDox-spec#16` at `cd49eb25`** (32 rules) and directed the exact rule to violate.
## What this realizes
Box **7.0** — `tests/fixtures/malformed`: exactly one violation of a rule of the neutral snapshot schema T053 adds (R1Q12 (a)), and an `EXPECTED_RULE` file holding that rule's identifier.
Read `openDox-spec#16`'s schema (`contracts/schemas/opendox-snapshot.schema.yaml`) and its own examples directly rather than guessing:
- `documents[].title` and `documents[].summary` are each `"type": ["string", "null"], "minLength": 1`, under `x-rule: title-and-summary-are-text` — *"A document's title and summary are each non-empty text, or null."* openDox-spec's own `opendox-snapshot-no-front-matter.example.yaml` (VALID) shows `title: null, summary: null` for a document with no declared front matter at all; its `negative/opendox-snapshot-title-and-summary-are-text.negative.yaml` (INVALID) is that same shape with one document's `title` changed to `""` — an empty string is the one value that is neither `null` nor non-empty text.
- The holder's decision: T054 (the neutral projection, not yet built) will copy a document's declared `title`/`summary` **verbatim**, never coercing an empty declared value to `null` and never excluding the document because of it — so a plain document whose `title:` header line is present-but-empty carries that exact defect through into the generated snapshot.
This fixture realizes that at the plain-repository level, the only level T051 owns (T054/T057's projection and validator do not exist yet — this PR adds no code, only fixture data + the sentinel file, matching T050's footing before it):
- `tests/fixtures/malformed/notes-bee-boxes.md` — an ordinary, fully valid source document (non-empty `title:` and `summary:`).
- `tests/fixtures/malformed/notes-empty-title.md` — `title:` declared with nothing after the colon (present in the header, empty string once parsed) and an ordinary, valid `summary:`. Exactly one property on exactly one document is wrong; verified by hand-parsing both files with the same `Name: value`-up-to-blank-line convention `LocalGitCorpus._header_of` and T050's fixture use:
```
$ python3 -c "
from pathlib import Path
for name in ['notes-bee-boxes.md', 'notes-empty-title.md']:
text = Path('tests/fixtures/malformed', name).read_text()
lines = text.splitlines(); header = {}
for line in lines:
if not line.strip(): break
n, sep, v = line.partition(':')
if sep: header[n.strip()] = v.strip()
print(name, '->', header)
"
notes-bee-boxes.md -> {'title': 'Setting up two new bee boxes', 'summary': 'Where the new hives will go, and how far from the path.'}
notes-empty-title.md -> {'title': '', 'summary': 'A short summary is here; only the title line is declared and left empty.'}
```
- `tests/fixtures/malformed/EXPECTED_RULE` — one line, `title-and-summary-are-text`, the holder-directed rule identifier verbatim.
No banned vocabulary either (not this task's own falsifier, but checked against T050's word lists for consistency — zero hits in both `.md` files).
## Falsifier
T051's task line names none of its own: **"Falsifier: used by F7.2"** (a later, not-yet-built falsifier — `tests/test_plain_documents_fixture.py`-style coverage does not apply here). This PR is fixture-only, on the same footing T050 was before it.
## The repo's own suite, unaffected
Only new files under `tests/fixtures/malformed/` are added, and nothing existing changed. This branch is current with `main` `2d116415` (T037, #55), merged as `44dcc3a` after T049 landed. Since T036 (#52) the whole suite runs as one `validate` job, with no explicit file list. New fixture data under `tests/fixtures/` is not collected by pytest (it carries no `test_*.py`), so `validate`'s "Pin the triple" step reads `main`'s triple here. Since T037 its floors are `MIN_SELECTED=2476` and `MIN_PASSED=2465`, with `EXPECT_SKIPPED==11`. The triple it reads at this branch's head is in its PR checks.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…erator (plan 034) (#54)
**Authored ahead, as a phase-2 draft.** Brett's RULING on openxFactory#656, comment `5857365170` ("Start phase 2's independent tasks"), names T052 among the phase-2 tasks authored as drafts. **T049 has landed** (openxFactory#1204 → `9d2e5bc3`), so phase 2 is open. T052 is `After: T049, T009, T053`, and **T053 has landed**: openDox-spec#16 → `f7ee3c76`. This PR stays a draft until the holder un-drafts it.
Plan 034, **T052 (5.4: declare the generator seam)**, phase-2 slice **P2-G**. The plan was read at openxFactory `main` `133e37d9` (`specs/034-opendox-standalone-operation/tasks.md`), and re-read at `9d2e5bc3`, where T052's entry is unchanged. The slice is claimed on openxFactory#656, comment `5857453864`. The branch was cut from openDox-code `main` `80acead1`, and `main` `2d116415` (T036 #52, T037 #55) is merged in.
## What it declares
Box 5.4 of #1144 reads *"DECLARE THE GENERATOR SEAM — it does not exist and `CorpusAdapter` is not it"*, and asks for three things. The new module is `src/opendox/generator_seam.py`, beside `domain_profile.py`.
- **The operation handed over**: `generate(repo_root, repository, *, source_revision=None, generated_at=None, **inputs)`, which answers the snapshot, a `dict`.
- These are the four arguments openDox's generate verbs already hand a generator.
- A governed generator's own extras, such as `project_register_source` and `possibles_source`, travel as **declared inputs**. So the seam neither drops them nor names them.
- **The registration point, beside `domain_profile.register()`**. A host calls `opendox.generator_seam.register(<SnapshotGenerator>)` once, at process start. Entry points call `register_default(...)`, which registers only where nothing is registered. `current()`, `is_registered()` and `unregister()` complete the registry, in `domain_profile`'s shape.
- **The conformance a contributed generator must meet**. `SnapshotGenerator(contract, generate, inputs=())` declares it, and `generate()` enforces it:
1. It declares the contract it writes, which is the `kind` of every snapshot it answers.
2. Its operation takes the seam's call, and **each declared input is optional**, because the seam passes an input only when the caller has a value for it. The seam checks this against the signature when the declaration is made. It binds the call once with every declared input given and once with none given, and every call the seam can make lies between the two.
3. It declares every further input it reads. An undeclared input is refused before the generator is called (`GeneratorInputRefused`), and an input given as `None` is simply not passed.
4. It answers a `dict` whose `kind` is its declared contract and whose `schema_version` is an integer. Anything else is refused (`GeneratorNotConformant`) and not handed on. So two generators that write two contracts can never both claim to be the one conformant implementation, which is the failure 5.4 was raised against.
5. It is deterministic over its inputs. That is declared, and each generator's own suite proves it.
- **The conformance clause names T053's neutral kind for openDox's own generator**. `NEUTRAL_SNAPSHOT_KIND = "opendox-snapshot"` equals the `kind` const of openDox-spec#16's `contracts/schemas/opendox-snapshot.schema.yaml`. It was read at `bcff47d4`, and it is unchanged at #16's last head `cd49eb25` and in the landed `f7ee3c76` (`"kind": {"x-rule": "kind-is-opendox-snapshot", "const": "opendox-snapshot"}`). `register_default()` refuses a declaration that writes any other contract. A contributor declares its own contract, as openXdox's governed generator will.
- **The entry points register openDox's own generator where no host has** (R1Q10 (a), `5850003126`, in R1Q3 (a)'s pattern). `cli.build_parser()`, `cli.main()`, `serve.build_server()` and `serve.main()` each gain one line, `generator_seam.register_default(default_generator.GENERATOR)`, beside their registrations of the default profile and the default home corpus. As for the profile:
- a bare process that builds nothing still meets `GeneratorNotRegistered`, which names the seam and the call;
- a host registration made before anything has been generated from the default replaces it;
- one made after a snapshot has been generated from it is refused (`GeneratorAlreadyRegistered`), for the reason RN-1 (a) gives for the profile;
- one made **while** a snapshot is being generated from it is refused too, because that snapshot would come back after the swap;
- a generation that fails, or whose answer the seam refuses, wrote nothing. So it records nothing, and a host still replaces the default after it.
- **Each registration keeps its own records.** Every change of registration goes through one helper that moves a registration serial on and starts the records afresh: `register()`, `register_default()` where it registers, and `unregister()`. A generation carries the serial it began under. So one that outlives its registration records nothing against the next one, even a later registration of the same declaration, and its caller still gets its snapshot.
- **One lock.** The registry's bookkeeping is kept under one `threading.Lock`, because `serve.py`'s `ThreadingHTTPServer` answers each request on a thread of its own. `generate()` holds it only to resolve and mark, and to record the end, and never across the generator's own call. So a generator may register, unregister or generate from inside its own call.
- **`CorpusAdapter` stays closed at six members.** A test pins `OPERATIONS` to the six and the protocol to `OPERATIONS`.
## Why openDox's own generator refuses until T054
`src/opendox/default_generator.py` declares openDox's own generator: contract `opendox-snapshot`, and no inputs. Its `generate()` raises `NeutralProjectionNotBuilt`, which names itself and T054, and it generates nothing. It never answers an empty snapshot. Because that refusal writes nothing, it shuts no host out.
That follows from the plan's order:
- T054, the neutral projection, is `After: T050, T052, T053`.
- T054 edits neither `cli.py` nor `serve.py`, whose single-writer chains run T052, then T055 (plan.md; W2-14 put T052 in both chains).
- So the registration calls are this task's, and the projection behind them is T054's.
No verb reaches the seam yet. The generate verbs still call the consumer's generator through `consumer_reach` (`cli.py:90`) until T055 routes them, and T055 is after T054. The refusal is therefore reachable only by a library caller that uses the seam directly.
## Files
| file | change |
|---|---|
| `src/opendox/generator_seam.py` | new: the seam, its declaration type and its refusals |
| `src/opendox/default_generator.py` | new: openDox's own generator's declaration |
| `tests/test_generator_seam.py` | new: the seam tests (71 cases) |
| `src/opendox/cli.py` | +9: one import, and one registration line in each of `build_parser()` and `main()` |
| `src/opendox/serve.py` | +9: one import, and one registration line in each of `build_server()` and `main()` |
The PR stays out of `conftest.py`, `pyproject.toml`, `validate.yml`, `README.md` and every pin.
## Review round 1: Copilot at `834f8ead`, two findings, both taken
Commit `4ca45d27` addresses both findings.
- **r4116122374, a declared input the operation cannot do without.** The declaration bound the call with every declared input given. But `generate()` drops a `None` input, so an operation that *requires* a declared input was accepted, and then failed with a raw `TypeError` whenever the option was unset. The declaration now binds the call a second time with none of the declared inputs given, and refuses such an operation when it is declared. The regression case is `test_a_declared_input_the_operation_cannot_do_without_is_refused`, which covers the input required by keyword and by position. openXdox's `generate_snapshot` takes both of its extras with a default of `None`, so T059's declaration passes both binds. `test_a_governed_generators_shape_is_declarable` now also generates through that shape with its inputs unset, and with one of them set.
- **r4116122388, the default's window closed before its operation ran.** The generation from the default was recorded before the call. So a failed generation, openDox's own pre-T054 refusal included, shut every host out although it wrote nothing. That contradicted the documented rule. The record is now made only once a conformant snapshot comes back. The property the early record gave, that no registration slips in during a first generation, is kept by a count of the generations from the default that are under way. That count and the record are updated under one lock, never held across the call.
- The regression cases:
- `test_openDoxs_own_generator_refuses_until_its_projection_lands` is Copilot's exact scenario: the real default refuses, then a host registers.
- `test_a_generation_from_the_default_that_wrote_nothing_is_not_a_generation` runs twice: once for an operation that raises, and once for an answer the seam refuses.
- `test_a_host_is_refused_while_a_generation_from_the_default_is_under_way` runs three times: the generation answers, raises, or answers another kind. It runs on a thread, and the host is refused during the generation every time. Afterwards the host is refused only after the conformant answer.
- `test_a_generator_may_register_or_generate_from_inside_its_own_call` covers nesting, registering from inside the call, and a default swapped out from inside its own call.
- The concurrency and re-entrancy cases run in a process of their own with a time limit. So a lock held across a call fails them, rather than hanging the suite.
**The new cases pin the findings.** The new test file was run against `834f8ead`'s seam logic. A one-line shim adds the counter attribute, so that the fixture can save it, and the old logic never reads it. 8 of the 66 go red: the declared-input case, the pre-T054 default case, the two wrote-nothing cases, the three under-way cases and the re-entrant case.
## Review round 2: the seam finding in Copilot's overview of openDox-code#57
T054's branch (#57) stacks on this one. Copilot's overview of #57 at `c0747e96` said that *"replacement-generator tracking can reject valid registrations"*. It opened no thread, so there was no scenario to answer. The claim is **real**. There are two cases, and both were reproduced at `4ca45d27`:
1. **The count of generations under way was global**, not tied to the registration it counted. `unregister()` drops a default while a generation from it still runs. Then a fresh default is registered, and a host over it is refused with *"a snapshot is being generated from it now"*, although nothing is.
2. **A generation that outlived its registration recorded its late answer against a fresh registration of the same declaration.** That shut the fresh window, against `unregister()`'s own promise that the record goes with the registration.
Commit `bce09c50` addresses both, in the form described under **Each registration keeps its own records** above. Commit `97b5b01f` moves one new docstring sentence so that #57 takes this head without a conflict. A trial merge of this head into #57's head `5a6fe637` is clean, and 94 seam and projection cases pass in the merged tree.
- **The regression case** is `test_a_generation_that_outlives_its_registration_touches_no_later_one`. It runs in four variants, in a process of its own. The follower is another default or the same declaration, and the host registers either while the generation runs or after it answers.
- Against `4ca45d27`'s seam logic, with a one-line shim for the new serial, **3 of the 4 go red**.
- The fourth (a host after the answer, over another default) was already right there, and it guards the new scoping. M12 turns all four red.
- `test_unregister_clears_the_default_and_its_generation` now registers the same default afresh before the host tries. So it also catches a helper that forgets to reset the record (M15).
## Review round 3: Copilot at `bce09c50`, one finding, taken
- **r4117421102: `current()` read `_registered` twice**, once for its `None` check and once for its answer. A thread that unregistered between the two reads made it answer `None` after passing the check.
- `generate()` calls it while holding the seam's lock, so that path was safe, but a bare caller was not.
- Commit `8d507c5b` makes it read the registration into a local once and answer that local. It takes no lock of its own, because `generate()` holds the seam's lock, which is not re-entrant, when it calls it.
- **The regression case** is `test_current_answers_the_registration_it_checked`. A line tracer forces the interleaving deterministically: it drops the registration before every line of `current()` after its first. Against `97b5b01f`'s seam logic it is red, with *"current() answered None after passing its check"*. Mutation M16 is caught by it.
- #57 still takes this head with no conflict. In a trial merge into #57's head `5a6fe637`, 95 seam and projection cases pass.
## The falsifier: the seam tests
T052's falsifier is "seam tests; F5.2 through T059 and T061", so F5.2 is quoted in T059's and T061's PRs, not here. These runs used Python 3.12.3 and pytest 8.4.2, in a venv installed exactly as `validate` installs: `--only-binary :all: -c constraints-cpython312-linux.txt -e ".[runtime,test]"`.
```
$ python -m pytest -q tests/test_generator_seam.py # root conftest
71 passed in 1.09s
$ python -m pytest -q tests/test_generator_seam.py --noconftest # the file stands alone too
71 passed in 0.86s
```
**Red at `main`.** This test file dropped into a `git archive` of `main` `2d116415` fails to collect. The seam does not exist there, which is 5.4's own first line.
```
E ImportError: cannot import name 'default_generator' from 'opendox' (…/src/opendox/__init__.py)
1 error in 0.24s
```
**The tests bite.** Each of sixteen mutations of the seam or an entry point, run in a throwaway copy of this branch, turns at least one case red:
| mutation | red |
|---|---|
| M1 `serve.build_server()` loses its registration | 2 |
| M2 `cli.build_parser()` loses its registration | 2 |
| M3 `current()` falls back to openDox's own generator | 3 |
| M4 `generate()` drops the kind check | 4 |
| M5 `generate()` passes an undeclared input through | 2 |
| M6 `register()` always overwrites, as `register_home` does | 7 |
| M7 `register_default()` drops the neutral-contract clause | 1 |
| M8 a generation from the default is not recorded | 3 |
| M9 the default's generation is recorded before its call (r4116122388) | 5 |
| M10 a generation from the default is never marked under way | 7 |
| M11 declared inputs are bound only as given (r4116122374) | 1 |
| M12 a generation's end ignores which registration it began under (#57's overview) | 5 |
| M13 a generation under way does not refuse a host | 4 |
| M14 a change of registration keeps the count of generations under way | 5 |
| M15 a change of registration keeps the record of a generation | 2 |
| M16 `current()` reads the registration again to answer (r4117421102) | 1 |
## The repository's own checks
**`validate`, as it now runs.** Since T036 (#52), `validate` runs the whole suite in one `python -m pytest -q --junitxml=…`, then pins the triple. It was run that way here, at `main` `2d116415` and at this head, in venvs installed by its own install line, and the JUnit reports were diffed test by test. This machine has no Postgres, so the database-backed cases skip here where CI runs them. The local skip count is therefore 177 at both, where CI pins 11.
```
main 2d11641: 2302 passed, 177 skipped (selected 2479, failures 0, errors 0)
this head: 2373 passed, 177 skipped (selected 2550, failures 0, errors 0)
added: 71 (tests.test_generator_seam, all passed) · removed: 0 · changed outcome: 0
```
The skip count does not move, so CI's exact pin of 11 holds. The number selected rises by the 71 cases, above the floor of 2476.
**F4.1's scan** (`scan_deferred_reaches.py`, sha256 `fe116203…`, byte-identical to research.md's appendix). It prints `19 deferred reaches` at `main` `2d116415` and at this head. The two listings are identical apart from the line numbers the added lines shift. The two new modules make no reach, late or not, and a test asserts that too. `threading` is the standard library's.
## What the later tasks need from the seam
- **T054 (the neutral projection)** replaces `default_generator.generate()`'s refusal with the projection, and keeps its signature `(repo_root, repository, *, source_revision=None, generated_at=None)`. It returns `{"schema_version": 1, "kind": "opendox-snapshot", …}`, and its inputs stay `()` unless it declares one, which must then be optional. It also retires `NeutralProjectionNotBuilt` and `test_openDoxs_own_generator_refuses_until_its_projection_lands`. The stand-in cases keep the "a generation that wrote nothing shuts no host out" rule covered. Its in-process test can generate through `generator_seam.generate(...)` with `default_generator.GENERATOR` registered. #57 takes this head (`8d507c5b`) with no conflict, and it needs no change for review rounds 2 and 3. A suite that generates from the default should `unregister()` between cases, as #57's `tests/test_neutral_projection.py` does, because each registration keeps its own window.
- **T055 (serve and generate standalone)**:
- It routes `cli.py`'s two `generate_snapshot` calls (`_generate_and_write`, `_gate_snapshot`) through `generator_seam.generate(repo_root, repository, source_revision=…, generated_at=…, project_register_source=…, possibles_source=…)`, and resolves per call rather than holding `current()`.
- A `None` option is not passed. A given option the registered generator does not declare is refused, as `GeneratorInputRefused`, a `GeneratorSeamError` that `main()` can report.
- Its openDox-default snapshot registry's regenerate goes through the same call. The seam's own bookkeeping is safe to call from the server's request threads.
- Its validator lookup picks the schema by the snapshot's `kind`, which is the registered generator's `contract`.
- Two reaches are not the generator's operation, and the seam deliberately does not carry them:
- `branch_session.py:1568` reads `iter_changes` and `declared_origin_state`, governed change-enumeration helpers;
- `cli.py`'s `is_rfc3339_datetime` is a date-time shape check.
T055 routes both elsewhere.
- Once a verb generates through the seam, a suite that runs the verb gets openDox's own generator, unless a host registers one first.
- **T059 (openXdox contributes)** registers openXdox's governed generator:
```
generator_seam.register(SnapshotGenerator(contract="ideation-dashboard-snapshot",
generate=generate_snapshot,
inputs=("project_register_source", "possibles_source")))
```
- `generate_snapshot`'s signature takes the seam's call as it stands. Both declared inputs default to `None`, so the declaration passes both binds, and a test declares and generates through that shape.
- Its test-only keywords (`git`, `generator_version`, `excluded_documents`) stay undeclared, so the seam never passes them.
- The registration must come before the first generation in any process that uses openDox's entry points, and not during one, or it is refused.
- T059's own seam test is `current() is` that declaration.
- **T064 (host wiring)**. The seam needs one explicit registration. openxFactory's `register_openxfactory()` makes only the profile registration today, and the seam does not read the profile. So openxFactory gets openXdox's generator only if something calls `register(...)` in its process: either a one-line host registration in T064, or a hook T059 gives openXdox that openxFactory already calls. T064's line *"It composes openXdox's profile, so none is expected"* should be re-read against this. **The holder decided it (2026-09-27):** T059 registers openXdox's generator from openXdox's own profile-registration path, the hook openxFactory already calls. So T064's line stays true, and T064 needs no host line. The next phase-2 bookkeeping round records it in T059's and T064's text.
- **T057**, once it packages `opendox-snapshot.schema.yaml`, can hold `NEUTRAL_SNAPSHOT_KIND` to the packaged copy's `kind` const.
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan 034, task T037, slice P1-G (the whole suite in CI). The plan is
specs/034-opendox-standalone-operation/tasks.mdat opensoft/openxFactorymaina9e7db75; T037's entry is unchanged since133e37d9. This PR realizes box 9.4, openDox's half, of the ratifiedadd-neutral-product-standalone-operability: "Restore the margin, and stop the skips carrying the gap".5856501803.55194335. This branch merged thatmainat952af2cb, with no force-push. The merged tree is byte-identical to the branch's tree before the merge, because T036 + T031: the required check runs the whole suite; README states why it was narrowed (plan 034) #52 landed as a squash of the commits this branch already carried.The task entry reads: "Restore the margin over the floors. The two skips that mirror openXdox's gap assert for real." FR-006 adds: "Behaviour that needs both legs SHALL be declared integration tests at the declared composition" and "The margins SHALL be restored, with no skip carrying the gap."
The two skips
Of the 13 skips T036's whole suite pins, two carry the gap. Both are in
tests/test_binding_stylesheets.py, a created file:test_the_gate_exclusive_set_is_re_derived_where_the_modules_are_presenttest_no_contributed_sheet_declares_a_design_tokenThese are the "mirror image" the proposal names. openXdox's six skip for want of
doc_health; these two skip for want of openXdox. In a lone openDox checkout they cannot assert for real. The modules and sheets are openXdox's package data, and openDox-code cannot install openXdox, because openXdox depends on openDox. So each needs both legs, and FR-006 sends that to the declared composition: openXdox-code, whosepyproject.tomlpins this leg.The other 11 skips are 8 in
test_doxbench_bridge_live.py(noompharness) and 3 intest_openprofiler_broker_e2e.py(no broker binary, another product's build artefact). Neither set needs openXdox, and neither is this task's.What this PR moves, and where each case goes
Stays, and now asserts on every run:
test_opendox_own_bundle_names_no_gate_exclusive_class. This was the openDox-only loop inside the re-derivation: openDox's own bundle (its views,app.jsandindex.html, comments blanked, the six excluded by name) names none of the 54 gate-loop classes. It needs no assembly. Measured over a corpus of 1.46 million characters, it holds.Added, for Copilot's review at
7f98b46f:test_the_own_bundle_corpus_leaves_out_an_assembled_contributed_module. No run of this leg's suite has the six in its bundle, so the by-name exclusion was load-bearing and never exercised in the suite. The case assembles a throwaway bundle (one view of openDox's own,app.js,index.html, and all six modules, each naming a gate-only class). It asserts that the corpus reads the view and none of the six.Leaves this leg:
test_the_gate_exclusive_set_is_re_derived_where_the_modules_are_present, the half that reads the sixtests/integration/(T042). There the six are placed in the pinned openDox's bundle on every run, so the derivation asserts for real: no class the six alone name is left instyles.css, and each of the 54 is named by one of the sixtest_a_partial_assembly_is_a_failure_and_not_a_skip, with_assembled_views()test_no_contributed_sheet_declares_a_design_tokentests/test_gate_loop_views.py::test_no_contributed_sheet_declares_a_design_token, over every sheet that leg declares, on its required list. This leg's version also scanned an assembled bundle'sviews/**/*.cssrecursively; that scan goes to T042 with the derivatione28930bftest_the_design_token_guard_sees_an_inline_declaration, with_declared_st_tokens()tests/test_gate_loop_views.py::test_the_design_token_guard_sees_an_inline_declaration, with the same regexe28930bfT049 checks that each arrived. The file's closing comment carries the same list.
Refactored, no behaviour change: the orphan scan's corpus and namer become
_own_bundle_text()and_class_namer(), shared with the new case. Old and new give the same corpus, byte for byte, and the same answer on 628 tokens.The margin
EXPECT_SKIPPED13 → 11, and the floors move three below CI's reading instead of sitting on it. That is the reference implementation's rule, openxFactorypytest-suite.yml: "three below the lower of the two greens". The trade is stated in the pin, as the reference states it. A loss of up to three collected tests does not red on the floors alone. It still reds on the exact SKIPPED pin if the lost tests became skips, and on failures or errors if they failed.Read from CI's two greens of one tree, and read twice:
8c03966aselected=2478 passed=2467 skipped=112475 / 24643dd66679selected=2479 passed=2468 skipped=112476 / 2465, one higher for the exclusion caseNo jitter was measured between any two runs of one tree. A local replica read the same, which is a check, not the source. At
b6b07351, where the floors moved to2476 / 2465, run 36341050224 (job 108681071640) printed the same triple withmargin 3for both floors. So did run 36341364941 (job 108681982884) at this head,5664fec3, whose one later commit changes comments only.Measured
tests/test_binding_stylesheets.py: 18 passed, 0 skipped. It was 18 passed and 2 skipped: four cases left and two arrived.2479 / 2468 / 11. That is T036's2481 / 2468 / 13less 2 selected and 2 skipped, with PASSED unchanged.app.jsemits"gatebar": the new case fails;"refusalpanel-" + k: it fails on the prefix form;index.htmlcarriesclass="swb-notice": it fails;gatebaris a control, and stays green;gate.jsin the bundle is a control, and stays green, because it is excluded by name;gate.jsplaced, it fails, and so does the new exclusion case on its own throwaway bundle;styles.css: the refactored orphan scan fails.Also here: T036's docstrings, from Copilot's review of this PR
Thirteen test files still said, in the present tense, that
validateruns them from an explicit list with--noconftest. That list ended with T036. Each claim now says the job ran the file that way until plan 034 T036 (f0d6170e, docstrings and comments only, no count moves). Where the property still holds, the file still says it is--noconftestsafe.src/opendox/cli.py:1120is left as it is, because itsvalidateis openXdox-code's, and that one still runs two shape suites that way.Copilot's reviews of this PR
8c03966a--noconftestclaims in test docstrings15923378); thirteen files swept (f0d6170e); both resolved952af2cbtest_intent_binding_dom.py7f98b46f, resolved7f98b46f3dd66679; floors raised by one from two more runs,b6b073513dd666795664fec3, answered on the thread5664fec3Questions for Brett
tests/integration/yet. T042 creates it. Until then, the two to-land rows above exist only as this list, and T049 is what checks that they arrive.tests/test_binding_stylesheets.pyis a created file with no carve-manifest row (RULED OQ-C), so R1Q22 (a) is not needed for it.Landing
mainis merged in.Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
🤖 Generated with Claude Code