docs(cxf): publish the normative composite-subset contract with a conformance corpus#173
Merged
Merged
Conversation
…formance corpus (#165) The canonical emitter-facing statement of the nested-composite import subset, plus the fixture files the engine tests itself with: - docs/cxf-composite-subset.md: seven numbered rules (four rejecting, tagged with their catalog DiagCode + composite/<rule-id> prefix; three non-rejecting classification/ordering/transform rules explicitly untagged), the rule-id/DiagCode/prefix table, generic-diagnostics boundary, acceptance preconditions, and corpus test commands. - crates/oce-cxf/tests/fixtures/composite_contract/: 3 accepted fixtures with blessed byte-exact ModelGraph goldens, 9 rejected fixtures pinning the full (DiagCode, subject, message) triple per file, and an indexed README held one-to-one with the sorted on-disk listing. - crates/oce-cxf/tests/composite_contract_doc.rs: doc-vs-catalog drift guard; the message-prefix leg is derived from the rule-id cell, never parsed from markdown (trailing-space hazard). - crates/oce-api/tests/conformance.rs: the corpus driven end-to-end through Engine::load_cxf (rejected triples pinned, subject only where defined, zero-root carries none; accepted fixtures load warning-free). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, and align contract examples (#165) Review fix round (3x SOUND_WITH_NITS): - Active nodes section: conditional-false pruning defined once and the qualifier applied in rules 3/4/5/7 (banned keys tolerated on inactive nodes, inactive array-params do not reject, inactive subtrees not traversed — all probe-verified); rule 2 does not consult activity; live connections into inactive nodes named as the generic inactive-conditional-node rejection. - Rule 5: nearest-wins shadowing semantics stated normatively plus the distinct-local-names caution; fragment aligned to minimal_nested's actual kBase -> kTop -> kInner -> gain.k chain. - Rule 6: top-composite boundary-output fate stated explicitly (elided outright; golden-verified). - Rule 4 example now matches reachable_cycle.jsonld (3-node cycle); rule 2 fixture citations split correctly. - How-to-test: accepted-fixture workflow added (golden naming convention + OCE_BLESS bless command). - New rejected/diamond_cycle.jsonld pins the one-diagnostic-per-reentry contract (one structural cycle, two paths, two path-ordered diagnostics) in both driver pin tables and the README index; expected strings derived from actual emission. Co-Authored-By: Claude Fable 5 <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
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.
Rung 3 of 7 of the interchange-trio ladder (owner-ratified 2026-07-21). Together with R2 (#172), this completes the issue. Closes #165.
What
Docs + fixtures + tests only — zero
src/changes (lead-verified):docs/cxf-composite-subset.md— the canonical, published, normative contract for the restricted nested-composite import subset: seven as-built rules (four rejecting, bound to theirDiagCode+composite/<rule-id>prefixes from the R2 catalog; three explicitly non-rejecting classification/ordering/transform rules with no fabricated identifiers), the two R2-review-adjudicated normative statements (pure cycle ⇒ zero-roots; one diagnostic per re-entry), the import-parity boundary in the ratified RT-2 wording, the generic-diagnostics boundary, acceptance preconditions, and a how-to-test section.crates/oce-cxf/tests/fixtures/composite_contract/— 3 accepted fixtures with blessed byte-exact.modelgraph.txtgoldens (minimal nesting, two-level nesting, registered-leaf carve-out with its protected child elided) and 9 rejected fixtures pinning exact(DiagCode, Option<subject>, message)triples through the files, plus an index-enforced README. Third-party emitters can run the identical inputs.oce-api/tests/conformance.rs(test-side only): the rejected corpus throughEngine::load_cxfasserting the rule-id prefix always and subject where defined (zero-root pinssubject=None); accepted fixtures load warning-free.(rule-id, diag_code)against the checked-in catalog, with the prefix leg derived (format!("composite/{rule_id}: ")) — immune to the trailing-space markdown round-trip hazard the red-team caught.Tests
14 new (workspace 1205 → 1219). Mutation self-checks all caught: doc diag_code cell edit → drift guard FAIL; rule-id cell edit → both drift-guard legs FAIL; README row deletion → index test FAIL.
Gates
Implementer + independent lead re-run, both green, including both rustdoc
-D warningsgates: fmt · clippy · nextest 1219/1219 · doctests · file-size · doc gates · determinism mirror 448/448 release.🤖 Generated with Claude Code