Files currently locked by running/staged nodes (write-write hazard guard).
()
| 86 | |
| 87 | /** Files currently locked by running/staged nodes (write-write hazard guard). */ |
| 88 | private lockedFiles(): Set<string> { |
| 89 | const locked = new Set<string>(); |
| 90 | for (const n of this.graph.nodes.values()) { |
| 91 | if (n.status === 'running' || n.status === 'review' || n.status === 'staged') { |
| 92 | for (const f of n.targetFiles) locked.add(f); |
| 93 | } |
| 94 | } |
| 95 | return locked; |
| 96 | } |
| 97 | |
| 98 | /** Pick ready nodes that don't collide (by file) with locked or each other. */ |
| 99 | private selectRunnable(slots: number): TaskNode[] { |