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.
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.