rigortype 0.2.1 → 0.2.2
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 +41 -14
- data/docs/handbook/01-getting-started.md +311 -0
- data/docs/handbook/02-everyday-types.md +337 -0
- data/docs/handbook/03-narrowing.md +359 -0
- data/docs/handbook/04-tuples-and-shapes.md +321 -0
- data/docs/handbook/05-methods-and-blocks.md +339 -0
- data/docs/handbook/06-classes.md +305 -0
- data/docs/handbook/07-rbs-and-extended.md +427 -0
- data/docs/handbook/08-understanding-errors.md +373 -0
- data/docs/handbook/09-plugins.md +241 -0
- data/docs/handbook/10-sorbet.md +347 -0
- data/docs/handbook/11-sig-gen.md +312 -0
- data/docs/handbook/12-lightweight-hkt.md +333 -0
- data/docs/handbook/README.md +275 -0
- data/docs/handbook/appendix-elixir.md +370 -0
- data/docs/handbook/appendix-go.md +399 -0
- data/docs/handbook/appendix-java-csharp.md +470 -0
- data/docs/handbook/appendix-liskov.md +580 -0
- data/docs/handbook/appendix-mypy.md +370 -0
- data/docs/handbook/appendix-phpstan.md +338 -0
- data/docs/handbook/appendix-protocols-and-structural-typing.md +292 -0
- data/docs/handbook/appendix-rust.md +446 -0
- data/docs/handbook/appendix-steep.md +336 -0
- data/docs/handbook/appendix-type-theory.md +1662 -0
- data/docs/handbook/appendix-typeprof.md +416 -0
- data/docs/handbook/appendix-typescript.md +332 -0
- data/docs/install.md +189 -0
- data/docs/llms.txt +72 -0
- data/docs/manual/01-installation.md +342 -0
- data/docs/manual/02-cli-reference.md +557 -0
- data/docs/manual/03-configuration.md +152 -0
- data/docs/manual/04-diagnostics.md +206 -0
- data/docs/manual/05-inspecting-types.md +109 -0
- data/docs/manual/06-baseline.md +104 -0
- data/docs/manual/07-plugins.md +92 -0
- data/docs/manual/08-skills.md +143 -0
- data/docs/manual/09-editor-integration.md +245 -0
- data/docs/manual/10-mcp-server.md +532 -0
- data/docs/manual/11-ci.md +274 -0
- data/docs/manual/12-caching.md +116 -0
- data/docs/manual/13-troubleshooting.md +120 -0
- data/docs/manual/14-rails-quickstart.md +332 -0
- data/docs/manual/15-type-protection-coverage.md +204 -0
- data/docs/manual/16-rbs-extended-annotations.md +190 -0
- data/docs/manual/17-driving-improvement.md +160 -0
- data/docs/manual/README.md +87 -0
- data/docs/manual/ci-templates/README.md +58 -0
- data/docs/manual/plugins/README.md +86 -0
- data/docs/manual/plugins/rigor-actioncable.md +78 -0
- data/docs/manual/plugins/rigor-actionmailer.md +74 -0
- data/docs/manual/plugins/rigor-actionpack.md +80 -0
- data/docs/manual/plugins/rigor-activejob.md +58 -0
- data/docs/manual/plugins/rigor-activerecord.md +102 -0
- data/docs/manual/plugins/rigor-activestorage.md +74 -0
- data/docs/manual/plugins/rigor-activesupport-core-ext.md +86 -0
- data/docs/manual/plugins/rigor-devise.md +70 -0
- data/docs/manual/plugins/rigor-dry-schema.md +56 -0
- data/docs/manual/plugins/rigor-dry-struct.md +60 -0
- data/docs/manual/plugins/rigor-dry-types.md +59 -0
- data/docs/manual/plugins/rigor-dry-validation.md +62 -0
- data/docs/manual/plugins/rigor-factorybot.md +76 -0
- data/docs/manual/plugins/rigor-graphql.md +89 -0
- data/docs/manual/plugins/rigor-hanami.md +83 -0
- data/docs/manual/plugins/rigor-mangrove.md +73 -0
- data/docs/manual/plugins/rigor-minitest.md +86 -0
- data/docs/manual/plugins/rigor-pundit.md +72 -0
- data/docs/manual/plugins/rigor-rails-i18n.md +92 -0
- data/docs/manual/plugins/rigor-rails-routes.md +94 -0
- data/docs/manual/plugins/rigor-rails.md +44 -0
- data/docs/manual/plugins/rigor-rbs-inline.md +83 -0
- data/docs/manual/plugins/rigor-rspec-rails.md +72 -0
- data/docs/manual/plugins/rigor-rspec.md +86 -0
- data/docs/manual/plugins/rigor-shoulda-matchers.md +78 -0
- data/docs/manual/plugins/rigor-sidekiq.md +78 -0
- data/docs/manual/plugins/rigor-sinatra.md +61 -0
- data/docs/manual/plugins/rigor-sorbet.md +63 -0
- data/docs/manual/plugins/rigor-statesman.md +75 -0
- data/docs/manual/plugins/rigor-typescript-utility-types.md +71 -0
- data/exe/rigor +1 -1
- data/lib/rigor/analysis/incremental_session.rb +4 -2
- data/lib/rigor/analysis/run_stats.rb +13 -1
- data/lib/rigor/analysis/runner.rb +54 -12
- data/lib/rigor/cli/check_command.rb +1 -1
- data/lib/rigor/cli/docs_command.rb +248 -0
- data/lib/rigor/cli/skill_command.rb +103 -41
- data/lib/rigor/cli/skill_describe.rb +346 -0
- data/lib/rigor/cli.rb +25 -3
- data/lib/rigor/inference/method_dispatcher/constant_folding.rb +124 -32
- data/lib/rigor/inference/method_dispatcher/shape_dispatch.rb +37 -6
- data/lib/rigor/inference/scope_indexer.rb +87 -89
- data/lib/rigor/plugin/isolation.rb +5 -5
- data/lib/rigor/plugin/loader.rb +4 -2
- data/lib/rigor/version.rb +1 -1
- data/skills/rigor-ask/SKILL.md +172 -0
- data/skills/rigor-doctor/SKILL.md +87 -0
- data/skills/rigor-editor-setup/SKILL.md +114 -0
- data/skills/rigor-mcp-setup/SKILL.md +117 -0
- data/skills/rigor-monkeypatch-resolve/SKILL.md +79 -0
- data/skills/rigor-next-steps/SKILL.md +113 -0
- data/skills/rigor-plugin-tune/SKILL.md +79 -0
- data/skills/rigor-protection-uplift/SKILL.md +133 -0
- data/skills/rigor-rbs-setup/SKILL.md +128 -0
- data/skills/rigor-upgrade/SKILL.md +79 -0
- metadata +90 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rigor-protection-uplift
|
|
3
|
+
description: |
|
|
4
|
+
Close the type-protection holes `rigor coverage --protection` surfaces: for each unprotected dispatch site, run `rigor sig-gen` first, hand-author only the minimal residual annotation, then verify with a double gate — the site becomes protected AND `rigor check` gains no new diagnostic. Triggers: "raise type protection", "add types where Rigor can't catch bugs", "act on coverage --protection / --mutation output", "make more of this code bug-catchable". NOT for Rigor's own `lib/` or the bundled plugins (use `rigor sig-gen` directly there and treat gaps as engine signal), and NOT for first-time setup (use rigor-project-init).
|
|
5
|
+
license: MPL-2.0
|
|
6
|
+
metadata:
|
|
7
|
+
version: 0.1.0
|
|
8
|
+
homepage: https://github.com/rigortype/rigor
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Rigor Protection Uplift
|
|
12
|
+
|
|
13
|
+
`rigor coverage --protection` (Tier 1) and `rigor coverage --protection
|
|
14
|
+
--mutation` (Tier 2) *surface* "add a type here" — they never author the
|
|
15
|
+
type. This skill *acts* on that surfacing under the discipline that keeps
|
|
16
|
+
Rigor false-positive-safe: protection goes up, and not one line of
|
|
17
|
+
working code starts reporting a new diagnostic.
|
|
18
|
+
|
|
19
|
+
## When to use
|
|
20
|
+
|
|
21
|
+
- A user wants to raise how much of their code Rigor can actually catch
|
|
22
|
+
bugs in.
|
|
23
|
+
- You have `coverage --protection` output (an "add a type here" list) and
|
|
24
|
+
want to close it.
|
|
25
|
+
|
|
26
|
+
## When NOT to use
|
|
27
|
+
|
|
28
|
+
- **Rigor's own `lib/`, or the bundled `plugins/` / `examples/`** — the
|
|
29
|
+
self-check tree. Hand-authoring types there collides with the
|
|
30
|
+
sig-gen-first ethos; run `rigor sig-gen` directly and treat residual
|
|
31
|
+
gaps as engine signal to report, not a private fix.
|
|
32
|
+
- **"Make my code more precise" with no protection goal** — that is
|
|
33
|
+
`rigor coverage` (precision), not `--protection`.
|
|
34
|
+
- **A project with no Rigor config yet** — onboard first with
|
|
35
|
+
`rigor-project-init`.
|
|
36
|
+
|
|
37
|
+
## Load-bearing rules (read before touching a single type)
|
|
38
|
+
|
|
39
|
+
1. **The signal prioritises and verifies; the contract sources the
|
|
40
|
+
type.** Never write the type the coverage/mutation signal "wants".
|
|
41
|
+
Write the type the code *actually has*, derived from the
|
|
42
|
+
implementation and its callers. A type guessed from the signal is a
|
|
43
|
+
false-confidence type — worse than no type.
|
|
44
|
+
2. **sig-gen first.** A hand-written annotation is only the *residual*
|
|
45
|
+
`rigor sig-gen` cannot reach. Every residual is a sig-gen-improvement
|
|
46
|
+
to report, not just a private fix.
|
|
47
|
+
3. **"Minimal" = annotation footprint, not minimal-to-kill-the-mutant.**
|
|
48
|
+
Optimising literally for mutant death games the metric. Add the
|
|
49
|
+
smallest *true* annotation that models the contract; if that also
|
|
50
|
+
kills the mutant, good.
|
|
51
|
+
4. **Robustness (ADR-5).** Tighten returns, keep parameters lenient. An
|
|
52
|
+
over-tight param annotation breaks callers and breaches the
|
|
53
|
+
false-positive discipline.
|
|
54
|
+
|
|
55
|
+
## Procedure
|
|
56
|
+
|
|
57
|
+
### Phase 1 — surface the holes
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
rigor coverage --protection --format json PATHS
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Read the ranked "add a type here" list (`count`, `method_name`,
|
|
64
|
+
`examples`). Optionally confirm the highest-traffic ones actually buy
|
|
65
|
+
catching power with the Tier 2 deep dive:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
rigor coverage --protection --mutation --format json # changed-files by default
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Phase 2 — sig-gen first
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
rigor sig-gen --diff PATHS # inspect; --write to apply
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Adopt every concrete inferred signature. Note where sig-gen emits
|
|
78
|
+
`untyped` for a site on the "add a type here" list — that is the
|
|
79
|
+
**residual** Phase 3 owns.
|
|
80
|
+
|
|
81
|
+
### Phase 3 — author the residual (cheapest carrier per hole class)
|
|
82
|
+
|
|
83
|
+
| Hole class | Cheapest carrier |
|
|
84
|
+
| ----------------------------------- | --------------------------------------------- |
|
|
85
|
+
| `Dynamic` method return | annotate that method's return in `sig/…rbs` |
|
|
86
|
+
| `Dynamic[top] \| nil` ivar read | `# @rbs @field: T` (ADR-58 territory) |
|
|
87
|
+
| untyped param feeding the receiver | a *lenient* param annotation |
|
|
88
|
+
|
|
89
|
+
Write the minimal true type. Prefer annotating the *upstream* source of
|
|
90
|
+
the Dynamic (the method return / the ivar) over the call site itself.
|
|
91
|
+
|
|
92
|
+
**Trap (carrier-additivity):** a sidecar `sig/…rbs` is NOT purely
|
|
93
|
+
additive. Declaring a class there flips it from inference-mode to
|
|
94
|
+
RBS-declared mode and *drops every member the RBS omits* — a lone
|
|
95
|
+
`def formatted: () -> String` can make Rigor forget the inferred
|
|
96
|
+
`initialize` and reject `Money.new(500)`. So either (1) adopt the full
|
|
97
|
+
Phase-2 sig-gen base into the file and add the residual on top, or
|
|
98
|
+
(2) use an in-place additive carrier (rbs-inline `#:` / a
|
|
99
|
+
`%a{rigor:v1:…}` return-override) that annotates the method without
|
|
100
|
+
re-declaring the class. "Minimal footprint" means the smallest *true*
|
|
101
|
+
type, never the smallest *file*.
|
|
102
|
+
|
|
103
|
+
### Phase 4 — double-gate verify (both must hold)
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
rigor coverage --protection PATHS # (a) the site is now protected / ratio up
|
|
107
|
+
rigor check PATHS # (b) no NEW diagnostic vs the post-sig-gen baseline
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
If (b) regresses, the annotation modeled the wrong contract — **revert
|
|
111
|
+
it**, do not suppress the diagnostic. If (a) did not move, the carrier
|
|
112
|
+
was wrong (often: you typed the call site, not the upstream Dynamic
|
|
113
|
+
source). Gate (b) is a *diff* against the post-sig-gen state, not an
|
|
114
|
+
absolute "zero diagnostics" — sig-gen itself can surface the
|
|
115
|
+
acknowledge-mode FP envelope a project baseline absorbs; this skill owns
|
|
116
|
+
only the increment it adds.
|
|
117
|
+
|
|
118
|
+
### Phase 5 — feed the residual back
|
|
119
|
+
|
|
120
|
+
File each Phase-3 residual as a sig-gen gap (what shape did inference
|
|
121
|
+
miss?). The hand annotation is the stopgap; the durable fix is raising
|
|
122
|
+
inference so the residual disappears.
|
|
123
|
+
|
|
124
|
+
## Honest bounds
|
|
125
|
+
|
|
126
|
+
Hand-RBS uplift is a finisher, not a path to 80% protection. The
|
|
127
|
+
dominant remaining holes after this loop are intractable from
|
|
128
|
+
annotation alone — external-gem Dynamic receivers, polymorphic value
|
|
129
|
+
types, generic type parameters, dynamically-built classes. Those need
|
|
130
|
+
parametric types / external RBS / engine folding (and are where the
|
|
131
|
+
`rigor-plugin-author` escalation or a Rigor issue comes in), not another
|
|
132
|
+
hand annotation. Expect a low-20s → low-30s% protection lift on a mature
|
|
133
|
+
library, at zero diagnostic cost.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rigor-rbs-setup
|
|
3
|
+
description: |
|
|
4
|
+
Install community RBS for the project's gems with `rbs collection install`, so Rigor stops typing calls into RBS-less dependencies as `Dynamic` and gains real coverage (and real bug-catching) on them. Rigor auto-detects the resulting `rbs_collection.lock.yaml` — no Rigor config change needed. Triggers: "set up rbs collection", "my gems type as Dynamic", "rigor check says N gems have no RBS available", "reduce false positives from untyped gems". NOT for first-time Rigor setup (use rigor-project-init first) and NOT for a gem that has no entry in the community collection (that needs rigor-plugin-author or a Rigor issue).
|
|
5
|
+
license: MPL-2.0
|
|
6
|
+
metadata:
|
|
7
|
+
version: 0.1.0
|
|
8
|
+
homepage: https://github.com/rigortype/rigor
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Rigor RBS Setup
|
|
12
|
+
|
|
13
|
+
Most of what Rigor cannot type on a real application is the surface of
|
|
14
|
+
third-party gems that ship **no RBS**: a call into such a gem returns
|
|
15
|
+
`Dynamic`, so every downstream method on the result is unprotected and
|
|
16
|
+
some genuine bugs go uncaught. The Ruby ecosystem's answer is the
|
|
17
|
+
community RBS collection at
|
|
18
|
+
[`ruby/gem_rbs_collection`](https://github.com/ruby/gem_rbs_collection);
|
|
19
|
+
this skill wires it into the project.
|
|
20
|
+
|
|
21
|
+
## When to use
|
|
22
|
+
|
|
23
|
+
- `rigor check` ends with `info: N gem(s) in Gemfile.lock have no RBS
|
|
24
|
+
available: …` — that list is the gap this skill closes.
|
|
25
|
+
- A deep call chain into a gem (an HTTP client, a parser, a service
|
|
26
|
+
object) types as `Dynamic` and you want Rigor to see through it.
|
|
27
|
+
|
|
28
|
+
## When NOT to use
|
|
29
|
+
|
|
30
|
+
- The project has no Rigor config yet — run `rigor-project-init` first.
|
|
31
|
+
- A specific gem you need is **not in** the community collection — RBS
|
|
32
|
+
setup will not cover it. That residue is for `rigor-plugin-author` (if
|
|
33
|
+
it is your own DSL) or a Rigor issue (if it is a popular gem worth
|
|
34
|
+
built-in support).
|
|
35
|
+
|
|
36
|
+
## How Rigor consumes it (so you know what "done" looks like)
|
|
37
|
+
|
|
38
|
+
Rigor **auto-detects** `rbs_collection.lock.yaml` at the project root
|
|
39
|
+
(`rbs_collection.auto_detect` defaults to `true`) and feeds each gem's
|
|
40
|
+
downloaded RBS directory into its signature paths, skipping `stdlib`
|
|
41
|
+
entries it already bundles. **No `.rigor.yml` change is required** — the
|
|
42
|
+
lockfile's presence is the whole wiring. (Set `rbs_collection.lockfile:`
|
|
43
|
+
only if the lockfile lives somewhere other than the project root.)
|
|
44
|
+
|
|
45
|
+
## Procedure
|
|
46
|
+
|
|
47
|
+
### Phase 1 — see the gap
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
rigor check
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Read the closing `info` line listing the gems with no RBS. That is your
|
|
54
|
+
target set.
|
|
55
|
+
|
|
56
|
+
### Phase 2 — make the `rbs` CLI available
|
|
57
|
+
|
|
58
|
+
`rbs collection` is part of the `rbs` gem and reads the project's
|
|
59
|
+
`Gemfile.lock`. Check it is runnable:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
rbs --version # or: bundle exec rbs --version
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If it is missing, add it to the project's development group
|
|
66
|
+
(`bundle add rbs --group development`) or install it standalone
|
|
67
|
+
(`gem install rbs`). Prefer `bundle exec rbs …` when `rbs` is in the
|
|
68
|
+
Gemfile so it matches the project's resolved versions.
|
|
69
|
+
|
|
70
|
+
### Phase 3 — initialise the collection config (first time only)
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
rbs collection init
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This writes `rbs_collection.yaml` (which gems to pull, which to ignore).
|
|
77
|
+
Skip if the file already exists; review it either way — the default
|
|
78
|
+
pulls RBS for every gem in the lockfile that the collection knows.
|
|
79
|
+
|
|
80
|
+
### Phase 4 — install
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
rbs collection install # bundle exec rbs collection install when bundled
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This resolves against `ruby/gem_rbs_collection`, writes
|
|
87
|
+
`rbs_collection.lock.yaml`, and downloads the `.rbs` files into
|
|
88
|
+
`.gem_rbs_collection/`.
|
|
89
|
+
|
|
90
|
+
### Phase 5 — verify (re-check; watch for new diagnostics)
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
rigor check
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Two things to confirm:
|
|
97
|
+
|
|
98
|
+
1. **The `info` "no RBS available" list shrank** — the gems now covered
|
|
99
|
+
dropped off it.
|
|
100
|
+
2. **No surprising new diagnostics.** Community RBS occasionally ships a
|
|
101
|
+
signature stricter than the gem's real runtime behaviour, which can
|
|
102
|
+
surface a false positive. Treat the diff like any other:
|
|
103
|
+
- In **acknowledge mode**, regenerate the baseline
|
|
104
|
+
(`rigor baseline regenerate`) so the new envelope is recorded.
|
|
105
|
+
- For a **genuine** new error the sharper types caught, that is a win
|
|
106
|
+
— fix it.
|
|
107
|
+
- For a clear RBS-quality false positive, `# rigor:disable <rule>` the
|
|
108
|
+
site with a reason, or pin the gem out in `rbs_collection.yaml`.
|
|
109
|
+
|
|
110
|
+
### Phase 6 — commit
|
|
111
|
+
|
|
112
|
+
Commit the **config + lockfile**, gitignore the **download dir**:
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
# .gitignore
|
|
116
|
+
.gem_rbs_collection/
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Commit `rbs_collection.yaml` and `rbs_collection.lock.yaml` so every
|
|
120
|
+
contributor and CI resolves the same RBS. `.gem_rbs_collection/` is
|
|
121
|
+
regenerable from the lockfile (`rbs collection install`), so it is not
|
|
122
|
+
committed.
|
|
123
|
+
|
|
124
|
+
## Next step
|
|
125
|
+
|
|
126
|
+
Re-run `rigor skill describe` — with the gem-RBS foundation in place it
|
|
127
|
+
will route you to the next move (CI wiring, baseline work, or protection
|
|
128
|
+
uplift).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rigor-upgrade
|
|
3
|
+
description: |
|
|
4
|
+
Adopt a new Rigor version cleanly: after upgrading the `rigortype` gem, re-run the analysis, diff the diagnostics against the committed baseline, and sort the changes into genuine new catches (sharper inference), known sig-quality false positives, and the baseline you should regenerate. Triggers: "I upgraded Rigor, what changed?", "new diagnostics after gem update rigortype", "adopt the new Rigor version", "rigor baseline drifted after upgrade". NOT for first-time setup (use rigor-project-init) or routine baseline work unrelated to an upgrade (use rigor-baseline-reduce).
|
|
5
|
+
license: MPL-2.0
|
|
6
|
+
metadata:
|
|
7
|
+
version: 0.1.0
|
|
8
|
+
homepage: https://github.com/rigortype/rigor
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Rigor Upgrade
|
|
12
|
+
|
|
13
|
+
A new Rigor release sharpens inference and may add or tighten rules, so
|
|
14
|
+
`rigor check` can report diagnostics it did not before — most are the new
|
|
15
|
+
version catching more, a few are sig-quality false positives the new
|
|
16
|
+
sharpness exposes. This skill adopts the upgrade without either blindly
|
|
17
|
+
regenerating the baseline (which buries genuine new catches) or treating
|
|
18
|
+
every new line as a regression.
|
|
19
|
+
|
|
20
|
+
## When to use
|
|
21
|
+
|
|
22
|
+
- You just ran `mise use gem:rigortype` / `gem update rigortype` and want
|
|
23
|
+
to understand what the new version changed about your project's
|
|
24
|
+
diagnostics.
|
|
25
|
+
|
|
26
|
+
## Procedure
|
|
27
|
+
|
|
28
|
+
### Phase 1 — confirm the new version
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
rigor --version
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Phase 2 — see the delta against the committed baseline
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
rigor check
|
|
38
|
+
rigor diff # compare current diagnostics to the saved baseline JSON
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`rigor diff` shows what is **new** relative to the baseline — that set is
|
|
42
|
+
what the upgrade changed.
|
|
43
|
+
|
|
44
|
+
### Phase 3 — sort the new diagnostics
|
|
45
|
+
|
|
46
|
+
For each newly-surfaced diagnostic:
|
|
47
|
+
|
|
48
|
+
- **A genuine new catch** — the sharper inference found a real latent
|
|
49
|
+
issue. Fix it. (Check `evidence_tier` in `rigor check --format json`:
|
|
50
|
+
`high` is most likely a true positive.)
|
|
51
|
+
- **A sig-quality false positive** — a known class (Struct
|
|
52
|
+
`call.wrong-arity`, an over-nilable RBS return, a regex-capture `$1`
|
|
53
|
+
read). `# rigor:disable <rule>` the site with a reason, or address the
|
|
54
|
+
RBS. Read `rigor explain <rule>` if unsure whether the rule should fire
|
|
55
|
+
here.
|
|
56
|
+
- **Expected envelope growth** — broadly acceptable in acknowledge mode.
|
|
57
|
+
|
|
58
|
+
### Phase 4 — regenerate the baseline (acknowledge mode)
|
|
59
|
+
|
|
60
|
+
Once you have triaged and fixed the genuine catches, record the new
|
|
61
|
+
envelope so the regeneration does not bury what you just fixed:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
rigor baseline regenerate
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Commit the updated `.rigor-baseline.yml` together with any fixes, so the
|
|
68
|
+
team adopts the same post-upgrade baseline.
|
|
69
|
+
|
|
70
|
+
## Note
|
|
71
|
+
|
|
72
|
+
`rigor skill describe` cannot detect that you just upgraded — the
|
|
73
|
+
baseline records only its schema version, not the Rigor version that
|
|
74
|
+
generated it — so this skill is invoked on demand rather than
|
|
75
|
+
recommended automatically. Run it whenever you bump the gem.
|
|
76
|
+
|
|
77
|
+
## Next step
|
|
78
|
+
|
|
79
|
+
Re-run `rigor skill describe` for the next move.
|
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.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rigor contributors
|
|
@@ -304,6 +304,83 @@ files:
|
|
|
304
304
|
- data/vendored_gem_sigs/redis/redis.rbs
|
|
305
305
|
- data/vendored_gem_sigs/redis/redis_extras.rbs
|
|
306
306
|
- data/vendored_gem_sigs/rubygems/rubygems_extras.rbs
|
|
307
|
+
- docs/handbook/01-getting-started.md
|
|
308
|
+
- docs/handbook/02-everyday-types.md
|
|
309
|
+
- docs/handbook/03-narrowing.md
|
|
310
|
+
- docs/handbook/04-tuples-and-shapes.md
|
|
311
|
+
- docs/handbook/05-methods-and-blocks.md
|
|
312
|
+
- docs/handbook/06-classes.md
|
|
313
|
+
- docs/handbook/07-rbs-and-extended.md
|
|
314
|
+
- docs/handbook/08-understanding-errors.md
|
|
315
|
+
- docs/handbook/09-plugins.md
|
|
316
|
+
- docs/handbook/10-sorbet.md
|
|
317
|
+
- docs/handbook/11-sig-gen.md
|
|
318
|
+
- docs/handbook/12-lightweight-hkt.md
|
|
319
|
+
- docs/handbook/README.md
|
|
320
|
+
- docs/handbook/appendix-elixir.md
|
|
321
|
+
- docs/handbook/appendix-go.md
|
|
322
|
+
- docs/handbook/appendix-java-csharp.md
|
|
323
|
+
- docs/handbook/appendix-liskov.md
|
|
324
|
+
- docs/handbook/appendix-mypy.md
|
|
325
|
+
- docs/handbook/appendix-phpstan.md
|
|
326
|
+
- docs/handbook/appendix-protocols-and-structural-typing.md
|
|
327
|
+
- docs/handbook/appendix-rust.md
|
|
328
|
+
- docs/handbook/appendix-steep.md
|
|
329
|
+
- docs/handbook/appendix-type-theory.md
|
|
330
|
+
- docs/handbook/appendix-typeprof.md
|
|
331
|
+
- docs/handbook/appendix-typescript.md
|
|
332
|
+
- docs/install.md
|
|
333
|
+
- docs/llms.txt
|
|
334
|
+
- docs/manual/01-installation.md
|
|
335
|
+
- docs/manual/02-cli-reference.md
|
|
336
|
+
- docs/manual/03-configuration.md
|
|
337
|
+
- docs/manual/04-diagnostics.md
|
|
338
|
+
- docs/manual/05-inspecting-types.md
|
|
339
|
+
- docs/manual/06-baseline.md
|
|
340
|
+
- docs/manual/07-plugins.md
|
|
341
|
+
- docs/manual/08-skills.md
|
|
342
|
+
- docs/manual/09-editor-integration.md
|
|
343
|
+
- docs/manual/10-mcp-server.md
|
|
344
|
+
- docs/manual/11-ci.md
|
|
345
|
+
- docs/manual/12-caching.md
|
|
346
|
+
- docs/manual/13-troubleshooting.md
|
|
347
|
+
- docs/manual/14-rails-quickstart.md
|
|
348
|
+
- docs/manual/15-type-protection-coverage.md
|
|
349
|
+
- docs/manual/16-rbs-extended-annotations.md
|
|
350
|
+
- docs/manual/17-driving-improvement.md
|
|
351
|
+
- docs/manual/README.md
|
|
352
|
+
- docs/manual/ci-templates/README.md
|
|
353
|
+
- docs/manual/plugins/README.md
|
|
354
|
+
- docs/manual/plugins/rigor-actioncable.md
|
|
355
|
+
- docs/manual/plugins/rigor-actionmailer.md
|
|
356
|
+
- docs/manual/plugins/rigor-actionpack.md
|
|
357
|
+
- docs/manual/plugins/rigor-activejob.md
|
|
358
|
+
- docs/manual/plugins/rigor-activerecord.md
|
|
359
|
+
- docs/manual/plugins/rigor-activestorage.md
|
|
360
|
+
- docs/manual/plugins/rigor-activesupport-core-ext.md
|
|
361
|
+
- docs/manual/plugins/rigor-devise.md
|
|
362
|
+
- docs/manual/plugins/rigor-dry-schema.md
|
|
363
|
+
- docs/manual/plugins/rigor-dry-struct.md
|
|
364
|
+
- docs/manual/plugins/rigor-dry-types.md
|
|
365
|
+
- docs/manual/plugins/rigor-dry-validation.md
|
|
366
|
+
- docs/manual/plugins/rigor-factorybot.md
|
|
367
|
+
- docs/manual/plugins/rigor-graphql.md
|
|
368
|
+
- docs/manual/plugins/rigor-hanami.md
|
|
369
|
+
- docs/manual/plugins/rigor-mangrove.md
|
|
370
|
+
- docs/manual/plugins/rigor-minitest.md
|
|
371
|
+
- docs/manual/plugins/rigor-pundit.md
|
|
372
|
+
- docs/manual/plugins/rigor-rails-i18n.md
|
|
373
|
+
- docs/manual/plugins/rigor-rails-routes.md
|
|
374
|
+
- docs/manual/plugins/rigor-rails.md
|
|
375
|
+
- docs/manual/plugins/rigor-rbs-inline.md
|
|
376
|
+
- docs/manual/plugins/rigor-rspec-rails.md
|
|
377
|
+
- docs/manual/plugins/rigor-rspec.md
|
|
378
|
+
- docs/manual/plugins/rigor-shoulda-matchers.md
|
|
379
|
+
- docs/manual/plugins/rigor-sidekiq.md
|
|
380
|
+
- docs/manual/plugins/rigor-sinatra.md
|
|
381
|
+
- docs/manual/plugins/rigor-sorbet.md
|
|
382
|
+
- docs/manual/plugins/rigor-statesman.md
|
|
383
|
+
- docs/manual/plugins/rigor-typescript-utility-types.md
|
|
307
384
|
- exe/rigor
|
|
308
385
|
- lib/rigor.rb
|
|
309
386
|
- lib/rigor/analysis/baseline.rb
|
|
@@ -372,6 +449,7 @@ files:
|
|
|
372
449
|
- lib/rigor/cli/coverage_scan.rb
|
|
373
450
|
- lib/rigor/cli/diagnostic_formats.rb
|
|
374
451
|
- lib/rigor/cli/diff_command.rb
|
|
452
|
+
- lib/rigor/cli/docs_command.rb
|
|
375
453
|
- lib/rigor/cli/explain_command.rb
|
|
376
454
|
- lib/rigor/cli/fused_protection_renderer.rb
|
|
377
455
|
- lib/rigor/cli/fused_protection_report.rb
|
|
@@ -390,6 +468,7 @@ files:
|
|
|
390
468
|
- lib/rigor/cli/show_bleedingedge_command.rb
|
|
391
469
|
- lib/rigor/cli/sig_gen_command.rb
|
|
392
470
|
- lib/rigor/cli/skill_command.rb
|
|
471
|
+
- lib/rigor/cli/skill_describe.rb
|
|
393
472
|
- lib/rigor/cli/trace_command.rb
|
|
394
473
|
- lib/rigor/cli/trace_renderer.rb
|
|
395
474
|
- lib/rigor/cli/triage_command.rb
|
|
@@ -777,19 +856,29 @@ files:
|
|
|
777
856
|
- sig/rigor/testing.rbs
|
|
778
857
|
- sig/rigor/trinary.rbs
|
|
779
858
|
- sig/rigor/type.rbs
|
|
859
|
+
- skills/rigor-ask/SKILL.md
|
|
780
860
|
- skills/rigor-baseline-reduce/SKILL.md
|
|
781
861
|
- skills/rigor-baseline-reduce/references/01-classify.md
|
|
782
862
|
- skills/rigor-baseline-reduce/references/02-fix-or-suppress.md
|
|
783
863
|
- skills/rigor-ci-setup/SKILL.md
|
|
864
|
+
- skills/rigor-doctor/SKILL.md
|
|
865
|
+
- skills/rigor-editor-setup/SKILL.md
|
|
866
|
+
- skills/rigor-mcp-setup/SKILL.md
|
|
867
|
+
- skills/rigor-monkeypatch-resolve/SKILL.md
|
|
868
|
+
- skills/rigor-next-steps/SKILL.md
|
|
784
869
|
- skills/rigor-plugin-author/SKILL.md
|
|
785
870
|
- skills/rigor-plugin-author/references/01-plan-and-scaffold.md
|
|
786
871
|
- skills/rigor-plugin-author/references/02-walker-and-types.md
|
|
787
872
|
- skills/rigor-plugin-author/references/03-test-and-ship.md
|
|
873
|
+
- skills/rigor-plugin-tune/SKILL.md
|
|
788
874
|
- skills/rigor-project-init/SKILL.md
|
|
789
875
|
- skills/rigor-project-init/references/01-detect.md
|
|
790
876
|
- skills/rigor-project-init/references/02-configure.md
|
|
791
877
|
- skills/rigor-project-init/references/03-baseline-and-bugs.md
|
|
792
878
|
- skills/rigor-project-init/references/04-sig-uplift.md
|
|
879
|
+
- skills/rigor-protection-uplift/SKILL.md
|
|
880
|
+
- skills/rigor-rbs-setup/SKILL.md
|
|
881
|
+
- skills/rigor-upgrade/SKILL.md
|
|
793
882
|
homepage: https://github.com/rigortype/rigor
|
|
794
883
|
licenses:
|
|
795
884
|
- MPL-2.0
|