You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(check): the cruise that leaves obs and keeps its casts (3.12.0)
Release v2026.08.08 shipped 10 calcofi_ctd-cast cruises holding all 1,186 of
their casts and none of their 874,000 observations. Nothing in the pipeline
said a word, and nothing was going to: PK/FK validation runs child -> parent,
so every surviving obs row still had a parent cast, and a parent with NO
CHILDREN violates no constraint. The bounds backstop inspects obs, which these
cruises had entirely left. No check anywhere looked at the parent side.
check_cruise_coverage() is that check. Three things it has to get right:
- The grain is the CRUISE, not the sample. A CTD `sample` row is one physical
cast per DIRECTION while obs keeps one direction, so ~half of that dataset's
cast rows legitimately carry no observations; a per-sample assertion is wrong
on arrival. A whole cruise with none never is.
- It joins through sample_key, never obs.cruise_key — that denormalized column
is NULL on 59,274 swfsc_cufes rows and 14,170 euphausiid ones and would
invent orphans that do not exist. A test drops the column outright so an
implementation that reaches for it fails rather than passing quietly.
- A dataset emitting no observations at all is exempt. sio_pic-zooplankton is a
net-tow registry whose biovolumes are pending from the provider: 587
sample-only cruises that must not fail. The rule is relative, so no allowlist
is needed to say so.
max_orphan_cruises takes a named per-dataset vector, so the release can ratchet
a documented backlog while a new orphan still fails; an ingest that knows its
own correct answer passes 0.
Also fixes a stale fixture in test-in_release.R that declared a directory
`output:` and had been failing since check_nested_outputs() landed in 3.11.0.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments