Repository navigation
feat(catalog): add typed Signal decoding and validation - #216
Merged
Merged
Conversation
This was referenced Oct 12, 2026
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.
Generic Signal decoding checks the envelope but does not select a domain definition. Add an immutable
Jido.Signal.Catalogbuilt from explicit v3 definition modules. It uses the existing codec and serializer, selects exact{type, dataschema}pairs, validates data with the definition's Zoi schema, and returns structured package errors. Revalidation preserves Signal ID, time, source, subject, and valid transport context. Message and sensor examples use the same API.Registration validates one metadata snapshot with the existing envelope type and schema URI rules. Type and schema lookup use direct map access. Invalid metadata, malformed catalog values, and codec faults return structured errors. Existing Signal context is checked before envelope defaults can replace it. When a data default or transform changes the payload, the existing codec keeps data presence and Base64 flags consistent. The catalog does not add another envelope codec or generate a new fact ID.
This intentionally changes the earlier v3 beta's custom constructor behavior: options can no longer override the definition's
dataschema, includingnil. Use a separate definition for each schema identity. Generic constructors retain their existing behavior. The guide explains the CloudEvents attribute, exact matching, metadata snapshots, schema-owned data-key rules, and errors. There is no global registration, input-driven module discovery, remote schema fetch, data migration, or domain policy.Validation on Elixir 1.18.4 / OTP 27.3:
mix test --include flaky --warnings-as-errors: 524 tests, 0 failures, 47 excluded in each run. Property/fuzz cases run separately below.mix quality: formatting, compilation, Doctor, ExDoc, Credo, and Dialyzer passed.MIX_ENV=test mix test --cover --warnings-as-errors: 524 tests, 0 failures; 96.6% total coverage, 97.2% catalog coverage.mix deps.get,mix deps.unlock --check-unused,mix hex.audit, andmix hex.build: passed. This branch includes the mergedrelease/v3Decimal fix from fix(deps): update Decimal lock to 3.2.0 #218. The package includes the catalog module and guide.GitHub CI passed for
cfe2d9e39f6ac0834f718e14b3f7aae1eac0c7c1, including all four runtime matrix rows, compilation, format, docs, Credo, Dialyzer, audit, dependency, and package checks. The workflow skipped its optional experimental compile job.The completed local diff was reviewed for defects and scope. No open local review findings. No
CHANGELOG.mdchange.Chat/Messaging plan and Signal v3 assessment.
Closes #213.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.