Repository navigation
Report lake connection lines apart from rearing km (#317) - #318
Merged
NewGraphEnvironment merged 6 commits intoOct 8, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
Phase 1: on #310's run-B snapshots, no re-classify. Connection lines (1400/1450 in lake polygons) are 160-276 km per species; ADMS CH vs bcfishpass +91.1% -> +38.9%. bcfishpass counts them too, so the rule applies to both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
FWA connection lines (1400/1450 in a lake polygon) stay in fresh's `rearing` flag, where cluster_rearing needs them, but the compare rollups now report them as `rearing_lake_connection` km and leave them out of `rearing` and `rearing_lake` km, on the link side and the bcfishpass side alike (bcfishpass counts them in BT and SK rearing). One predicate, .lnk_sql_lake_connection() (NULL-safe), exposed as a `connection` alias in lnk_rollup_wsg(). Its default rearing_km stays the flag total: the validator's cost and the parity scripts compare the flag (code-check round 1). compare_rollups.R stops on a pre/post-#317 mix. Live: rollup matches the flag measure within 0.008 km; SK parity 0.0 % on six bcfishpass-config WSGs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
RUNBOOK §7, research/habitat_thresholds.md ("Lake connection lines"),
the default bundle README and dictionary, a note on
bcfishpass_methodology.md's 1400/1450 claim, and the CLAUDE.md status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
FWA 1400 is "Construction line, other flow / inferred connection", a construction flow line, not a connector (operator: "construction and connector are totally different"). .lnk_sql_lake_connection() now matches lake-polygon lines on 1450 only, so 1400 stays in rearing km. Lake 1400 is at most 1.4 km of rearing: only NATR BT (3,709.5 -> 3,710.4 km, +24.3 % -> +24.4 % vs bcfishpass) and RB move. Logs re-run; docs swept. Two code-check rounds, ended by enumerating every claim-bearing sentence against the DB and git (one review figure was a bare-id_segment fan-out and was corrected before landing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
NewGraphEnvironment
deleted the
317-lake-km-should-1450-connection-lines-cou
branch
October 8, 2026 21:25
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
lnk_compare_rollup()/lnk_compare_wsg()) report FWA lake connectors (edge 1450, "Construction line, connection", in a lake or reservoir polygon) as a newrearing_lake_connectionkm slice and leave them out ofrearingandrearing_lakekm. fresh'srearingflag still carries them, socluster_rearingstill joins inlet rearing to the lake. Rules are unchanged and nothing re-classifies..lnk_sql_lake_connection()is exposed as aconnectionalias inlnk_rollup_wsg()and applied to the link side and the bcfishpass reference alike, because bcfishpass counts these lines in BT and SK rearing too.lnk_rollup_wsg()'s defaultrearing_kmstays the flag total, since the validator's cost and the parity scripts compare the flag itself.data-raw/logs/lake_connection_317/). ADMS against bcfishpass: CH +91.1 % → +38.9 %, CO +75.0 % → +28.7 %, BT +16.4 % → +2.0 %. SK rearing km fall 55–95 % on both sides, so SK parity stays 0.0 % on six bcfishpass-config WSGs. Write-up:research/habitat_thresholds.md, "Lake connection lines".Related Issues
Test plan
devtools::test(): 2585 pass / 0 fail / 16 warnings (baseline)connectionalias, and the flag-total default. They also pin the compare metrics and the link-side and bcfishpass-side SQL, plus the 9-row long format.rollup_check.csv); bcfishpass-config parity on 9 taxonomy-pinned WSGs (parity_bcfishpass.csv)lintr: no new lints in R/ (lnk_compare_wsg.Rcarries 18 pre-existing, same as main)/code-check: four rounds. Round 1 found the primitive-default leak, fixed by keeping the flag default; round 2 clean; round 3 found two doc errors, fixed; round 4 clean.Notes
rearing_lake_connection, andrearing/rearing_lakekm shrink.data-raw/compare_rollups.Rstops on a directory that mixes pre- and post-Lake km: should 1450 connection lines count as lake rearing? #317 rollups.lnk_rollup_wsg()'s default too. Review showed that change would break the validator's pairing of capture and cost, and the parity proof, so it was kept as the flag total.lnk_rollup_wsg()'s defaultrearing_kmstill counts connection lines, sorearing_kmmeans two things until rearing_km means two things: lnk_rollup_wsg() keeps lake connection lines, the compare rollups do not #319 makes it one meaning everywhere, with the validator's capture staying on the flag.🤖 Generated with Claude Code
https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx