Skip to content

Bump hegeltest from 0.48.1 to 0.50.3 - #3

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/hegeltest-0.50.3
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/hegeltest-0.50.3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 1, 2026

Copy link
Copy Markdown

Bumps hegeltest from 0.48.1 to 0.50.3.

Release notes

Sourced from hegeltest's releases.

libhegel v0.49.0

This patch adds HEGEL_MAX_SIZE_DEFAULT, which a frontend passes as the max_size of hegel_string_generator_text or hegel_generate_bytes when the user gave no maximum, or of hegel_new_collection for a collection that builds text or bytes, such as text whose characters come from an arbitrary generator. libhegel then applies its default of 100, or min_size + 100 when min_size is above 100, so every frontend's text and binary generators share one default instead of each hard-coding its own. UINT64_MAX still means no upper bound. The sentinel is UINT64_MAX - 1, so that value is reserved: a frontend passing a user's explicit maximum should pass UINT64_MAX for anything at or above HEGEL_MAX_SIZE_DEFAULT, which no allocation could reach anyway.

It also adds HEGEL_FILTER_ATTEMPTS, the number of times a filtered generator draws a value before it rejects the test case (3), so that every frontend's filter uses the engine's number.

It also adds hegel_settings_set_from_string, which sets one setting from its hegel.toml key and a value given as text, in the vocabulary hegel.toml uses for that key, with these spellings for values that are not strings there: integers as decimal digits, optionally after a + (no _ separators or 0x prefix), booleans as the HEGEL_* environment variables take them, and lists such as phases and suppress_health_check as comma-separated names. A frontend's command-line interface can pass each flag through it, so every setting is settable from the command line without the frontend knowing each setting's vocabulary. unbounded_choices and the database key (database_key) are settable this way too; only the test location, which has four parts, still needs hegel_settings_set_test_location.

It also moves the splicing of explicit grammar terminals into libhegel. A frontend drawing a grammar string whose explicit terminals take values from the user's own generators now starts a draw with hegel_grammar_draw_new, calls hegel_grammar_draw_next to learn which terminal needs a value next, draws that value and hands it over with hegel_grammar_draw_provide, and reads the finished string with hegel_grammar_draw_result once hegel_grammar_draw_next returns HEGEL_E_NOT_FOUND:

hegel_grammar_draw_t *draw;
hegel_grammar_draw_new(ctx, grammar, 0, &draw);
size_t terminal;
hegel_result_t rc;
while ((rc = hegel_grammar_draw_next(ctx, tc, draw, &terminal)) == HEGEL_OK) {
    /* draw a value for explicit_names[terminal] */
    hegel_grammar_draw_provide(ctx, draw, value);
}
if (rc == HEGEL_E_NOT_FOUND)
    hegel_grammar_draw_result(ctx, draw, &string);
hegel_grammar_draw_free(ctx, draw);

libhegel replaces each placeholder marker with its value, keeps the whole string, values included, under the size cap by drawing it again with less room for the grammar's own text when the values overflow it, and rejects the test case after HEGEL_FILTER_ATTEMPTS attempts that do not fit, so a frontend no longer reimplements any of this. The draw's max_size is read as hegel_generate_grammar reads its own: 0 means the grammar's cap, and a cap below the grammar's smallest string or above its cap is read as that. A draw belongs to the choice stream of the test-case handle it is first advanced with: hegel_grammar_draw_next accepts that handle and its block handles from hegel_test_case_block, returns HEGEL_E_INVALID_ARG for a handle on another stream (a clone, or a later test case's handle), and a draw handle used from two threads at once returns HEGEL_E_CONCURRENT_USE. hegel_generate_grammar and hegel_grammar_placeholder still work as before.

The header's list of constructors and their matching frees now includes hegel_settings_new_for_profile, hegel_new_recursion and the new grammar draw functions, and the documentation of hegel_stop_span no longer claims that libhegel retries a discarded span itself: the caller draws again.

It also makes the unbounded_choices setting reachable the way the other settings are: profiles in hegel.toml accept an unbounded_choices key (a boolean), and the HEGEL_UNBOUNDED_CHOICES environment variable (true, 1 or yes, or false, 0 or no) sets it over the resolved profile. Previously it could only be set through hegel_settings_set_unbounded_choices or carried by a registered profile.

It also moves the policy of a frontend's repeat loop (run the body as many times as the engine wants, so that a failure shrinks to the fewest repetitions) into libhegel, as four new functions over a hegel_repeat_t handle. A frontend starts the loop with hegel_new_repeat, asks hegel_repeat_more before each repetition whether to run another, tells the engine with hegel_repeat_failed when a repetition failed before it lets the failure propagate (a repetition that only fails an assumption is skipped, and needs no call), and releases the handle with hegel_repeat_free:

hegel_repeat_t *repeat;
hegel_new_repeat(ctx, tc, &repeat);
bool more;
while (hegel_repeat_more(ctx, tc, repeat, &more) == HEGEL_OK && more) {
    /* note "// Repetition #N", run the body on a block of tc */
    if (/* the body failed */) {
        hegel_repeat_failed(ctx, tc, repeat);
        /* rethrow */
    }
}
hegel_repeat_free(ctx, repeat);

The choices the engine makes are the ones the Rust frontend's own loop used to make, so a reproduce blob printed by an earlier release still replays once a frontend switches to these functions.

It also renames the type of the recursion handle in the header from HegelRecursion to hegel_recursion_t, the name the documentation and every other handle type already used. A C consumer that spelt the type out should replace HegelRecursion with hegel_recursion_t; the functions are unchanged.

It also publishes HEGEL_RECURSION_ATTEMPTS, the number of attempts in a row that hegel_recursion_leaf and hegel_recursion_finish may discard before the engine rejects the test case (9), which the recursion documentation had left unspecified. The documentation of HEGEL_HC_LARGE_INITIAL_TEST_CASE now says that the health check aborts the run, as it does, rather than warns; and the documentation of hegel_verbosity_t now describes what libhegel itself prints at each level rather than what a frontend might.

... (truncated)

Commits
  • ef54eff Release libhegel/0.48.0 and frontends/rust/0.50.3 and frontends/python/0.2.0
  • 9f97f5e Merge pull request #3 from hegeldev/DRMacIver/python
  • db6eb35 Fix the two CI failures: Read the Docs lacked maturin, and the shrink loop ha...
  • 05e54a6 Read the grammar's error before freeing its builder in the Unicode-version test
  • f6c1b66 Make the Unicode version a process-wide setting that grammars follow too; dro...
  • b36241f Review the Python frontend branch: model stop_on_first_failure, pin the Linux...
  • 421c019 Address review: drop Hegel-only claims Hypothesis shares, point docs at hegel...
  • cbd21ec Take label_from_name and combine_labels out of the public API
  • 480c874 Give Collection and weighted_booleans a low-level tools reference page
  • 4b981f6 Document Collection with the test case, not with printing
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [hegeltest](https://github.com/hegeldev/hegel) from 0.48.1 to 0.50.3.
- [Release notes](https://github.com/hegeldev/hegel/releases)
- [Commits](hegeldev/hegel@frontends/rust/0.48.1...frontends/rust/0.50.3)

---
updated-dependencies:
- dependency-name: hegeltest
  dependency-version: 0.50.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants