branchproof 0.10.0 → 0.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +153 -10
- data/doc/Branchproof/Configuration.md +28 -0
- data/doc/Branchproof/CoveragePolicy.md +27 -0
- data/doc/Branchproof/FocusedReport.md +1 -1
- data/doc/Branchproof/Report.md +8 -2
- data/doc/Branchproof/ReportSelection.md +42 -0
- data/doc/Branchproof.md +4 -1
- data/doc/CHANGELOG.md +23 -0
- data/doc/README.md +153 -10
- data/lib/branchproof/cli.rb +120 -13
- data/lib/branchproof/comparison.rb +6 -1
- data/lib/branchproof/configuration.rb +111 -0
- data/lib/branchproof/coverage_policy.rb +169 -0
- data/lib/branchproof/evidence.rb +37 -2
- data/lib/branchproof/focused_report.rb +144 -27
- data/lib/branchproof/report.rb +97 -9
- data/lib/branchproof/report_selection.rb +158 -0
- data/lib/branchproof/saved_report.rb +29 -3
- data/lib/branchproof/version.rb +1 -1
- data/lib/branchproof.rb +3 -0
- data/llms.txt +4 -1
- data/sig/branchproof.rbs +35 -3
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3667120528803b1ceeb8c17313f66391b38633ed452757cb6e532f938d8cfd2a
|
|
4
|
+
data.tar.gz: ebdab6b41dde4697eff2634fe022c18e7c86e7abf4a317235fc94f24ec6070ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 226da6639e0f9aedc3345073e76b8bd78c23921ea0c5664d4230cf1712d25984a8b97168b2d721658e50c552dab54e6ad5cac71ae8bfccf5222c4eb89cf8471e
|
|
7
|
+
data.tar.gz: 7ff352e0d1ec9aca08a67d0ed9c6246a37f1560f16777a0c89b01ad04ad94fff7af99a2abb3b09135990f1d67b33e58cff3ce4209e0e0a5a808f72ff59a52c07
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.11.0] - 2026-09-25
|
|
4
|
+
|
|
5
|
+
- Add validated coverage policies for Decision, Condition, Condition/Decision,
|
|
6
|
+
MC/DC, and Decision Table criteria. Repeatable `--minimum criterion=threshold`
|
|
7
|
+
options override matching project or saved-report policy entries, compare
|
|
8
|
+
exact counts, and distinguish failed gates from unavailable or incomplete
|
|
9
|
+
evidence in exit status and JSON.
|
|
10
|
+
- Persist policy decisions in live schema `1.4` reports while keeping saved
|
|
11
|
+
schemas `1.0` through `1.3` readable; offline policy overrides do not load
|
|
12
|
+
project configuration or mutate snapshots.
|
|
13
|
+
- Add terminal-only `--focus PATH[:LINE]` and `--top N` selection for analyze
|
|
14
|
+
and report views. Selection uses captured source spans and deterministic source
|
|
15
|
+
order while leaving global summaries, gates, diagnostics, and exit status
|
|
16
|
+
unchanged.
|
|
17
|
+
- Document a GitHub Actions artifact workflow that creates the output directory
|
|
18
|
+
and uploads reports after gate failures.
|
|
19
|
+
- Preserve setup, body, and teardown phase totals when independent evidence runs
|
|
20
|
+
are merged, keeping phase attribution complete in combined snapshots.
|
|
21
|
+
- Add declarative `.branchproof.json` project configuration with CLI precedence,
|
|
22
|
+
source exclusions, and comparison metadata for repeatable coverage runs.
|
|
23
|
+
- Add a pipeline benchmark harness that exposes timing dimensions for future
|
|
24
|
+
measurements of coverage feedback costs.
|
|
25
|
+
|
|
3
26
|
## [0.10.0] - 2026-09-21
|
|
4
27
|
|
|
5
28
|
- Add the first-release RSpec execution path for plain Ruby and Rails projects.
|
data/README.md
CHANGED
|
@@ -107,6 +107,72 @@ files are selected explicitly. The worker prepends the project's `lib` and
|
|
|
107
107
|
`test` directories (`lib` and `spec` for RSpec) to its child load path, so application `require` calls
|
|
108
108
|
resolve without changing the parent process.
|
|
109
109
|
|
|
110
|
+
Project defaults can be checked into `.branchproof.json` at the project root:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"schema_version": 1,
|
|
115
|
+
"project": "rails",
|
|
116
|
+
"framework": "minitest",
|
|
117
|
+
"sources": ["app/**/*.rb"],
|
|
118
|
+
"tests": ["test/**/*_test.rb"],
|
|
119
|
+
"exclude": ["app/generated/**/*.rb"],
|
|
120
|
+
"minimum": { "mcdc": 80 }
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`project` accepts `auto`, `ruby`, or `rails`; `framework` accepts `auto`,
|
|
125
|
+
`minitest`, or `rspec`. `sources` and `tests` replace their corresponding
|
|
126
|
+
defaults, while `exclude` removes matching source files before inventory. A
|
|
127
|
+
configuration file may live elsewhere when passed with `--config PATH`; its
|
|
128
|
+
patterns are still resolved from the project root. Use `--no-config` to disable
|
|
129
|
+
the default file. Command-line project, framework, source, and test selections
|
|
130
|
+
take precedence over the file. Configured `exclude` patterns are applied
|
|
131
|
+
before source inventory and are recorded in run metadata for comparison.
|
|
132
|
+
`--config` and `--no-config` cannot be used together. RSpec configuration
|
|
133
|
+
selectors continue to conflict with an explicit test selection, including one
|
|
134
|
+
supplied by this file.
|
|
135
|
+
|
|
136
|
+
The `minimum` values are validated percentages from 0 through 100 for the five
|
|
137
|
+
supported criteria: `decision`, `condition`, `condition_decision`, `mcdc`, and
|
|
138
|
+
`decision_table`. A policy is evaluated against the exact numerator and
|
|
139
|
+
denominator counts in the report, so a value such as `66.67` is not rounded
|
|
140
|
+
before it is compared. The policy is recorded in JSON under
|
|
141
|
+
`coverage_policy`.
|
|
142
|
+
|
|
143
|
+
The command line can add or replace individual policy entries with repeatable
|
|
144
|
+
`--minimum` options. Use `criterion=threshold`, for example:
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
bundle exec branchproof analyze 'lib/**/*.rb' --minimum mcdc=80 \
|
|
148
|
+
--minimum decision_table=75
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
CLI values take precedence over matching `minimum` keys from `.branchproof.json`.
|
|
152
|
+
Specifying the same criterion more than once on the command line is an error.
|
|
153
|
+
The five criteria are evaluated independently. A threshold met exactly passes;
|
|
154
|
+
a result below it fails. A requested gate with a zero denominator, unavailable
|
|
155
|
+
coverage, or incomplete observations or analysis is `unavailable`, and exits
|
|
156
|
+
with status 2. A below-threshold gate exits 1. A failed test run makes
|
|
157
|
+
requested policy gates unavailable and exits 2; without a policy, a failed test
|
|
158
|
+
run retains the existing exit status 1. With no policy, the existing report
|
|
159
|
+
exit behavior remains unchanged.
|
|
160
|
+
|
|
161
|
+
For a Minitest project, a focused configuration can select the library and
|
|
162
|
+
test trees directly:
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{ "schema_version": 1, "framework": "minitest",
|
|
166
|
+
"sources": ["lib/**/*.rb"], "tests": ["test/**/*_test.rb"] }
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
For an RSpec project, use its spec patterns instead:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{ "schema_version": 1, "framework": "rspec",
|
|
173
|
+
"sources": ["app/**/*.rb"], "tests": ["spec/**/*_spec.rb"] }
|
|
174
|
+
```
|
|
175
|
+
|
|
110
176
|
Rails analysis boots the application inside the isolated worker after
|
|
111
177
|
Branchproof's loader and the selected framework hooks are installed. The
|
|
112
178
|
application's `rails_helper` owns requiring and configuring `rspec/rails` after
|
|
@@ -208,6 +274,15 @@ that did evaluate count toward Condition Coverage even when their value was
|
|
|
208
274
|
masked by another condition. Here, the two observations prove independence
|
|
209
275
|
for `logged_in?`; `admin?` still needs `[TF] => F`.
|
|
210
276
|
|
|
277
|
+
This is also a compact test-design walkthrough. A test that records
|
|
278
|
+
`[F-] => F` proves the false branch of `logged_in?`; a test that records
|
|
279
|
+
`[TT] => T` proves the true branch and establishes the current positive path.
|
|
280
|
+
Adding a test that records `[TF] => F` evaluates `admin?` false while
|
|
281
|
+
`logged_in?` stays true, so it supplies the missing independence witness and
|
|
282
|
+
improves the condition, Condition/Decision, MC/DC, and applicable decision-table
|
|
283
|
+
results. The report names the missing vector and its owning test when it is
|
|
284
|
+
observed.
|
|
285
|
+
|
|
211
286
|
Decision and Condition Coverage are calculated independently from the captured
|
|
212
287
|
evidence. Condition/Decision requires both; MC/DC adds independence evidence.
|
|
213
288
|
Decision Table Coverage is calculated independently of all of them: MC/DC asks
|
|
@@ -501,6 +576,34 @@ execution. JSON output always contains the complete evidence document, so an
|
|
|
501
576
|
explicit view cannot be combined with `--format json`. The `mcdc` executable
|
|
502
577
|
accepts the same arguments for existing scripts.
|
|
503
578
|
|
|
579
|
+
Terminal reports can be narrowed with `--focus PATH[:LINE]` and bounded with
|
|
580
|
+
`--top N`, where `N` is a positive integer. These options are accepted by
|
|
581
|
+
`analyze` and `report`, and are terminal-only. Focus matches the source spans
|
|
582
|
+
captured in the report; rendering does not reopen or need the original source
|
|
583
|
+
file. `--focus` and `--top` affect displayed detail only: the coverage summary,
|
|
584
|
+
policy gates, diagnostics, exit status, and global counts remain unchanged.
|
|
585
|
+
|
|
586
|
+
The default view limits decisions. In `--view decision-tables`, the units are
|
|
587
|
+
decision tables; in `--view conditions`, condition and alternative rows; and
|
|
588
|
+
in `--view tests`, test rows. Rows are ordered deterministically by project-
|
|
589
|
+
relative path and source line, with deterministic tie-breakers for each view:
|
|
590
|
+
decisions use column and stable ID; decision tables use decision ID; conditions
|
|
591
|
+
and alternatives use column, decision ID, and condition or alternative index;
|
|
592
|
+
tests use test name and ID. `--top` follows that source order; it does not rank
|
|
593
|
+
rows by risk or coverage. For example:
|
|
594
|
+
|
|
595
|
+
```sh
|
|
596
|
+
bundle exec branchproof analyze 'lib/**/*.rb' --focus lib/access.rb:12 --top 5
|
|
597
|
+
bundle exec branchproof report .branchproof/current.json --view conditions \
|
|
598
|
+
--focus lib/access.rb --top 10
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
Focus and top selections never create a new test run or alter policy scope.
|
|
602
|
+
They also do not generate tests. RSpec rerun labels remain the existing
|
|
603
|
+
recorded selectors and commands. The main finding rows respect the selection;
|
|
604
|
+
supplemental unexecuted, unattributed, and unsupported sections retain their
|
|
605
|
+
run-wide counts rather than expanding into all detail rows.
|
|
606
|
+
|
|
504
607
|
### Saved reports and offline comparison
|
|
505
608
|
|
|
506
609
|
Reports are saved only when requested. Create a local artifact directory and
|
|
@@ -518,13 +621,26 @@ The output's parent directory must already exist. Replacing a baseline is an
|
|
|
518
621
|
explicit `analyze --format json --output` operation; keep CI snapshots as
|
|
519
622
|
artifacts when you need to retain multiple runs.
|
|
520
623
|
|
|
521
|
-
The `report` command reads the saved document without loading the application
|
|
522
|
-
or running tests. It uses locations and metadata
|
|
523
|
-
rendering remains useful after the original
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
624
|
+
The `report` command reads the saved document without loading the application,
|
|
625
|
+
project configuration, or running tests. It uses locations and metadata
|
|
626
|
+
captured in the report, so rendering remains useful after the original
|
|
627
|
+
checkout has moved or been removed. A saved report's policy is inherited by
|
|
628
|
+
default. Repeatable `--minimum criterion=threshold` options override matching
|
|
629
|
+
saved policy entries for that rendering without changing the snapshot file;
|
|
630
|
+
other saved thresholds remain inherited. Offline rendering never consults the
|
|
631
|
+
current `.branchproof.json`.
|
|
632
|
+
|
|
633
|
+
New live JSON reports use schema `1.4` and include the required
|
|
634
|
+
`coverage_policy` object with the normalized requested minima and recomputed
|
|
635
|
+
gate results. The report validates those results from its exact coverage
|
|
636
|
+
counts rather than trusting a persisted percentage. Readers continue to accept
|
|
637
|
+
schemas `1.0` through `1.3`; an offline policy overlay is optional and
|
|
638
|
+
preserves the input snapshot's schema version, including for legacy reports.
|
|
639
|
+
New snapshots retain the ladder at every level. Legacy snapshots without
|
|
640
|
+
analysis can still be rendered at Level 1; levels 2 and 3 require analysis in
|
|
641
|
+
the saved report.
|
|
642
|
+
The repository ignores `.branchproof/`; choose a different path and CI artifact
|
|
643
|
+
policy when a project needs to retain reports.
|
|
528
644
|
Saved JSON includes existing raw metadata such as test names and expressions;
|
|
529
645
|
relative terminal labels do not mean every legacy JSON field is sanitized.
|
|
530
646
|
|
|
@@ -560,6 +676,29 @@ Invalid input or an incomplete comparison exits 2, which takes
|
|
|
560
676
|
precedence. Reports are explicit snapshots: comparison never creates history,
|
|
561
677
|
promotes a baseline, or overwrites either input.
|
|
562
678
|
|
|
679
|
+
### GitHub Actions artifacts
|
|
680
|
+
|
|
681
|
+
A coverage policy can fail a job while still preserving the report for review.
|
|
682
|
+
Create the output directory before invoking Branchproof and upload the report
|
|
683
|
+
with `if: always()` so failed gates and failed test runs leave an artifact:
|
|
684
|
+
|
|
685
|
+
```yaml
|
|
686
|
+
- name: Branchproof coverage
|
|
687
|
+
run: |
|
|
688
|
+
mkdir -p .branchproof
|
|
689
|
+
bundle exec branchproof analyze 'lib/**/*.rb' --test 'test/**/*_test.rb' \
|
|
690
|
+
--format json --output .branchproof/coverage.json \
|
|
691
|
+
--minimum mcdc=80 --minimum decision_table=75
|
|
692
|
+
|
|
693
|
+
- name: Upload Branchproof report
|
|
694
|
+
if: always()
|
|
695
|
+
uses: actions/upload-artifact@v4
|
|
696
|
+
with:
|
|
697
|
+
name: branchproof-coverage
|
|
698
|
+
path: .branchproof/coverage.json
|
|
699
|
+
if-no-files-found: warn
|
|
700
|
+
```
|
|
701
|
+
|
|
563
702
|
MC/DC has two related questions. Evaluation asks whether a condition was
|
|
564
703
|
observed with a value, including short-circuiting. Independent proof asks
|
|
565
704
|
whether the analyzer found a pair of observations where that condition changes
|
|
@@ -670,8 +809,8 @@ Ruby-defined custom `!` methods keep their runtime behavior;
|
|
|
670
809
|
evidence that contradicts Boolean negation is rejected instead of proving
|
|
671
810
|
coverage with an invalid logical model.
|
|
672
811
|
|
|
673
|
-
New reports use schema `1.
|
|
674
|
-
remain readable. Comparison distinguishes decision-table coverage movement
|
|
812
|
+
New reports use schema `1.4`; saved schema `1.0`, `1.1`, `1.2`, and `1.3`
|
|
813
|
+
reports remain readable. Comparison distinguishes decision-table coverage movement
|
|
675
814
|
(`rule coverage gained`, `rule coverage lost`) from analysis movement
|
|
676
815
|
(`rule reachability changed`), and treats a structurally changed decision as a
|
|
677
816
|
changed decision-table context instead of guessing which old rule a new rule
|
|
@@ -730,7 +869,11 @@ namespace. The CLI is the supported way to run a complete analysis;
|
|
|
730
869
|
child-environment policy,
|
|
731
870
|
and `Branchproof::RailsSupport` is the optional Rails boot boundary. The library
|
|
732
871
|
classes expose the source, runtime, evidence, analysis, and report contracts
|
|
733
|
-
for adapters and integrations.
|
|
872
|
+
for adapters and integrations. `Branchproof::CoveragePolicy#call` evaluates a
|
|
873
|
+
normalized `minimum` hash against a report document. `Report#coverage_policy`
|
|
874
|
+
returns the recomputed policy record, and `Report#coverage_policy_lines`
|
|
875
|
+
returns its terminal lines; both are available to integrations that need the
|
|
876
|
+
same gate result as the CLI.
|
|
734
877
|
|
|
735
878
|
## Development
|
|
736
879
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Class Branchproof::Configuration <a id="class-Branchproof-Configuration"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/branchproof/configuration.rb |
|
|
7
|
+
|
|
8
|
+
Loads and validates the project-local .branchproof.json policy.
|
|
9
|
+
|
|
10
|
+
## Constants
|
|
11
|
+
### `FIELDS` <a id="constant-FIELDS"></a> <a id="FIELDS-constant"></a>
|
|
12
|
+
Not documented.
|
|
13
|
+
|
|
14
|
+
### `FRAMEWORKS` <a id="constant-FRAMEWORKS"></a> <a id="FRAMEWORKS-constant"></a>
|
|
15
|
+
Not documented.
|
|
16
|
+
|
|
17
|
+
### `MINIMUM_CRITERIA` <a id="constant-MINIMUM_CRITERIA"></a> <a id="MINIMUM_CRITERIA-constant"></a>
|
|
18
|
+
Not documented.
|
|
19
|
+
|
|
20
|
+
### `PROJECTS` <a id="constant-PROJECTS"></a> <a id="PROJECTS-constant"></a>
|
|
21
|
+
Not documented.
|
|
22
|
+
|
|
23
|
+
### `SCHEMA_VERSION` <a id="constant-SCHEMA_VERSION"></a> <a id="SCHEMA_VERSION-constant"></a>
|
|
24
|
+
Not documented.
|
|
25
|
+
|
|
26
|
+
## Public Class Methods
|
|
27
|
+
### `load(path:, root:, explicit: = false, disabled: = false)` <a id="method-c-load"></a> <a id="load-class_method"></a>
|
|
28
|
+
Not documented.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Class Branchproof::CoveragePolicy <a id="class-Branchproof-CoveragePolicy"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/branchproof/coverage_policy.rb |
|
|
7
|
+
|
|
8
|
+
Evaluates configured coverage thresholds against the aggregate Analyzer
|
|
9
|
+
coverage counts without relying on rounded percentage fields.
|
|
10
|
+
|
|
11
|
+
## Constants
|
|
12
|
+
### `COMPLETENESS_FIELDS` <a id="constant-COMPLETENESS_FIELDS"></a> <a id="COMPLETENESS_FIELDS-constant"></a>
|
|
13
|
+
Not documented.
|
|
14
|
+
|
|
15
|
+
### `CRITERIA` <a id="constant-CRITERIA"></a> <a id="CRITERIA-constant"></a>
|
|
16
|
+
Not documented.
|
|
17
|
+
|
|
18
|
+
## Public Class Methods
|
|
19
|
+
### `normalize(minimum)` <a id="method-c-normalize"></a> <a id="normalize-class_method"></a>
|
|
20
|
+
- **@raise** [ArgumentError]
|
|
21
|
+
|
|
22
|
+
## Public Instance Methods
|
|
23
|
+
### `call(document:)` <a id="method-i-call"></a> <a id="call-instance_method"></a>
|
|
24
|
+
Not documented.
|
|
25
|
+
|
|
26
|
+
### `initialize(minimum:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
27
|
+
- **@return** [CoveragePolicy] a new instance of CoveragePolicy
|
|
@@ -12,7 +12,7 @@ Terminal renderings grouped around conditions or tests.
|
|
|
12
12
|
Not documented.
|
|
13
13
|
|
|
14
14
|
## Public Instance Methods
|
|
15
|
-
### `initialize(document:, view:, level:, missing_only: = false, coordinator: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
15
|
+
### `initialize(document:, view:, level:, missing_only: = false, coordinator: = nil, focus: = nil, top: = nil, selection: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
16
16
|
- **@return** [FocusedReport] a new instance of FocusedReport
|
|
17
17
|
|
|
18
18
|
### `render()` <a id="method-i-render"></a> <a id="render-instance_method"></a>
|
data/doc/Branchproof/Report.md
CHANGED
|
@@ -24,7 +24,7 @@ Not documented.
|
|
|
24
24
|
Not documented.
|
|
25
25
|
|
|
26
26
|
## Public Class Methods
|
|
27
|
-
### `from_document(document:, level: = nil, view: = :decisions, missing_only: = false)` <a id="method-c-from_document"></a> <a id="from_document-class_method"></a>
|
|
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>
|
|
28
28
|
Not documented.
|
|
29
29
|
|
|
30
30
|
## Public Instance Methods
|
|
@@ -38,6 +38,12 @@ Shares the existing missing-case wording with focused terminal views.
|
|
|
38
38
|
### `coverage_ladder_lines()` <a id="method-i-coverage_ladder_lines"></a> <a id="coverage_ladder_lines-instance_method"></a>
|
|
39
39
|
Render the shared ladder in every terminal view.
|
|
40
40
|
|
|
41
|
+
### `coverage_policy()` <a id="method-i-coverage_policy"></a> <a id="coverage_policy-instance_method"></a>
|
|
42
|
+
Not documented.
|
|
43
|
+
|
|
44
|
+
### `coverage_policy_lines()` <a id="method-i-coverage_policy_lines"></a> <a id="coverage_policy_lines-instance_method"></a>
|
|
45
|
+
Not documented.
|
|
46
|
+
|
|
41
47
|
### `coverage_status_label(status)` <a id="method-i-coverage_status_label"></a> <a id="coverage_status_label-instance_method"></a>
|
|
42
48
|
Not documented.
|
|
43
49
|
|
|
@@ -56,7 +62,7 @@ Formats source context consistently in live and saved terminal views.
|
|
|
56
62
|
### `exit_code()` <a id="method-i-exit_code"></a> <a id="exit_code-instance_method"></a>
|
|
57
63
|
Not documented.
|
|
58
64
|
|
|
59
|
-
### `initialize(inventory:, evidence:, analysis:, minima:, baseline:, diagnostics:, level: = 3, missing_only: = false, view: = :decisions, run_metadata: = {}, saved_document: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
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>
|
|
60
66
|
- **@raise** [ArgumentError]
|
|
61
67
|
- **@return** [Report] a new instance of Report
|
|
62
68
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Class Branchproof::ReportSelection <a id="class-Branchproof-ReportSelection"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/branchproof/report_selection.rb |
|
|
7
|
+
|
|
8
|
+
Validates and applies terminal-only report display filters. rubocop:disable
|
|
9
|
+
Metrics/ClassLength, Metrics/AbcSize, Metrics/CyclomaticComplexity,
|
|
10
|
+
Metrics/MethodLength, Metrics/PerceivedComplexity
|
|
11
|
+
|
|
12
|
+
## Attributes
|
|
13
|
+
### `focus` [R] <a id="attribute-i-focus"></a> <a id="focus-instance_method"></a>
|
|
14
|
+
Returns the value of attribute focus.
|
|
15
|
+
|
|
16
|
+
### `top` [R] <a id="attribute-i-top"></a> <a id="top-instance_method"></a>
|
|
17
|
+
Returns the value of attribute top.
|
|
18
|
+
|
|
19
|
+
## Public Instance Methods
|
|
20
|
+
### `active?()` <a id="method-i-active-3F"></a> <a id="active?-instance_method"></a>
|
|
21
|
+
- **@return** [Boolean]
|
|
22
|
+
|
|
23
|
+
### `filter_decisions(decisions, inventory: = {})` <a id="method-i-filter_decisions"></a> <a id="filter_decisions-instance_method"></a>
|
|
24
|
+
Not documented.
|
|
25
|
+
|
|
26
|
+
### `focus_active?()` <a id="method-i-focus_active-3F"></a> <a id="focus_active?-instance_method"></a>
|
|
27
|
+
- **@return** [Boolean]
|
|
28
|
+
|
|
29
|
+
### `focus_label()` <a id="method-i-focus_label"></a> <a id="focus_label-instance_method"></a>
|
|
30
|
+
Not documented.
|
|
31
|
+
|
|
32
|
+
### `initialize(focus: = nil, top: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
33
|
+
- **@return** [ReportSelection] a new instance of ReportSelection
|
|
34
|
+
|
|
35
|
+
### `limit(items)` <a id="method-i-limit"></a> <a id="limit-instance_method"></a>
|
|
36
|
+
Not documented.
|
|
37
|
+
|
|
38
|
+
### `matching_decision_ids(document)` <a id="method-i-matching_decision_ids"></a> <a id="matching_decision_ids-instance_method"></a>
|
|
39
|
+
Not documented.
|
|
40
|
+
|
|
41
|
+
### `sort_key(decision, inventory: = {})` <a id="method-i-sort_key"></a> <a id="sort_key-instance_method"></a>
|
|
42
|
+
Not documented.
|
data/doc/Branchproof.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
| | |
|
|
4
4
|
| --- | --- |
|
|
5
|
-
| **Defined in** | lib/branchproof.rb, lib/branchproof/cli.rb, lib/branchproof/limits.rb, lib/branchproof/loader.rb, lib/branchproof/report.rb, lib/branchproof/source.rb, lib/branchproof/worker.rb, lib/branchproof/project.rb, lib/branchproof/records.rb, lib/branchproof/runtime.rb, lib/branchproof/version.rb, lib/branchproof/analyzer.rb, lib/branchproof/evidence.rb, lib/branchproof/minimizer.rb, lib/branchproof/comparison.rb, lib/branchproof/constraints.rb, lib/branchproof/instrumenter.rb, lib/branchproof/runtime_flow.rb, lib/branchproof/saved_report.rb, lib/branchproof/value_syntax.rb, lib/branchproof/rails_support.rb, lib/branchproof/rspec_adapter.rb, lib/branchproof/value_runtime.rb, lib/branchproof/coverage_index.rb, lib/branchproof/decision_table.rb, lib/branchproof/default_syntax.rb, lib/branchproof/focused_report.rb, lib/branchproof/decision_syntax.rb, lib/branchproof/default_runtime.rb, lib/branchproof/exception_syntax.rb, lib/branchproof/iteration_syntax.rb, lib/branchproof/minitest_adapter.rb, lib/branchproof/comparison_report.rb, lib/branchproof/exception_runtime.rb, lib/branchproof/iteration_runtime.rb, lib/branchproof/flow_instrumentation.rb, lib/branchproof/value_instrumentation.rb, lib/branchproof/default_instrumentation.rb, lib/branchproof/exception_instrumentation.rb, lib/branchproof/iteration_instrumentation.rb, lib/branchproof/extended_alternative_runtime.rb |
|
|
5
|
+
| **Defined in** | lib/branchproof.rb, lib/branchproof/cli.rb, lib/branchproof/limits.rb, lib/branchproof/loader.rb, lib/branchproof/report.rb, lib/branchproof/source.rb, lib/branchproof/worker.rb, lib/branchproof/project.rb, lib/branchproof/records.rb, lib/branchproof/runtime.rb, lib/branchproof/version.rb, lib/branchproof/analyzer.rb, lib/branchproof/evidence.rb, lib/branchproof/minimizer.rb, lib/branchproof/comparison.rb, lib/branchproof/constraints.rb, lib/branchproof/instrumenter.rb, lib/branchproof/runtime_flow.rb, lib/branchproof/saved_report.rb, lib/branchproof/value_syntax.rb, lib/branchproof/configuration.rb, lib/branchproof/rails_support.rb, lib/branchproof/rspec_adapter.rb, lib/branchproof/value_runtime.rb, lib/branchproof/coverage_index.rb, lib/branchproof/decision_table.rb, lib/branchproof/default_syntax.rb, lib/branchproof/focused_report.rb, lib/branchproof/coverage_policy.rb, lib/branchproof/decision_syntax.rb, lib/branchproof/default_runtime.rb, lib/branchproof/exception_syntax.rb, lib/branchproof/iteration_syntax.rb, lib/branchproof/minitest_adapter.rb, lib/branchproof/report_selection.rb, lib/branchproof/comparison_report.rb, lib/branchproof/exception_runtime.rb, lib/branchproof/iteration_runtime.rb, lib/branchproof/flow_instrumentation.rb, lib/branchproof/value_instrumentation.rb, lib/branchproof/default_instrumentation.rb, lib/branchproof/exception_instrumentation.rb, lib/branchproof/iteration_instrumentation.rb, lib/branchproof/extended_alternative_runtime.rb |
|
|
6
6
|
|
|
7
7
|
Keep source-boundary and parameter-binding rules together for auditing.
|
|
8
8
|
rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity,
|
|
@@ -18,9 +18,11 @@ Not documented.
|
|
|
18
18
|
- [Branchproof/CLI.md](Branchproof/CLI.md)
|
|
19
19
|
- [Branchproof/Comparison.md](Branchproof/Comparison.md)
|
|
20
20
|
- [Branchproof/ComparisonReport.md](Branchproof/ComparisonReport.md)
|
|
21
|
+
- [Branchproof/Configuration.md](Branchproof/Configuration.md)
|
|
21
22
|
- [Branchproof/Constraints/Solver.md](Branchproof/Constraints/Solver.md)
|
|
22
23
|
- [Branchproof/Constraints.md](Branchproof/Constraints.md)
|
|
23
24
|
- [Branchproof/CoverageIndex.md](Branchproof/CoverageIndex.md)
|
|
25
|
+
- [Branchproof/CoveragePolicy.md](Branchproof/CoveragePolicy.md)
|
|
24
26
|
- [Branchproof/DecisionSyntax.md](Branchproof/DecisionSyntax.md)
|
|
25
27
|
- [Branchproof/DecisionTable.md](Branchproof/DecisionTable.md)
|
|
26
28
|
- [Branchproof/DefaultInstrumentation.md](Branchproof/DefaultInstrumentation.md)
|
|
@@ -54,6 +56,7 @@ Not documented.
|
|
|
54
56
|
- [Branchproof/RailsSupport.md](Branchproof/RailsSupport.md)
|
|
55
57
|
- [Branchproof/Records.md](Branchproof/Records.md)
|
|
56
58
|
- [Branchproof/Report.md](Branchproof/Report.md)
|
|
59
|
+
- [Branchproof/ReportSelection.md](Branchproof/ReportSelection.md)
|
|
57
60
|
- [Branchproof/Runtime.md](Branchproof/Runtime.md)
|
|
58
61
|
- [Branchproof/RuntimeFlow.md](Branchproof/RuntimeFlow.md)
|
|
59
62
|
- [Branchproof/SavedReport.md](Branchproof/SavedReport.md)
|
data/doc/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.11.0] - 2026-09-25
|
|
4
|
+
|
|
5
|
+
- Add validated coverage policies for Decision, Condition, Condition/Decision,
|
|
6
|
+
MC/DC, and Decision Table criteria. Repeatable `--minimum criterion=threshold`
|
|
7
|
+
options override matching project or saved-report policy entries, compare
|
|
8
|
+
exact counts, and distinguish failed gates from unavailable or incomplete
|
|
9
|
+
evidence in exit status and JSON.
|
|
10
|
+
- Persist policy decisions in live schema `1.4` reports while keeping saved
|
|
11
|
+
schemas `1.0` through `1.3` readable; offline policy overrides do not load
|
|
12
|
+
project configuration or mutate snapshots.
|
|
13
|
+
- Add terminal-only `--focus PATH[:LINE]` and `--top N` selection for analyze
|
|
14
|
+
and report views. Selection uses captured source spans and deterministic source
|
|
15
|
+
order while leaving global summaries, gates, diagnostics, and exit status
|
|
16
|
+
unchanged.
|
|
17
|
+
- Document a GitHub Actions artifact workflow that creates the output directory
|
|
18
|
+
and uploads reports after gate failures.
|
|
19
|
+
- Preserve setup, body, and teardown phase totals when independent evidence runs
|
|
20
|
+
are merged, keeping phase attribution complete in combined snapshots.
|
|
21
|
+
- Add declarative `.branchproof.json` project configuration with CLI precedence,
|
|
22
|
+
source exclusions, and comparison metadata for repeatable coverage runs.
|
|
23
|
+
- Add a pipeline benchmark harness that exposes timing dimensions for future
|
|
24
|
+
measurements of coverage feedback costs.
|
|
25
|
+
|
|
3
26
|
## [0.10.0] - 2026-09-21
|
|
4
27
|
|
|
5
28
|
- Add the first-release RSpec execution path for plain Ruby and Rails projects.
|