conformance-kit 0.4.1 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18bb6e4722bbdc745b4efcbd1f9b3c3106b6193f235f9657d33e94f41c93b38a
4
- data.tar.gz: 6b023ed04a3167ab8a43f0689691a4416b7ab5fcb2714d71bb1864d62162c3df
3
+ metadata.gz: 7194b9197bb0f74d0984120097dcb41a80e518b9de1ba8818f0b0007b4614c09
4
+ data.tar.gz: d830a25c1493c79747f91312287f2b856f4450bd2f4636f6fd6bff9435c0ffcb
5
5
  SHA512:
6
- metadata.gz: 16280d264476d1b02f60039e2c03dc821fc3f063e861b90a5b3fceae5e0fd53620d51c538cdd290169a5c348ac178b565b03c1867acdf24d37992ee5152ce061
7
- data.tar.gz: 46cbb7fcfdf0ed59f99aa8f11b837b5aff4ad502062b66f0a964feb6f9e7529059f61c86451b276529c78b18f3f933e3438f8b916385a05350a510bb7f7d2ae8
6
+ metadata.gz: 387a7061b29d5f30d6bbc0316ca9d68601b981bce2b37a0afc5d03fa462e1bb3803a5ad3362bf822c106f154ab5b6df614a69e26eff5df0791294da79dc01353
7
+ data.tar.gz: 2b47a5f0f484b3b71382ae21630255b821d4bb420512b5cc6e2e5be69a3d44f2a9b79072c937d0644c8209e16320b5099bf4ceee450560f70ae7d94a06acb4cd
data/CHANGELOG.md CHANGED
@@ -1,22 +1,26 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.4.2 - 2026-10-17
4
+
5
+ - A Proc or lock found inside another value now reads as one sentence: `[:save] is a Proc that is never shareable: ...` and `.@lock is a Thread::Mutex that is main-only: ...` instead of `is a Proc is never shareable` (in `conformance-audit` findings and `"a boot-finalized configuration"` failures; a top-level one reads `a Proc that is never shareable`).
6
+
7
+ ## 0.4.1 - 2026-10-16
4
8
 
5
9
  - `ConformanceKit::Store.fetch` on a non-main Ractor below Ruby 3.4: threads that race on the first fetch now get the first value stored instead of each keeping its own (the race shrinks from the whole initializer to the publish; a thread switch inside the publish itself remains possible, as no Ractor-local lock exists before 3.4) (found by zoolutions/docs-kit#103, whose copy of the Store had the same `||= [yield]`).
6
10
 
7
- ## 0.4.0
11
+ ## 0.4.0 - 2026-10-15
8
12
 
9
13
  - `main_only:` takes `ancestor:` rules (with optional `ivars:`): framework class state on the gem's own subclasses (ActiveRecord, ActionController, Rails::Engine, ActiveSupport::Concern, ...) in one entry per framework instead of one per ivar per class. Constants are never covered; unused rules are listed as stale; an entry with an unknown key, or an ancestor every module has (`Object`, `Module`, ...), is a config error. `Audit::Finding` gains a `rule` member (the covering rule, or nil).
10
14
  - `conformance-audit` no longer crashes on a `BasicObject` value (ActiveRecord keeps one in an unresolved model's `@primary_key`): the finding names its class through `Kernel#class`.
11
15
 
12
- ## 0.3.0
16
+ ## 0.3.0 - 2026-10-15
13
17
 
14
18
  Breaking (pre-1.0): `conformance.yml` is a reusable workflow that each repo calls, instead of one an org ruleset requires. It runs on `workflow_call` only. A repo adds a caller pinned to a release tag (`uses: zoolutions/conformance-kit/.github/workflows/conformance.yml@vX.Y.Z`, see the README) and makes `conformance / Conformance settings` and `conformance / Conformance (Ruby 4.0)` required checks in its own branch ruleset. Repos outside zoolutions can use it the same way.
15
19
 
16
20
  - The version handshake reads `job.workflow_ref` (the called workflow's own tag) instead of `github.workflow_ref` (the caller's).
17
21
  - This repo calls its own workflow through `.github/workflows/conformance-self.yml`.
18
22
 
19
- ## 0.2.0
23
+ ## 0.2.0 - 2026-10-14
20
24
 
21
25
  Breaking (pre-1.0): the reusable workflows `ractor.yml` and `probes.yml` are replaced by `conformance.yml`, which an org ruleset requires at a release tag. A repo opts in with `.conformance.yml`, `gem "conformance-kit", "~> 0.2"` and `gem "rubocop-thread_safety", ">= 0.8"` in its Gemfile, and `inherit_gem: { conformance-kit: config/rubocop.yml }` in `.rubocop.yml` (`conformance-kit doctor` checks all three); it needs no workflow edits.
22
26
 
@@ -26,7 +30,7 @@ Breaking (pre-1.0): the reusable workflows `ractor.yml` and `probes.yml` are rep
26
30
  - `audit.strict_autoloads: true` makes `--strict` fail on unloaded autoloads not listed in `audit.skip_autoloads` (default `false`, 0.1's behaviour).
27
31
  - `.github/workflows/conformance.yml`: the Ruby 4.0 conformance job (with a `postgres:18` service and the version handshake from `github.workflow_ref`) and the report-only compiler probes.
28
32
 
29
- ## 0.1.0
33
+ ## 0.1.0 - 2026-10-14
30
34
 
31
35
  - Shared examples (`require "conformance_kit/rspec"`): `"thread-safe under contention"`, `"fiber-safe under an Async reactor"`, `"a boot-finalized configuration"` and `"runs inside a non-main Ractor"` (Ruby 4.0+, tagged `:ractor`).
32
36
  - The same checks as Minitest assertions (`require "conformance_kit/minitest"`): `assert_thread_safe`, `assert_fiber_safe`, `assert_boot_finalized`, `assert_runs_in_ractor`.
data/README.md CHANGED
@@ -109,7 +109,7 @@ Requires the files, walks every loaded module under the namespaces (`--require`
109
109
 
110
110
  ```
111
111
  conformance-audit: 2 findings in MyGem (1 allowlisted main-only; 14 modules audited, 0 unloaded autoloads skipped)
112
- MyGem::LOCK (constant) Thread::Mutex: a Thread::Mutex is main-only: keep per-Ractor state in ConformanceKit::Store, or allowlist it main_only
112
+ MyGem::LOCK (constant) Thread::Mutex: a Thread::Mutex that is main-only: keep per-Ractor state in ConformanceKit::Store, or allowlist it main_only
113
113
  MyGem::Config.@colors (module ivar) Hash: [:primary] is an Array that is not frozen: freeze it at boot (Ractor.make_shareable)
114
114
  ```
115
115
 
@@ -199,7 +199,7 @@ permissions:
199
199
 
200
200
  jobs:
201
201
  conformance:
202
- uses: zoolutions/conformance-kit/.github/workflows/conformance.yml@v0.4.0
202
+ uses: zoolutions/conformance-kit/.github/workflows/conformance.yml@v0.4.2
203
203
  ```
204
204
 
205
205
  To make it a merge requirement, add `conformance / Conformance settings` and `conformance / Conformance (Ruby 4.0)` to the required status checks in the repo's branch ruleset. Require both: if the settings job fails, the gate is skipped, and a skipped check does not block a merge. The prefix is the caller's job id (`conformance` above) and the Ruby is `ractor.ruby`, so the names change with either. Leave the probes out: they never fail. A repo or org that only allows selected actions must allow `zoolutions/conformance-kit/.github/workflows/conformance.yml@*`.
@@ -79,10 +79,10 @@ module ConformanceKit
79
79
  def reason(value)
80
80
  name = class_name(value)
81
81
  if callable?(value)
82
- "#{article(name)} #{name} is never shareable: use Ractor.shareable_proc (Ruby 4.0) " \
82
+ "#{article(name)} #{name} that is never shareable: use Ractor.shareable_proc (Ruby 4.0) " \
83
83
  "or Ractor.make_shareable on a capture-free proc"
84
84
  elsif lock?(value) || concurrent?(value)
85
- "#{article(name)} #{name} is main-only: keep per-Ractor state in ConformanceKit::Store, " \
85
+ "#{article(name)} #{name} that is main-only: keep per-Ractor state in ConformanceKit::Store, " \
86
86
  "or allowlist it main_only"
87
87
  elsif !frozen?(value)
88
88
  "#{article(name)} #{name} that is not frozen: freeze it at boot (Ractor.make_shareable)"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConformanceKit
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conformance-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mhenrixon