Condition::ClassReference + lutaml-model migration plan (TODO 19)#17
Merged
Conversation
Adds Condition::ClassReference subclass supporting bare IRDI and bare set conditions per the approved grammar. Removes the rescue ArgumentError from Property#condition that was silently dropping IEC 62683 class-reference data. Includes the full phased lutaml-model migration plan (Phases 2.1-2.5) with all 3 user decisions applied: per-item + single-file coexist, YAML default, nested multilingual maps. Drive-by: fixes 2 perpetual skips. find_by_name gets real coverage after setting preferred_name on the fixture; the CDDAL->JSON->CDDAL placeholder is removed (deferred to Phase 2.5). 930 specs, 0 failures, 0 pending.
4 tasks
ronaldtse
added a commit
that referenced
this pull request
Jul 24, 2026
… 1 shipped Moves the IEC 62656-1 column-name to property-ID table from entity/name_synthesizer.rb into Opencdd::PropertyIds::IEC_COLUMN_NAMES (the lint-exempt SSOT). name_synthesizer.rb now holds a one-line alias; no public-API change. CI lint-no-raw-mdc passes. Also adds a Status header to TODO.final/19 marking Item 1 (ClassReference) as shipped in commit bae0c56 / PR #17, since the TS team had no signal that this was real API and not a proposal. 930 specs, 0 failures, lint green.
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
Implements TODO 19 from the cdd-data 2026-07-23 session.
Item 1: Condition grammar — ClassReference subclass (code)
IEC 62683 stores property conditions as bare class-reference sets like
{0112/2///62683#ACE132}, whichOpencdd::Condition.parsepreviouslyrejected. The workaround in
Property#conditionrescuedArgumentErrorand returned nil — silently dropping the data.
This PR adds
Opencdd::Condition::ClassReferenceper the approvedgrammar:
Files changed:
lib/opencdd/condition.rb— newClassReferencesubclass;parsedispatches bare IRDI / bare set to it. Malformed input (e.g.
"no operator here") still raisesArgumentError.lib/opencdd/property.rb— removed therescue ArgumentError;class references now parse instead of becoming nil.
lib/opencdd/validator/condition_rule.rb— comment clarification;existing
!parse(value).nil?already accepts ClassReference.spec/condition_spec.rb— 14 new cases (bare IRDI, bare set,satisfaction, round-trip, equality, cross-type comparison).
spec/validator_spec.rb— 2 new R11 cases for class references.Item 2: lutaml-model migration — full phased plan (docs)
Expands the TODO 19 Item 2 summary into a fully-decisioned plan with
all three user decisions applied:
format:override.Files added:
TODO.final/19b-lutaml-model-migration.md— full plan for Phases2.1 (done) → 2.5, with files-to-change, acceptance criteria, risks,
and how each decision shows up per phase.
TODO.final/19-condition-grammar-and-lutaml-migration.md— pointerfrom the proposal summary to the detailed plan.
Pending-spec cleanup (drive-by)
spec/database/public_api_coverage_spec.rb—find_by_namewasperpetually skipped; added
MDC_P004.ento the fixture's klassand wrote 4 real cases.
spec/parcel/round_trip_matrix_spec.rb— removed theCDDAL→JSON→CDDAL placeholder; replaced with a comment deferring to
Phase 2.5 (which makes the round-trip implementable).
Test plan
bundle exec rspec spec/condition_spec.rb— 31 examples, 0 failuresbundle exec rspec spec/validator_spec.rb -e "R11"— 4 examples, 0 failuresbundle exec rspec(full suite) — 930 examples, 0 failures, 0 pendingdef to_h/from_h/to_hashintroduced