branchproof 0.8.0 → 0.10.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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/README.md +120 -28
  4. data/doc/Branchproof/DefaultInstrumentation.md +13 -0
  5. data/doc/Branchproof/DefaultRuntime.md +11 -0
  6. data/doc/Branchproof/DefaultSyntax.md +7 -0
  7. data/doc/Branchproof/Evidence.md +3 -0
  8. data/doc/Branchproof/ExceptionInstrumentation.md +9 -0
  9. data/doc/Branchproof/ExceptionRuntime.md +27 -0
  10. data/doc/Branchproof/ExceptionSyntax.md +9 -0
  11. data/doc/Branchproof/ExtendedAlternativeRuntime.md +19 -0
  12. data/doc/Branchproof/Instrumenter.md +1 -1
  13. data/doc/Branchproof/IterationInstrumentation.md +7 -0
  14. data/doc/Branchproof/IterationRuntime.md +21 -0
  15. data/doc/Branchproof/IterationSyntax.md +11 -0
  16. data/doc/Branchproof/Project.md +4 -1
  17. data/doc/Branchproof/RSpecAdapter/ClassRunnerGuard.md +11 -0
  18. data/doc/Branchproof/RSpecAdapter/ContextLifecycle.md +14 -0
  19. data/doc/Branchproof/RSpecAdapter/DefaultDiscovery.md +11 -0
  20. data/doc/Branchproof/RSpecAdapter/ExampleLifecycle.md +11 -0
  21. data/doc/Branchproof/RSpecAdapter/RunnerGuard.md +11 -0
  22. data/doc/Branchproof/RSpecAdapter/UnsupportedRunner.md +12 -0
  23. data/doc/Branchproof/RSpecAdapter.md +47 -0
  24. data/doc/Branchproof/RailsSupport.md +35 -2
  25. data/doc/Branchproof/Report.md +3 -0
  26. data/doc/Branchproof/Runtime.md +59 -1
  27. data/doc/Branchproof/Source.md +7 -1
  28. data/doc/Branchproof/ValueInstrumentation.md +7 -0
  29. data/doc/Branchproof/ValueRuntime.md +26 -0
  30. data/doc/Branchproof/ValueSyntax.md +26 -0
  31. data/doc/Branchproof/Worker.md +8 -1
  32. data/doc/Branchproof.md +24 -3
  33. data/doc/CHANGELOG.md +37 -0
  34. data/doc/README.md +120 -28
  35. data/lib/branchproof/cli.rb +74 -28
  36. data/lib/branchproof/comparison.rb +52 -6
  37. data/lib/branchproof/decision_syntax.rb +19 -9
  38. data/lib/branchproof/default_instrumentation.rb +140 -0
  39. data/lib/branchproof/default_runtime.rb +16 -0
  40. data/lib/branchproof/default_syntax.rb +94 -0
  41. data/lib/branchproof/evidence.rb +87 -1
  42. data/lib/branchproof/exception_instrumentation.rb +96 -0
  43. data/lib/branchproof/exception_runtime.rb +41 -0
  44. data/lib/branchproof/exception_syntax.rb +157 -0
  45. data/lib/branchproof/extended_alternative_runtime.rb +23 -0
  46. data/lib/branchproof/flow_instrumentation.rb +36 -7
  47. data/lib/branchproof/focused_report.rb +5 -0
  48. data/lib/branchproof/instrumenter.rb +50 -5
  49. data/lib/branchproof/iteration_instrumentation.rb +66 -0
  50. data/lib/branchproof/iteration_runtime.rb +79 -0
  51. data/lib/branchproof/iteration_syntax.rb +75 -0
  52. data/lib/branchproof/loader.rb +6 -1
  53. data/lib/branchproof/project.rb +49 -2
  54. data/lib/branchproof/rails_support.rb +101 -0
  55. data/lib/branchproof/report.rb +21 -1
  56. data/lib/branchproof/rspec_adapter.rb +423 -0
  57. data/lib/branchproof/runtime.rb +14 -0
  58. data/lib/branchproof/saved_report.rb +9 -2
  59. data/lib/branchproof/source.rb +59 -32
  60. data/lib/branchproof/value_instrumentation.rb +35 -0
  61. data/lib/branchproof/value_runtime.rb +73 -0
  62. data/lib/branchproof/value_syntax.rb +116 -0
  63. data/lib/branchproof/version.rb +1 -1
  64. data/lib/branchproof/worker.rb +75 -15
  65. data/lib/branchproof.rb +1 -0
  66. data/llms.txt +24 -3
  67. data/sig/branchproof.rbs +45 -1
  68. metadata +36 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c76fa40f75fbd8122fc0fbb45a1c9d460fa3478f783951674e0e4c2707d44175
4
- data.tar.gz: b4b0b88c1a0d5e61797ab52174f1841c57f1dde359d405dc1205bcff27810968
3
+ metadata.gz: ac29ee2c9df680fb49df3bc144ed102168320ad48908bcf9ec665521ebcfec0b
4
+ data.tar.gz: c31a3385bdbf3e42c538d4bd85c0120ee414da71bb184653287ab644ff7d243e
5
5
  SHA512:
6
- metadata.gz: c32db269cece96c843093cc72accffd3921e56eb2a6b974b61c2d87cd696444ffd0d7fff25ed50ac3c5cadf2e6c316ccfd99aaf4f6c28344112c30451cf8e22a
7
- data.tar.gz: 54a46ff6c7a753e2015bdb814d13fc576bc2d9bd88fa18d0bb4bee8f1f939fbcea62b9f006d31a3c5e99ac0d9c95de8a8bbea8d43db05c1a767c3ff828430f8b
6
+ metadata.gz: 9edc32c189cdbf5fbab52e224f9a2292e3cc1ec3ac20090408f0371b2dcd76198a6295059bd65be868eb041f12f62cae54b0a4a0a61e1cc7302cd6d90cfe3475
7
+ data.tar.gz: 2c60434afbc2940cfcb17717c37787a3560e18d8278b46fbe7e1571bd4556e7230de7648bdff883e85666be066396c3ffbdc154937913bae54dbf365cadfde7e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.10.0] - 2026-09-21
4
+
5
+ - Add the first-release RSpec execution path for plain Ruby and Rails projects.
6
+ It supports RSpec 3.13, including Rails 8.1 with rspec-rails 8.x on CRuby 3.4.
7
+ Integration is verified against rspec-rails 8.0.4 and native RSpec behavior.
8
+ - Add `--framework auto|minitest|rspec`, native RSpec discovery that respects
9
+ exclusions and custom patterns, full-description labels, and status mapping for pending,
10
+ skipped, fixed pending, and failed examples.
11
+ - Keep Rails helper ownership with the application after Branchproof's loader;
12
+ transaction behavior, in-process specs, and context/suite/unattributed
13
+ evidence are recorded explicitly.
14
+ - Allow focused pure-Ruby specs inside Rails projects without requiring Rails boot.
15
+ - Match RSpec examples across saved reports only when spec and declaration
16
+ revisions agree, preventing false matches after examples are inserted or reordered.
17
+ - Stream test progress to stderr, show quoted RSpec rerun commands, and explain
18
+ unmatched test globs, empty suites, and filters selecting no examples.
19
+ - Document repeated ordinary and shared-example benchmarks with allocations
20
+ and peak process memory; end-to-end overhead remains substantial.
21
+
22
+ ## [0.9.0] - 2026-09-18
23
+
24
+ - Measure contextual predicates, guarded pattern selection, dynamic case splat
25
+ groups, required pattern matching, and safe-navigation compound assignment.
26
+ - Add coverage for rescue paths, optional argument binding, standalone
27
+ predicates, value alternatives, iteration, and source-visible callbacks.
28
+ - Preserve Boolean criteria for Boolean decisions and report other choices as
29
+ alternative coverage, including their source locations and supporting tests.
30
+ - Exercise 144 Ruby construct fixtures and 406 native cases across source inventory, native behavior,
31
+ runtime evidence, analysis, reports, saved reports, and CLI integration.
32
+ - Preserve nonlocal control transfers on the right side of logical expressions.
33
+ - Harden default-argument, exception, and iteration instrumentation around
34
+ implicit parameters, nonlocal transfers, nested frames, and deferred callbacks.
35
+ - Remove unreachable integer bitwise alternatives and keep their exclusions out
36
+ of coverage denominators.
37
+ - Cache repeated value evidence while preserving vector counts, test/phase
38
+ attribution, and saved-report coverage semantics.
39
+
3
40
  ## [0.8.0] - 2026-09-17
4
41
 
5
42
  - Derive a reduced decision table for every supported Boolean decision from its
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Branchproof
2
2
 
3
3
  Branchproof measures decision, condition, modified condition/decision (MC/DC),
4
- and decision-table coverage from one serial Minitest run. It discovers Ruby
4
+ and decision-table coverage from one serial Minitest or RSpec run. It discovers Ruby
5
5
  decisions through Prism, records their runtime paths, and attributes evidence
6
6
  to tests. Boolean decisions receive the coverage ladder; `case`, pattern
7
7
  alternatives, safe navigation, and conditional assignments receive alternative
@@ -22,10 +22,13 @@ Or add it to a bundle:
22
22
  bundle add branchproof
23
23
  ```
24
24
 
25
- Branchproof targets CRuby 3.3 and 3.4, Minitest 5.x, and Prism 1.x. The
26
- published core runtime matrix is the CI matrix. Rails support is optional and
27
- has been locally checked against Rails 8.1.3.1 on CRuby 3.4.5; Rails is
28
- supplied by the application and is not a runtime dependency of this gem.
25
+ Branchproof targets CRuby 3.3 and 3.4, Minitest 5.x, RSpec 3.13, and Prism 1.x. The
26
+ published core runtime matrix is the CI matrix. Rails/RSpec execution is limited
27
+ to Rails 8.1.x, rspec-rails 8.x, RSpec 3.13.x, and CRuby 3.4.x; passing core
28
+ tests on Ruby 4.0 does not imply Rails/RSpec support. Integration has been checked
29
+ with Rails 8.1.3.1, rspec-rails 8.0.4, RSpec Core 3.13.6, and CRuby 3.4.7.
30
+ Rails and RSpec are optional dependencies supplied by the application.
31
+ Minitest 5.x remains a runtime dependency of this gem.
29
32
  Unsupported syntax and incomplete observations remain visible in the report
30
33
  instead of being counted as coverage.
31
34
 
@@ -33,7 +36,7 @@ instead of being counted as coverage.
33
36
 
34
37
  Run `branchproof analyze` with the source files or globs to inspect, followed by
35
38
  options. A second `--` separates Branchproof options from arguments passed to
36
- Minitest unchanged:
39
+ the selected test framework:
37
40
 
38
41
  ```sh
39
42
  branchproof analyze 'lib/**/*.rb' --test 'test/**/*_test.rb' \
@@ -58,22 +61,60 @@ the application's bundle and Rails version remain in effect:
58
61
  bundle exec branchproof analyze 'app/**/*.rb' --project rails --test 'test/**/*_test.rb'
59
62
  ```
60
63
 
64
+ Choose the test framework independently from project kind:
65
+
66
+ ```sh
67
+ bundle exec branchproof analyze 'app/**/*.rb' --project rails --framework rspec
68
+ ```
69
+
70
+ `--framework auto|minitest|rspec` is explicit about the adapter. Auto mode
71
+ selects RSpec when `.rspec` or `spec/**/*_spec.rb` markers exist and Minitest
72
+ when `test/**/*_test.rb` or `test/**/test_*.rb` markers exist. If both are
73
+ present, specify the framework. RSpec discovery uses `spec/**/*_spec.rb`; an
74
+ explicit `--test` selection remains authoritative. Project roots are resolved
75
+ explicitly, and report paths are relative to that root so reports from
76
+ different checkouts can be compared.
77
+
78
+ Install `rspec` in the application's test bundle; Rails applications also need
79
+ `rspec-rails`. RSpec reads its usual option files and `SPEC_OPTS`, including
80
+ helper requires, filters, ordering, and file or example-ID selectors. Selectors
81
+ from RSpec configuration replace default discovery. Combining those selectors
82
+ with an explicit Branchproof `--test` is rejected as ambiguous; ordinary filters
83
+ such as `--tag` and `--example` can accompany `--test`.
84
+
85
+ RSpec before hooks, eager `let!`, and around-hook prefixes own setup evidence.
86
+ The example body and helpers evaluated there own body evidence; after hooks,
87
+ mock cleanup, and around-hook suffixes own teardown evidence. Suite and context
88
+ hooks remain unattributed. Pending and skipped examples do not invent execution;
89
+ an unexpectedly passing pending example remains a failure.
90
+
91
+ RSpec support is serial: dry-run, bisect, DRb, custom runners, nested runs, and
92
+ repeated example attempts are rejected. Rails/RSpec supports Rails 8.1.x with
93
+ rspec-rails 8.x on CRuby 3.4.x. Feature and system specs use the in-process
94
+ Capybara `rack_test` driver; browser drivers require execution-context support
95
+ outside this release. Capybara is optional for apps that do not use those specs.
96
+
61
97
  For a project rooted at the current directory, `--project auto` is the
62
98
  default. It selects Rails only when both `config/application.rb` and
63
99
  `config/environment.rb` exist; otherwise it selects a plain Ruby project.
64
100
  Use `--project ruby` or `--project rails` to override detection. An explicit
65
101
  Rails project without both boot files is a usage error.
66
102
 
67
- Project defaults discover the sorted, de-duplicated union of
103
+ Minitest defaults discover the sorted, de-duplicated union of
68
104
  `test/**/*_test.rb` and `test/**/test_*.rb`. Helper, support, and fixture files
69
105
  are excluded from that default set. `--test` remains authoritative when test
70
106
  files are selected explicitly. The worker prepends the project's `lib` and
71
- `test` directories to its child load path, so application `require` calls
107
+ `test` directories (`lib` and `spec` for RSpec) to its child load path, so application `require` calls
72
108
  resolve without changing the parent process.
73
109
 
74
- Rails analysis boots `config/environment.rb` and `rails/test_help` inside the
75
- isolated worker after Branchproof's loader and Minitest hooks are installed. The
76
- child receives `RAILS_ENV=test`, `RACK_ENV=test`, `PARALLEL_WORKERS=1`,
110
+ Rails analysis boots the application inside the isolated worker after
111
+ Branchproof's loader and the selected framework hooks are installed. The
112
+ application's `rails_helper` owns requiring and configuring `rspec/rails` after
113
+ the loader; the helper must not require `branchproof` again. Selected specs
114
+ may require only `spec_helper` and run without booting Rails,
115
+ even when project detection selects Rails. Once Rails is loaded, Branchproof
116
+ requires an initialized application and enforces the Rails/RSpec support limits.
117
+ The child receives `RAILS_ENV=test`, `RACK_ENV=test`, `PARALLEL_WORKERS=1`,
77
118
  `DISABLE_BOOTSNAP=1`, and `DISABLE_SPRING=1`; the invoking process environment
78
119
  is unchanged. The Rails metadata in the report identifies the selected
79
120
  project and Rails version.
@@ -93,6 +134,17 @@ the witness pair or missing counterpart constraints beside each condition;
93
134
  Level 2 and Level 3 also list named supporting tests. Repeated supporting-set
94
135
  rows are collapsed in terminal output only.
95
136
 
137
+ RSpec owners use the example's `full_description` and positional `example_id`.
138
+ Terminal views include quoted rerun commands, including selectors for shared
139
+ examples. These selectors apply to the recorded spec revision. Comparisons
140
+ require matching spec and declaration digests before matching example owners;
141
+ changed specs and older reports without digests are treated conservatively.
142
+ Runner output streams to stderr while JSON reports remain on stdout.
143
+ Pending, skipped, fixed-pending, and failed examples map to the corresponding
144
+ baseline statuses; suite and context lifecycle events remain visible, and
145
+ observations without a test owner are counted as unattributed. The same levels
146
+ and terminal views are available for both adapters.
147
+
96
148
  For example, running the contents of the small `decision.rb` /
97
149
  `test_decision_test.rb` fixture from a project `lib/` and `test/` directory
98
150
  with the terminal format produces a summary like this:
@@ -542,6 +594,13 @@ ID. Repeated equivalent executions aggregate into a vector's `count`, retaining
542
594
  the supporting tests. Ternary outcomes likewise describe the predicate, not
543
595
  the value returned by the chosen branch.
544
596
 
597
+ Value decisions remain enabled by default. For each decision, evidence caches
598
+ the most recent successful completed trace, keyed by its observations, outcome,
599
+ test, and phase. Consecutive equivalent executions increment vector and phase
600
+ counts without repeating serialization and digest work. When observations,
601
+ test, or phase changes, the execution is recorded normally, so alternating
602
+ traces retain their full evidence and attribution.
603
+
545
604
  Other constructs use alternative coverage, separate from MC/DC:
546
605
 
547
606
  | Construct | Kind | Context | Required alternatives |
@@ -551,6 +610,18 @@ Other constructs use alternative coverage, separate from MC/DC:
551
610
  | `receiver&.method` | `implicit` | `safe_navigation` | Receiver nil / non-nil |
552
611
  | `lhs ||= rhs` | `implicit` | `or_assignment` | RHS skipped / executed |
553
612
  | `lhs &&= rhs` | `implicit` | `and_assignment` | RHS skipped / executed |
613
+ | `receiver&.value ||= rhs` / `&&=` | `multiway` | `or_assignment` / `and_assignment` | Receiver nil / RHS skipped / RHS evaluated |
614
+ | `value => pattern` | `pattern` | `required_pattern` | Matched / mismatch |
615
+ | Rescue regions | `exception` | `rescue` | Normal completion / rescue clause / unhandled exception |
616
+ | Optional positional and keyword arguments | `implicit` | `default_argument` | Supplied / default evaluated |
617
+ | Standalone predicate calls | `implicit` | `predicate` | Falsey / truthy result |
618
+ | `<=>` | `multiway` | `comparison` | Negative / zero / positive / nil |
619
+ | `[]` lookup | `multiway` | `lookup` | Truthy / false / nil result |
620
+ | `send`, `public_send`, and `__send__` | `implicit` | `dispatch` | Successful return / exception |
621
+ | Regular-expression match capture | `implicit` | `match_capture` | False / true |
622
+ | Iterator bodies | `implicit` | `iteration` | Empty / entered |
623
+ | Lazy iterator callbacks | `multiway` | `lazy_callback` | Callback entered |
624
+ | `fetch` with a fallback block | `implicit` | `fetch_fallback` | Value present / fallback entered |
554
625
 
555
626
  Each safe-navigation operation in a chain is a distinct decision. Assignment
556
627
  instrumentation preserves Ruby's native local, instance, class, global,
@@ -572,16 +643,30 @@ that fails before choosing a branch is aborted, not counted as a selected
572
643
  alternative. Selected branches and assignment paths remain observed even when
573
644
  their bodies or right-hand sides subsequently raise or return.
574
645
 
575
- Unsupported syntax stays visible and outside coverage denominators. Current
576
- exclusions include guarded `case/in` (`unsupported_pattern_guard`), dynamic
577
- `when` splats (`unsupported_case_splat`), safe-navigation compound assignment
578
- (`unsupported_assignment_target`), and rescue alternatives
579
- (`unsupported_rescue_control_flow`). A guard predicate can still supply Boolean
580
- evidence when Ruby evaluates it; an unsupported guarded case does not claim
581
- pattern-match coverage from that evidence. Flip-flops remain
582
- `unsupported_flip_flop`. Decisions inside `defined?`, contextual regular
583
- expressions, heredocs, unsafe predicates, and limit overflows retain explicit
584
- exclusions. Ruby-defined custom `!` methods keep their runtime behavior;
646
+ Guarded pattern alternatives measure the selected clause, including guard
647
+ acceptance. The guard also supplies Boolean evidence when Ruby evaluates it.
648
+ A dynamic `when *candidates` is one static candidate group; the report does not
649
+ claim coverage of individual elements in that runtime collection.
650
+
651
+ Flip-flops and implicit regular-expression conditions retain Ruby's conditional
652
+ semantics and contribute one atomic predicate outcome. `defined?` measures its
653
+ result without evaluating or instrumenting the operand. Standalone predicate
654
+ calls record returned truthiness as alternative coverage; they do not claim
655
+ short-circuit conditions or coverage of library internals. Eager bitwise `&`,
656
+ `|`, and `^` are excluded because integer results do not represent Ruby
657
+ truthiness decisions: integer `0` is truthy in Ruby. These expressions add no
658
+ decisions or coverage obligations.
659
+ Dynamic dispatch records completion or exception, and preserves the original
660
+ return value. Lazy callback observations arise only when the callback runs.
661
+ Lookup coverage cannot distinguish an absent key from a stored nil; `fetch`
662
+ fallback coverage measures that separate absence-based choice.
663
+ Optional argument probes use generated local flags and preserve parameter
664
+ signatures, defaults, and existing local bindings. Code that enumerates its own
665
+ local variables can see these instrumentation locals.
666
+
667
+ Unsupported syntax stays visible and outside coverage denominators. Heredocs,
668
+ unsafe predicates, data sections, and limit overflows retain explicit exclusions.
669
+ Ruby-defined custom `!` methods keep their runtime behavior;
585
670
  evidence that contradicts Boolean negation is rejected instead of proving
586
671
  coverage with an invalid logical model.
587
672
 
@@ -621,12 +706,14 @@ the serial Minitest runner. This is useful for seeds and name filters:
621
706
  branchproof analyze 'lib/**/*.rb' --level 1 -- --seed 9001 -n /checkout/
622
707
  ```
623
708
 
624
- The 0.2 release supports serial Minitest execution in plain Ruby projects and
625
- Rails applications. Rails lazy and eager loading are supported when the
626
- application does not enable reloading for the test run. RSpec, parallel or
627
- forked runners, mutation execution, Rails system/browser tests, custom Rails
628
- test commands, generated tests, and reloading configurations are outside this
629
- release and produce diagnostics rather than a passing analysis.
709
+ The first release supports serial Minitest and RSpec execution in plain Ruby
710
+ projects and Rails applications. Rails lazy and eager loading are supported
711
+ when the application does not enable reloading for the test run. Transactions
712
+ and in-process specs are supported within the serial process policy. Parallel
713
+ or forked runners, remote or threaded browser drivers, mutation execution,
714
+ Rails system/browser tests, custom Rails test commands, generated tests, and
715
+ reloading configurations are explicitly unsupported and produce diagnostics
716
+ rather than a passing analysis.
630
717
 
631
718
  ## Library entry points
632
719
 
@@ -639,7 +726,8 @@ Branchproof::Records.id(name: "stable identity")
639
726
 
640
727
  `require "mcdc"` and `MCDC` are compatibility aliases for the same public
641
728
  namespace. The CLI is the supported way to run a complete analysis;
642
- `Branchproof::Project` exposes project selection and child-environment policy,
729
+ `Branchproof::Project` exposes project and framework selection and
730
+ child-environment policy,
643
731
  and `Branchproof::RailsSupport` is the optional Rails boot boundary. The library
644
732
  classes expose the source, runtime, evidence, analysis, and report contracts
645
733
  for adapters and integrations.
@@ -672,6 +760,10 @@ Run the commands with the Ruby executable you intend to validate. The checked
672
760
  release environments are CRuby 3.3.6 and 3.4.5. Each runtime
673
761
  must provide the declared Minitest 5.x and Prism 1.x dependencies.
674
762
 
763
+ The repeatable native-versus-instrumented adapter benchmark and its captured
764
+ Ruby 3.4.7 result are in
765
+ [`docs/benchmarks/rspec-adapter.md`](docs/benchmarks/rspec-adapter.md).
766
+
675
767
  ## License
676
768
 
677
769
  Branchproof is available under the [Apache License, Version 2.0](LICENSE.txt).
@@ -0,0 +1,13 @@
1
+ # Module Branchproof::DefaultInstrumentation <a id="module-Branchproof-DefaultInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/default_instrumentation.rb |
6
+
7
+ Defaults stay inline in their original lexical scope. The owner decision makes
8
+ body entry edits part of the same original AST edit tree as the parameter
9
+ expression edits.
10
+
11
+ ## Public Instance Methods
12
+ ### `rewrite(unit:)` <a id="method-i-rewrite"></a> <a id="rewrite-instance_method"></a>
13
+ Not documented.
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::DefaultRuntime <a id="module-Branchproof-DefaultRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/default_runtime.rb |
6
+
7
+ Binding events are immediate; no pending state survives a failed default.
8
+
9
+ ## Public Instance Methods
10
+ ### `default_binding(decision_id, index)` <a id="method-i-default_binding"></a> <a id="default_binding-instance_method"></a>
11
+ Not documented.
@@ -0,0 +1,7 @@
1
+ # Module Branchproof::DefaultSyntax <a id="module-Branchproof-DefaultSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/default_syntax.rb |
6
+
7
+ Each optional parameter has an independent supplied/defaulted obligation.
@@ -44,3 +44,6 @@ Not documented.
44
44
 
45
45
  ### `snapshot()` <a id="method-i-snapshot"></a> <a id="snapshot-instance_method"></a>
46
46
  Not documented.
47
+
48
+ ### `test_phase_counts()` <a id="method-i-test_phase_counts"></a> <a id="test_phase_counts-instance_method"></a>
49
+ Not documented.
@@ -0,0 +1,9 @@
1
+ # Module Branchproof::ExceptionInstrumentation <a id="module-Branchproof-ExceptionInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/exception_instrumentation.rb |
6
+
7
+ Textual edits for native rescue control flow. The edits only add calls at
8
+ Ruby's own protected-region and handler boundaries; exception matching, `$!`,
9
+ retry, ensure ordering, and nonlocal transfers remain Ruby-owned.
@@ -0,0 +1,27 @@
1
+ # Module Branchproof::ExceptionRuntime <a id="module-Branchproof-ExceptionRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/exception_runtime.rb |
6
+
7
+ Record native clause selection and escaping exceptions. Generated wrappers
8
+ re-raise the same exception; nonlocal transfers remain aborted observations.
9
+
10
+ ## Public Instance Methods
11
+ ### `exception_enter(decision_id, unhandled_index)` <a id="method-i-exception_enter"></a> <a id="exception_enter-instance_method"></a>
12
+ Not documented.
13
+
14
+ ### `exception_finish(decision_id, value)` <a id="method-i-exception_finish"></a> <a id="exception_finish-instance_method"></a>
15
+ Not documented.
16
+
17
+ ### `exception_leave(decision_id)` <a id="method-i-exception_leave"></a> <a id="exception_leave-instance_method"></a>
18
+ Not documented.
19
+
20
+ ### `exception_path(decision_id, index)` <a id="method-i-exception_path"></a> <a id="exception_path-instance_method"></a>
21
+ Not documented.
22
+
23
+ ### `exception_unhandled(decision_id)` <a id="method-i-exception_unhandled"></a> <a id="exception_unhandled-instance_method"></a>
24
+ Not documented.
25
+
26
+ ### `exception_value(decision_id, value, index)` <a id="method-i-exception_value"></a> <a id="exception_value-instance_method"></a>
27
+ Not documented.
@@ -0,0 +1,9 @@
1
+ # Module Branchproof::ExceptionSyntax <a id="module-Branchproof-ExceptionSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/exception_syntax.rb |
6
+
7
+ Replaces unsupported standalone rescue-clause records with decisions for
8
+ Ruby's enclosing protected region. Ruby chooses a rescue clause as part of
9
+ executing BeginNode; a RescueNode by itself is not executable syntax.
@@ -0,0 +1,19 @@
1
+ # Module Branchproof::ExtendedAlternativeRuntime <a id="module-Branchproof-ExtendedAlternativeRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/extended_alternative_runtime.rb |
6
+
7
+ Runtime hooks for decisions whose native evaluation has a third path. Runtime
8
+ includes this module explicitly; it is kept separate so the ordinary two-path
9
+ helpers remain unchanged.
10
+
11
+ ## Public Instance Methods
12
+ ### `flow_assignment_finish(decision_id, value, default_path = nil)` <a id="method-i-flow_assignment_finish"></a> <a id="flow_assignment_finish-instance_method"></a>
13
+ Not documented.
14
+
15
+ ### `flow_assignment_path(decision_id, index)` <a id="method-i-flow_assignment_path"></a> <a id="flow_assignment_path-instance_method"></a>
16
+ Not documented.
17
+
18
+ ### `flow_assignment_receiver(decision_id, receiver)` <a id="method-i-flow_assignment_receiver"></a> <a id="flow_assignment_receiver-instance_method"></a>
19
+ Not documented.
@@ -3,7 +3,7 @@
3
3
  | | |
4
4
  | --- | --- |
5
5
  | **Inherits** | Object |
6
- | **Includes** | [Branchproof::FlowInstrumentation](FlowInstrumentation.md) |
6
+ | **Includes** | [Branchproof::DefaultInstrumentation](DefaultInstrumentation.md), [Branchproof::ExceptionInstrumentation](ExceptionInstrumentation.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
@@ -0,0 +1,7 @@
1
+ # Module Branchproof::IterationInstrumentation <a id="module-Branchproof-IterationInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/iteration_instrumentation.rb |
6
+
7
+ Keep matching and iteration in the original lexical scope.
@@ -0,0 +1,21 @@
1
+ # Module Branchproof::IterationRuntime <a id="module-Branchproof-IterationRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/iteration_runtime.rb |
6
+
7
+ Runtime support for callback based iteration, including lazy receivers whose
8
+ callbacks execute after the constructing call has returned.
9
+
10
+ ## Public Instance Methods
11
+ ### `flow_iteration_begin(decision_id, receiver, alternative_count = 2)` <a id="method-i-flow_iteration_begin"></a> <a id="flow_iteration_begin-instance_method"></a>
12
+ Not documented.
13
+
14
+ ### `flow_iteration_callback(decision_id, alternative_count = 2)` <a id="method-i-flow_iteration_callback"></a> <a id="flow_iteration_callback-instance_method"></a>
15
+ rubocop:disable-next Metrics/MethodLength
16
+
17
+ ### `flow_iteration_finish(decision_id, value, default_path = nil)` <a id="method-i-flow_iteration_finish"></a> <a id="flow_iteration_finish-instance_method"></a>
18
+ Not documented.
19
+
20
+ ### `flow_iteration_leave(decision_id)` <a id="method-i-flow_iteration_leave"></a> <a id="flow_iteration_leave-instance_method"></a>
21
+ Not documented.
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::IterationSyntax <a id="module-Branchproof-IterationSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/iteration_syntax.rb |
6
+
7
+ Observe entry into source-visible callback bodies, not library internals.
8
+
9
+ ## Constants
10
+ ### `ITERATORS` <a id="constant-ITERATORS"></a> <a id="ITERATORS-constant"></a>
11
+ Not documented.
@@ -8,6 +8,9 @@
8
8
  Resolves the project policy used by the isolated analysis worker.
9
9
 
10
10
  ## Constants
11
+ ### `FRAMEWORKS` <a id="constant-FRAMEWORKS"></a> <a id="FRAMEWORKS-constant"></a>
12
+ Not documented.
13
+
11
14
  ### `MODES` <a id="constant-MODES"></a> <a id="MODES-constant"></a>
12
15
  Not documented.
13
16
 
@@ -15,7 +18,7 @@ Not documented.
15
18
  Not documented.
16
19
 
17
20
  ## Public Instance Methods
18
- ### `initialize(root:, mode: = "auto")` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
21
+ ### `initialize(root:, mode: = "auto", framework: = "auto")` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
19
22
  - **@raise** [ArgumentError]
20
23
  - **@return** [Project] a new instance of Project
21
24
 
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::RSpecAdapter::ClassRunnerGuard <a id="module-Branchproof-RSpecAdapter-ClassRunnerGuard"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/rspec_adapter.rb |
6
+
7
+ Rejects additional class-level runner entry points.
8
+
9
+ ## Public Instance Methods
10
+ ### `run(*args)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
11
+ Not documented.
@@ -0,0 +1,14 @@
1
+ # Module Branchproof::RSpecAdapter::ContextLifecycle <a id="module-Branchproof-RSpecAdapter-ContextLifecycle"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/rspec_adapter.rb |
6
+
7
+ Keeps group-level hooks outside individual example ownership.
8
+
9
+ ## Public Instance Methods
10
+ ### `run_after_context_hooks(*args)` <a id="method-i-run_after_context_hooks"></a> <a id="run_after_context_hooks-instance_method"></a>
11
+ Not documented.
12
+
13
+ ### `run_before_context_hooks(*args)` <a id="method-i-run_before_context_hooks"></a> <a id="run_before_context_hooks-instance_method"></a>
14
+ Not documented.
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::RSpecAdapter::DefaultDiscovery <a id="module-Branchproof-RSpecAdapter-DefaultDiscovery"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/rspec_adapter.rb |
6
+
7
+ Restores CLI directory discovery when RSpec runs inside the worker.
8
+
9
+ ## Public Instance Methods
10
+ ### `configure(configuration)` <a id="method-i-configure"></a> <a id="configure-instance_method"></a>
11
+ Not documented.
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::RSpecAdapter::ExampleLifecycle <a id="module-Branchproof-RSpecAdapter-ExampleLifecycle"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/rspec_adapter.rb |
6
+
7
+ Assigns observation phases while the reporter owns test registration.
8
+
9
+ ## Public Instance Methods
10
+ ### `run(*args)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
11
+ Not documented.
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::RSpecAdapter::RunnerGuard <a id="module-Branchproof-RSpecAdapter-RunnerGuard"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/rspec_adapter.rb |
6
+
7
+ Allows only the worker-owned native runner instance.
8
+
9
+ ## Public Instance Methods
10
+ ### `run(*args)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
11
+ Not documented.
@@ -0,0 +1,12 @@
1
+ # Class Branchproof::RSpecAdapter::UnsupportedRunner <a id="class-Branchproof-RSpecAdapter-UnsupportedRunner"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | ArgumentError |
6
+ | **Defined in** | lib/branchproof/rspec_adapter.rb |
7
+
8
+ Identifies runner capabilities that cannot produce supported evidence.
9
+
10
+ ## Public Instance Methods
11
+ ### `diagnostic_code()` <a id="method-i-diagnostic_code"></a> <a id="diagnostic_code-instance_method"></a>
12
+ Not documented.
@@ -0,0 +1,47 @@
1
+ # Class Branchproof::RSpecAdapter <a id="class-Branchproof-RSpecAdapter"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/branchproof/rspec_adapter.rb |
7
+
8
+ Bridges one serial RSpec run to Runtime lifecycle ownership.
9
+
10
+ ## Constants
11
+ ### `FORBIDDEN_OPTIONS` <a id="constant-FORBIDDEN_OPTIONS"></a> <a id="FORBIDDEN_OPTIONS-constant"></a>
12
+ Not documented.
13
+
14
+ ## Attributes
15
+ ### `active_adapter` [RW] <a id="attribute-c-active_adapter"></a> <a id="active_adapter-class_method"></a>
16
+ Returns the value of attribute active_adapter.
17
+
18
+ ### `runner_adapter` [RW] <a id="attribute-c-runner_adapter"></a> <a id="runner_adapter-class_method"></a>
19
+ Returns the value of attribute runner_adapter.
20
+
21
+ ### `late_execution_error` [R] <a id="attribute-i-late_execution_error"></a> <a id="late_execution_error-instance_method"></a>
22
+ Returns the value of attribute late_execution_error.
23
+
24
+ ### `tests` [R] <a id="attribute-i-tests"></a> <a id="tests-instance_method"></a>
25
+ Returns the value of attribute tests.
26
+
27
+ ## Public Instance Methods
28
+ ### `enter_runner!(runner)` <a id="method-i-enter_runner-21"></a> <a id="enter_runner!-instance_method"></a>
29
+ Not documented.
30
+
31
+ ### `example_finished(notification)` <a id="method-i-example_finished"></a> <a id="example_finished-instance_method"></a>
32
+ Not documented.
33
+
34
+ ### `example_started(notification)` <a id="method-i-example_started"></a> <a id="example_started-instance_method"></a>
35
+ Not documented.
36
+
37
+ ### `initialize(runtime:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
38
+ - **@return** [RSpecAdapter] a new instance of RSpecAdapter
39
+
40
+ ### `reject_execution!(message)` <a id="method-i-reject_execution-21"></a> <a id="reject_execution!-instance_method"></a>
41
+ - **@raise** [@run_error]
42
+
43
+ ### `run(test_files:, runner_args:, on_complete:, before_load: = nil, after_load: = nil, test_selection_explicit: = false)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
44
+ rubocop:disable-next Metrics/ParameterLists
45
+
46
+ ### `validate_runner!()` <a id="method-i-validate_runner-21"></a> <a id="validate_runner!-instance_method"></a>
47
+ Not documented.