Repository navigation
feat: surface classification breakdown in report pipeline - #55
Merged
jflowers merged 1 commit intoMar 15, 2026
Merged
Conversation
…und-force#42) Add classify.CountLabels helper to count side effects by classification label (contractual/ambiguous/incidental). Classification counts now flow through the report pipeline via classifyStepResult and are visible at the ReportSummary level. This lets users and AI consumers see why contract coverage is low — when most effects are 'ambiguous' (confidence just below threshold), adding assertions can't improve the metric. The fix is to use --ai reclassification or adjust thresholds. - Add CountLabels to classify package (pure function, 3 tests) - Add classifyStepResult struct (follows crapStepResult pattern) - Update pipelineStepFuncs.classifyStep type signature - Add Contractual/Ambiguous/Incidental to ReportSummary Closes unbound-force#42
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
classify.CountLabelshelper to count side effects by classification labelMotivation
Issue #42: When gaze classifies most side effects as "ambiguous" (confidence just below the contractual threshold), contract coverage is structurally zero regardless of test assertions. Users discover this only after wasting effort on assertions that can't improve the metric.
With classification counts visible, the report can now convey: "Contract coverage is 0% because all effects are ambiguous. Use --ai reclassification or lower the threshold."
Changes
classify.CountLabels[]AnalysisResultclassifyStepResultcrapStepResultpattern) with JSON + label countspipelineStepFuncs.classifyStep*classifyStepResultReportSummaryContractual,Ambiguous,Incidentalint fieldsrunProductionPipelineTests
CountLabels(mixed labels, no classification, empty input)fakeSteps()and classify failure test for new typeTestRunProductionPipeline_AllStepsSucceedwith count assertionsCloses #42