Skip to content

Pin tolerance for additive sample fields and explicit-null samples - #15

Merged
mbreissi merged 1 commit into
mainfrom
feat/southbound-conformance
Jul 27, 2026
Merged

Pin tolerance for additive sample fields and explicit-null samples#15
mbreissi merged 1 commit into
mainfrom
feat/southbound-conformance

Conversation

@mbreissi

Copy link
Copy Markdown
Contributor

What

Regression pins (tests only, no pipeline changes) for the amended SOUTHBOUND §2 conventions — "Explicit null values" and "Additive sample fields" (core/docs/SOUTHBOUND.md):

  • A samples[] entry MAY carry additive protocol-specific fields beside the canonical five (e.g. valueType/valueEncoding); consumers MUST ignore fields they do not understand.
  • A deliberate null publishes as value: null with quality: "GOOD" (a failed read is value: null + quality: "BAD"), so the two stay distinguishable by quality alone.

The telemetry-processor is payload-agnostic by design; these tests pin that the §2 shapes flow through ingestion and every representative pipeline stage without error, without dropping the sample, and — for pass-through/projection paths — without stripping the additive fields.

Tests added

Test Pins
dispatch::tests::forwards_additive_sample_fields_and_explicit_null_value_untouched ingestion fan-out forwards the body verbatim (null + extras intact, sample not dropped)
proc::filter::tests::quality_filter_keeps_explicit_null_value_with_good_quality_and_additive_fields quality filter keys on quality only: null+GOOD kept, null+BAD droppable
proc::project::tests::keep_preserves_additive_sample_fields_and_explicit_null_value project.keep copies samples byte-identical, extras included
proc::tests::southbound_s2_null_and_additive_sample_fields_flow_through_a_pass_through_pipeline full filter → sample → project pipeline carries the sample end to end verbatim
proc::aggregate::tests::explicit_null_samples_fold_per_documented_null_semantics aggregation does not crash on nulls and follows its documented semantics

Null-handling findings

The aggregate stage has documented null semantics (docs/reference/data-types.md "Aggregate agg value types", docs/reference/messaging-interface.md "Aggregate output"), and the implementation matches them — no gap found:

  • count counts all folded sample values, nulls included;
  • first/last carry the raw value, null included;
  • numeric reducers (avg/sum/min/max) fold numeric values only and emit null when the window had no numeric sample (an all-null window emits samples[0].value: null, quality: "GOOD" — consistent with §2''s explicit-null convention).

No pipeline or dispatch code changed. Full suite: 99 passed, 0 failed (baseline was green).

🤖 Generated with Claude Code

https://claude.ai/code/session_014iQDskU2E1HLStYHoZrSTn

Pin the amended SOUTHBOUND section 2 conventions ("Explicit null values" +
"Additive sample fields") by regression test: a SouthboundSignalUpdate whose
samples carry additive unknown fields (valueType/valueEncoding) and an
explicit null value with quality GOOD flows through ingestion (the fan-out
handler), the quality filter, sample, project, and a full pass-through
pipeline without error, without dropping the sample, and without stripping
the additive fields. The aggregate stage is pinned to its documented null
semantics (docs/reference/data-types.md "Aggregate agg value types"): count
folds nulls, first/last carry them, numeric reducers are null when the
window has no numeric sample.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014iQDskU2E1HLStYHoZrSTn
@mbreissi
mbreissi marked this pull request as ready for review July 27, 2026 16:55
@mbreissi
mbreissi merged commit 8394f09 into main Jul 27, 2026
4 checks passed
@mbreissi
mbreissi deleted the feat/southbound-conformance branch July 27, 2026 16:56
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