Repository navigation
Fix show_envvar output for a sequence or an empty envvar - #3884
Merged
Merged
Conversation
kdeldycke
force-pushed
the
envvar-sequence-error-hint
branch
from
October 6, 2026 13:50
2e07b32 to
b285c68
Compare
kdeldycke
force-pushed
the
envvar-sequence-error-hint
branch
from
October 6, 2026 13:54
b285c68 to
c53d373
Compare
Rowlando13
approved these changes
Oct 6, 2026
DuhItzAniket
added a commit
to DuhItzAniket/Repro
that referenced
this pull request
Oct 20, 2026
A call whose arguments could not be encoded (a framework's context object) had no key and was never compared. It is now keyed by its position, the n-th such call of the function in the test's phase, when A, A2 and H made as many of them; the tracer previews it as #n. On pallets/click#3884, 151 calls of 2 of its 4 changed functions went from not comparable to compared, and the card from UNVERIFIABLE to VERIFIED (deterministic). Work in progress: test_run_stage's perf-regress fixture fails on its missing items, not yet diagnosed (timing or this change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DuhItzAniket
added a commit
to DuhItzAniket/Repro
that referenced
this pull request
Oct 20, 2026
…on (#97) Fixes the second gap the real-world demo found: Repro never compared calls whose *arguments* it could not encode, such as a framework's context object. So a change to such functions came out UNVERIFIABLE. ## What happened pallets/click#3884 (merged) changes `Option.get_error_hint(ctx)` and `Option.get_help_extra(ctx)`. click's `Context` is past the encoder's limits (depth 6, 5,000 values, 50 ms, no cycles), so those calls had no key. In 16 and 58 tests they were not compared at all. The card was UNVERIFIABLE: "2 of 4 changed symbols unverified". ## The fix - **Positional keys.** A call whose arguments could not be encoded is keyed by its *position*, the n-th such call of the function in the test's phase. The key is `(test, phase, symbol, "", n)`; a real digest is never empty. - **Only when it's sound.** Calls are paired this way only when base, base again and head made as many of them (`observations.align`). Otherwise they stay unkeyed and are reported as `encoding_failed`, as before. - **Noise is still caught.** A against A2 still says whether a positional result is noise; a test covers it. - **Previews and the reproducer.** - The tracer previews such a call when asked for `#n`, so its evidence shows real values. - The reproducer finds it again by position. - Without a preview, the summary says plainly that the call was matched by position. - The positional observations round-trip through the CBOR artifacts. The empty digest is stored as "no digest". ## Evidence - **click#3884, deterministic, before and after:** - calls compared went from 244 to **395**, all the same, none not comparable; - the 12 new tests pass; - the card went from UNVERIFIABLE to **VERIFIED**. - **The perf-regress fixture changed exactly as expected.** Its expectation had recorded the old behaviour: unique_tags()'s 50,000-tag calls were not compared. Now its 20 calls per run are compared by position and match. The golden card loses its `encoding_failed` item and its "1 of 1 changed symbols unverified" coverage rule, and stays FLAGGED (perf_budget). The other 16 fixtures and their goldens are unchanged. - **New tests:** - positional pairing finds a real difference; - no pairing when the counts differ; - a positional result that differs on base is masked as noise; - the CBOR round-trip; - the tracer previews the second of two cyclic-argument calls as `#1` and only that one, on the real tracer; - the summary and preview request for a positional difference. `docs/paper/LOG.md` records the measurements, and ARCHITECTURE §4.3 the rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes some awkward rendering in the
Error: Invalid value for '--units' (env var: xxxxx)error message's hint for special cases of environment variables:envvar=Noneenvvar=""(env var: '')envvar=[](env var: '[]')envvar=["WEATHER_UNITS", "UNITS"](env var: '['WEATHER_UNITS', 'UNITS']')(env var: 'WEATHER_UNITS', 'UNITS')Also fixes the rendering of help screen:
envvar=Noneenvvar=""[env var: ]envvar=[][env var: ]