Skip to content

feat(relations): Relation.sample(seed=) with validation sampling - #298

Merged
discreteds merged 3 commits into
developfrom
feature/validation-roundtrip
Aug 17, 2026
Merged

feat(relations): Relation.sample(seed=) with validation sampling#298
discreteds merged 3 commits into
developfrom
feature/validation-roundtrip

Conversation

@discreteds

@discreteds discreteds commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a validated Relation.sample(n=, fraction=, seed=) contract and InvalidSampleArgumentsError.
  • Thread seed through the public protocol, Mountainash backend protocol, and Polars/Narwhals/Ibis implementations.
  • Clamp oversize n; support Narwhals lazy sampling through collect/sample/re-lazy; preserve Ibis Bernoulli semantics with strict xfails for ibis-polars and ibis-sqlite seed limitations.
  • Keep Validator._slice on the execution backend, pin implicit seeds, record the effective fallback seed, and record a closed-by-default fallback when a non-empty input samples to zero rows.
  • Compile Frictionless pattern checks through regex_contains, fixing false passes on Narwhals and ibis-duckdb.
  • Retire the resolved NW-REL-03 divergence fact and generated census/docs entries.

Verification

  • Targeted gate: 74 passed, 6 xfailed for the post-review validator/sample/capability checks.
  • Pre-review targeted gate: 441 passed, 4 skipped, 14 xfailed.
  • Full suite: 23051 passed, 81 skipped, 1 unrelated strict XPASS, 3469 xfailed.
  • The unrelated XPASS is IB-DT-13 on ibis-sqlite in test_show_recent_errors; it is reproducible and filed as mountainash-central backlog item 105, not changed by this PR.
  • Ruff clean on changed files.

Spec: mountainash-central 04.planning/mountainash/superpowers/specs/2026-08-17-syntheticdata-validation-roundtrip-design.md.
Part B is independent of this PR and of item 8j PR #297.

discreteds and others added 3 commits August 17, 2026 23:55
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…REL-03

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@discreteds
discreteds merged commit 421248b into develop Aug 17, 2026
4 checks passed
@discreteds
discreteds deleted the feature/validation-roundtrip branch August 17, 2026 15:03
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