Two DIFFERENT symbols that happen to share a label, in different files. This is the monorepo shape: each workspace defines its own `MetricsPort`. Both land in `_find_node`'s `exact` tier, separated only by iteration order.
(tmp_path, *, reverse: bool = False)
| 266 | |
| 267 | |
| 268 | def _write_ambiguous_graph(tmp_path, *, reverse: bool = False): |
| 269 | """Two DIFFERENT symbols that happen to share a label, in different files. |
| 270 | |
| 271 | This is the monorepo shape: each workspace defines its own `MetricsPort`. |
| 272 | Both land in `_find_node`'s `exact` tier, separated only by iteration order. |
| 273 | """ |
| 274 | nodes = [ |
| 275 | {"id": "chat_metrics_port", "label": "MetricsPort", |
| 276 | "source_file": "services/chat/src/application/ports/metrics.port.ts", |
| 277 | "community": 0}, |
| 278 | {"id": "scraping_metrics_port", "label": "MetricsPort", |
| 279 | "source_file": "services/scraping/src/application/ports/metrics.port.ts", |
| 280 | "community": 0}, |
| 281 | ] |
| 282 | graph_data = { |
| 283 | "directed": False, "multigraph": False, "graph": {}, |
| 284 | "nodes": list(reversed(nodes)) if reverse else nodes, |
| 285 | "links": [], |
| 286 | } |
| 287 | p = tmp_path / ("graph_rev.json" if reverse else "graph.json") |
| 288 | p.write_text(json.dumps(graph_data)) |
| 289 | return p |
| 290 | |
| 291 | |
| 292 | def _run_expect_exit(monkeypatch, graph_path, label, capsys): |
no outgoing calls
no test coverage detected