rigortype 0.4.3 → 0.4.4
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/README.md +1 -1
- data/data/core_overlay/ostruct.rbs +40 -0
- data/docs/handbook/11-sig-gen.md +16 -0
- data/docs/manual/02-cli-reference.md +4 -3
- data/docs/manual/03-configuration.md +16 -5
- data/docs/manual/04-diagnostics.md +44 -2
- data/docs/manual/07-plugins.md +1 -1
- data/docs/manual/10-mcp-server.md +32 -3
- data/docs/manual/18-removing-dead-code.md +11 -1
- data/docs/manual/plugins/rigor-rails-routes.md +2 -2
- data/docs/manual/plugins/rigor-shoulda-matchers.md +4 -1
- data/exe/rigor +12 -17
- data/lib/rigor/analysis/check_rules/rule_ids.rb +57 -0
- data/lib/rigor/analysis/check_rules.rb +46 -36
- data/lib/rigor/analysis/incremental.rb +12 -0
- data/lib/rigor/analysis/incremental_session.rb +121 -21
- data/lib/rigor/analysis/reachability/graph.rb +23 -3
- data/lib/rigor/analysis/reachability/scan.rb +51 -9
- data/lib/rigor/analysis/rule_catalog.rb +6 -1
- data/lib/rigor/analysis/run_cache_key.rb +31 -7
- data/lib/rigor/analysis/run_cache_probe.rb +5 -3
- data/lib/rigor/analysis/runner/diagnostic_aggregator.rb +48 -12
- data/lib/rigor/analysis/runner/pool_coordinator.rb +110 -15
- data/lib/rigor/analysis/runner/project_pre_passes.rb +29 -4
- data/lib/rigor/analysis/runner.rb +35 -9
- data/lib/rigor/analysis/severity_stamp.rb +34 -1
- data/lib/rigor/analysis/worker_session.rb +57 -1
- data/lib/rigor/cache/descriptor.rb +40 -6
- data/lib/rigor/cache/incremental_snapshot.rb +20 -4
- data/lib/rigor/cli/mcp_command.rb +1 -1
- data/lib/rigor/config_audit.rb +111 -15
- data/lib/rigor/configuration/dependencies.rb +19 -11
- data/lib/rigor/environment/rbs_loader.rb +46 -10
- data/lib/rigor/inference/block_call_timing.rb +5 -0
- data/lib/rigor/inference/captured_locals.rb +26 -3
- data/lib/rigor/inference/definer_resolution.rb +16 -7
- data/lib/rigor/inference/expression_typer.rb +59 -4
- data/lib/rigor/inference/guard_rebinding.rb +7 -2
- data/lib/rigor/inference/last_line/self_evidence.rb +1 -1
- data/lib/rigor/inference/module_function_state.rb +80 -13
- data/lib/rigor/inference/narrowing.rb +184 -68
- data/lib/rigor/inference/reflective_ivar_write.rb +116 -0
- data/lib/rigor/inference/repeated_or_writes.rb +414 -1
- data/lib/rigor/inference/scope_indexer.rb +439 -70
- data/lib/rigor/inference/self_call_ivar_writes.rb +341 -0
- data/lib/rigor/inference/statement_evaluator.rb +84 -29
- data/lib/rigor/lens/anchor.rb +3 -3
- data/lib/rigor/lens/contract_reader.rb +15 -0
- data/lib/rigor/lens/document.rb +2 -2
- data/lib/rigor/lens/file_reader.rb +442 -73
- data/lib/rigor/lens/members.rb +65 -15
- data/lib/rigor/lens/run.rb +44 -2
- data/lib/rigor/lens.rb +2 -1
- data/lib/rigor/mcp/server.rb +61 -20
- data/lib/rigor/plugin/box_probe.rb +154 -7
- data/lib/rigor/project_environment.rb +6 -3
- data/lib/rigor/scope.rb +11 -6
- data/lib/rigor/sig_gen/layout_index.rb +36 -0
- data/lib/rigor/sig_gen/method_candidate.rb +8 -0
- data/lib/rigor/sig_gen/path_mapper.rb +18 -2
- data/lib/rigor/sig_gen/writer.rb +47 -34
- data/lib/rigor/version.rb +1 -1
- data/plugins/rigor-dry-schema/lib/rigor/plugin/dry_schema.rb +5 -1
- data/plugins/rigor-dry-validation/lib/rigor/plugin/dry_validation.rb +5 -1
- data/plugins/rigor-ffi/lib/rigor/plugin/ffi/discoverer.rb +28 -6
- data/plugins/rigor-ffi/lib/rigor/plugin/ffi.rb +1 -1
- data/plugins/rigor-graphql/lib/rigor/plugin/graphql.rb +5 -1
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec/matcher_analyzer.rb +155 -12
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec.rb +10 -8
- metadata +4 -1
|
@@ -86,7 +86,7 @@ module Rigor
|
|
|
86
86
|
# ADR-37 slice 2 — matcher narrowing (`expect(x).to be_a(T)` → `post_return_facts` on `x`),
|
|
87
87
|
# method-gated by the engine on the expectation verbs.
|
|
88
88
|
narrowing_facts methods: %i[to not_to to_not] do |call_node, scope|
|
|
89
|
-
MatcherAnalyzer.contribution_for(call_node,
|
|
89
|
+
MatcherAnalyzer.contribution_for(call_node, scope: scope)&.post_return_facts
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
# ADR-52 slice 5a — binds local reads in `it` / spec bodies to their `let(:name) { ... }` block's
|
|
@@ -98,13 +98,15 @@ module Rigor
|
|
|
98
98
|
let_binding_return_type(call_node, scope)
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
# ADR-88 WD1 — both contributions are per-file: the matcher narrowing facts come from the call's own AST
|
|
102
|
-
# and
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
101
|
+
# ADR-88 WD1 — both contributions are per-file: the matcher narrowing facts come from the call's own AST
|
|
102
|
+
# and, for `eq` / `eql`, from the local's current type and the scope's project discovery (whether the
|
|
103
|
+
# project defines `==` / `eql?` on a core class); the `let`-binding return types come from each spec
|
|
104
|
+
# file's OWN `describe`/`let` structure (`let` is file-scoped). A spec file's edit changes its own
|
|
105
|
+
# content (re-analysed already). The one cross-file input — the optional factorybot `:factory_index`
|
|
106
|
+
# fact this plugin consumes — is itself an ADR-9 publication captured in the incremental fact-surface
|
|
107
|
+
# digest via factorybot's own channel, so it need not appear here. A stable sentinel declares "no OWN
|
|
108
|
+
# cross-file fact surface", keeping the plugin incremental-capable; `--verify-incremental` backstops
|
|
109
|
+
# the claim.
|
|
108
110
|
def incremental_state_fingerprint
|
|
109
111
|
"per-file-lets"
|
|
110
112
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rigortype
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rigor contributors
|
|
@@ -321,6 +321,7 @@ files:
|
|
|
321
321
|
- data/core_overlay/module.rbs
|
|
322
322
|
- data/core_overlay/numeric.rbs
|
|
323
323
|
- data/core_overlay/object_space.rbs
|
|
324
|
+
- data/core_overlay/ostruct.rbs
|
|
324
325
|
- data/core_overlay/pathname.rbs
|
|
325
326
|
- data/core_overlay/proc.rbs
|
|
326
327
|
- data/core_overlay/process.rbs
|
|
@@ -830,6 +831,7 @@ files:
|
|
|
830
831
|
- lib/rigor/inference/refined_dispatch/class_object.rb
|
|
831
832
|
- lib/rigor/inference/refined_dispatch/own_method.rb
|
|
832
833
|
- lib/rigor/inference/refinement_mutation.rb
|
|
834
|
+
- lib/rigor/inference/reflective_ivar_write.rb
|
|
833
835
|
- lib/rigor/inference/repeated_or_writes.rb
|
|
834
836
|
- lib/rigor/inference/return_barrier.rb
|
|
835
837
|
- lib/rigor/inference/rewrite_mutation.rb
|
|
@@ -841,6 +843,7 @@ files:
|
|
|
841
843
|
- lib/rigor/inference/scope_indexer/member_layouts_collector.rb
|
|
842
844
|
- lib/rigor/inference/scope_indexer/mixin_accumulator.rb
|
|
843
845
|
- lib/rigor/inference/scope_indexer/superclasses_collector.rb
|
|
846
|
+
- lib/rigor/inference/self_call_ivar_writes.rb
|
|
844
847
|
- lib/rigor/inference/singleton_hook_decline.rb
|
|
845
848
|
- lib/rigor/inference/singleton_object_constant.rb
|
|
846
849
|
- lib/rigor/inference/statement_evaluator.rb
|