sparkforensics-server 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/package.json +1 -1
  2. package/public/assets/AutoscalingChurn-CRA2Mb7F.js +1 -0
  3. package/public/assets/CacheUtilization-Bh9OY_V9.js +1 -0
  4. package/public/assets/{CachingOpportunity-D1NcHs0V.js → CachingOpportunity-oCiQwmTJ.js} +1 -1
  5. package/public/assets/{ColdStart-CdRJ9gD8.js → ColdStart-BJrtjfmn.js} +1 -1
  6. package/public/assets/ConfigAudit-DMvKxySP.js +1 -0
  7. package/public/assets/{CoreUsageArea-a--NTRGY.js → CoreUsageArea-REC2zsKw.js} +1 -1
  8. package/public/assets/Dashboard-BHZ76JCu.js +2 -0
  9. package/public/assets/DisclosureContext-OO7X1HAx.js +1 -0
  10. package/public/assets/{DuplicatePlanSubtree-dobXdz7E.js → DuplicatePlanSubtree-BgG-L-cK.js} +1 -1
  11. package/public/assets/ExecutorUtilization-D2KhSVbY.js +1 -0
  12. package/public/assets/{GcPressure-8-G2ri10.js → GcPressure-D1BTE8qh.js} +1 -1
  13. package/public/assets/{IncompleteRun-B91lky7a.js → IncompleteRun-DD40xUpy.js} +1 -1
  14. package/public/assets/{JobFailures-BsWvBMyJ.js → JobFailures-YwNzCF19.js} +1 -1
  15. package/public/assets/MemoryUtilization-9b8ee_3_.js +1 -0
  16. package/public/assets/{OverBroadcast-DdN8JIJH.js → OverBroadcast-CfctS8a8.js} +1 -1
  17. package/public/assets/{PartitionSizing-CY5HDYtp.js → PartitionSizing-VG8kBgG5.js} +1 -1
  18. package/public/assets/{PlanExplorer-DgHCDBD_.js → PlanExplorer-DmubTAOP.js} +1 -1
  19. package/public/assets/PlanGraphRoute-DctPZjS0.js +1 -0
  20. package/public/assets/RetryWaste-CnpM8bB7.js +1 -0
  21. package/public/assets/{ShuffleIO-MMnDESkF.js → ShuffleIO-D13vGmas.js} +1 -1
  22. package/public/assets/Skew-DlagstYP.js +1 -0
  23. package/public/assets/SlowHost-cSkLRZ_e.js +1 -0
  24. package/public/assets/{SmallFiles-BoK3R1Ex.js → SmallFiles-B-kERMcq.js} +1 -1
  25. package/public/assets/{SpeculationWaste-CnVxB5AJ.js → SpeculationWaste-DaysAzXO.js} +1 -1
  26. package/public/assets/Spill-H44Gz4US.js +1 -0
  27. package/public/assets/{StageFailed-mAhHU4l_.js → StageFailed-DCfii9h_.js} +1 -1
  28. package/public/assets/{StageFindingGroup-BEtPWcT0.js → StageFindingGroup-BXJ0Mj5n.js} +1 -1
  29. package/public/assets/{StageHeader-DJkYkrsU.js → StageHeader--oN2J-oD.js} +1 -1
  30. package/public/assets/StageShape-IZ80CZiJ.js +1 -0
  31. package/public/assets/{StageSlowness-BPRw-otN.js → StageSlowness--BRIaBc1.js} +1 -1
  32. package/public/assets/Straggler-Ctq0Df_o.js +1 -0
  33. package/public/assets/TaskFailures-Bks_gqhL.js +1 -0
  34. package/public/assets/{TinyTask-Bi84qU7n.js → TinyTask-BssfzGFB.js} +1 -1
  35. package/public/assets/{UnderBroadcast-DdQV7htE.js → UnderBroadcast-DsScrxc-.js} +1 -1
  36. package/public/assets/{finding-anchor-Cl6_5hfV.js → finding-anchor-BYW1oz5R.js} +1 -1
  37. package/public/assets/{impact-sort-CssZ6MT2.js → impact-sort-xzy0g-Vh.js} +1 -1
  38. package/public/assets/index-DhpRGMZc.css +2 -0
  39. package/public/assets/index-DwqkFUFk.js +14 -0
  40. package/public/assets/instrument-sans-latin-ext-wdth-normal-C5E2Gvlv.woff2 +0 -0
  41. package/public/assets/instrument-sans-latin-wdth-normal-BVScPF0l.woff2 +0 -0
  42. package/public/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  43. package/public/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  44. package/public/assets/react-vendor-DfpuPQZf.js +9 -0
  45. package/public/assets/{select-CQjNhprm.js → select-C8edjYTq.js} +1 -1
  46. package/public/assets/{usePagedRows-Dyl6T8Ok.js → usePagedRows-CsuUFeYx.js} +1 -1
  47. package/public/assets/useRecentFiles-BvkKo3JN.js +11 -0
  48. package/public/assets/{useSortMode-Dhvit8dt.js → useSortMode-joX71BZN.js} +1 -1
  49. package/public/docs/404.html +3 -7
  50. package/public/docs/assets/{app.eYTPqTeq.js → app.CnWL6bKV.js} +1 -1
  51. package/public/docs/assets/chunks/@localSearchIndexroot.tE5pz54z.js +1 -0
  52. package/public/docs/assets/chunks/{VPLocalSearchBox.DsZrQKQR.js → VPLocalSearchBox.C0IBKeRQ.js} +1 -1
  53. package/public/docs/assets/chunks/{theme.DsTNE2pE.js → theme.BH-2HuRf.js} +2 -2
  54. package/public/docs/assets/{contributor-guide_architecture_board-widgets_caching-and-memory.md.8bH1HnZp.js → contributor-guide_architecture_board-widgets_caching-and-memory.md.CQgn1t_M.js} +1 -1
  55. package/public/docs/assets/contributor-guide_architecture_board-widgets_visual-system-and-templating.md.wulOueeB.js +1 -0
  56. package/public/docs/assets/{contributor-guide_architecture_detector-contract.md.wj6Et6UD.js → contributor-guide_architecture_detector-contract.md.N4hhenrA.js} +1 -1
  57. package/public/docs/assets/{contributor-guide_architecture_detector-contract_threshold-tables.md.CKjWG56Y.js → contributor-guide_architecture_detector-contract_threshold-tables.md.Dp3c40rx.js} +1 -1
  58. package/public/docs/assets/contributor-guide_architecture_impact-estimation.md.DfvbqEUu.js +1 -0
  59. package/public/docs/assets/{contributor-guide_architecture_impact-estimation.md.CZv_ZGOp.lean.js → contributor-guide_architecture_impact-estimation.md.DfvbqEUu.lean.js} +1 -1
  60. package/public/docs/assets/{contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.BUucRc0A.js → contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.Cwm1jHmn.js} +1 -1
  61. package/public/docs/assets/{contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.BUucRc0A.lean.js → contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.Cwm1jHmn.lean.js} +1 -1
  62. package/public/docs/assets/{contributor-guide_architecture_worker-protocol_cli-and-mcp.md.DC1YqXBp.js → contributor-guide_architecture_worker-protocol_cli-and-mcp.md.BX1XnFbq.js} +1 -1
  63. package/public/docs/assets/{contributor-guide_architecture_worker-protocol_evidence-report.md.DVGZOWvW.js → contributor-guide_architecture_worker-protocol_evidence-report.md.CiQl1MLb.js} +1 -1
  64. package/public/docs/assets/{contributor-guide_development-setup.md.D9bu4j_c.js → contributor-guide_development-setup.md.DQdzera7.js} +1 -1
  65. package/public/docs/assets/instrument-sans-latin-ext-wdth-normal.C5E2Gvlv.woff2 +0 -0
  66. package/public/docs/assets/instrument-sans-latin-wdth-normal.BVScPF0l.woff2 +0 -0
  67. package/public/docs/assets/jetbrains-mono-cyrillic-wght-normal.D73BlboJ.woff2 +0 -0
  68. package/public/docs/assets/jetbrains-mono-greek-wght-normal.Bw9x6K1M.woff2 +0 -0
  69. package/public/docs/assets/jetbrains-mono-latin-ext-wght-normal.DBQx-q_a.woff2 +0 -0
  70. package/public/docs/assets/jetbrains-mono-latin-wght-normal.B9CIFXIH.woff2 +0 -0
  71. package/public/docs/assets/jetbrains-mono-vietnamese-wght-normal.Bt-aOZkq.woff2 +0 -0
  72. package/public/docs/assets/style.CyK9Ss73.css +1 -0
  73. package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.BEepbDDL.js +24 -0
  74. package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.BEepbDDL.lean.js +1 -0
  75. package/public/docs/assets/{user-guide_mcp-tools_get-run-summary.md.DpxZ4ZNp.js → user-guide_mcp-tools_get-run-summary.md.EhaIsele.js} +1 -1
  76. package/public/docs/assets/user-guide_understanding-findings.md.3C7KCEZO.js +1 -0
  77. package/public/docs/contributor-guide/architecture/board-widgets/caching-and-memory.html +6 -10
  78. package/public/docs/contributor-guide/architecture/board-widgets/plan-advisor.html +4 -8
  79. package/public/docs/contributor-guide/architecture/board-widgets/visual-system-and-templating.html +6 -10
  80. package/public/docs/contributor-guide/architecture/board-widgets.html +4 -8
  81. package/public/docs/contributor-guide/architecture/detector-contract/plan-attribution.html +4 -8
  82. package/public/docs/contributor-guide/architecture/detector-contract/threshold-tables.html +6 -10
  83. package/public/docs/contributor-guide/architecture/detector-contract.html +6 -10
  84. package/public/docs/contributor-guide/architecture/drill-down/plan-graph.html +4 -8
  85. package/public/docs/contributor-guide/architecture/drill-down.html +4 -8
  86. package/public/docs/contributor-guide/architecture/impact-estimation/caveats-tuning-and-coverage.html +6 -10
  87. package/public/docs/contributor-guide/architecture/impact-estimation/stage-union-rollup.html +4 -8
  88. package/public/docs/contributor-guide/architecture/impact-estimation.html +6 -10
  89. package/public/docs/contributor-guide/architecture/index.html +4 -8
  90. package/public/docs/contributor-guide/architecture/overview.html +4 -8
  91. package/public/docs/contributor-guide/architecture/state-and-history/history-server-intake.html +4 -8
  92. package/public/docs/contributor-guide/architecture/state-and-history/run-comparison-internals.html +4 -8
  93. package/public/docs/contributor-guide/architecture/state-and-history.html +4 -8
  94. package/public/docs/contributor-guide/architecture/widget-rendering/findings-tab.html +4 -8
  95. package/public/docs/contributor-guide/architecture/widget-rendering/investigation-routing.html +4 -8
  96. package/public/docs/contributor-guide/architecture/widget-rendering/list-sort-mode.html +4 -8
  97. package/public/docs/contributor-guide/architecture/widget-rendering/reference-section.html +4 -8
  98. package/public/docs/contributor-guide/architecture/widget-rendering/row-expand-contract.html +4 -8
  99. package/public/docs/contributor-guide/architecture/widget-rendering.html +4 -8
  100. package/public/docs/contributor-guide/architecture/worker-protocol/cli-and-mcp.html +6 -10
  101. package/public/docs/contributor-guide/architecture/worker-protocol/core-and-event-validation.html +4 -8
  102. package/public/docs/contributor-guide/architecture/worker-protocol/evidence-availability.html +4 -8
  103. package/public/docs/contributor-guide/architecture/worker-protocol/evidence-report.html +6 -10
  104. package/public/docs/contributor-guide/architecture/worker-protocol.html +4 -8
  105. package/public/docs/contributor-guide/contributing.html +4 -8
  106. package/public/docs/contributor-guide/development-setup.html +6 -10
  107. package/public/docs/contributor-guide/testing.html +4 -8
  108. package/public/docs/favicon.svg +2 -2
  109. package/public/docs/hashmap.json +1 -1
  110. package/public/docs/index.html +4 -8
  111. package/public/docs/tuning-reference/anti-patterns.html +4 -8
  112. package/public/docs/tuning-reference/aqe.html +4 -8
  113. package/public/docs/tuning-reference/bottleneck-broadcast-sizing.html +4 -8
  114. package/public/docs/tuning-reference/bottleneck-cold-start.html +4 -8
  115. package/public/docs/tuning-reference/bottleneck-duplicate-plan-subtree.html +4 -8
  116. package/public/docs/tuning-reference/bottleneck-failures.html +4 -8
  117. package/public/docs/tuning-reference/bottleneck-gc.html +4 -8
  118. package/public/docs/tuning-reference/bottleneck-job-failure-rate.html +4 -8
  119. package/public/docs/tuning-reference/bottleneck-memory-utilization.html +4 -8
  120. package/public/docs/tuning-reference/bottleneck-retry-waste.html +4 -8
  121. package/public/docs/tuning-reference/bottleneck-shuffle.html +4 -8
  122. package/public/docs/tuning-reference/bottleneck-skew.html +4 -8
  123. package/public/docs/tuning-reference/bottleneck-slow-host.html +4 -8
  124. package/public/docs/tuning-reference/bottleneck-small-files.html +4 -8
  125. package/public/docs/tuning-reference/bottleneck-spill.html +4 -8
  126. package/public/docs/tuning-reference/bottleneck-straggler.html +4 -8
  127. package/public/docs/tuning-reference/bottleneck-tiny-tasks.html +4 -8
  128. package/public/docs/tuning-reference/bottleneck-utilization.html +4 -8
  129. package/public/docs/tuning-reference/caching.html +4 -8
  130. package/public/docs/tuning-reference/cluster-config.html +4 -8
  131. package/public/docs/tuning-reference/config.html +4 -8
  132. package/public/docs/tuning-reference/data-formats.html +4 -8
  133. package/public/docs/tuning-reference/index.html +5 -9
  134. package/public/docs/tuning-reference/intro.html +4 -8
  135. package/public/docs/tuning-reference/joins.html +4 -8
  136. package/public/docs/tuning-reference/memory-model.html +4 -8
  137. package/public/docs/tuning-reference/metrics.html +4 -8
  138. package/public/docs/tuning-reference/partitioning.html +4 -8
  139. package/public/docs/tuning-reference/pyspark.html +4 -8
  140. package/public/docs/tuning-reference/shuffle.html +4 -8
  141. package/public/docs/tuning-reference/spark-architecture.html +4 -8
  142. package/public/docs/tuning-reference/table-formats.html +4 -8
  143. package/public/docs/user-guide/alternative-log-retrieval/managed-platforms.html +4 -8
  144. package/public/docs/user-guide/alternative-log-retrieval/ssh-bastion.html +4 -8
  145. package/public/docs/user-guide/alternative-log-retrieval.html +4 -8
  146. package/public/docs/user-guide/getting-started/ci-and-automation.html +9 -12
  147. package/public/docs/user-guide/getting-started/reading-the-dashboard.html +4 -8
  148. package/public/docs/user-guide/getting-started/regression-metric-keys.html +4 -8
  149. package/public/docs/user-guide/getting-started/tuning-thresholds.html +4 -8
  150. package/public/docs/user-guide/getting-started.html +4 -8
  151. package/public/docs/user-guide/mcp-tools/compare-runs.html +4 -8
  152. package/public/docs/user-guide/mcp-tools/diagnose-run.html +4 -8
  153. package/public/docs/user-guide/mcp-tools/evaluate-budgets.html +4 -8
  154. package/public/docs/user-guide/mcp-tools/get-finding-documentation.html +4 -8
  155. package/public/docs/user-guide/mcp-tools/get-finding-evidence.html +4 -8
  156. package/public/docs/user-guide/mcp-tools/get-reference-doc.html +4 -8
  157. package/public/docs/user-guide/mcp-tools/get-run-summary.html +6 -10
  158. package/public/docs/user-guide/mcp-tools/list-runs.html +4 -8
  159. package/public/docs/user-guide/mcp-tools.html +4 -8
  160. package/public/docs/user-guide/run-comparison/how-stages-are-matched.html +4 -8
  161. package/public/docs/user-guide/run-comparison.html +4 -8
  162. package/public/docs/user-guide/understanding-findings.html +6 -10
  163. package/public/export-template.html +46 -46
  164. package/public/favicon.svg +2 -2
  165. package/public/index.html +4 -7
  166. package/vendor-core/allocation.js +105 -20
  167. package/vendor-core/api-merge-writes.js +1 -0
  168. package/vendor-core/core-source-hash.txt +1 -1
  169. package/vendor-core/delta-log-paths.js +10 -1
  170. package/vendor-core/detectors.js +73 -38
  171. package/vendor-core/docs-content/detection/mem.md +1 -1
  172. package/vendor-core/docs-content/detection/skew.md +2 -1
  173. package/vendor-core/docs-content/detection/util.md +6 -2
  174. package/vendor-core/efficiency-model.js +22 -14
  175. package/vendor-core/finding-presentation.js +13 -6
  176. package/vendor-core/finding-types.js +21 -10
  177. package/vendor-core/impact-model.js +2 -2
  178. package/vendor-core/remediation.js +10 -5
  179. package/vendor-core/run-output.js +14 -3
  180. package/vendor-core/types.js +12 -2
  181. package/vendor-core/wall-clock.js +8 -0
  182. package/vendor-core/wasted-core-hours.js +12 -11
  183. package/vendor-core/write-targets.js +32 -0
  184. package/public/assets/AutoscalingChurn-8t3U3isq.js +0 -1
  185. package/public/assets/CacheUtilization-CJs9tTum.js +0 -1
  186. package/public/assets/ConfigAudit-B5Gbe5js.js +0 -1
  187. package/public/assets/Dashboard-C1hNeX49.js +0 -2
  188. package/public/assets/DisclosureContext-ZpE6CkHx.js +0 -1
  189. package/public/assets/ExecutorUtilization-D9grwi7t.js +0 -1
  190. package/public/assets/MemoryUtilization-BM5schZI.js +0 -1
  191. package/public/assets/PlanGraphRoute-DH3KJb8j.js +0 -1
  192. package/public/assets/RetryWaste-DOnE9vGF.js +0 -1
  193. package/public/assets/Skew-BmZZJ5ms.js +0 -1
  194. package/public/assets/SlowHost-CsJzfEqo.js +0 -1
  195. package/public/assets/Spill-BhNicyBy.js +0 -1
  196. package/public/assets/StageShape-BDxRknLp.js +0 -1
  197. package/public/assets/Straggler-CZCbnOWP.js +0 -1
  198. package/public/assets/TaskFailures-C57YcLFQ.js +0 -1
  199. package/public/assets/index-2h_TgUAb.css +0 -2
  200. package/public/assets/index-B-03mG7K.js +0 -14
  201. package/public/assets/react-vendor-DEdfrRTJ.js +0 -9
  202. package/public/assets/useRecentFiles-XZEnLlal.js +0 -11
  203. package/public/docs/assets/chunks/@localSearchIndexroot.u_e5bQz4.js +0 -1
  204. package/public/docs/assets/contributor-guide_architecture_board-widgets_visual-system-and-templating.md.DYgUpIJB.js +0 -1
  205. package/public/docs/assets/contributor-guide_architecture_impact-estimation.md.CZv_ZGOp.js +0 -1
  206. package/public/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
  207. package/public/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
  208. package/public/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
  209. package/public/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
  210. package/public/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
  211. package/public/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
  212. package/public/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
  213. package/public/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
  214. package/public/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
  215. package/public/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
  216. package/public/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
  217. package/public/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
  218. package/public/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
  219. package/public/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
  220. package/public/docs/assets/style.tmDhD3c8.css +0 -1
  221. package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.OUQqw3mI.js +0 -23
  222. package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.OUQqw3mI.lean.js +0 -1
  223. package/public/docs/assets/user-guide_understanding-findings.md.C9YRruMT.js +0 -1
  224. /package/public/docs/assets/{contributor-guide_architecture_board-widgets_caching-and-memory.md.8bH1HnZp.lean.js → contributor-guide_architecture_board-widgets_caching-and-memory.md.CQgn1t_M.lean.js} +0 -0
  225. /package/public/docs/assets/{contributor-guide_architecture_board-widgets_visual-system-and-templating.md.DYgUpIJB.lean.js → contributor-guide_architecture_board-widgets_visual-system-and-templating.md.wulOueeB.lean.js} +0 -0
  226. /package/public/docs/assets/{contributor-guide_architecture_detector-contract.md.wj6Et6UD.lean.js → contributor-guide_architecture_detector-contract.md.N4hhenrA.lean.js} +0 -0
  227. /package/public/docs/assets/{contributor-guide_architecture_detector-contract_threshold-tables.md.CKjWG56Y.lean.js → contributor-guide_architecture_detector-contract_threshold-tables.md.Dp3c40rx.lean.js} +0 -0
  228. /package/public/docs/assets/{contributor-guide_architecture_worker-protocol_cli-and-mcp.md.DC1YqXBp.lean.js → contributor-guide_architecture_worker-protocol_cli-and-mcp.md.BX1XnFbq.lean.js} +0 -0
  229. /package/public/docs/assets/{contributor-guide_architecture_worker-protocol_evidence-report.md.DVGZOWvW.lean.js → contributor-guide_architecture_worker-protocol_evidence-report.md.CiQl1MLb.lean.js} +0 -0
  230. /package/public/docs/assets/{contributor-guide_development-setup.md.D9bu4j_c.lean.js → contributor-guide_development-setup.md.DQdzera7.lean.js} +0 -0
  231. /package/public/docs/assets/{user-guide_mcp-tools_get-run-summary.md.DpxZ4ZNp.lean.js → user-guide_mcp-tools_get-run-summary.md.EhaIsele.lean.js} +0 -0
  232. /package/public/docs/assets/{user-guide_understanding-findings.md.C9YRruMT.lean.js → user-guide_understanding-findings.md.3C7KCEZO.lean.js} +0 -0
@@ -10,16 +10,27 @@
10
10
 
11
11
 
12
12
 
13
- /** One concrete change a finding's fix makes, alongside its prose `recommendation`. Only a Spark
14
- * property the detector already names; `suggested` is null when it computes no value. Sizes carry a
15
- * Spark unit suffix ("384m"), counts are plain numbers, switches are booleans. */
16
-
13
+ /** One concrete change a finding's fix makes, alongside its prose `recommendation`. Entries are
14
+ * applied together unless the recommendation words them as alternatives ("either ... or"), as an
15
+ * idle-capacity finding does with dynamic allocation off: then a consumer applies one. */
16
+
17
+
18
+ /** A Spark property the detector already names; `suggested` is null when it computes no value.
19
+ * Sizes carry a Spark unit suffix ("384m"), counts are plain numbers, switches are booleans. */
20
+
17
21
 
18
22
 
19
23
 
20
24
 
21
25
 
22
26
 
27
+ /** A fix no Spark property makes: the job's code or data has to change. `hint` is the same
28
+ * wording the finding's `recommendation` gives. */
29
+
30
+
31
+
32
+
33
+
23
34
  // The columns every finding carries, whatever its detector.
24
35
 
25
36
 
@@ -218,11 +229,12 @@
218
229
 
219
230
 
220
231
 
221
-
222
-
232
+
233
+
223
234
 
224
235
 
225
236
 
237
+
226
238
 
227
239
 
228
240
 
@@ -236,11 +248,10 @@
236
248
 
237
249
 
238
250
 
239
-
240
-
251
+
252
+
241
253
 
242
-
243
-
254
+
244
255
 
245
256
 
246
257
 
@@ -118,8 +118,8 @@ export function tasksMostlyIdle(stage , sql = n
118
118
  return cpuMs / runMs < IDLE_CPU_SHARE_MAX;
119
119
  }
120
120
 
121
- // skew, straggler and stageSlowness claim time off the stage's longest task itself, so the
122
- // occupancy clip must not floor them at that same task (see estimateSingleStage).
121
+ // skew, straggler, stageSlowness and lowShuffleParallelism claim time off the stage's longest task
122
+ // itself, so the occupancy clip must not floor them at that same task (see estimateSingleStage).
123
123
  export const TAIL_CLAIM = { shortensLongestTask: true };
124
124
 
125
125
  // No quantifiable magnitude -> 'informational'; a rawWaste figure with no stage window ->
@@ -1,20 +1,25 @@
1
1
  // Constructors for the structured `remediation` a detector attaches next to its prose
2
2
  // `recommendation`: only where the detector already names the Spark property, never an invented one.
3
-
3
+
4
4
 
5
-
5
+
6
6
 
7
7
  /** The property should be raised; `suggested` is the value when the detector computed one. */
8
- export function increaseConf(key , suggested = null) {
8
+ export function increaseConf(key , suggested = null) {
9
9
  return { kind: 'conf', key, direction: 'increase', suggested };
10
10
  }
11
11
 
12
12
  /** The property should be lowered; `suggested` is the value when the detector computed one. */
13
- export function decreaseConf(key , suggested = null) {
13
+ export function decreaseConf(key , suggested = null) {
14
14
  return { kind: 'conf', key, direction: 'decrease', suggested };
15
15
  }
16
16
 
17
17
  /** The property should take a specific value (a switch or a class name), not move up or down. */
18
- export function setConf(key , suggested = null) {
18
+ export function setConf(key , suggested = null) {
19
19
  return { kind: 'conf', key, direction: 'set', suggested };
20
20
  }
21
+
22
+ /** No property fixes it: the job's code or data has to change, as `hint` says. */
23
+ export function codeFix(hint ) {
24
+ return { kind: 'code', hint };
25
+ }
@@ -5,21 +5,32 @@ import { buildEffectiveConf, } from './effective-conf.js';
5
5
 
6
6
 
7
7
 
8
+ /** Which build wrote a report: the host package's name and version, and the build id of the core it
9
+ * loaded. Core does not know its host, so the surface passes it in. */
10
+
11
+
12
+
13
+
14
+
15
+
8
16
  /** The CLI report's `metrics` and `effectiveConf` blocks, shared with MCP diagnose_run. Under
9
17
  * `redact` they come from the run redacted with the report's own inputs, so host and app
10
- * pseudonyms match the report's. `confKeys`/`confRedactRegex` narrow and mask `effectiveConf`. */
18
+ * pseudonyms match the report's. `confKeys`/`confRedactRegex` narrow and mask `effectiveConf`.
19
+ * `generator`, when the surface supplies it, is returned as given: it holds no run identifiers. */
11
20
  export function runOutputBlocks(
12
21
  appModel ,
13
- { redact, thresholds, confKeys, confRedactRegex }
22
+ { redact, thresholds, confKeys, confRedactRegex, generator }
14
23
 
24
+
15
25
  = {},
16
- ) {
26
+ ) {
17
27
  let blocksModel = appModel;
18
28
  if (redact) {
19
29
  const { catalog, config } = runFindings(appModel, thresholds);
20
30
  blocksModel = redactRunModel(appModel, catalog, config).appModel;
21
31
  }
22
32
  return {
33
+ ...(generator ? { generator } : {}),
23
34
  metrics: computeRunMetrics(blocksModel, thresholds),
24
35
  effectiveConf: buildEffectiveConf(blocksModel.app, { keys: confKeys, userPattern: confRedactRegex }),
25
36
  };
@@ -338,9 +338,19 @@
338
338
 
339
339
 
340
340
 
341
-
342
-
341
+
342
+
343
+
344
+
345
+
343
346
 
347
+
348
+
349
+
350
+
351
+
352
+
353
+
344
354
 
345
355
 
346
356
  // `Finding` is a union discriminated on `type`, one member per emitted finding type: see
@@ -1,5 +1,13 @@
1
1
  import { mergeIntervals } from './intervals.js';
2
2
 
3
+ /** The union of the stages' [submittedAt, completedAt) windows, sorted: where stages were active. */
4
+ export function stageWindows(stages ) {
5
+ const intervals = [...stages.values()]
6
+ .filter((s) => s.submittedAt != null && s.completedAt != null)
7
+ .map((s) => [s.submittedAt , s.completedAt ]);
8
+ return mergeIntervals(intervals);
9
+ }
10
+
3
11
  export function computeWallClock(app , stages ) {
4
12
  const start = app?.startTime ?? 0;
5
13
  const stageList = [...stages.values()].filter(s => s.submittedAt != null && s.completedAt != null);
@@ -1,7 +1,8 @@
1
1
  // Wasted core-hours summary. Pure, worker-agnostic reducer over the same inputs
2
- // the memoryUtilization detector's idle-cores math uses: capacity core-time vs.
2
+ // the memoryUtilization detector's idle-cores math uses: allocated core-time vs.
3
3
  // core-time that actually ran tasks. Feeds a report widget only, no detector.
4
4
 
5
+ import { allocatedCoreMs } from './allocation.js';
5
6
  import { computePeakConcurrentCores } from './core-count.js';
6
7
  import { MS_PER_CORE_HOUR } from './format-utils.js';
7
8
 
@@ -32,9 +33,9 @@ const EMPTY = {
32
33
  // SparkAppInfo | null before parsing completes), which the guard below already
33
34
  // tolerates. `resources` is on app's shape so the computePeakConcurrentCores
34
35
  // pass-through type-checks; real app objects always carry it. An omitted
35
- // `executorsRemoved` means no executor left, where peak cores equal the sum.
36
+ // `executorsRemoved` means no executor left.
36
37
  export function computeWastedCoreHours(
37
- app ,
38
+ app ,
38
39
  executorsAdded = [],
39
40
  runAggregates ,
40
41
  executorsRemoved = [],
@@ -44,17 +45,17 @@ export function computeWastedCoreHours(
44
45
  const appDurationMs = app.endTime - app.startTime;
45
46
  if (appDurationMs <= 0) return EMPTY;
46
47
 
47
- // Total cores: peak concurrent Executor-Added Total Cores, else peak executors ×
48
- // configured cores. Same capacity as the memoryUtilization detector, so an
49
- // executor replaced mid-run is not counted twice.
48
+ // Capacity is the run's allocation (cores x time alive), the same as the idle findings. The
49
+ // application end is set here, so the allocation never needs the stages to find where a log stops.
50
+ const allocatedMs = allocatedCoreMs({ app, stages: new Map(), executors: { added: executorsAdded, removed: executorsRemoved } });
51
+ if (allocatedMs == null) return EMPTY;
52
+ // Peak concurrent cores, reported as the cluster size: an executor replaced mid-run counts once.
50
53
  const totalCores = computePeakConcurrentCores(app, executorsAdded, executorsRemoved);
51
- if (totalCores <= 0) return EMPTY;
52
54
 
53
- const totalCoreHours = (totalCores * appDurationMs) / MS_PER_CORE_HOUR;
55
+ const totalCoreHours = allocatedMs / MS_PER_CORE_HOUR;
54
56
  const usefulCoreHours = (runAggregates.busyCoreMs ?? 0) / MS_PER_CORE_HOUR;
55
- // Clamp: totalCores can be a fallback estimate while busyCoreMs is measured
56
- // from task events, so the difference can dip below zero (same guard as
57
- // src/efficiency-model.js).
57
+ // Clamp: busyCoreMs is measured from task events while the allocation comes from executor
58
+ // events, so the difference can dip below zero (same guard as efficiency-model.ts).
58
59
  const wastedCoreHours = Math.max(0, totalCoreHours - usefulCoreHours);
59
60
 
60
61
  const topStages = Object.entries(runAggregates.perStage ?? {})
@@ -17,6 +17,15 @@ import { indexByRoot, isStagedDeltaWrite, parseDeltaTableV2, resolveDeltaCommand
17
17
  import { IDENT_PARTS, isCut, splitArgs, tableName, } from './write-target-args.js';
18
18
 
19
19
 
20
+ /** The row counts a MergeIntoCommand node reports in its SQL metrics. */
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
20
29
 
21
30
 
22
31
 
@@ -35,6 +44,10 @@ import { IDENT_PARTS, isCut, splitArgs, tableName, } from './write-targ
35
44
 
36
45
 
37
46
 
47
+
48
+
49
+
50
+
38
51
 
39
52
 
40
53
 
@@ -234,6 +247,24 @@ function outputRowsOf(node ) {
234
247
  return metric !== undefined && Number.isFinite(metric.value) ? metric.value : null;
235
248
  }
236
249
 
250
+ // A name in `names` is read when the log has it. 'number of rows copied' is the label older Delta
251
+ // releases give the rewritten-unmodified counter.
252
+ function metricValue(node , ...names ) {
253
+ const metric = node.metrics?.find((m) => names.includes(m.name));
254
+ return metric !== undefined && Number.isFinite(metric.value) ? metric.value : null;
255
+ }
256
+
257
+ function mergeRowsOf(command , node ) {
258
+ if (command !== 'MergeIntoCommand') return null;
259
+ const rows = {
260
+ inserted: metricValue(node, 'number of inserted rows'),
261
+ updated: metricValue(node, 'number of updated rows'),
262
+ deleted: metricValue(node, 'number of deleted rows'),
263
+ copied: metricValue(node, 'number of target rows rewritten unmodified', 'number of rows copied'),
264
+ };
265
+ return Object.values(rows).every((v) => v === null) ? null : rows;
266
+ }
267
+
237
268
  function collectWrites(exec , root , byRoot , out ) {
238
269
  walkPlanTree(root, (node) => {
239
270
  const command = commandOf(node.name);
@@ -250,6 +281,7 @@ function collectWrites(exec , root , byRoot
250
281
  kind: parsed?.kind ?? null,
251
282
  target: parsed?.target ?? null,
252
283
  outputRows: outputRowsOf(node),
284
+ mergeRows: mergeRowsOf(command, node),
253
285
  raw: detail !== '' ? detail : node.name,
254
286
  });
255
287
  }, { dedupe: true });
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t,T as n,f as r,l as i,o as a,s as o,t as s,v as c,w as l}from"./charts-vendor-0VMaLVLN.js";import{S as u,d,u as f}from"./DisclosureContext-ZpE6CkHx.js";import{p}from"./plan-graph-vendor-BYl-AzN5.js";import{d as m,m as h}from"./useRecentFiles-XZEnLlal.js";import{k as g}from"./index-B-03mG7K.js";import{c as _,o as v,t as y}from"./Dashboard-C1hNeX49.js";var b=e(t(),1),x=p(),S=60,C=6e4,w=220;function T(e,t,n,r,i){if(e.length===0&&t.length===0)return[];let a=Math.max(i,r-n),o=Math.max(1,Math.ceil(a/i)),s=[];for(let e=0;e<o;e++)s.push({tStart:n+e*i,adds:0,removes:0});let c=e=>Math.min(o-1,Math.max(0,Math.floor((e-n)/i)));for(let t of e)s[c(t.timestamp)].adds++;for(let e of t)s[c(e.timestamp)].removes++;return s}function E(e,t){let n=Math.max(1,t-e);return Math.max(C,Math.ceil(n/S))}function D(e){if(e<=0)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function O(e){let t=D(e.reduce((e,t)=>Math.max(e,Math.abs(t.added),Math.abs(t.removed)),0));return{domain:[-t,t],ticks:[-t,-t/2,0,t/2,t]}}function k(e){return Math.abs(e.height)<1?null:(0,x.jsx)(l,{...e})}function A({finding:e}){return(0,x.jsxs)(`div`,{className:`flex flex-col gap-1 transition-colors`,children:[(0,x.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Short-lived executors: `,(0,x.jsxs)(`strong`,{children:[e.value,`%`]})]}),(0,x.jsx)(y,{finding:e}),(0,x.jsxs)(`p`,{className:`flex flex-wrap items-start gap-2 text-sm`,children:[(0,x.jsx)(f,{impactBand:e.impactBand,className:`mt-1.5`}),(0,x.jsx)(`span`,{children:(0,x.jsx)(u,{anchor:`#config-autoscale-bounds`,children:`Tuning executorIdleTimeout and the min/max bounds`})})]})]})}var j=(0,b.memo)(function({appModel:e,activeFileId:t,catalog:l=[],defaultCollapsed:u=!0}){let f=(0,b.useMemo)(()=>{let t=e.executors.added,n=e.executors.removed;if(t.length===0&&n.length===0)return{hasEvents:!1,added:t,removed:n};let r=e.app,i=r?.startTime??0,a=r?.endTime??i,o=E(i,a),s=_(T(t,n,i,a,o)).map(e=>({t:`${Math.round((e.tStart-i)/1e3)}s`,added:e.adds,removed:-e.removes}));return{hasEvents:!0,added:t,removed:n,rows:s,yAxisScale:O(s)}},[e,t]);if(!f.hasEvents)return(0,x.jsx)(g,{title:`Autoscaling Churn`,summary:(0,x.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`No executor add/remove events (static allocation).`}),children:(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`No executor add/remove events (static allocation).`})});let{added:p,removed:y,rows:S,yAxisScale:C}=f,D=l.find(e=>e.type===`autoscalingChurn`);return(0,x.jsx)(g,{title:`Autoscaling Churn`,impactBand:D?.impactBand,fixFor:D?[D]:[],badges:D&&(0,x.jsx)(d,{type:`autoscalingChurn`,impactBand:D.impactBand}),defaultCollapsed:u,summary:(0,x.jsx)(v,{value:`${p.length} added / ${y.length} removed`,context:D?`${D.value}% short-lived executors, ${D.impactBand}`:`executor churn events`}),children:(0,x.jsxs)(`div`,{className:`space-y-2`,children:[D&&(0,x.jsx)(A,{finding:D}),(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`executors added / removed over time`}),(0,x.jsx)(h,{ariaLabel:`Executor added and removed counts per time bucket over the run.`,height:w,table:{caption:`Executor added/removed counts by time bucket`,columns:[`Time`,`Executors added`,`Executors removed`],rows:S.map(e=>[e.t,e.added,Math.abs(e.removed)]),align:[`right`,`right`,`right`]},children:(0,x.jsxs)(s,{data:S,children:[(0,x.jsx)(r,{stroke:m.muted,strokeOpacity:.2}),(0,x.jsx)(o,{dataKey:`t`,tick:{fontSize:10}}),(0,x.jsx)(a,{tick:{fontSize:10},width:32,domain:C.domain,ticks:C.ticks}),(0,x.jsx)(c,{formatter:(e,t)=>[Math.abs(Number(e)),t]}),(0,x.jsx)(n,{wrapperStyle:{fontSize:10}}),(0,x.jsx)(i,{dataKey:`added`,name:`Added`,stackId:`churn`,fill:m.clean,shape:k}),(0,x.jsx)(i,{dataKey:`removed`,name:`Removed`,stackId:`churn`,fill:m.muted,shape:k})]})})]})})});export{j as AutoscalingChurn};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,S as r,U as i,Y as a,at as o,d as s,it as c,u as l,ut as u}from"./DisclosureContext-ZpE6CkHx.js";import{p as d}from"./plan-graph-vendor-BYl-AzN5.js";import{c as f}from"./useRecentFiles-XZEnLlal.js";import{H as p,P as m,R as h,U as g,V as _,W as v,k as y,z as b}from"./index-B-03mG7K.js";import{o as x,r as S,t as C}from"./Dashboard-C1hNeX49.js";import{n as w}from"./finding-anchor-Cl6_5hfV.js";import{t as T}from"./usePagedRows-Dyl6T8Ok.js";var E=e(t(),1),D=d(),O=70;function k(e){if(!e)return`—`;let t=[];return e.useMemory&&t.push(`Memory`),e.useDisk&&t.push(`Disk`),e.deserialized?t.push(`Deserialized`):(e.useMemory||e.useDisk)&&t.push(`Serialized`),(e.replication??1)>1&&t.push(`x${e.replication}`),t.join(` · `)||`—`}function A(e){return e.name||`RDD ${e.id}`}function j(e){let t=o(A(e));return t.length<=O?t:`${t.slice(0,O)}…`}function M(e){if(e.variant===`storageUnobserved`)return`No block updates logged: cached partition counts and sizes are unknown`;let t=n(`pct`,c(e));return e.variant===`diskSpillover`?`${t} spilled to disk: ${a(e.diskSize??0)} disk / ${a(e.memorySize??0)} memory`:`${t} cached (${e.numCachedPartitions??0}/${e.numPartitions??0} partitions)`}function N({finding:e}){let t=w([e]),n=e.dataUnavailable?`Cache storage not logged`:e.rddName??`RDD ${e.rddId}`;return(0,D.jsxs)(`div`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 transition-colors ${t.flashClassName}`,children:[(0,D.jsxs)(`p`,{className:`flex flex-wrap items-start gap-2`,children:[(0,D.jsx)(l,{impactBand:e.impactBand,className:`mt-1.5`}),(0,D.jsx)(`span`,{children:n})]}),(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.dataUnavailable?e.recommendation:M(e)}),(0,D.jsx)(C,{finding:e})]})}var P=(0,E.memo)(function({appModel:e,catalog:t}){let[n,o]=(0,E.useState)(0),[d,C]=(0,E.useState)(0),w=e.app?.rddInfo,O=(0,E.useMemo)(()=>w?[...w.values()].filter(e=>(e.storageLevel?.useMemory||e.storageLevel?.useDisk)&&(e.numCachedPartitions??0)>0).sort((e,t)=>(t.memorySize??0)+(t.diskSize??0)-((e.memorySize??0)+(e.diskSize??0))):[],[w]),M=(0,E.useMemo)(()=>f(t,`cacheUtilization`).sort((e,t)=>i[e.impactBand]-i[t.impactBand]),[t]),P=T(O,n,o),F=m(),I=F?M.findIndex(e=>e===F.finding):null,L=T(M,d,C,I),R=M.find(e=>e.dataUnavailable);if(O.length===0&&!R)return null;let z=e=>M.filter(t=>t.rddId===e),B=O.reduce((e,t)=>e+(t.memorySize??0)+(t.diskSize??0),0);return(0,D.jsx)(`div`,{"data-widget":`cache-utilization`,children:(0,D.jsxs)(y,{title:`Cache Storage`,fixFor:M,impactBand:u(M),badges:(0,D.jsxs)(D.Fragment,{children:[M.length>0?(0,D.jsx)(s,{type:`cacheUtilization`,impactBand:u(M)??`info`}):null,(0,D.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[O.length>0?`${O.length} cached RDD${O.length===1?``:`s`}`:`cache storage not logged`,`, see`,` `,(0,D.jsx)(r,{anchor:`#memory-model`,children:`how Spark accounts cached memory`})]})]}),defaultCollapsed:!0,summary:O.length>0?(0,D.jsx)(x,{value:a(B),context:`cached across memory + disk`}):(0,D.jsx)(x,{value:`Unknown`,context:`${c(R)} persisted, no block updates`}),children:[O.length>0?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(h,{children:[(0,D.jsx)(g,{children:(0,D.jsxs)(v,{children:[(0,D.jsx)(p,{children:`RDD`}),(0,D.jsx)(p,{children:`Storage level`}),(0,D.jsx)(p,{className:`text-right`,children:`Cached partitions`}),(0,D.jsx)(p,{className:`text-right`,children:`Memory`}),(0,D.jsx)(p,{className:`text-right`,children:`Disk`})]})}),(0,D.jsx)(b,{children:P.visible.map(e=>{let t=A(e),n=j(e),r=z(e.id);return(0,D.jsxs)(v,{children:[(0,D.jsxs)(_,{className:`max-w-80 truncate`,title:t===n?void 0:t,children:[n,r.length>0&&(0,D.jsx)(l,{impactBand:u(r)??`info`,className:`ml-1.5`})]}),(0,D.jsx)(_,{children:k(e.storageLevel)}),(0,D.jsxs)(_,{className:`text-right`,children:[e.numCachedPartitions,` / `,e.numPartitions]}),(0,D.jsx)(_,{className:`text-right`,children:a(e.memorySize??0)}),(0,D.jsx)(_,{className:`text-right`,children:a(e.diskSize??0)})]},e.id)})})]}),(0,D.jsx)(S,{page:P.effectivePage,totalPages:P.totalPages,onPrev:()=>o(e=>e-1),onNext:()=>o(e=>e+1)})]}):null,M.length>0?(0,D.jsxs)(`div`,{className:`mt-3 space-y-2 text-sm`,children:[L.visible.map(e=>(0,D.jsx)(N,{finding:e},e.id)),(0,D.jsx)(S,{page:L.effectivePage,totalPages:L.totalPages,onPrev:()=>C(e=>e-1),onNext:()=>C(e=>e+1)})]}):null]})})});export{P as CacheUtilization};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{S as n,U as r,d as i,j as a,p as o,u as s,ut as c}from"./DisclosureContext-ZpE6CkHx.js";import{p as l}from"./plan-graph-vendor-BYl-AzN5.js";import{c as u,l as d}from"./useRecentFiles-XZEnLlal.js";import{P as f,k as p,l as m}from"./index-B-03mG7K.js";import{o as h,r as g,t as _}from"./Dashboard-C1hNeX49.js";import{n as v}from"./finding-anchor-Cl6_5hfV.js";import{t as y}from"./usePagedRows-Dyl6T8Ok.js";var b=e(t(),1),x=l();function S({finding:e}){let t=v([e]);return(0,x.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 transition-colors ${t.flashClassName}`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(s,{impactBand:e.impactBand}),(0,x.jsx)(`code`,{className:`text-xs`,children:e.property}),(0,x.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`=`}),(0,x.jsx)(`code`,{className:`rounded bg-accent/10 px-1.5 py-0.5 font-mono text-xs text-accent`,children:e.valueText})]}),(0,x.jsx)(_,{finding:e}),(0,x.jsxs)(`p`,{className:`text-sm`,children:[m(e.recommendation??``).measured??e.recommendation,e.docAnchor?(0,x.jsxs)(x.Fragment,{children:[` `,(0,x.jsxs)(n,{anchor:e.docAnchor,children:[`Why `,e.property,` matters`]})]}):null]})]})}var C=(0,b.memo)(function({appModel:e,configFindings:t,defaultCollapsed:n=!0}){let[s,l]=(0,b.useState)(0),m=(0,b.useMemo)(()=>u(t??[],`configAudit`).sort((e,t)=>r[e.impactBand]-r[t.impactBand]),[t]),_=f(),v=_?m.findIndex(e=>e===_.finding):null,{totalPages:C,effectivePage:w,visible:T}=y(m,s,l,v);if(m.length===0){let t=e.evidenceAvailability?.entries.find(e=>e.key===`sparkConfiguration`),n;if(t)n=t.state===`present`?`No misconfigurations detected.`:t.state===`unknown`&&t.reasonCode===`parseIncomplete`?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{children:[t.summary,` `]}),(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`span`,{children:`No environment info captured in this log. `}),(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})})]});else{let t=e.app?.evidenceInputs;n=(t?t.environmentUpdates>0:Object.keys(e.app?.config??{}).length>0||e.app?.resources)?`No misconfigurations detected.`:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`span`,{children:`No environment info captured in this log. `}),(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})})]})}let r=(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:n});return(0,x.jsx)(p,{title:`Config Audit`,compact:!0,summary:r,children:r})}let E=c(m);return(0,x.jsxs)(p,{title:`Config Audit`,fixFor:m,impactBand:E,badges:(0,x.jsx)(i,{type:`configAudit`,impactBand:E??`info`,docAnchor:a(m)}),statusBadge:(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})}),defaultCollapsed:n,summary:(0,x.jsx)(h,{value:`${m.length}`,context:`misconfiguration${m.length===1?``:`s`} flagged`}),children:[(0,x.jsx)(`ul`,{className:`space-y-4`,children:T.map(e=>(0,x.jsx)(S,{finding:e},e.id))}),(0,x.jsx)(g,{page:w,totalPages:C,onPrev:()=>l(e=>e-1),onNext:()=>l(e=>e+1)})]})});export{C as ConfigAudit};