Repository navigation
Calibrate CH/BT habitat thresholds from observations (#284, steps 1-4, 6) - #287
Merged
NewGraphEnvironment merged 11 commits intoSep 26, 2026
Merged
Conversation
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
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
…284) Two read-only query scripts and their committed outputs. Observations are joined to the segment the model tests (the upstream one at each break), compared with accessible length, and checked against FISS data-submission sites from knowledge (aggregates only; knowledge is private). 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
The only cell the evidence moves. Every other CH/BT gradient max and width min, spawn_gradient_min and the bridge are kept, so default_tuned still inherits parameters_fresh.csv. A test pins exactly which cells differ from default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx
research/habitat_thresholds.md records the verdict per threshold with its observation, FISS and literature evidence, the post-hoc change that moved three verdicts, and the step-5 scoring plan (waits on #283). 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
) Inland, DV records are bull trout under the other name; on the coast the two chars' habitat biology is treated as equivalent. Pooled BT+DV is now the primary BT evidence and BT-only is recorded beside it (evidence_role in candidates.csv, set in bridge_bt.csv), so the evidence exists both ways. The pooled P95 moves default_tuned BT rear_gradient_max 0.1249 -> 0.1349. The inverted keep clause is removed from the rule code. Reviewed in three rounds (review-pool-round{1,2,3}.md). 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
NewGraphEnvironment
deleted the
284-research-calibrate-ch-and-bt-gradient-an
branch
September 26, 2026 17:48
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
Steps 1–4 and 6 of #284: CH and BT gradient and channel-width thresholds for the
default_tunedbundle, calibrated from observations, FISS site data and literature. The rule was fixed before the distributions were seen.rear_gradient_max0.1049 → 0.1349 inconfigs/default_tuned/. The evidence is BT and DV records pooled (n 4,764 accessible observations, P95 0.135), and Isaak et al. 2015's 15 % natal envelope agrees. BT records alone give 0.1249, and both are recorded (evidence_roleincandidates.csv).spawn_gradient_min(CH spawning selects the flattest bin, ratio 2.8) andcluster_bridge_gradient(1.2 % loss). Sodefault_tunedstill inheritsparameters_fresh.csv.data-raw/query_habitat_thresholds_{obs,fiss}.R→data-raw/logs/habitat_thresholds_284/.research/habitat_thresholds.md, plus a newresearch/README.mdindex.Read before trusting the numbers
Three changes were made to the rule after numbers had been seen, all disclosed in the doc (Method, Changes 1–3):
Step 5 should score the retired values too.
The candidates are unscored. Scoring against the observation validation (Validate modelled habitat against fish observations per species and watershed group #283) is step 5, so Research: calibrate CH and BT gradient and channel-width thresholds from observations #284 stays open.
BT has no life stage in bcfishobs. The staged evidence is the DV records. With them at full confidence the rule would loosen BT spawning gradient (0.1949) and width (1.2 m); the literature vetoes both.
Related Issues
Test plan
devtools::test(filter = "lnk_config"): 171/171, including a new test that pins exactly which cellsdefault_tunedchanges. That test was proven by planting an untracked cell change, which made it fail.Connection refusedon the bcfishpass tunnel:63333, which was down during the run; these tests aren't touched by this branch.lnk_config_verify(lnk_config("default_tuned"))clean;audit_configs.R§2: default_tuned rules match structurally, so it needs no ownrules.yaml./code-checkon the pooling change, 3 rounds (review-pool-round*.md). Round 3 swept 45 BT figures for which evidence set each came from./code-check, 4 rounds (planning/archive/2026-09-issue-284-*/review-round*.md). R1 and R2 found defects that flipped candidates and corrected the bridge mechanism. R3 and R4 checked 88 and 97 claims; R4 was 96/97, and the one miss (a section pointer) is fixed.Notes
knowledgeis private, so only FISS aggregates are committed here. Site rows are written only whenLNK_FISS_SITES_OUTis set.knowledge: parse the individual-fish sheets;average_gradient_percentholds proportions.fresh/link: NULL-width river polygons fail the river rule'sBETWEEN 0 AND 9999.284-research-calibrate-ch-and-bt-gradient-a, whose three planning commits are cherry-picked here. That leaves out the unrelated MCGR run-log commit, which is on localmainonly.🤖 Generated with Claude Code
https://claude.ai/code/session_01WJE2szSCkeV9R3qKhuSwyx