hegeltest 0.2.1-aarch64-linux → 0.3.1-aarch64-linux

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: aaeb9d0de3eed73e101255a9737dcd411e7819dfd559b9b6654556563bd1a9ab
4
- data.tar.gz: 1a8b52232cc7ea3b746c4224b5a16aebd910405a0b6a8403e067a23ce175ad6b
3
+ metadata.gz: d0372fb8bf6fc7928f6c0790df8b89c47ba5b705c823cc9133d950bb894fb840
4
+ data.tar.gz: 9db269f1bbd5c2dd97c41e9eaa23a633732f3ffb5b190825b970523b1d7b2a4c
5
5
  SHA512:
6
- metadata.gz: 15fd917172691c48b448ba688ca00fae54cea30bf67408a4f34f96a09a95d37564e8c6cfb90eaf7e2dc68adf4d2285d8f6f3315e771a0838d7cf9e2f8fb0d2e4
7
- data.tar.gz: 28c4f53b9dfeedf865f266940a27e8d012604bb4c32c3fc63d2db5af9af48449d08a933e24e2017d6a726512653b714c7c88bcacb55afe928cd8d5ea2e04ba29
6
+ metadata.gz: 4f7bc4b5b69bfbbcf7802a8b5f24e5c3535e2f2074e5112c86c73876d1f445dbc520d18ad907c08f9a6c862392464f18c660194f790a502c3f4f824d5131c187
7
+ data.tar.gz: 175551928ce3681380f273d2cb3d39ac8787a6fd7b4249ef4f92a2c4bd3f8ffbf39b4080377354eb184b5f9389405d41045515701477a168f87ce83316f59049
data/CHANGELOG.md CHANGED
@@ -2,23 +2,91 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.3.1] - 2026-10-15
6
+
7
+ ### Engine: libhegel 0.45.7 (was 0.45.4)
8
+
9
+ The [libhegel 0.45.7 release notes](https://github.com/hegeldev/hegel-rust/releases/tag/libhegel-v0.45.7)
10
+ describe 0.45.7 alone. The
11
+ [engine changelog](https://github.com/hegeldev/hegel-rust/blob/libhegel-v0.45.7/hegel-c/CHANGELOG.md)
12
+ describes each engine release after 0.45.4, up to 0.45.7.
13
+
14
+ Each platform gem carries `libhegel` 0.45.7. The engine only adds to its C
15
+ interface, and these bindings do not use the addition. A caller has nothing
16
+ to change in code. The engine changes these messages for a caller:
17
+
18
+ - `from_regex` with a pattern that no string matches, such as `"(?!)"`,
19
+ raises `Hegel::Error` with a message that names the pattern and says
20
+ that it `matches no string`. Before, the run raised `Hegel::Error` with
21
+ a message that starts with `Unsatisfiable`.
22
+ - The FilterTooMuch health check message says how to suppress the check
23
+ with the `suppress_health_check` setting, and it says "rejected by
24
+ assume() or a filter". Before, it showed Rust syntax. The
25
+ `FailedHealthCheck:` and `Unsatisfiable` prefixes do not change.
26
+
27
+ ## [0.3.0] - 2026-10-14
28
+
29
+ ### Engine: libhegel 0.45.4 (was 0.45.1)
30
+
31
+ The [libhegel 0.45.4 release notes](https://github.com/hegeldev/hegel-rust/releases/tag/libhegel-v0.45.4)
32
+ describe 0.45.4 alone. The
33
+ [engine changelog](https://github.com/hegeldev/hegel-rust/blob/libhegel-v0.45.4/hegel-c/CHANGELOG.md)
34
+ describes each engine release after 0.45.1, up to 0.45.4.
35
+
36
+ Each platform gem carries `libhegel` 0.45.4. The engine only adds to its C
37
+ interface, and these bindings do not use the additions. The engine
38
+ changes these results for a caller:
39
+
40
+ - A run that generates no valid test case now raises `Hegel::Error` with a
41
+ message that starts with `Unsatisfiable`, also when
42
+ `suppress_health_check:` holds `:filter_too_much` or
43
+ `:test_cases_too_large`. Before, such a run passed. A test that rejects
44
+ every case and expects to pass must now draw at least one valid case.
45
+ - `from_regex` records each drawn string as one choice that the pattern
46
+ constrains. A failure shrinks inside the pattern, so
47
+ `from_regex("(?:bbbb|a)", fullmatch: true)` now shrinks to `"a"`, where
48
+ it stopped at `"bbbb"` before. The example database drops a failure that
49
+ an earlier engine saved for a `from_regex` draw, so the first run after
50
+ the update does not replay it.
51
+ - `from_regex` rejects a look-behind of variable width, such as
52
+ `(?<=a*)b`, with `Hegel::Error`, as Python's `re` does.
53
+ - `\w`, `\d`, `\s`, and case-insensitive matching in `from_regex` follow
54
+ Unicode 17.0. Before, they followed Unicode 15.1.
55
+ - A run stops when its test-case budget or its budget of invalid cases is
56
+ spent. Before, it could also stop after ten rejected cases in a row that
57
+ it had seen before.
58
+
5
59
  ## [0.2.1] - 2026-10-08
6
60
 
7
- Each platform gem carries `libhegel` 0.45.1, up from 0.45.0. A caller has
8
- nothing to change. The engine now reads a NULL string buffer with length
9
- zero as the empty string, and it rejects a NULL buffer with a nonzero
10
- length. These bindings send neither case, so a drawn value does not
11
- change: `from_regex("", fullmatch: true)` draws `""` on both engines.
61
+ ### Engine: libhegel 0.45.1 (was 0.45.0)
62
+
63
+ The [libhegel 0.45.1 release notes](https://github.com/hegeldev/hegel-rust/releases/tag/libhegel-v0.45.1)
64
+ describe the engine changes.
65
+
66
+ Each platform gem carries `libhegel` 0.45.1. A caller has nothing to
67
+ change. The engine now reads a NULL string buffer with length zero as the
68
+ empty string, and it rejects a NULL buffer with a nonzero length. These
69
+ bindings send neither case, so a drawn value does not change:
70
+ `from_regex("", fullmatch: true)` draws `""` on both engines.
12
71
 
13
72
  ## [0.2.0] - 2026-10-07
14
73
 
74
+ ### Engine: libhegel 0.45.0 (was 0.32.5)
75
+
76
+ The [libhegel 0.45.0 release notes](https://github.com/hegeldev/hegel-rust/releases/tag/libhegel-v0.45.0)
77
+ describe 0.45.0 alone. The
78
+ [engine changelog](https://github.com/hegeldev/hegel-rust/blob/libhegel-v0.45.0/hegel-c/CHANGELOG.md)
79
+ describes each engine release after 0.32.5, up to 0.45.0.
80
+
81
+ Each platform gem carries `libhegel` 0.45.0. The engine changed its C
82
+ interface in several places between the two, and these bindings follow
83
+ each change. The sections below list what that changes for a caller.
84
+
85
+ ### Ruby
86
+
15
87
  The floor is Ruby 3.4. A project on Ruby 3.3 stays on 0.1.1. See
16
88
  [ADR 0017](docs/adr/0017-raise-the-ruby-floor-to-3-4.md).
17
89
 
18
- Each platform gem carries `libhegel` 0.45.0, up from 0.32.5. The engine
19
- changed its C interface in several places between the two, and these
20
- bindings follow each change.
21
-
22
90
  ### Changes a caller has to make
23
91
 
24
92
  `Hegel.test` no longer takes `stateful_step_count:`. Pass `step_count:` to
@@ -128,6 +196,8 @@ The engine is called through the `ffi` gem. Each platform gem carries the
128
196
  matching `libhegel` 0.32.5 build. The platform-independent gem carries none,
129
197
  so a run on it needs `HEGEL_LIBHEGEL_PATH` pointing at a local build.
130
198
 
199
+ [0.3.1]: https://github.com/meganemura/hegel-ruby/releases/tag/v0.3.1
200
+ [0.3.0]: https://github.com/meganemura/hegel-ruby/releases/tag/v0.3.0
131
201
  [0.2.1]: https://github.com/meganemura/hegel-ruby/releases/tag/v0.2.1
132
202
  [0.2.0]: https://github.com/meganemura/hegel-ruby/releases/tag/v0.2.0
133
203
  [0.1.1]: https://github.com/meganemura/hegel-ruby/releases/tag/v0.1.1
@@ -5,5 +5,5 @@ module Hegel
5
5
  # Hegel::VERSION (the gem's own release): hegel-go and hegel-typescript keep
6
6
  # the two separate too, so bumping the pinned engine can land as its own
7
7
  # commit without also releasing a new gem version.
8
- LIBHEGEL_VERSION = "0.45.1"
8
+ LIBHEGEL_VERSION = "0.45.7"
9
9
  end
data/lib/hegel/runner.rb CHANGED
@@ -178,9 +178,9 @@ module Hegel
178
178
  # Pulls test cases from +run+ until hegel_next_test_case reports none
179
179
  # left (a nil out-parameter, not an error). Never counts iterations
180
180
  # itself: test_cases bounds generation, not how many times shrinking
181
- # and rejected cases call the body. Measured against libhegel 0.45.0, a
181
+ # and rejected cases call the body. Measured against libhegel 0.45.7, a
182
182
  # run configured for 20 test cases whose body rejected nearly every case
183
- # took 1040 to 1537 iterations. +stats+ does its own, different counting
183
+ # took 913 to 1818 iterations. +stats+ does its own, different counting
184
184
  # -- see GenerationStats above.
185
185
  def drive(impl, ctx, run, stats, captures, &block)
186
186
  loop do
data/lib/hegel/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hegel
4
- VERSION = "0.2.1"
4
+ VERSION = "0.3.1"
5
5
  end
@@ -494,12 +494,12 @@ expose) are not available in this binding; `codec:`, `min_codepoint:`, and
494
494
  `max_codepoint:` are the alphabet controls it exposes today.
495
495
 
496
496
  Other generators cover most character-set jobs. These results were measured
497
- with libhegel 0.45.0:
497
+ with libhegel 0.45.7:
498
498
 
499
499
  | Job | Generator | Measured output |
500
500
  |---|---|---|
501
- | Characters to include | `from_regex("[ぁ-んA-Z0-9]{1,5}", fullmatch: true)` | `"ぁ"`, `"Hわ9ごう"`; 30 draws all matched the pattern |
502
- | Characters to exclude | `from_regex("[^,\\t\\n]{0,6}", fullmatch: true)` | `""`, `"\u008FBՔ\u0014੐C"`; 30 draws contained no comma, tab, or newline |
501
+ | Characters to include | `from_regex("[ぁ-んA-Z0-9]{1,5}", fullmatch: true)` | `"0"`, `"お"`, `"Dぷぎ"`; 30 draws all matched the pattern |
502
+ | Characters to exclude | `from_regex("[^,\\t\\n]{0,6}", fullmatch: true)` | `""`, `"âb¤"`; 30 draws contained no comma, tab, or newline |
503
503
  | A contiguous block | `text(min_codepoint: 0x300, max_codepoint: 0x36F)` | Every character of 100 draws was in U+0300 through U+036F |
504
504
  | An arbitrary alphabet | `arrays(sampled_from(%w[ß a İ]), max_size: 4).map(&:join)` | 30 draws, each built only from `ß`, `a`, and `İ` |
505
505
 
@@ -512,14 +512,13 @@ inputs and reported this health check:
512
512
 
513
513
  ```
514
514
  FailedHealthCheck: FilterTooMuch — it looks like this test is filtering out
515
- too many inputs. 50 inputs were filtered out by assume() while only 0 valid
516
- inputs were generated. If this is expected, suppress the check with
517
- suppress_health_check = [HealthCheck::FilterTooMuch].
515
+ too many inputs. 50 inputs were rejected by assume() or a filter while only
516
+ 0 valid inputs were generated. If this is expected, suppress the
517
+ FilterTooMuch health check with the suppress_health_check setting.
518
518
  ```
519
519
 
520
- The engine writes that last sentence in its own naming. This binding takes
521
- the same setting as `suppress_health_check: [:filter_too_much]`, listed in
522
- [Settings](#settings).
520
+ This binding takes that setting as
521
+ `suppress_health_check: [:filter_too_much]`, listed in [Settings](#settings).
523
522
 
524
523
  Unconfigured `text` draws from a much wider Unicode range. In 200 draws of
525
524
  `text(min_size: 1, max_size: 4)`, the results included emoji, private-use
@@ -745,6 +744,13 @@ translated): `from_regex(/[a-z]{3}/)` raises `Hegel::Error` at draw time,
745
744
  Regexp"`. Pass `my_regexp.source` explicitly for a pattern confirmed to
746
745
  need no flags and to use only syntax the two grammars share.
747
746
 
747
+ A pattern that no string matches, such as `"(?!)"`, also raises
748
+ `Hegel::Error` at draw time. The engine writes the message, and it names
749
+ the pattern: `from_regex("(?!)")` raises
750
+ `"HEGEL_E_INVALID_ARG (-5): regex pattern \"(?!)\" matches no string the
751
+ generator can produce"`. Since libhegel 0.45.7 the engine makes this
752
+ check.
753
+
748
754
  ### `emails`
749
755
 
750
756
  An RFC 5321/5322 email address `String`.
@@ -1219,11 +1225,18 @@ value already in the shape you need):
1219
1225
 
1220
1226
  ```ruby
1221
1227
  result = Hegel.test(test_cases: 20, suppress_health_check: [:filter_too_much], verbosity: :quiet) do |tc|
1222
- tc.draw(integers.filter { |_n| false })
1228
+ tc.draw(integers(min_value: 0, max_value: 1_000_000).filter(&:zero?))
1223
1229
  end
1224
1230
  result # => nil
1225
1231
  ```
1226
1232
 
1233
+ The suppressed check does not let a run pass with no valid input. A
1234
+ predicate that never holds, such as `integers.filter { |_n| false }`,
1235
+ still raises `Hegel::Error`, with a message that starts with
1236
+ `"Unsatisfiable: unable to satisfy the test's assumptions."` Since libhegel
1237
+ 0.45.2, the engine ends every run that generates no valid test case this
1238
+ way.
1239
+
1227
1240
  ## Gotchas
1228
1241
 
1229
1242
  1. **Float defaults include NaN and infinity when unbounded.** `floats` with
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hegeltest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - meganemura