Skip to content

docs(cxf): publish the normative composite-subset contract with a conformance corpus#173

Merged
jscott3201 merged 2 commits into
developmentfrom
claude/cxf-composite-contract
Jul 22, 2026
Merged

docs(cxf): publish the normative composite-subset contract with a conformance corpus#173
jscott3201 merged 2 commits into
developmentfrom
claude/cxf-composite-contract

Conversation

@jscott3201

Copy link
Copy Markdown
Owner

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 their DiagCode + 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.
  • Conformance corpus at crates/oce-cxf/tests/fixtures/composite_contract/ — 3 accepted fixtures with blessed byte-exact .modelgraph.txt goldens (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.
  • End-to-end wiring in oce-api/tests/conformance.rs (test-side only): the rejected corpus through Engine::load_cxf asserting the rule-id prefix always and subject where defined (zero-root pins subject=None); accepted fixtures load warning-free.
  • Doc-vs-code drift guard: the doc's rule table asserts (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 warnings gates: fmt · clippy · nextest 1219/1219 · doctests · file-size · doc gates · determinism mirror 448/448 release.

🤖 Generated with Claude Code

jscott3201 and others added 2 commits July 21, 2026 20:44
…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>
@jscott3201
jscott3201 merged commit 83e2f9a into development Jul 22, 2026
14 checks passed
@jscott3201
jscott3201 deleted the claude/cxf-composite-contract branch July 22, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the supported nested-composite subset in CXF import + actionable diagnostics for unsupported shapes

1 participant