Repository navigation
feat(ack)!: unify decoder and encoder error contracts - #163
Draft
leoafarias wants to merge 1 commit into
Draft
leoafarias wants to merge 1 commit into
leoafarias wants to merge 1 commit into
Conversation
leoafarias
added a commit
that referenced
this pull request
Sep 29, 2026
Align the six publishable packages at 1.7.0-beta.1 and move unreleased notes into the 1.7.0-beta.1 changelog sections. The release includes shared inference, model adapter schemas, CodecSchema.canEncode, typed copyWith, stricter constrained-Set validation, the @AckInfer schema shorthand (#174), generated string-literal escaping (#164), and explicit schema descriptions (#176). Update PUBLISHING.md for this candidate. The Draft 2020-12 runtime (#171), JSON Schema-to-Dart generation (#167), and the decoder error contract (#163) are deferred to 2.0.
leoafarias
force-pushed
the
codex/ack-v2-codec-error-contract
branch
from
October 9, 2026 14:04
b322401 to
ac6f353
Compare
This was referenced Oct 9, 2026
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.
Summary
Unify decoder and encoder error contracts in
CodecSchema:Errors: When a codec decoder or one-way.transform()callback throws a DartError(such asStateErrororTypeError), rethrow it with its original stack trace (Error.throwWithStackTrace) instead of wrapping it in aSchemaTransformError, matching the existing encoder and refinement contracts.Exceptions as validation failures: OrdinaryExceptionvalues (such asFormatException) continue to returnSchemaTransformErrorfailures so union schemas (Ack.anyOf) can fall back to subsequent branches on invalid input without silently swallowing programmer defects.parse/safeParse, nestedAck.object/Ack.list/Ack.map, one-way.transform(),Ack.anyOfshort-circuiting, recoverableFormatExceptionfallback, and stack trace preservation.Breaking Change (Ack 2.0)
Decoder callbacks that threw a
StateErroror otherErrorsubclass to signal invalid user input should throwFormatException(or anotherException) instead.Stack (Ack 2.0)
main← feat(ack)!: unify decoder and encoder error contracts #163 (codex/ack-v2-codec-error-contract) ← feat(ack): support Draft 2020-12 runtime import and export #171 (feat/json-schema-2020-12-runtime) ← feat(generator): generate models from Draft 2020-12 schemas #167 (feat/json-schema-model-generator)