STONE v2 reformat#52
Merged
Merged
Conversation
a5ec277 to
ed4ce7d
Compare
ed4ce7d to
fd697f4
Compare
4e0548f to
c8ac09c
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Boulder now accepts STONE v2 YAML defined either as a single-stage
network:list or a multi-stagestages:layout with matching top-level stage blocks. Legacy STONE v1 (nodes:/connections:/groups:in raw YAML) is rejected with an explicit migration message. Normalization still produces the same internal flat shape (nodes,connections,groups) so the converter, staged solver, and existing validation plumbing stay aligned.What changed
Parsing and normalization (
boulder/config.py)_detect_stone_dialectinfersv2_network,v2_staged, or treats already-normalized dicts asinternalwhen appropriate (tests/plugins)._normalize_v2maps v2 into internal lists: staged items getgroup: <stage_id>;network:is wrapped as a synthetic single stage where needed.source/targetpresence; ambiguous half-edges raiseValueError.stages:keys and top-level stage sections,stages:vsnetwork:mutex, and related staged-graph constraints are enforced during normalization.inlet:/outlet:on node items are rejected in favor of explicit connection items (per spec).logicalannotation until a dedicated type exists).Validation (
boulder/validation.py)validate_normalized_configextended so normalized v2-derived configs satisfy the same end-state rules as before, plus any v2-specific checks needed after flattening.Specification and user-facing docs
SPECIFICATIONS.md: short index linking to the STONE spec.docs/stone.rst+docs/index.rst: Sphinx overview, quick start (network:), staged example, pointer toSTONE_SPECIFICATIONS.md, v1 deprecation note.ARCHITECTURE.mdandconfigs/README.md: pipeline and examples updated for v2; normative detail deferred toSTONE_SPECIFICATIONS.md.Tests
tests/fixtures/stone_v2/{valid,invalid}/minimal YAMLs (one rule per file).tests/test_stone_v2_fixtures.py: parametrized normalize + validate;test_spec_examples_are_valid_yamlensures every ```yaml block inSTONE_SPECIFICATIONS.mdparses.Breaking change
Raw STONE v1 YAML is no longer accepted by
normalize_config. Consumers must migrate tonetwork:orstages:(blocB migrations are handled in sibling PRs per plan).