Summary
A Wisdom ONE_TO_MANY relationship round-trips (Wisdom->Ossie->Wisdom) to MANY_TO_ONE. The forward path sets no ai_context marker for ONE_TO_MANY (unlike ONE_TO_ONE / MANY_TO_MANY), and the reverse path defaults unmarked relationships to MANY_TO_ONE.
Root cause
Forward wisdom_to_ossie.py: the ONE_TO_MANY branch swaps from/to but leaves ai_context=None. Reverse ossie_to_wisdom.py: only one-to-one / many-to-many markers are recognized; default is MANY_TO_ONE.
Repro (real converters, HEAD ab8fc1a — EXECUTED)
Using fixture tests/fixtures/sample_export.json through both converters:
original wisdom relationshipTypes: ['MANY_TO_ONE','ONE_TO_MANY','MANY_TO_MANY','MANY_TO_ONE','MANY_TO_ONE']
after Wisdom->Ossie->Wisdom: ['MANY_TO_ONE','MANY_TO_ONE','MANY_TO_MANY','MANY_TO_ONE']
The ONE_TO_MANY at index 1 becomes MANY_TO_ONE. (Also note the relationship count dropped 5->4 in this fixture run — worth a look, but out of scope for this issue.) The wrong result is also enshrined in tests/test_ossie_to_wisdom.py::test_relationship_types_restored.
Potential fix
Emit ai_context = "one-to-many relationship" in the forward path; add an elif ...startswith("one-to-many") branch in reverse; update the test expectation.
Scope / caveats
ONE_TO_ONE / MANY_TO_MANY unaffected. From/to swap is correct; only the semantic label is lost. Fixing requires the test update.
Summary
A Wisdom
ONE_TO_MANYrelationship round-trips (Wisdom->Ossie->Wisdom) toMANY_TO_ONE. The forward path sets noai_contextmarker forONE_TO_MANY(unlike ONE_TO_ONE / MANY_TO_MANY), and the reverse path defaults unmarked relationships toMANY_TO_ONE.Root cause
Forward
wisdom_to_ossie.py: theONE_TO_MANYbranch swaps from/to but leavesai_context=None. Reverseossie_to_wisdom.py: onlyone-to-one/many-to-manymarkers are recognized; default isMANY_TO_ONE.Repro (real converters, HEAD ab8fc1a — EXECUTED)
Using fixture
tests/fixtures/sample_export.jsonthrough both converters:The
ONE_TO_MANYat index 1 becomesMANY_TO_ONE. (Also note the relationship count dropped 5->4 in this fixture run — worth a look, but out of scope for this issue.) The wrong result is also enshrined intests/test_ossie_to_wisdom.py::test_relationship_types_restored.Potential fix
Emit
ai_context = "one-to-many relationship"in the forward path; add anelif ...startswith("one-to-many")branch in reverse; update the test expectation.Scope / caveats
ONE_TO_ONE / MANY_TO_MANY unaffected. From/to swap is correct; only the semantic label is lost. Fixing requires the test update.