* 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)
| 3648 | * it. One indexed query (idx_nodes_file_path + idx_edges_target_kind). |
| 3649 | */ |
| 3650 | getDependentFilePaths(filePath: string): string[] { |
| 3651 | const sql = `SELECT DISTINCT src.file_path AS fp |
| 3652 | FROM edges e |
| 3653 | JOIN nodes tgt ON tgt.id = e.target |
| 3654 | JOIN nodes src ON src.id = e.source |
| 3655 | WHERE tgt.file_path = ? |
| 3656 | AND e.kind != 'contains' |
| 3657 | AND src.file_path != ?`; |
| 3658 | const rows = this.db.prepare(sql).all(filePath, filePath) as Array<{ fp: string }>; |
| 3659 | return rows.map((r) => r.fp); |
| 3660 | } |
| 3661 | |
| 3662 | /** |
| 3663 | * Distinct file paths that `filePath` DEPENDS ON — the inverse of |
no test coverage detected