Problem
In src/boring_semantic_layer/serialization/reconstruct.py:264, the join reconstructor uses:
cardinality = metadata.get("cardinality", "one")
Before #217 added the cardinality field to extract_join, serialized joins never emitted cardinality. This means any persisted/cached tagged model created before that change will now deserialize join_many as join_one, potentially producing incorrect aggregation results.
Since bsl_version is still "2.0", from_tagged() has no way to distinguish old payloads from new ones.
Impact
Any persisted tagged expressions that used join_many or join_cross before #217 will silently change behavior after upgrading.
Suggested fix
Either:
- Bump
bsl_version to "2.1" and treat missing cardinality in "2.0" payloads as "many" (safer default), or
- Default to
"many" instead of "one" when cardinality is absent (since join_one is a strict subset of join_many behavior, but not vice versa)
Found by
Codex CLI review of #222.
Problem
In
src/boring_semantic_layer/serialization/reconstruct.py:264, the join reconstructor uses:Before #217 added the
cardinalityfield toextract_join, serialized joins never emittedcardinality. This means any persisted/cached tagged model created before that change will now deserializejoin_manyasjoin_one, potentially producing incorrect aggregation results.Since
bsl_versionis still"2.0",from_tagged()has no way to distinguish old payloads from new ones.Impact
Any persisted tagged expressions that used
join_manyorjoin_crossbefore #217 will silently change behavior after upgrading.Suggested fix
Either:
bsl_versionto"2.1"and treat missingcardinalityin"2.0"payloads as"many"(safer default), or"many"instead of"one"whencardinalityis absent (sincejoin_oneis a strict subset ofjoin_manybehavior, but not vice versa)Found by
Codex CLI review of #222.