Skip to content

Three-phase cluster: on-spawning + downstream trace#159

Merged
NewGraphEnvironment merged 1 commit intomainfrom
153-upstream-trace
Apr 15, 2026
Merged

Three-phase cluster: on-spawning + downstream trace#159
NewGraphEnvironment merged 1 commit intomainfrom
153-upstream-trace

Conversation

@NewGraphEnvironment
Copy link
Copy Markdown
Owner

Summary

  • Phase 1: segments with both rearing AND spawning TRUE excluded from clustering — always valid
  • Phase 2: upstream boolean (existing) — rearing below spawning
  • Phase 3: FWA_Downstream on broken streams table (mainstem only) with gradient bridge + distance cap — rearing above spawning

Replaces boolean-only upstream check that was too permissive (CH rearing +6%).

Results (link compare script)

Species Rearing (0.13.7) Rearing (this PR)
BT BULK +1.3% -2.2%
CH BULK +6.0% +2.6%
CO BULK +0.9% +0.4%
ST BULK +3.6% -0.1%

All within 5%.

Fixes #153
Relates to NewGraphEnvironment/sred-2025-2026#24

Generated with Claude Code

Phase 1: segments with both label_cluster and label_connect TRUE
excluded from clustering — always valid (on-spawning rearing).

Phase 3: FWA_Downstream on broken streams table (mainstem only)
replaces fwa_downstreamtrace on raw FWA. Path gradient + distance
constraints applied linearly.

BULK CH rearing: +6.0% → +4.2%. BT rearing: +1.3% → +0.0%.
ADMS no regression.

Fixes #153

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NewGraphEnvironment NewGraphEnvironment merged commit d07e7ea into main Apr 15, 2026
1 check passed
@NewGraphEnvironment NewGraphEnvironment deleted the 153-upstream-trace branch April 15, 2026 07:20
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.

frs_cluster: apply bridge_gradient and bridge_distance along path

1 participant