Repository navigation
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
TeamDman
marked this pull request as ready for review
October 6, 2026 14:28
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Report the peeked scalar's span for unknown enum variants
Closes #69.
Invalid scalar enum values currently inherit the previous consumed event's
span. In Cloud Terrastodon's Figue CLI, an invalid
--output-formatvalue cantherefore underline an unrelated preceding authentication argument.
Use
event.spanin the external-enum no-match/no-fallback error branch. Theevent was only peeked, so
self.last_spanstill belongs to a previous event.The error kind and path, valid enum decoding, catch-all fallback, and parser
consumption behavior remain unchanged. Clarify the consumed-versus-peeked span
rule in the deserializer's documentation.
Add a Format-library regression that consumes one synthetic scalar before
rejecting another as a unit enum variant. It checks the rejected value's exact
span and error kind with both single-event and default-size buffers. The test
adds Facet as a development dependency to derive its enum; it has no JSON
fixtures or Figue dependency.
Validation
Based on official Format main
4279debff780ae1cd5b028201f446c26594b1120,freshly fetched on 2026-10-06.
Span { offset: 14, len: 7 }, expectedSpan { offset: 38, len: 5 }.facet-formatlibrary tests pass withcargo +1.96.0 test -p facet-format --lib --offline --locked.cargo +1.96.0 fmt -p facet-format -- --checkandgit diff --checkpass.production data, credentials, application caches, or service calls.
The issue/PR pair for native enum aliases is independent: this change repairs
diagnostic location for values that still legitimately fail enum decoding.
Prepared with assistance from OpenAI Codex (GPT-6).