Skip to content

fix(check-path): data-standard check-path filtering + option-3 format (Part A / soda-core)#2778

Draft
m1n0 wants to merge 7 commits into
mainfrom
fix/ds-checkpath-filter
Draft

fix(check-path): data-standard check-path filtering + option-3 format (Part A / soda-core)#2778
m1n0 wants to merge 7 commits into
mainfrom
fix/ds-checkpath-filter

Conversation

@m1n0

@m1n0 m1n0 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Part A — soda-core engine (of a larger cross-repo change)

Fixes FE-triggered "run selected checks" on data-standard checks matching zero checks, and lays the engine groundwork for the option-3 check-path format.

Root cause

The FE round-trips the full wire checkPath (data-standard paths are collection-prefixed); the engine's --check-paths filter matched the stripped path, so nothing matched. Contracts were unaffected (their checkPath is already bare).

What changed (design D1–D4)

  • D1 (bug fix): CheckSelector.from_check_paths now matches the full check_path only (not the stripped path). Fixes the data-standard partial run; contracts unchanged; no silent fan-out across collections.
  • D3 (filters): new --check-filter fields source=, collection=/standard=, relative_path=, check_path= (mirror identity_prefix = (wire_source, collection_id)).
  • D4 (rename): CheckImpl.path → relative_path, full_path → check_path (+ Check dataclass, wire builder). Wire JSON key checkPath unchanged; contract emission byte-identical.
  • D2 (option-3 format): non-contract collections emit {type}.{id}:{relative} (e.g. data-standard.my_std:columns.email.checks.missing); contracts stay bare. Grammar: one :, split-first; + delimiter guard forbidding ./: in collection_id/wire_source.

Design + plan: docs/superpowers/specs/data_standards/2026-06-24-checkpath-filter-data-standards-{design,plan}.md (soda-punch workspace).

Testing

  • Whole soda-core unit suite green.
  • End-to-end contract-filter suite (test_check_paths_filter.py, test_check_selectors_filter.py, incl. test_backward_compat_check_paths) green against a live postgres — no contract regression.

⚠️ DO NOT RELEASE until these land — the D2 emission is wire-breaking; this PR is engine-only

Part B (coordinated; sequencing = backend tolerant-parser → engine flip → FE):

  • soda-server — replace CheckCollectionModule.firstSegmentOf + DataStandardIngestionFilterModule with an option-3 (type, id, relative) parser; make it tolerant of the legacy {id}.{relative} form during rollout.
  • soda-webappfirstSegmentOf (checks-tree-table.fns.ts) + path builders parse the new grammar (split on first :).

Cross-repo consumers of the D4 rename (break only when a soda-core release ships the rename; all pin soda-core by version; sweep of soda / soda-library / launcher = clean):

  • soda-reconciliation reconciliation_check_types.py:324-330 — overrides path via super().path + reconciliation.{source}. prefix. Silent-regression risk: a naive fix drops the prefix. Migrate the override deliberately to relative_path/check_path.
  • soda-migration contract_migrator.py:436check_impl.path.relative_path.
  • soda-data-standard — extend the name validator to reject :; migrate test_data_standard_check_full_path_is_prefixed_with_standard_name to option-3 and add the deferred real-engine e2e.

Kept as draft until Part B is sequenced and the cross-repo consumers are ready.

🤖 Generated with Claude Code

m1n0 and others added 7 commits June 30, 2026 22:44
…e across unit tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…th= filter fields

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…act collections

Non-contract check collections (e.g. data standards) now emit
checkPath as "{wire_source}.{collection_id}:{relative_path}" (option 3)
instead of the old "{collection_id}.{relative_path}" format. Contracts
stay bare (checkPath == relative_path). Adds a delimiter-safety guard
in base.py verify() that rejects collection_id values containing '.'
or ':' (reserved check-path delimiters). Updates all stub check_path
values in selector and alignment tests to the option-3 format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@m1n0 m1n0 self-assigned this Jul 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

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