-
fix(core): batch hashing, topological cache walk, and TUI batch fixes (#34798)
发布于
2026-03-13 13:26:41 +00:00 Current Behavior
hashBatchTaskshashes tasks one-by-one viaPromise.all+
hashTask(singular), making N separate native hasher calls.- Batch cache resolution rebuilds the entire remaining task graph each
wave viaremoveTasksFromTaskGraph, which is O(tasks) per wave and can
crash ifgraph.dependencies[id]is undefined. postRunStepsfor cached batch results is deferred until all cache
resolution completes.- TUI batch groups appear below "Waiting for task..." placeholders
because their status is based on nested task statuses, which may not
have transitioned yet.
Expected Behavior
hashBatchTasksuseshashTasks(plural) to batch all tasks into a
single native hasher call.- Batch cache resolution uses a new
walkTaskGraphutil that walks
topologically via in-degree counters — only visits direct dependents per
wave instead of rebuilding the graph. postRunStepsruns incrementally per wave during cache resolution.- TUI batch groups are treated as in-progress by existence (since
start_batchwas called), only moving to completed when all nested
tasks are done.
Related Issue(s)
Fixes crash:
Cannot read properties of undefined (reading 'filter')in
removeIdsFromTaskGraphduring batch cache resolution.
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
下载附件