branchproof 0.11.0 → 0.12.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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +89 -0
  3. data/README.md +440 -29
  4. data/doc/Branchproof/CLI.md +1 -1
  5. data/doc/Branchproof/ChangedCoverage.md +19 -0
  6. data/doc/Branchproof/ChangedCoveragePolicy.md +24 -0
  7. data/doc/Branchproof/ChangedDecisionMap.md +20 -0
  8. data/doc/Branchproof/ChangedScope.md +18 -0
  9. data/doc/Branchproof/Collation.md +23 -0
  10. data/doc/Branchproof/CollationManifest.md +29 -0
  11. data/doc/Branchproof/CoverageSummary.md +20 -0
  12. data/doc/Branchproof/Doctor/TerminalRenderer.md +15 -0
  13. data/doc/Branchproof/Doctor.md +34 -0
  14. data/doc/Branchproof/FallbackInstrumentation.md +8 -0
  15. data/doc/Branchproof/FallbackRuntime.md +12 -0
  16. data/doc/Branchproof/FallbackSyntax.md +13 -0
  17. data/doc/Branchproof/GitChanges.md +19 -0
  18. data/doc/Branchproof/GithubReport.md +25 -0
  19. data/doc/Branchproof/HtmlReport.md +22 -0
  20. data/doc/Branchproof/Instrumenter.md +1 -1
  21. data/doc/Branchproof/MinitestAdapter.md +4 -0
  22. data/doc/Branchproof/RakeTask.md +121 -0
  23. data/doc/Branchproof/Report.md +41 -3
  24. data/doc/Branchproof/ReportSelection.md +10 -1
  25. data/doc/Branchproof/Runtime.md +4 -1
  26. data/doc/Branchproof/Source.md +6 -1
  27. data/doc/Branchproof/SummaryRanking/Decision.md +86 -0
  28. data/doc/Branchproof/SummaryRanking/SourceFile.md +43 -0
  29. data/doc/Branchproof/SummaryRanking.md +36 -0
  30. data/doc/Branchproof/SummaryReport.md +42 -0
  31. data/doc/Branchproof/Worker.md +1 -1
  32. data/doc/Branchproof.md +21 -1
  33. data/doc/CHANGELOG.md +89 -0
  34. data/doc/README.md +440 -29
  35. data/lib/branchproof/analyzer.rb +2 -52
  36. data/lib/branchproof/changed_coverage.rb +177 -0
  37. data/lib/branchproof/changed_decision_map.rb +359 -0
  38. data/lib/branchproof/changed_scope.rb +93 -0
  39. data/lib/branchproof/cli.rb +242 -21
  40. data/lib/branchproof/collation.rb +525 -0
  41. data/lib/branchproof/collation_manifest.rb +129 -0
  42. data/lib/branchproof/comparison.rb +11 -3
  43. data/lib/branchproof/comparison_report.rb +2 -0
  44. data/lib/branchproof/configuration.rb +12 -2
  45. data/lib/branchproof/coverage_policy.rb +122 -0
  46. data/lib/branchproof/coverage_summary.rb +94 -0
  47. data/lib/branchproof/doctor.rb +241 -0
  48. data/lib/branchproof/evidence.rb +5 -1
  49. data/lib/branchproof/exception_instrumentation.rb +4 -3
  50. data/lib/branchproof/exception_syntax.rb +15 -1
  51. data/lib/branchproof/fallback_instrumentation.rb +25 -0
  52. data/lib/branchproof/fallback_runtime.rb +14 -0
  53. data/lib/branchproof/fallback_syntax.rb +90 -0
  54. data/lib/branchproof/focused_report.rb +81 -22
  55. data/lib/branchproof/git_changes.rb +188 -0
  56. data/lib/branchproof/github_report.rb +292 -0
  57. data/lib/branchproof/html_report.rb +412 -0
  58. data/lib/branchproof/instrumenter.rb +2 -0
  59. data/lib/branchproof/minimizer.rb +4 -2
  60. data/lib/branchproof/minitest_adapter.rb +45 -5
  61. data/lib/branchproof/rails_support.rb +2 -2
  62. data/lib/branchproof/rake_task.rb +186 -0
  63. data/lib/branchproof/report.rb +383 -71
  64. data/lib/branchproof/report_selection.rb +26 -5
  65. data/lib/branchproof/runtime.rb +2 -0
  66. data/lib/branchproof/saved_report.rb +323 -5
  67. data/lib/branchproof/source.rb +25 -4
  68. data/lib/branchproof/summary_ranking.rb +165 -0
  69. data/lib/branchproof/summary_report.rb +241 -0
  70. data/lib/branchproof/version.rb +1 -1
  71. data/lib/branchproof/worker.rb +14 -9
  72. data/lib/branchproof.rb +12 -0
  73. data/llms.txt +21 -1
  74. data/sig/branchproof.rbs +206 -5
  75. metadata +38 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3667120528803b1ceeb8c17313f66391b38633ed452757cb6e532f938d8cfd2a
4
- data.tar.gz: ebdab6b41dde4697eff2634fe022c18e7c86e7abf4a317235fc94f24ec6070ad
3
+ metadata.gz: ac60ef7d1ba183067cb1290e2ca5a50a455733e38cd1d8eb8e31892a74b2b029
4
+ data.tar.gz: 03ff3d45dd008156103ca81a5834f7d2479ccee7ae37655b5b7a6a71dc3423e6
5
5
  SHA512:
6
- metadata.gz: 226da6639e0f9aedc3345073e76b8bd78c23921ea0c5664d4230cf1712d25984a8b97168b2d721658e50c552dab54e6ad5cac71ae8bfccf5222c4eb89cf8471e
7
- data.tar.gz: 7ff352e0d1ec9aca08a67d0ed9c6246a37f1560f16777a0c89b01ad04ad94fff7af99a2abb3b09135990f1d67b33e58cff3ce4209e0e0a5a808f72ff59a52c07
6
+ metadata.gz: 0e3bcc13ff1030451abf7fdc30d16eb36eb77a57d8b74fa13929365551c2749ee66b6bde3c84588c43404b1f665fd23067a93110e6bfc33bec8879b7401786c8
7
+ data.tar.gz: 60eb5d087463069447453422459e03d02eb2b7c332cb649d77159227b8f359375dd3bac4c74fa8f508f0a896fb8fd82415ffbd13d29a20c40fa43ce575511463
data/CHANGELOG.md CHANGED
@@ -1,5 +1,94 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.12.0] - 2026-10-05
4
+
5
+ - Fix compilation of instrumented rescue bodies with early returns when Ruby
6
+ branch coverage is enabled, preserving return values, exception handling,
7
+ and `ensure` behavior.
8
+ - Combine compatible serial reports with `branchproof collate`, recomputing
9
+ coverage and gates from merged observations. An optional expected-shard
10
+ manifest distinguishes complete collections from missing or unknown inputs;
11
+ incomplete collections cannot pass. Schema `1.7` retains shard provenance,
12
+ while existing analyze schemas remain unchanged. Terminal, GitHub, and HTML
13
+ output disclose collection status. No application boot or test run is needed.
14
+ - Support serial plain Ruby applications using Minitest 6 while retaining
15
+ Minitest 5.25.5 and later. Doctor accepts the same `>= 5.25.5, < 7` range.
16
+ Recognize Minitest 6 parallel scheduling and reject bisect/server execution
17
+ before test bodies run. Frameworks remain application-supplied dependencies.
18
+ - Add independent changed-decision gates with `--minimum-changed`, paired with
19
+ `analyze --changed-since` or a saved report's captured scope. Terminal, GitHub,
20
+ and HTML show changed-policy results; JSON schema `1.6` records and validates
21
+ them. Valid empty scopes are explicitly not applicable, and incomplete or
22
+ unavailable evidence cannot pass a changed gate.
23
+ - Explain missing MC/DC evidence using captured expressions, an observed vector,
24
+ and a suggested counterpart. Shared report wording distinguishes hypothetical
25
+ candidates from observations and preserves short-circuit information.
26
+ - Add `branchproof doctor` for static setup checks of the Ruby runtime, selected
27
+ test framework metadata, project configuration, and source/test file selection.
28
+ The command reports terminal or JSON results without loading project code or
29
+ running tests; it exits 2 when setup is blocked. See the README for its
30
+ readiness limits and JSON shape.
31
+ - Make Minitest and RSpec application-supplied optional dependencies. Branchproof
32
+ now needs only Prism at runtime; saved reports can be rendered and compared
33
+ without either test framework installed.
34
+ - Render saved reports as self-contained offline HTML with `branchproof report
35
+ snapshot.json --format html`. HTML preserves whole-run policy and exit status,
36
+ supports display filters, and can be uploaded as a CI artifact without rerunning
37
+ tests; HTML is unavailable for live analysis and comparison.
38
+ - Add `analyze --changed-since REF` for informational coverage of current
39
+ decisions affected by tracked staged and unstaged worktree changes. Tests,
40
+ whole-run coverage, and minimum gates retain their existing scope; captured
41
+ changed-scope reports use JSON schema `1.5` and remain available offline.
42
+ - Speed up level-3 supporting-set minimization by avoiding repeated Set
43
+ differences in greedy selection. Large synthetic RSpec and Minitest runs
44
+ take 70–77% less end-to-end time on Ruby 4.0.1; selected sets, search
45
+ budgets, report fields, and exit statuses are preserved. See the
46
+ [performance record](https://github.com/lucianghinda/branchproof/blob/main/docs/benchmarks/supporting-set-performance-2026-10-02.md)
47
+ for measurements and allocation/memory limits.
48
+
49
+ - Require Ruby 4.0 or newer and run core, RSpec, and Rails CI on Ruby 4.0.
50
+ - `branchproof mutate` now exits with status 2 and says that mutation testing
51
+ is not supported yet, instead of the generic unknown-command error.
52
+ - Add RBS signatures for `Branchproof::Worker`.
53
+ - Add `--view summary` for `analyze` and `report`. It ranks source files and
54
+ decisions with gaps: unexecuted decisions first, then the most missing
55
+ decision-table rules, unproven MC/DC conditions, and missing alternatives.
56
+ Each row shows its location, counts with denominators, the cases to test
57
+ (level 2+), and the tests that already reach the decision (level 3).
58
+ `--top`, `--focus`, and `--missing-only` apply; global summaries, gates,
59
+ and exit status are unchanged.
60
+ - Add `--format github` for `analyze` and `report`. It prints GitHub Actions
61
+ annotations in summary-view order, errors for failed or incomplete runs
62
+ and unmet policy gates, and a final coverage notice. Annotation paths are
63
+ made repository-relative with `GITHUB_WORKSPACE`. When `GITHUB_STEP_SUMMARY` is set, it
64
+ also appends a Markdown job summary with the ladder, gates, and ranked gaps.
65
+ - Add `Branchproof::RakeTask`. `require "branchproof/rake_task"` defines a
66
+ Rake task that runs `branchproof analyze` in a subprocess with the options
67
+ set in the Rakefile. Unset options keep the CLI and `.branchproof.json`
68
+ defaults, and a non-zero CLI exit status fails the Rake process with the
69
+ same status.
70
+
71
+ - Report value-context `||` chains that end in a string, symbol, or numeric
72
+ literal (including interpolated strings and symbols), such as
73
+ `name.presence || entry&.title || "Item #{id}"`, as `fallback` alternatives:
74
+ each operand is an alternative, covered when a test makes it the one that
75
+ supplies the value. These chains are no longer Boolean `short_circuit`
76
+ decisions, so they leave the MC/DC and decision-table denominators. Chains
77
+ used as conditions (`if`, `unless`, `while`, `until`, ternary, and
78
+ `case`/`when`), chains that end in `true`, `false`, or `nil`, keyword `or`,
79
+ and chains whose operands contain `&&`, `||`, `!`, or a jump (`return`,
80
+ `break`, `next`, `redo`, `retry`) keep Boolean treatment.
81
+ - Decision IDs for these expressions change because their context changes.
82
+ Comparisons against reports made with earlier versions show them as removed
83
+ `short_circuit` decisions and new `fallback` decisions.
84
+
85
+ ## [0.11.1] - 2026-09-28
86
+
87
+ - Treat string, interpolated string, symbol, and numeric literal conditions as
88
+ always truthy. Rules that need such a literal to be falsey, as in
89
+ `name || "Item #{id}"`, are now excluded as statically impossible instead of
90
+ being reported as missing with unknown reachability.
91
+
3
92
  ## [0.11.0] - 2026-09-25
4
93
 
5
94
  - Add validated coverage policies for Decision, Condition, Condition/Decision,