Preserve multiple labels per break position#146
Merged
NewGraphEnvironment merged 2 commits intomainfrom Apr 12, 2026
Merged
Conversation
The measure-rounding dedup in frs_network_segment deleted rows at (blue_line_key, downstream_route_measure) — dropping one label when a gradient barrier and a falls shared the same position. Fix: add AND a.label = b.label to only remove exact duplicates. Different labels at the same position survive. Geometry splitting already deduplicates separately in frs_break_apply (SELECT DISTINCT blue_line_key, round(drm) — no label involved). Integration test: two mock break sources at the same position with different labels, verify both survive in the breaks table. 692 tests pass. Fixes #145 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve multiple labels per break position in
streams_breaks. A gradient_15 and a falls at the same measure both survive — enabling per-barrier overrides, access reporting, and habitat reporting by barrier type.IS NOT DISTINCT FROMfor NULL-safe label comparison (code-check caught NULL bypass)frs_break_apply(no label involved)Test plan
=operator. Fixed withIS NOT DISTINCT FROM.Fixes #145
Relates to NewGraphEnvironment/sred-2025-2026#16