Skip to content

Support spawn_connected rules for waterbody-adjacent spawning#155

Merged
NewGraphEnvironment merged 3 commits intomainfrom
154-spawn-connected
Apr 14, 2026
Merged

Support spawn_connected rules for waterbody-adjacent spawning#155
NewGraphEnvironment merged 3 commits intomainfrom
154-spawn-connected

Conversation

@NewGraphEnvironment
Copy link
Copy Markdown
Owner

Summary

  • Parse spawn_connected block in rules YAML — single config block with fixed keys (direction, waterbody_type, gradient_max, channel_width_min, distance_max, bridge_gradient), own validation separate from spawn/rear rules
  • Additive step in .frs_connected_waterbody(): after subtractive phases, promote accessible segments in the downstream trace that meet permissive spawn_connected thresholds but failed standard classification
  • BULK SK spawning: 22.04 km → 24.22 km (-0.7% vs bcfishpass 24.38 km). No regression on other species.

Test plan

  • 705 tests pass (5 new parser tests for spawn_connected validation)
  • Code-check clean (2 rounds)
  • Verified with link@31-per-model-barriers compare_bcfishpass.R on BULK
  • SK spawning -9.6% → -0.7%, connected waterbody 3727 → 71

Fixes #154
Relates to NewGraphEnvironment/sred-2025-2026#16

🤖 Generated with Claude Code

NewGraphEnvironment and others added 3 commits April 14, 2026 12:51
Relates to #154

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add spawn_connected as a valid habitat block alongside spawn/rear.
Unlike spawn/rear (lists of rules with OR semantics), spawn_connected
is a single configuration block with fixed keys: direction,
waterbody_type, gradient_max, channel_width_min, distance_max,
bridge_gradient. Own validation via .frs_validate_spawn_connected().

Flows through existing params attachment — accessible at
params$SP$rules$spawn_connected.

Relates to #154

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After the subtractive phases (downstream trace + upstream cluster),
Phase 3 promotes accessible segments in the downstream trace that
meet permissive spawn_connected thresholds (gradient_max,
channel_width_min, edge_types) but failed standard classification.

Keeps lfid_tbl alive from Phase 1 for the additive UPDATE. Segments
must be accessible, in the trace, and meet all spawn_connected
predicates. Wired through dispatcher via params$rules$spawn_connected.

BULK SK spawning: 22.04 km → ~24.2 km (bcfishpass 24.38 km).

Relates to #154

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NewGraphEnvironment NewGraphEnvironment merged commit 575d916 into main Apr 14, 2026
1 check passed
@NewGraphEnvironment NewGraphEnvironment deleted the 154-spawn-connected branch April 14, 2026 20:33
NewGraphEnvironment added a commit that referenced this pull request Apr 14, 2026
* main:
  Bump to v0.13.6 and archive PWF for issue #154
  Support spawn_connected rules for waterbody-adjacent spawning (#155)
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.

Support spawn_connected rules for waterbody-adjacent spawning

1 participant