Skip to content

Route extraction: pre-commit/CI config URLs become __route__infra__ Route nodes and collect junk HANDLES edges #999

Description

@DeusData

On a plain flask checkout, URLs from .pre-commit-config.yaml (e.g. https://github.com/astral-sh/ruff-pre-commit, codespell, uv-pre-commit) are materialized as __route__infra__<url> Route nodes, and the route matcher then attaches HANDLES edges from arbitrary view functions to them:

examples.tutorial.flaskr.auth.login -> __route__infra__https://github.com/astral-sh/ruff-pre-commit
examples.tutorial.flaskr.auth.login -> __route__infra__https://github.com/pre-commit/pre-commit-hooks

Every handler gets the same 6-7 junk targets, and WHICH handler wins is tie-break/scheduling-dependent (part of the HANDLES churn between builds). Also in the same class: multiple unrelated handlers all HANDLES-linked to the ambiguous __route__ANY__/ root route.

Asks:

  1. Infra-scan URLs from CI/tooling configs (pre-commit, workflows) should not produce route nodes that participate in handler matching — or at minimum never receive HANDLES from code handlers.
  2. When several handlers tie for one route, either emit none (zero-edge guarantee) or make the tie-break deterministic — arbitrary winners flip between runs/builds.

Found while diffing edge sets during the #979-regression bisect; reproducible on plain pallets/flask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgespriority/normalStandard review queue; useful PR with ordinary maintainer urgency.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions