Skip to content

tech-debt: orphan_detection count_cypher receives unused $limit param #90

@egouilliard-leyton

Description

@egouilliard-leyton

Context

Discovered during implementation of the `--scope` flag for `arch-check` (issue #22).

Description

In `arch_check.py`, the `_check_orphans` function builds a `count_cypher` that returns `count(*) AS v` with no `LIMIT` clause. However, the `params` dict (~line 444) always includes `"limit": SAMPLE_LIMIT`, and `count_cypher` is run with `**params`, so Neo4j silently receives a `$limit` parameter it never references.

This is harmless today (Neo4j ignores unused params), but it adds noise and could mislead a future refactor that splits count vs. sample params.

Suggested approach

Split the params dict into two: one for `count_cypher` (no `limit`) and one for `sample_cypher` (includes `limit`). Or just inline the params at each `s.run()` call to make intent explicit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions