repowise-dev / repowise-dev/repowise
[Bug] SYMBOL_USE_EDGE_TYPES still carries the inert reads membership
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 711
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 439
Description
Summary
SYMBOL_USE_EDGE_TYPES still lists "reads" as a symbol-to-symbol use edge, but nothing can produce a reads edge whose source is a symbol node.
packages/core/src/repowise/core/ingestion/models.py:554-573, the entry at :567
Mechanism
The file's own comment at :549-553 explains why: the symbol-level producer moved to framework_binds, leaving csharp_member_reads as the only remaining producer.
packages/core/src/repowise/core/ingestion/languages/csharp_member_reads.py:143-163
_add_reads_edge adds the edge with edge_type="reads" at :159, and its call sites pass file paths on both ends. A file node can never be a symbol node's predecessor, so the membership can never match. It is inert rather than wrong.
Two things already lean on this. EXECUTION_EDGE_TYPES (:584) explicitly subtracts "reads", which only makes sense if the membership is understood to be dead weight. REACHABILITY_USE_EDGE_TYPES (:591) is built on top of SYMBOL_USE_EDGE_TYPES and inherits the same inert member.
Repro
Read models.py:546-573 beside csharp_member_reads.py:130-163. The file-to-file shape of every reads edge the codebase emits is visible directly in _add_reads_edge's call sites, so no script is needed.
Impact
None on current behaviour. This is dead vocabulary, not a wrong edge. The cost is to a reader who sees "reads" in a symbol-use set and assumes it does something.
Done looks like
The proof first, then the removal. A guard test that a reads edge's source is never a symbol node, so removing the membership provably cannot change any existing classification. Only once that test passes, drop the "reads" entry and correct the comment at :549-553.
Keep this scoped to the one membership. FILE_DEPENDENCY_EDGE_TYPES at :540-543 also contains reads, where it is legitimate and load-bearing for file-level dependencies. Do not touch it, and do not change anything csharp_member_reads emits.
Tests: the guard test above, added before the removal. No existing test should change behaviour.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read packages/core/src/repowise/core/ingestion/models.py:546-573 alongside packages/core/src/repowise/core/ingestion/languages/csharp_member_reads.py:130-163. Add the requested guard test showing that reads edges do not originate from symbol nodes, then verify it passes before changing the symbol-use membership and its comment. Confirm existing behavior and FILE_DEPENDENCY_EDGE_TYPES remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100