fix(validation): accept empty kernel-fusion fallback findings - #941
Open
bong-water-water-bong wants to merge 1 commit into
Open
fix(validation): accept empty kernel-fusion fallback findings#941bong-water-water-bong wants to merge 1 commit into
bong-water-water-bong wants to merge 1 commit into
Conversation
The kernel-fusion analyzer emits an honest 'No kernel fusion opportunities detected.' fallback file when no candidates exist, but validate_findings_file rejected it: the required Recommendations / Detailed Analysis sections were missing, and the system-tier p_item marker was hard-required for its file (system_findings/, since kernel_fusion is a system-tier category). Extend the existing relaxed-empty path (compute tier) to the fusion tier via a new _fusion_no_data() check on kernel_fusion_metrics.json (status NO_DATA or empty impact_estimates), and honor skip_p_item_required for system_findings files. Verified: without this change the fallback fails with 'Missing required section: ## Detailed Analysis' and 'missing required kind=p_item'; with it, validation passes.
bong-water-water-bong
force-pushed
the
fix/validate-empty-fusion-fallback
branch
from
August 14, 2026 08:43
c836f57 to
6722f77
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The kernel-fusion analyzer emits an honest
"No kernel fusion opportunities detected."fallback findings file when no fusion candidates exist, butvalidate_findings_filerejected it with three errors:Missing required section: ## RecommendationsMissing required section: ## Detailed Analysiskernel_fusion_findings.md: missing required kind=p_itemThis made the empty-fusion case unvalidatable in the agentic analysis-orchestrator workflow: any trace with no fusion candidates failed Step 8 (
validate_subagent_outputs), even though the analyzer's fallback output is correct by design.Changes
TraceLens/Agent/Analysis/utils/validation_utils.py:_fusion_no_data(filepath)helper — returns True whenkernel_fusion_metrics.jsonreportsstatus == "NO_DATA"or has an emptyimpact_estimateslist (the analyzer's empty-fallback signals).relaxed_emptypath to the fusion tier —validate_findings_filenow skips the required-section check for fusion findings files that are genuine empty fallbacks, mirroring the existing compute-tier empty-category handling (_category_findings_empty).MarkerValidator.check_findings_file— thesystem_findingskind=p_itemrequirement now honorsskip_p_item_required(previously hard-required). This is load-bearing becausekernel_fusionis a system-tier category, so its fallback findings file lives insystem_findings/and legitimately carries no P-item markers.Verification
Before/after on a real trace with no fusion candidates (
system_findings/kernel_fusion_findings.md):validate_findings_filereturns(True, [])with the fix; the empty-fusion fallback now validates end-to-end in the orchestrator pipeline.Impact
Unblocks the analysis-orchestrator Step 8 validation for workloads where the kernel-fusion analysis legitimately finds no candidates (e.g. fully-fused training traces, traces where <75% of kernels have perf models). No behavior change for non-empty findings files.