Skip to content

Prove GR / KO / RB build models end-to-end on default bundle #108

@NewGraphEnvironment

Description

@NewGraphEnvironment

Problem

GR (Arctic Grayling), KO (Kokanee), and RB (Rainbow Trout) all have rule blocks emitted in default/rules.yaml and rows in default/parameters_fresh.csv (KO + GR added in #106; RB pre-existing). bcfishobs has substantive observations for each (RB: 117,593; KO: 9,535; GR: 3,298). Per-species fresh habitat thresholds exist for all three. But no end-to-end proof exists yet that the pipeline actually classifies habitat for any of them in any WSG.

What we need to prove (per species)

For GR, KO, RB on the default bundle:

  1. lnk_pipeline_classify consumes the species' rule block without error
  2. fresh.streams_habitat contains rows for the species with non-zero spawning_ / rearing_ values in a WSG where presence is flagged
  3. KO's lake-only rear (no rear_edge_types in fresh thresholds) correctly produces lake_rearing_ha > 0 in a WSG with a known Kokanee lake
  4. GR's stream+lake rear produces both rearing_stream and lake_rearing values
  5. RB's wetland (1 ha min) + lake (10 ha min) rears both fire
  6. frs_cluster runs cleanly for GR + KO (cluster_rearing = TRUE); KO also gets cluster_spawning = TRUE
  7. Observation lift fires for each species (per-species barrier_overrides table has rows when bcfishobs has observations upstream of natural barriers)

Approach

Pick one WSG per species where presence is well-attested:

Species Test WSG Rationale
GR PARS, NATR (Mackenzie basin) Authoritative GR presence per wsg_species_presence
KO KOTL, PARS (interim sentinel WSGs from #106) Until upstream NewGraphEnvironment/bcfishpass#12 ships authoritative coverage
RB KOTL, COWN (or any high-RB-density WSG) 117k bcfishobs observations to lift

Run compare_bcfishpass_wsg(wsg, lnk_config("default")) for each — assert species rows present in the rollup tibble, assert non-zero values, spot-check the <schema>.streams_habitat table for spawning_<sp> = 1 and rearing_<sp> = 1 flags.

Acceptance

  • All 3 species produce non-zero spawning_km in their test WSGs
  • All 3 species produce non-zero rearing values (stream / lake / wetland depending on dimensions)
  • No errors in lnk_pipeline_* phases when these species are active
  • Observation lift fires (per-species barrier_overrides has rows)
  • Verification log committed to data-raw/logs/

Out of scope

  • bcfishpass-bundle parity for GR/KO/RB — bcfishpass doesn't model these species, so there's nothing to compare against. This is default-bundle methodology proof only.
  • Authoritative KO presence-by-WSGAdd ko (Kokanee) column to wsg_species_presence.csv bcfishpass#12 (upstream); link uses sentinel WSGs in the interim.
  • Per-species access methodology refinement — accept the dimensions.csv settings as-is; tune later if numbers look off.

Relates to #106 (the spp_cols hardcode fix that enabled GR/KO end-to-end)
Relates to NewGraphEnvironment/bcfishpass#12 (KO presence column)
Relates to NewGraphEnvironment/sred-2025-2026#24

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions