Task · SKT-0062

Preserve synthetic metric shapes per producer during corpus comparison

Description

Producer overlap currently selects a family but compares its full synthetic union, so unrelated jobs can introduce false label and histogram contradictions. Preserve directly observed per-producer shapes while retaining the legacy flattened inventory.

Acceptance Criteria

Definition of Done

Implementation Notes

Evidence: job-specific shape test failed with an unrelated counter/gauge union contradiction, then passed while retaining a true matched-producer mismatch. Additive producer_metrics preserves the flattened view and JSON round-trip. The comparator also now treats sourced conditional node-label bags, OS fields, owner fields, and opt-in Azure metadata as coverage differences; undocumented fixed keys still contradict. This is a deliberate open-key contract correction, not a contradiction exemption. Existing substrate-evidence tests now use a closed example key contract rather than a known open node-label bag. CodeRabbit reviewed six mechanism files with zero findings; full isolated gate reruns after the fixture correction.

Final Summary

Committed 94263330d2df3199a72813d8fa89854baa44e9a1. Fail-first producer-shape controls and positive contradiction controls passed; CodeRabbit zero findings; isolated just check passed with the staged tree matching the commit. Explicit-selection dump comparison completed. Schema generation was not required for this inventory-only API change.

View the source file on GitHub