* Distinct file paths that DEPEND ON `filePath`: every file containing a * symbol with a cross-file edge (any kind except `contains`) into a symbol * of this file. This is the file-level projection of the symbol dependency * graph and the basis for blast-radius / `affected` test selection.
(filePath: string)
| 1390 | * it. One indexed query (idx_nodes_file_path + idx_edges_target_kind). |
| 1391 | */ |
| 1392 | getDependentFilePaths(filePath: string): string[] { |
| 1393 | const sql = `SELECT DISTINCT src.file_path AS fp |
| 1394 | FROM edges e |
| 1395 | JOIN nodes tgt ON tgt.id = e.target |
| 1396 | JOIN nodes src ON src.id = e.source |
| 1397 | WHERE tgt.file_path = ? |
| 1398 | AND e.kind != 'contains' |
| 1399 | AND src.file_path != ?`; |
| 1400 | const rows = this.db.prepare(sql).all(filePath, filePath) as Array<{ fp: string }>; |
| 1401 | return rows.map((r) => r.fp); |
| 1402 | } |
| 1403 | |
| 1404 | /** |
| 1405 | * Distinct file paths that `filePath` DEPENDS ON — the inverse of |
no test coverage detected