Repository navigation
#259 — coverage truthfulness: severity/where/disabled/singular attribution honesty - #283
Conversation
…honest-UNKNOWN in the grain check The grain.unique-key-unbacked verdict stops overclaiming on the #258 test-config wire (the cute-dbt#259 truthfulness pack): - DegradedBacking POD + Finding.degraded (serde-skipped when empty — payload byte-stability): a covering test that is warn-severity, where-filtered, or limit-capped still attributes, with every cause enumerated per test in domain-composed copy. Never a fourth verdict, never a percentage — the three-valued covered/uncovered/unknown vocabulary stays the trust contract; the cue rides in-row beside the attribution (#262 copy principles). An unrecognized severity surfaces its raw value, never guessed at. - exists-but-disabled evidence: a disabled uniqueness test on the declared grain (config.enabled: false in nodes, or a generic-test entry in the Manifest.disabled map — the shared uniqueness_columns recognizer now serves both linkage shapes) never counts as coverage but surfaces as a distinct fact from absent. - singular-test linkage: with no enabled generic uniqueness backing, an enabled singular (SQL-file) test referencing the model via depends_on (the only wire linkage singular tests carry, #258) degrades the verdict to honest UNKNOWN — evidence states what WAS checked and enumerates the singular tests — never a false Uncovered nag on singular-test shops. Disabled-map singular entries carry no linkage (both engines empty depends_on on disabled nodes) and are declared out in the spec exclusions. Spec conditions/exclusions mirror the new predicate; registry.toml + the book check page are regenerated from SPECS (byte-gated). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… the findings panel FindingPayload flattens the domain Finding, so the new degraded array rides the wire unchanged (pinned by a build_payload test). The findings panel renders it pure-presentationally: a summary 'degraded backing' chip ONLY when every attributing test is weakened (no full-strength backing at all — a partially degraded attribution keeps the summary quiet, no false alarm), under the #146/#188 tooltip contract (focusable trigger, aria-label, CSS-positioned bubble on hover AND focus, never a native title); plus the per-test enumerated causes beside the Covered-by attribution either way (in-row honesty). The exists-but-disabled and singular-test cues render through the existing generic evidence list — no new affordance needed. Chip styling pairs always-AA --text with the non-text amber edge token, so no per-theme contrast stand-in is needed; the latte .f-label deepening extends to the new label. Chrome snapshot re-accepted (CSS/JS bundle only). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…pins + golden regen
playground-current.json (current side only, leak-checked node-level
splice — every other byte verified identical): unique_dim_payers_payer_key gains severity warn,
unique_fct_provider_metrics_provider_metrics_key gains where
('year_actual >= 2024') + limit 100 (each with the matching authored
unrendered_config twin), int_patients__never_admitted gains
unique_key = 'patient_id' plus a hand-authored synthetic SINGULAR test
(assert_never_admitted_patients_distinct, cloned field-for-field from
the engine-emitted assert_patient_dates_valid shape, depends_on-linked
only), and the disabled map gains a fourth entry — a disabled unique
test on mart_dq_summary.entity_type cloned from the engine-emitted
disabled-generic specimen. MANIFEST.toml sha256 + provenance updated.
Pins: four new check_engine real-fixture tests (warn-degraded covered,
where+limit causes, exists-but-disabled on the UNCOVERED row,
singular-only honest UNKNOWN); the #258 ingestion pin extended to the
fourth disabled entry (none weakened); four new BDD scenarios over the
subprocess wire (degraded marks ⊆ by, disabled-MAP placement, singular
unknown) with the builders growing a disabled-map injection arm; one
new headless test driving the chip/tooltip/causes/quiet-partial DOM.
Goldens regenerated per the ci.yml recipes; payload-level diff audit
confirms intended-only deltas: dim_payers covered+degraded(warn) and
int_patients__never_admitted unknown(singular) and mart_dq_summary
uncovered+exists-but-disabled in playground-report,
fct_provider_metrics covered+degraded(where,limit) + mart_dq_summary in
diff-showcase, check_specs prose everywhere, explore tests.html payload
only; jaffle diff is the CSS/JS bundle alone.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 46 minutes and 15 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (20)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📄 Rendered report previewAll golden examples regenerated cleanly. 🟡 Golden examplesCommitted to
🐶 Live dogfood previewThis PR doesn't touch ▶ Open ↗ opens the report in your browser in one click — The Pages preview may take ~1 min to update after this comment Alternative: GitHub CLI# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 27397421641 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.htmlPosted by |
There was a problem hiding this comment.
Code Review
This pull request implements coverage truthfulness features for the unique-key unbacked check in cute-dbt (issue #259). It introduces support for identifying and rendering degraded backing (due to warn severity, where filters, or limit caps), surfacing disabled uniqueness tests as distinct evidence, and degrading verdicts to unknown when singular tests are present. The changes span the domain logic, rendering adapters, UI templates, and extensive test suites. The review feedback focuses on performance optimizations in src/domain/checks.rs, specifically recommending the use of borrowed &str slices instead of owned String allocations during filtering, sorting, and helper function returns to reduce unnecessary memory allocations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Review follow-up (Gemini, PR #283): the grain detector's covering scan collects (&str, &Node) and sorts on the borrowed key — ids become owned Strings only at the POD ownership boundary (verdict.by / DegradedBacking.by), dropping the intermediate owned collection; singular_tests_on returns Vec<&str> borrowed from the manifest — its sole consumer (grain_fallback_verdict) only formats the ids into evidence copy, so owning them allocated just to discard. Pure refactor: no payload change, goldens byte-identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Overnight orchestration wrap-upMerged as What shipped: the coverage truthfulness pack — 🤖 Generated with Claude Code |
Summary
Hardens verdict honesty in the coverage-intelligence checks over the #258 test-config wire (per-AC delivery below). Domain-only check logic in
src/domain/checks.rs, a pure-rendering findings-panel surface, and a leak-checked fixture splice so every new cue is visible in the committed goldens.Closes #259
Per-AC delivery
AC1 — severity/where/limit-degraded tests attribute as degraded backing. New
DegradedBackingPOD ridesFinding.degraded(serde-skipped when empty — payload byte-stability): a covering uniqueness test that isseverity: warn,where-filtered, orlimit-capped still attributes inverdict.by, with every cause enumerated per test in domain-composed copy. Verdict vocabulary stays exactly three-valued (Covered/Uncovered/Unknown — never a fourth verdict, never a percentage); the cue is in-row beside the attribution per the #262 copy principles. An unrecognized severity surfaces its raw value, never guessed at. The findings panel shows adegraded backingsummary chip only when every attributing test is weakened (a partially degraded attribution keeps the summary quiet — no false alarm) under the #146/#188 tooltip contract, and lists the per-test causes either way.AC2 — disabled tests surface as "exists but disabled", distinct from absent. A disabled uniqueness test on the declared grain never counts as coverage, but surfaces as an
exists but disabledevidence row naming the test id + columns. Both disabled surfaces are scanned: nodes-map tests carryingconfig.enabled: false(synthetic manifests) and the manifestdisabledmap (where both real engines put them), via a shareduniqueness_columnsrecognizer overTestMetadata+ thecolumn_namefallback — the same linkageDisabledEntrykeeps on disabled generic tests.AC3 — singular tests participate via depends_on linkage. With no enabled generic uniqueness backing, an enabled singular (SQL-file) test referencing the model through
depends_on.nodes(the only wire linkage singular tests carry — #258, live-probed on both engines) degrades the verdict to honest UNKNOWN: evidence states what WAS checked (generic backing) and enumerates the singular tests, and no recommendation fires. Interpretation note (the issue's Discovery question): a singular test's SQL is not statically classifiable, so claiming it asCoveredbacking would overclaim on a TOTAL-tier check — the honest-UNKNOWN reading is implemented: singular tests participate by preventing the false Uncovered nag and by being named in evidence, never by enteringby. Likewise the founder-ping question "warn = partial or annotated-full": implemented as annotated-full (attribution stays; the weakening is enumerated in-row) — a warn test still runs and still asserts, it just doesn't gate.AC4 — existing check pins extended, none weakened. The #258 ingestion pin grows the fourth disabled entry's linkage assertions; all prior grain/union/join/incremental pins and both insta payload snapshots pass unchanged (the new
degradedkey is serde-skipped on full-strength findings). Specconditions/exclusionsprose mirrors the new predicate;heuristics/registry.toml+ the book check page are regenerated fromSPECS(byte-gated).Dogfood-alongside (fixture splice + goldens)
playground-current.json(current side only; node-level audit confirms every other byte identical):unique_dim_payers_payer_key→ severity warn;unique_fct_provider_metrics_provider_metrics_key→ where + limit 100 (each with the authoredunrendered_configtwin);int_patients__never_admitted→unique_key: patient_id+ a hand-authored synthetic singular test (assert_never_admitted_patients_distinct, cloned field-for-field from the engine-emitted singular specimen, depends_on-linked only); disabled map → a disableduniquetest onmart_dq_summary.entity_typecloned from the engine-emitted disabled-generic specimen.MANIFEST.tomlsha256 + provenance updated.Golden-diff audit (payload-level, structural): intended-only deltas —
playground-report.html: dim_payers grain → covered + degraded(severity warn); int_patients__never_admitted → NEW grain finding unknown + generic-backing/singular evidence; mart_dq_summary grain → uncovered + exists-but-disabled evidencediff-showcase-report.html: fct_provider_metrics grain → covered + degraded(where, limit); mart_dq_summary as aboveexplore/tests.html: same payload facts + check_specs prose;explore/dag.htmlbyte-identicaljaffle-shop-report.html: CSS/JS bundle only (no payload change — no degraded/disabled/singular shapes there)Tests
degradedwire shape)Gates (run directly, not via lefthook)
cargo fmtclean ·clippy --all-targets --locked -D warningsclean ·nextest1423 passed · BDD 172 scenarios / 1104 steps passed · headless pair (headless_zero_egress10,headless_toggle77) passed ·cargo doc --no-deps --locked -D warnings(incl.--document-private-items) clean ·cargo deny checkok · heuristics ledger + example byte-gates green via regen.🤖 Generated with Claude Code