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
@@ -0,0 +1,20 @@
1
+ # Class Branchproof::ChangedDecisionMap <a id="class-Branchproof-ChangedDecisionMap"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/changed_decision_map.rb |
7
+
8
+ Maps changed lines to current decision records using Prism byte locations.
9
+ rubocop:disable-next Metrics/ClassLength -- AST ownership rules share the
10
+ parsed current source and hunk ranges.
11
+
12
+ ## Constants
13
+ ### `CONTROL_NODES` <a id="constant-CONTROL_NODES"></a> <a id="CONTROL_NODES-constant"></a>
14
+ Not documented.
15
+
16
+ ## Public Instance Methods
17
+ ### `call(bytes:, path:, decisions:, hunks:, old_bytes: = "")` <a id="method-i-call"></a> <a id="call-instance_method"></a>
18
+ rubocop:disable-next Metrics/AbcSize, Metrics/CyclomaticComplexity,
19
+ Metrics/MethodLength, Metrics/PerceivedComplexity -- Keeps one Prism walk
20
+ across all supported contexts.
@@ -0,0 +1,18 @@
1
+ # Class Branchproof::ChangedScope <a id="class-Branchproof-ChangedScope"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/changed_scope.rb |
7
+
8
+ Describes tracked files and current decision IDs affected by the direct
9
+ commit-to-worktree comparison.
10
+
11
+ ## Public Instance Methods
12
+ ### `call(inventory:)` <a id="method-i-call"></a> <a id="call-instance_method"></a>
13
+ rubocop:disable-next Metrics/AbcSize, Metrics/CyclomaticComplexity,
14
+ Metrics/MethodLength, Metrics/PerceivedComplexity -- Coordinates Git capture,
15
+ inventory checks, and ordered membership.
16
+
17
+ ### `initialize(root:, ref:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
18
+ - **@return** [ChangedScope] a new instance of ChangedScope
@@ -0,0 +1,23 @@
1
+ # Class Branchproof::Collation <a id="class-Branchproof-Collation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/collation.rb |
7
+
8
+ Reconstructs one analysis from validated, offline report artifacts.
9
+
10
+ ## Constants
11
+ ### `SCHEMA_VERSIONS` <a id="constant-SCHEMA_VERSIONS"></a> <a id="SCHEMA_VERSIONS-constant"></a>
12
+ Not documented.
13
+
14
+ ### `STATUS_ORDER` <a id="constant-STATUS_ORDER"></a> <a id="STATUS_ORDER-constant"></a>
15
+ Not documented.
16
+
17
+ ## Public Instance Methods
18
+ ### `call()` <a id="method-i-call"></a> <a id="call-instance_method"></a>
19
+ Not documented.
20
+
21
+ ### `initialize(inputs:, expected_shards: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
22
+ - **@raise** [ArgumentError]
23
+ - **@return** [Collation] a new instance of Collation
@@ -0,0 +1,29 @@
1
+ # Class Branchproof::CollationManifest <a id="class-Branchproof-CollationManifest"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/collation_manifest.rb |
7
+
8
+ Resolves supplied reports against a manifest without reading report files.
9
+
10
+ ## Attributes
11
+ ### `declared_identities` [R] <a id="attribute-i-declared_identities"></a> <a id="declared_identities-instance_method"></a>
12
+ Returns the value of attribute declared_identities.
13
+
14
+ ### `declared_paths` [R] <a id="attribute-i-declared_paths"></a> <a id="declared_paths-instance_method"></a>
15
+ Returns the value of attribute declared_paths.
16
+
17
+ ### `expected_ids` [R] <a id="attribute-i-expected_ids"></a> <a id="expected_ids-instance_method"></a>
18
+ Returns the value of attribute expected_ids.
19
+
20
+ ### `inputs` [R] <a id="attribute-i-inputs"></a> <a id="inputs-instance_method"></a>
21
+ Returns the value of attribute inputs.
22
+
23
+ ## Public Class Methods
24
+ ### `path_identity(path)` <a id="method-c-path_identity"></a> <a id="path_identity-class_method"></a>
25
+ Not documented.
26
+
27
+ ## Public Instance Methods
28
+ ### `initialize(path:, supplied_paths:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
29
+ - **@return** [CollationManifest] a new instance of CollationManifest
@@ -0,0 +1,20 @@
1
+ # Module Branchproof::CoverageSummary <a id="module-Branchproof-CoverageSummary"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/coverage_summary.rb |
6
+
7
+ Totals per-decision analyzer coverage without changing its counting rules.
8
+
9
+ ## Public Class Methods
10
+ ### `alternative_aggregate(decisions)` <a id="method-c-alternative_aggregate"></a> <a id="alternative_aggregate-class_method"></a>
11
+ Not documented.
12
+
13
+ ### `alternative_decision?(decision)` <a id="method-c-alternative_decision-3F"></a> <a id="alternative_decision?-class_method"></a>
14
+ - **@return** [Boolean]
15
+
16
+ ### `call(decisions)` <a id="method-c-call"></a> <a id="call-class_method"></a>
17
+ Not documented.
18
+
19
+ ### `decision_table_aggregate(boolean_supported)` <a id="method-c-decision_table_aggregate"></a> <a id="decision_table_aggregate-class_method"></a>
20
+ Not documented.
@@ -0,0 +1,15 @@
1
+ # Class Branchproof::Doctor::TerminalRenderer <a id="class-Branchproof-Doctor-TerminalRenderer"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/doctor.rb |
7
+
8
+ Formats the structured document as concise terminal output.
9
+
10
+ ## Public Instance Methods
11
+ ### `initialize(document)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
12
+ - **@return** [TerminalRenderer] a new instance of TerminalRenderer
13
+
14
+ ### `render()` <a id="method-i-render"></a> <a id="render-instance_method"></a>
15
+ Not documented.
@@ -0,0 +1,34 @@
1
+ # Class Branchproof::Doctor <a id="class-Branchproof-Doctor"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/doctor.rb |
7
+
8
+ Checks static setup facts and renders diagnostics without executing project
9
+ code.
10
+
11
+ ## Constants
12
+ ### `ERROR_DOCUMENT` <a id="constant-ERROR_DOCUMENT"></a> <a id="ERROR_DOCUMENT-constant"></a>
13
+ Not documented.
14
+
15
+ ### `FRAMEWORK_GEMS` <a id="constant-FRAMEWORK_GEMS"></a> <a id="FRAMEWORK_GEMS-constant"></a>
16
+ Not documented.
17
+
18
+ ### `LIMITATIONS` <a id="constant-LIMITATIONS"></a> <a id="LIMITATIONS-constant"></a>
19
+ Not documented.
20
+
21
+ ## Public Class Methods
22
+ ### `error(message)` <a id="method-c-error"></a> <a id="error-class_method"></a>
23
+ Not documented.
24
+
25
+ ### `terminal(document)` <a id="method-c-terminal"></a> <a id="terminal-class_method"></a>
26
+ Not documented.
27
+
28
+ ## Public Instance Methods
29
+ ### `document(source_files:, test_files:)` <a id="method-i-document"></a> <a id="document-instance_method"></a>
30
+ Not documented.
31
+
32
+ ### `initialize(options:, runtime: = { engine: RUBY_ENGINE, version: RUBY_VERSION }, loaded_features: = $LOADED_FEATURES, gem_sources: = { activated: Gem.loaded_specs,
33
+ discoverable: ->(name) { Gem::Specification.find_all_by_name(name) } })` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
34
+ - **@return** [Doctor] a new instance of Doctor
@@ -0,0 +1,8 @@
1
+ # Module Branchproof::FallbackInstrumentation <a id="module-Branchproof-FallbackInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/fallback_instrumentation.rb |
6
+
7
+ Wraps each fallback operand so the runtime sees the operand's own value. `||`
8
+ still short-circuits, so later operands are never evaluated early.
@@ -0,0 +1,12 @@
1
+ # Module Branchproof::FallbackRuntime <a id="module-Branchproof-FallbackRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/fallback_runtime.rb |
6
+
7
+ Records which operand of a fallback chain supplied the value. Only truthy
8
+ operands are recorded; `||` itself decides whether evaluation continues.
9
+
10
+ ## Public Instance Methods
11
+ ### `fallback_operand(decision_id, index, implicit, value)` <a id="method-i-fallback_operand"></a> <a id="fallback_operand-instance_method"></a>
12
+ Not documented.
@@ -0,0 +1,13 @@
1
+ # Module Branchproof::FallbackSyntax <a id="module-Branchproof-FallbackSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/fallback_syntax.rb |
6
+
7
+ A value-context `||` chain that ends in an always-truthy literal returns the
8
+ first truthy operand and is never false. It is inventoried as alternatives
9
+ (which operand supplied the value), not as a Boolean decision.
10
+
11
+ ## Constants
12
+ ### `JUMP_NODES` <a id="constant-JUMP_NODES"></a> <a id="JUMP_NODES-constant"></a>
13
+ A jump never supplies a value, so it cannot be a fallback operand.
@@ -0,0 +1,19 @@
1
+ # Class Branchproof::GitChanges <a id="class-Branchproof-GitChanges"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/git_changes.rb |
7
+
8
+ Reads the tracked working-tree delta from a validated commit to the current
9
+ index and worktree. Untracked files are intentionally outside this scope.
10
+ rubocop:disable-next Metrics/ClassLength -- Git capture phases share one
11
+ validated process context.
12
+
13
+ ## Public Instance Methods
14
+ ### `call(include_patch_lines: = false)` <a id="method-i-call"></a> <a id="call-instance_method"></a>
15
+ rubocop:disable-next Metrics/AbcSize, Metrics/CyclomaticComplexity,
16
+ Metrics/MethodLength -- Capture order is security-sensitive.
17
+
18
+ ### `initialize(root:, ref:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
19
+ - **@return** [GitChanges] a new instance of GitChanges
@@ -0,0 +1,25 @@
1
+ # Class Branchproof::GithubReport <a id="class-Branchproof-GithubReport"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/github_report.rb |
7
+
8
+ GitHub Actions output: workflow-command annotations for the ranked gaps and a
9
+ Markdown job summary. Both reuse the summary view's ranking and wording.
10
+
11
+ ## Constants
12
+ ### `MARKDOWN_ROWS` <a id="constant-MARKDOWN_ROWS"></a> <a id="MARKDOWN_ROWS-constant"></a>
13
+ Not documented.
14
+
15
+ ## Public Instance Methods
16
+ ### `annotations(path_prefix: = @path_prefix)` <a id="method-i-annotations"></a> <a id="annotations-instance_method"></a>
17
+ Workflow commands for stdout, one warning per ranked decision gap.
18
+
19
+ ### `initialize(document:, level:, coordinator:, selection: = ReportSelection.new, path_prefix: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
20
+ path_prefix maps project-relative paths to repository-relative ones when the
21
+ project is not at the repository root.
22
+ - **@return** [GithubReport] a new instance of GithubReport
23
+
24
+ ### `step_summary()` <a id="method-i-step_summary"></a> <a id="step_summary-instance_method"></a>
25
+ Markdown for $GITHUB_STEP_SUMMARY.
@@ -0,0 +1,22 @@
1
+ # Class Branchproof::HtmlReport <a id="class-Branchproof-HtmlReport"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/html_report.rb |
7
+
8
+ Portable, offline HTML presentation of a saved report document.
9
+ rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/ClassLength,
10
+ Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
11
+
12
+ ## Constants
13
+ ### `STYLE` <a id="constant-STYLE"></a> <a id="STYLE-constant"></a>
14
+ Keep complete HTML fragments together so their semantic structure is visible.
15
+ rubocop:disable Layout/LineLength
16
+
17
+ ## Public Instance Methods
18
+ ### `initialize(document:, level:, coordinator:, missing_only: = false, selection: = ReportSelection.new)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
19
+ - **@return** [HtmlReport] a new instance of HtmlReport
20
+
21
+ ### `render()` <a id="method-i-render"></a> <a id="render-instance_method"></a>
22
+ Not documented.
@@ -3,7 +3,7 @@
3
3
  | | |
4
4
  | --- | --- |
5
5
  | **Inherits** | Object |
6
- | **Includes** | [Branchproof::DefaultInstrumentation](DefaultInstrumentation.md), [Branchproof::ExceptionInstrumentation](ExceptionInstrumentation.md), [Branchproof::FlowInstrumentation](FlowInstrumentation.md), [Branchproof::IterationInstrumentation](IterationInstrumentation.md), [Branchproof::ValueInstrumentation](ValueInstrumentation.md) |
6
+ | **Includes** | [Branchproof::DefaultInstrumentation](DefaultInstrumentation.md), [Branchproof::ExceptionInstrumentation](ExceptionInstrumentation.md), [Branchproof::FallbackInstrumentation](FallbackInstrumentation.md), [Branchproof::FlowInstrumentation](FlowInstrumentation.md), [Branchproof::IterationInstrumentation](IterationInstrumentation.md), [Branchproof::ValueInstrumentation](ValueInstrumentation.md) |
7
7
  | **Defined in** | lib/branchproof/instrumenter.rb |
8
8
 
9
9
  Applies the smallest possible source edits around inventoried expressions. The
@@ -14,6 +14,10 @@ Returns the value of attribute active_adapter.
14
14
  ### `tests` [R] <a id="attribute-i-tests"></a> <a id="tests-instance_method"></a>
15
15
  Returns the value of attribute tests.
16
16
 
17
+ ## Public Class Methods
18
+ ### `load_framework!()` <a id="method-c-load_framework-21"></a> <a id="load_framework!-class_method"></a>
19
+ Not documented.
20
+
17
21
  ## Public Instance Methods
18
22
  ### `initialize(runtime:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
19
23
  - **@return** [MinitestAdapter] a new instance of MinitestAdapter
@@ -0,0 +1,121 @@
1
+ # Class Branchproof::RakeTask <a id="class-Branchproof-RakeTask"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Rake::TaskLib |
6
+ | **Defined in** | lib/branchproof/rake_task.rb |
7
+
8
+ Defines a Rake task that runs `branchproof analyze` in a subprocess.
9
+
10
+ The task shells out to the `branchproof` executable, so the isolated worker
11
+ model is unchanged. Only options the Rakefile sets are passed as CLI flags.
12
+ Everything else keeps the CLI default, and <code>.branchproof.json</code>
13
+ precedence stays intact.
14
+
15
+ **@example Minitest project**
16
+ ```ruby
17
+ require "branchproof/rake_task"
18
+
19
+ Branchproof::RakeTask.new(:branchproof) do |t|
20
+ t.sources = ["lib/**/*.rb"]
21
+ t.tests = ["test/**/*_test.rb"]
22
+ end
23
+ ```
24
+
25
+ **@example RSpec project with a coverage gate**
26
+ ```ruby
27
+ Branchproof::RakeTask.new(:branchproof) do |t|
28
+ t.sources = ["app/**/*.rb"]
29
+ t.framework = "rspec"
30
+ t.minimum = ["mcdc=100"]
31
+ end
32
+ ```
33
+
34
+ ## Constants
35
+ ### `DEFAULTS` <a id="constant-DEFAULTS"></a> <a id="DEFAULTS-constant"></a>
36
+ CLI defaults. The task only passes a flag when the Rakefile sets it.
37
+
38
+ ### `OPTIONS` <a id="constant-OPTIONS"></a> <a id="OPTIONS-constant"></a>
39
+ Option names in the order they appear in the built argv.
40
+
41
+ ### `REPEATED_FLAGS` <a id="constant-REPEATED_FLAGS"></a> <a id="REPEATED_FLAGS-constant"></a>
42
+ Options that repeat one flag per array item.
43
+
44
+ ## Attributes
45
+ ### `description` [RW] <a id="attribute-i-description"></a> <a id="description-instance_method"></a>
46
+ - **@return** [String] the task description shown by `rake -T`
47
+
48
+ ### `format` [R] <a id="attribute-i-format"></a> <a id="format-instance_method"></a>
49
+ Output format: `"terminal"` or `"json"`.
50
+ - **@return** [String]
51
+
52
+ ### `framework` [R] <a id="attribute-i-framework"></a> <a id="framework-instance_method"></a>
53
+ Test framework: `"auto"`, `"minitest"`, or `"rspec"`.
54
+ - **@return** [String]
55
+
56
+ ### `level` [R] <a id="attribute-i-level"></a> <a id="level-instance_method"></a>
57
+ Report level: 1, 2, or 3.
58
+ - **@return** [Integer]
59
+
60
+ ### `minimum` [R] <a id="attribute-i-minimum"></a> <a id="minimum-instance_method"></a>
61
+ Coverage gates as `"criterion=threshold"` strings, one <code>--minimum</code>
62
+ flag each.
63
+ - **@return** [Array<String>]
64
+
65
+ ### `missing_only` [R] <a id="attribute-i-missing_only"></a> <a id="missing_only-instance_method"></a>
66
+ When true, terminal output lists only missing evidence.
67
+ - **@return** [Boolean]
68
+
69
+ ### `name` [R] <a id="attribute-i-name"></a> <a id="name-instance_method"></a>
70
+ - **@return** [Symbol] the Rake task name
71
+
72
+ ### `output` [R] <a id="attribute-i-output"></a> <a id="output-instance_method"></a>
73
+ Output path, or nil to write to stdout.
74
+ - **@return** [String, nil]
75
+
76
+ ### `project` [R] <a id="attribute-i-project"></a> <a id="project-instance_method"></a>
77
+ Project mode: `"auto"`, `"ruby"`, or `"rails"`.
78
+ - **@return** [String]
79
+
80
+ ### `runner_args` [RW] <a id="attribute-i-runner_args"></a> <a id="runner_args-instance_method"></a>
81
+ Extra arguments appended after <code>--</code> and passed to the test runner.
82
+ - **@return** [Array<String>]
83
+
84
+ ### `sources` [RW] <a id="attribute-i-sources"></a> <a id="sources-instance_method"></a>
85
+ Source globs passed as positional arguments.
86
+ - **@return** [Array<String>]
87
+
88
+ ### `tests` [R] <a id="attribute-i-tests"></a> <a id="tests-instance_method"></a>
89
+ Test globs, one <code>--test</code> flag each.
90
+ - **@return** [Array<String>]
91
+
92
+ ### `view` [R] <a id="attribute-i-view"></a> <a id="view-instance_method"></a>
93
+ Terminal view: `"decisions"`, `"conditions"`, `"tests"`, or
94
+ `"decision-tables"`.
95
+ - **@return** [String]
96
+
97
+ ## Public Instance Methods
98
+ ### `argv()` <a id="method-i-argv"></a> <a id="argv-instance_method"></a>
99
+ Builds the CLI arguments without running anything.
100
+ - **@return** [Array<String>] arguments for `branchproof analyze`
101
+
102
+ ### `command()` <a id="method-i-command"></a> <a id="command-instance_method"></a>
103
+ Full command line, starting with the current Ruby and the gem executable.
104
+ - **@return** [Array<String>]
105
+
106
+ ### `executable()` <a id="method-i-executable"></a> <a id="executable-instance_method"></a>
107
+ Path to the `branchproof` executable. Works inside this repository and as an
108
+ installed gem.
109
+ - **@return** [String]
110
+
111
+ ### `initialize(name = :branchproof)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
112
+ Defines the task. The block receives the task so a Rakefile can set options.
113
+ - **@param** `name` [Symbol, String] the Rake task name
114
+ - **@return** [RakeTask] a new instance of RakeTask
115
+ - **@yieldparam** `task` [RakeTask] this task, before it is defined
116
+
117
+ ### `run()` <a id="method-i-run"></a> <a id="run-instance_method"></a>
118
+ Runs the analysis in a subprocess. A non-zero exit status ends the Rake
119
+ process with the same status so CI fails on coverage gate failures.
120
+ - **@raise** [Error]
121
+ - **@return** [void]
@@ -8,6 +8,18 @@
8
8
  Renders versioned terminal and JSON analysis reports.
9
9
 
10
10
  ## Constants
11
+ ### `CHANGED_POLICY_SCHEMA_VERSION` <a id="constant-CHANGED_POLICY_SCHEMA_VERSION"></a> <a id="CHANGED_POLICY_SCHEMA_VERSION-constant"></a>
12
+ Not documented.
13
+
14
+ ### `CHANGED_SCOPE_SCHEMA_VERSION` <a id="constant-CHANGED_SCOPE_SCHEMA_VERSION"></a> <a id="CHANGED_SCOPE_SCHEMA_VERSION-constant"></a>
15
+ Not documented.
16
+
17
+ ### `COLLATION_SCHEMA_VERSION` <a id="constant-COLLATION_SCHEMA_VERSION"></a> <a id="COLLATION_SCHEMA_VERSION-constant"></a>
18
+ Not documented.
19
+
20
+ ### `CRITERIA_LABELS` <a id="constant-CRITERIA_LABELS"></a> <a id="CRITERIA_LABELS-constant"></a>
21
+ Not documented.
22
+
11
23
  ### `CRITERION_VERSION` <a id="constant-CRITERION_VERSION"></a> <a id="CRITERION_VERSION-constant"></a>
12
24
  Not documented.
13
25
 
@@ -17,6 +29,9 @@ Not documented.
17
29
  ### `DECISION_TABLE_STATUS_LABELS` <a id="constant-DECISION_TABLE_STATUS_LABELS"></a> <a id="DECISION_TABLE_STATUS_LABELS-constant"></a>
18
30
  Not documented.
19
31
 
32
+ ### `FORMATS` <a id="constant-FORMATS"></a> <a id="FORMATS-constant"></a>
33
+ Not documented.
34
+
20
35
  ### `SCHEMA_VERSION` <a id="constant-SCHEMA_VERSION"></a> <a id="SCHEMA_VERSION-constant"></a>
21
36
  Not documented.
22
37
 
@@ -24,10 +39,25 @@ Not documented.
24
39
  Not documented.
25
40
 
26
41
  ## Public Class Methods
27
- ### `from_document(document:, level: = nil, view: = :decisions, missing_only: = false, focus: = nil, top: = nil, minimum: = nil)` <a id="method-c-from_document"></a> <a id="from_document-class_method"></a>
42
+ ### `from_document(document:, level: = nil, view: = :decisions, missing_only: = false, focus: = nil, top: = nil, minimum: = nil, minimum_changed: = nil)` <a id="method-c-from_document"></a> <a id="from_document-class_method"></a>
28
43
  Not documented.
29
44
 
30
45
  ## Public Instance Methods
46
+ ### `changed_coverage_available?()` <a id="method-i-changed_coverage_available-3F"></a> <a id="changed_coverage_available?-instance_method"></a>
47
+ - **@return** [Boolean]
48
+
49
+ ### `changed_coverage_policy()` <a id="method-i-changed_coverage_policy"></a> <a id="changed_coverage_policy-instance_method"></a>
50
+ Not documented.
51
+
52
+ ### `changed_coverage_policy_lines()` <a id="method-i-changed_coverage_policy_lines"></a> <a id="changed_coverage_policy_lines-instance_method"></a>
53
+ Not documented.
54
+
55
+ ### `changed_scope_lines()` <a id="method-i-changed_scope_lines"></a> <a id="changed_scope_lines-instance_method"></a>
56
+ Shared informational changed-scope header for all terminal and GitHub views.
57
+
58
+ ### `collation_lines()` <a id="method-i-collation_lines"></a> <a id="collation_lines-instance_method"></a>
59
+ Provenance summary for offline reports assembled from multiple shards.
60
+
31
61
  ### `condition_coverage_evidence(decision_id:, condition_id:)` <a id="method-i-condition_coverage_evidence"></a> <a id="condition_coverage_evidence-instance_method"></a>
32
62
  Returns condition-value evidence for focused renderers without exposing the
33
63
  report's internal document traversal or mutating saved records.
@@ -59,15 +89,23 @@ Not documented.
59
89
  ### `diagnostic_message(diagnostic)` <a id="method-i-diagnostic_message"></a> <a id="diagnostic_message-instance_method"></a>
60
90
  Formats source context consistently in live and saved terminal views.
61
91
 
92
+ ### `display_scope_path(path)` <a id="method-i-display_scope_path"></a> <a id="display_scope_path-instance_method"></a>
93
+ Not documented.
94
+
62
95
  ### `exit_code()` <a id="method-i-exit_code"></a> <a id="exit_code-instance_method"></a>
63
96
  Not documented.
64
97
 
65
- ### `initialize(inventory:, evidence:, analysis:, minima:, baseline:, diagnostics:, level: = 3, missing_only: = false, view: = :decisions, run_metadata: = {}, saved_document: = nil, focus: = nil, top: = nil, minimum: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
98
+ ### `initialize(inventory:, evidence:, analysis:, minima:, baseline:, diagnostics:, level: = 3, missing_only: = false, view: = :decisions, run_metadata: = {}, saved_document: = nil, focus: = nil, top: = nil, minimum: = nil, changed_scope: = nil, minimum_changed: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
66
99
  - **@raise** [ArgumentError]
67
100
  - **@return** [Report] a new instance of Report
68
101
 
69
102
  ### `rerun_command(test_id)` <a id="method-i-rerun_command"></a> <a id="rerun_command-instance_method"></a>
70
103
  Not documented.
71
104
 
72
- ### `write(io:, format:)` <a id="method-i-write"></a> <a id="write-instance_method"></a>
105
+ ### `step_summary()` <a id="method-i-step_summary"></a> <a id="step_summary-instance_method"></a>
106
+ Markdown job summary for GitHub Actions ($GITHUB_STEP_SUMMARY).
107
+
108
+ ### `write(io:, format:, path_prefix: = nil)` <a id="method-i-write"></a> <a id="write-instance_method"></a>
109
+ path_prefix is only used by :github, to make annotation paths
110
+ repository-relative.
73
111
  - **@raise** [ArgumentError]
@@ -10,6 +10,9 @@ Metrics/ClassLength, Metrics/AbcSize, Metrics/CyclomaticComplexity,
10
10
  Metrics/MethodLength, Metrics/PerceivedComplexity
11
11
 
12
12
  ## Attributes
13
+ ### `decision_ids` [R] <a id="attribute-i-decision_ids"></a> <a id="decision_ids-instance_method"></a>
14
+ Returns the value of attribute decision_ids.
15
+
13
16
  ### `focus` [R] <a id="attribute-i-focus"></a> <a id="focus-instance_method"></a>
14
17
  Returns the value of attribute focus.
15
18
 
@@ -20,6 +23,9 @@ Returns the value of attribute top.
20
23
  ### `active?()` <a id="method-i-active-3F"></a> <a id="active?-instance_method"></a>
21
24
  - **@return** [Boolean]
22
25
 
26
+ ### `decision_filter_active?()` <a id="method-i-decision_filter_active-3F"></a> <a id="decision_filter_active?-instance_method"></a>
27
+ - **@return** [Boolean]
28
+
23
29
  ### `filter_decisions(decisions, inventory: = {})` <a id="method-i-filter_decisions"></a> <a id="filter_decisions-instance_method"></a>
24
30
  Not documented.
25
31
 
@@ -29,7 +35,7 @@ Not documented.
29
35
  ### `focus_label()` <a id="method-i-focus_label"></a> <a id="focus_label-instance_method"></a>
30
36
  Not documented.
31
37
 
32
- ### `initialize(focus: = nil, top: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
38
+ ### `initialize(focus: = nil, top: = nil, decision_ids: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
33
39
  - **@return** [ReportSelection] a new instance of ReportSelection
34
40
 
35
41
  ### `limit(items)` <a id="method-i-limit"></a> <a id="limit-instance_method"></a>
@@ -38,5 +44,8 @@ Not documented.
38
44
  ### `matching_decision_ids(document)` <a id="method-i-matching_decision_ids"></a> <a id="matching_decision_ids-instance_method"></a>
39
45
  Not documented.
40
46
 
47
+ ### `selected_decision_ids(document)` <a id="method-i-selected_decision_ids"></a> <a id="selected_decision_ids-instance_method"></a>
48
+ Not documented.
49
+
41
50
  ### `sort_key(decision, inventory: = {})` <a id="method-i-sort_key"></a> <a id="sort_key-instance_method"></a>
42
51
  Not documented.
@@ -2,7 +2,7 @@
2
2
 
3
3
  | | |
4
4
  | --- | --- |
5
- | **Extended by** | [Branchproof::DefaultRuntime](DefaultRuntime.md), [Branchproof::ExceptionRuntime](ExceptionRuntime.md), [Branchproof::ExtendedAlternativeRuntime](ExtendedAlternativeRuntime.md), [Branchproof::IterationRuntime](IterationRuntime.md), [Branchproof::RuntimeFlow](RuntimeFlow.md), [Branchproof::ValueRuntime](ValueRuntime.md) |
5
+ | **Extended by** | [Branchproof::DefaultRuntime](DefaultRuntime.md), [Branchproof::ExceptionRuntime](ExceptionRuntime.md), [Branchproof::ExtendedAlternativeRuntime](ExtendedAlternativeRuntime.md), [Branchproof::FallbackRuntime](FallbackRuntime.md), [Branchproof::IterationRuntime](IterationRuntime.md), [Branchproof::RuntimeFlow](RuntimeFlow.md), [Branchproof::ValueRuntime](ValueRuntime.md) |
6
6
  | **Defined in** | lib/branchproof/runtime.rb |
7
7
 
8
8
  Process-local execution recorder. It deliberately never coerces or stores
@@ -53,6 +53,9 @@ Not documented.
53
53
  ### `exception_value(decision_id, value, index)` <a id="method-c-exception_value"></a> <a id="exception_value-class_method"></a>
54
54
  Not documented.
55
55
 
56
+ ### `fallback_operand(decision_id, index, implicit, value)` <a id="method-c-fallback_operand"></a> <a id="fallback_operand-class_method"></a>
57
+ Not documented.
58
+
56
59
  ### `finish(decision_id, value)` <a id="method-c-finish"></a> <a id="finish-class_method"></a>
57
60
  Not documented.
58
61
 
@@ -3,11 +3,16 @@
3
3
  | | |
4
4
  | --- | --- |
5
5
  | **Inherits** | Object |
6
- | **Includes** | [Branchproof::DecisionSyntax](DecisionSyntax.md), [Branchproof::DefaultSyntax](DefaultSyntax.md), [Branchproof::ExceptionSyntax](ExceptionSyntax.md), [Branchproof::IterationSyntax](IterationSyntax.md), [Branchproof::ValueSyntax](ValueSyntax.md) |
6
+ | **Includes** | [Branchproof::DecisionSyntax](DecisionSyntax.md), [Branchproof::DefaultSyntax](DefaultSyntax.md), [Branchproof::ExceptionSyntax](ExceptionSyntax.md), [Branchproof::FallbackSyntax](FallbackSyntax.md), [Branchproof::IterationSyntax](IterationSyntax.md), [Branchproof::ValueSyntax](ValueSyntax.md) |
7
7
  | **Defined in** | lib/branchproof/source.rb |
8
8
 
9
9
  Inventories supported condition and decision occurrences from Ruby files.
10
10
 
11
+ ## Constants
12
+ ### `ALWAYS_TRUTHY_LITERALS` <a id="constant-ALWAYS_TRUTHY_LITERALS"></a> <a id="ALWAYS_TRUTHY_LITERALS-constant"></a>
13
+ Strings, symbols, and numbers are always truthy. A regexp literal in a
14
+ condition matches against $_, so its truth is not static.
15
+
11
16
  ## Attributes
12
17
  ### `limits` [R] <a id="attribute-i-limits"></a> <a id="limits-instance_method"></a>
13
18
  Returns the value of attribute limits.