Skip to content

V023: 2 new pathlen_out step violations from routing weight change #212

Description

@jameshgrn

Summary

The learned routing weights (commit a676073) introduced 2 new pathlen_out_step violations (V023). These did not exist in the pre-routing database (sword_v17c_pre_routing.duckdb).

Affected reaches

reach_id Region pathlen_out dn_pathlen_out Step Expected River
81210700081 NA 491,138 535,421 -44,282 11,043 Deer Hunting Slough
52139900545 OC 51,093 73,152 -22,059 6,602 NODATA

Root cause

At these bifurcations, the new weighted score produces different rankings when evaluated in different contexts:

  • compute_best_headwater_outlet (downstream pass) picks successor A → computes pathlen_out along that path
  • compute_main_neighbors picks successor B → rch_id_dn_main points to B
  • Result: pathlen_out increases when following rch_id_dn_main

This is a routing divergence between the two functions at close-scoring bifurcations.

Impact

0.0008% of checked edges (2 / 244,739). Non-blocking for beta.

Options

  1. Accept as INFO — downgrade V023 threshold or add these 2 reaches to a known-exception list
  2. Investigate the bifurcations — check if _up_key double-count fix (this branch) resolves them
  3. Tighten consistency — ensure both functions see identical score at these junctions (may require passing the same pathlen context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions