Repository navigation
DRAFT: T073: the composed declarations (ARC-Q2 (a)): every declared entry runs composed, the rail files get the host's rail (plan 038) #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
brettheap
wants to merge
19
commits into
main
Choose a base branch
from
r2/t073-composed-declarations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c52900e
T020, U-1: the governed host for the governed suites that drive the g…
brettheap 0736158
T021, U-2: the gate console's schemas, each read where its owner keep…
brettheap c40af91
T022, U-3: the runbook placed from the composed tree, git-ignored, no…
brettheap ecf0ba9
T021: a host schema the console cannot apply refuses as GateRefused (…
brettheap 8d02a1b
Merge T021's fix (Copilot r4194497045) into T022
brettheap 7a149b7
T022: the placement script's guards held in CI, tests/test_composed_p…
brettheap d6f4a81
T029, U-9: the composed run, permanent: composed.yml and its openxFac…
brettheap 541852d
T029: judge a pull request's own edits as the landing they would be (…
brettheap 570efda
Merge T022's placement tests (7a149b70, #41) into T029
brettheap 82d9592
T029: an edited pull request body is judged again (Copilot r4195546545)
brettheap c27c91d
T073: the composed declarations, ARC-Q2 (a): each declared entry runs…
brettheap b4993d1
T029: 12.5's oracle call takes --chains, as Brett ruled (#656 6016648…
brettheap 2565dac
T073: the rail's and the contracts' open_until, as the holder ruled (…
brettheap bf8f5b7
Merge T029's newer head (b4993d1f, #44) into T073
brettheap b09c138
Merge origin/main (c6d15b27, T020 landed as #39) into T073
brettheap 26fe63e
T073: commit the rail block's restore cases, tests/test_declared_rail…
brettheap 860ad06
Merge origin/main (e2340bb6) into T073
brettheap cebf345
T073: the contracts farm leaves out only openDox-spec's opendox-snaps…
brettheap 8179615
Merge origin/main (9720925e) into T073
brettheap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # THE COMPOSED RUN'S HOST: the one openxFactory commit the composed workflow | ||
| # checks out (plan 038 task T029, U-9, in openxFactory | ||
| # `specs/038-opendox-document-tool-self-maintenance/`; decision N-7a, ruled | ||
| # with the plan on openxFactory#656 comment 6013547504). | ||
| # | ||
| # WHAT READS IT. `.github/workflows/composed.yml`, and nothing else. It checks | ||
| # openxFactory out at `commit`, initializes that checkout's `openDox`, | ||
| # `openXdox` and `openXwallet` submodules recursively, and runs 12.5's | ||
| # governed suites with that checkout's `scripts/` on `PYTHONPATH` (R1Q23 (a)'s | ||
| # form; F12.1 runs composed, CF-5). The workflow refuses the file, naming the | ||
| # rule, unless all of these hold: | ||
| # * `schema_version` is the integer 1, and `kind` is `composed-host-pin`; | ||
| # * `commit` is a full 40-character lowercase commit id; | ||
| # * no other key is present, and no key is given twice. | ||
| # The repository is openxFactory, always: the workflow names it, and this file | ||
| # names only the commit. | ||
| # | ||
| # WHEN IT MOVES. Never on its own: each advance is an openXdox-code pull | ||
| # request of its own, so the composed run always tests the host that | ||
| # openxFactory's `main` carries (plan 038 plan.md, "The composed workflow's | ||
| # openxFactory pin"). It advances after T030, T064 and T075 land in | ||
| # openxFactory, and T073 re-runs after each advance. | ||
| # | ||
| # ITS FIRST VALUE. openxFactory `main`'s head when T029 authored this file, | ||
| # read with `git ls-remote` at 2026-10-06T11:56:20Z: `92010d3e`, "Land | ||
| # add-factory-mcp-conformance on main as Speckit feature 037, with repairs | ||
| # and validator fixes (#1243)". | ||
| # | ||
| # A CREATED file: no row in openxFactory's `docs/opendox-carve-manifest.yaml` | ||
| # (RULED OQ-C). | ||
| schema_version: 1 | ||
| kind: composed-host-pin | ||
| commit: 92010d3e67f2c556687e1c3583ed3ca1867f4b8b |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| """The rail registration `tests/conftest.py` makes for the declared rail | ||
| suites, held to its word (plan 038 task T073; ARC-Q2 (a), openxFactory#656 | ||
| comment 6003918488; Copilot r4197793290 on openXdox-code#45). | ||
|
brettheap marked this conversation as resolved.
|
||
|
|
||
| Where the run is composed, each test of a file `tests/declared_exclusion.yaml` | ||
| names under `status-exemption-rail` runs with the rail openxFactory's host | ||
| registers, through `conftest.a_hosts_rail`. Those runs prove the rail is | ||
| registered. These cases prove what a composed run cannot see: that the seam is | ||
| put back afterwards, so no test after a rail suite meets a rail it did not | ||
| register, and no host's rail is lost to one. They use stand-in rails, so they | ||
| run in a lone checkout too, inside the required check. | ||
|
|
||
| Each case leaves openDox's seam exactly as it found it: `_the_seam_as_found` | ||
| records the seam's three globals through `monkeypatch`, which writes them back | ||
| at teardown, whatever the case did. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import pytest | ||
| import yaml | ||
|
|
||
| from conftest import HERE, a_hosts_rail, status_exemption_rail_suites | ||
| from opendox import doxbench_packet | ||
|
|
||
|
|
||
| class _Rail: | ||
| """A stand-in rail: the two names a rail must carry, each its own.""" | ||
|
|
||
| def __init__(self, name: str): | ||
| self.name = name | ||
|
|
||
| def lifecycle_status(text): | ||
| return None | ||
|
|
||
| def is_compression_exempt(text): | ||
| return False | ||
|
|
||
| self.lifecycle_status = lifecycle_status | ||
| self.is_compression_exempt = is_compression_exempt | ||
|
|
||
|
|
||
| def _answering() -> object: | ||
| """The rail openDox's seam answers with now, read through the name it | ||
| hands over (`doxbench_packet.is_compression_exempt`), or None when no | ||
| rail is registered.""" | ||
| if not doxbench_packet.status_exemption_registered(): | ||
| return None | ||
| return doxbench_packet.is_compression_exempt | ||
|
|
||
|
|
||
| @pytest.fixture(autouse=True) | ||
| def _the_seam_as_found(monkeypatch): | ||
| for name in ("_status_exemption_rail", "_status_exemption_is_default", | ||
| "_status_exemption_default_read"): | ||
| monkeypatch.setattr(doxbench_packet, name, getattr(doxbench_packet, name)) | ||
| doxbench_packet.unregister_status_exemption() | ||
|
|
||
|
|
||
| def test_a_hosts_earlier_rail_is_dropped_for_the_block_and_put_back_after(): | ||
| earlier, rail = _Rail("earlier"), _Rail("the host's") | ||
| doxbench_packet.register_status_exemption(earlier) | ||
| with a_hosts_rail(rail): | ||
| assert _answering() is rail.is_compression_exempt | ||
| assert _answering() is earlier.is_compression_exempt | ||
|
|
||
|
|
||
| def test_no_rail_is_left_behind_where_none_was_registered(): | ||
| rail = _Rail("the host's") | ||
| with a_hosts_rail(rail): | ||
| assert _answering() is rail.is_compression_exempt | ||
| assert _answering() is None | ||
|
|
||
|
|
||
| def test_opendoxs_own_default_is_not_put_back(): | ||
| """As `a_hosts_plane` treats the default profile: the next entry point | ||
| registers the default again, as it does in any process.""" | ||
| default, rail = _Rail("openDox's default"), _Rail("the host's") | ||
| doxbench_packet.register_default_status_exemption(default) | ||
| with a_hosts_rail(rail): | ||
| assert _answering() is rail.is_compression_exempt | ||
| assert _answering() is None | ||
|
|
||
|
|
||
| def test_the_seam_is_put_back_when_the_block_fails(): | ||
| earlier, rail = _Rail("earlier"), _Rail("the host's") | ||
| doxbench_packet.register_status_exemption(earlier) | ||
| with pytest.raises(RuntimeError, match="the case failed"): | ||
|
Check warning on line 88 in tests/test_declared_rail_registration.py
|
||
| with a_hosts_rail(rail): | ||
| raise RuntimeError("the case failed") | ||
| assert _answering() is earlier.is_compression_exempt | ||
|
|
||
|
|
||
| def test_the_rail_suites_are_the_declarations_rail_entries(): | ||
| declaration = yaml.safe_load( | ||
| (HERE / "declared_exclusion.yaml").read_text(encoding="utf-8")) | ||
| named = {entry["path"].rsplit("/", 1)[-1] for entry in declaration["entries"] | ||
| if "status-exemption-rail" in entry["reasons"]} | ||
| assert named, "the declaration names no rail file" | ||
| assert status_exemption_rail_suites() == frozenset(named) | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.