Skip to content

feat(relations): coerce bare cross-family DAG dependency refs (item 92) - #284

Merged
discreteds merged 1 commit into
developfrom
discreteds/dag-cross-family-bare
Aug 15, 2026
Merged

feat(relations): coerce bare cross-family DAG dependency refs (item 92)#284
discreteds merged 1 commit into
developfrom
discreteds/dag-cross-family-bare

Conversation

@discreteds

Copy link
Copy Markdown
Member

Implements backlog item 92 — RelationDAG cross-family bare-dependency coercion.

A DAG target anchored on one family that joins a BARE foreign-family dependency ref now compiles the ref in its own family and coerces the result to the anchor's family via _coerce_to_match (item 94), instead of leaving the ref on the anchor pair to fail raw in read().

Changes

  • _anchor_prototype(family, dialect) + _is_lazy_narwhals module helpers
  • _resolve_identity_leaf(name)(family, dialect, ReadRelNode)
  • Foreign branch: bare ReadRelNode root → compile own family + coerce + restore; derived root stays on the anchor pair (item 97's territory)
  • Upfront lazy-narwhals-anchor guard (order-independent rejection)

Tests: tests/relations/dag/test_dag_cross_family_bare.py (acceptance + Ibis/narwhals-anchor matrix + derived-non-rescue boundary); updated TestExplicitBackendPerRefNeverBuildsInvalidHybrid to the new own-family-compile semantics.

Full suite: 22250 passed, 0 failed. Ruff clean. (mypy baseline has pre-existing import-untyped/capability_census errors, unchanged.)

Design: mountainash-central 2026-08-14-dag-cross-family-bare-dependency-coercion.md (Revision 5).

A DAG target anchored on family X that joins a BARE foreign-family
dependency ref now compiles the ref in its own family and coerces the
result to the anchor's family via _coerce_to_match (item 94), instead of
leaving the ref on the anchor pair to fail in read().

- _anchor_prototype(family, dialect) + _is_lazy_narwhals helpers
- _resolve_identity_leaf(name) -> (family, dialect, ReadRelNode)
- foreign branch: bare ReadRelNode -> compile own family + coerce;
  derived root stays on the anchor pair (item 97's territory)
- upfront lazy-narwhals-anchor guard (order-independent rejection)

Design: mountainash-central
2026-08-14-dag-cross-family-bare-dependency-coercion.md (Rev 5)
@discreteds
discreteds merged commit 27e9721 into develop Aug 15, 2026
4 checks passed
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.

1 participant