Skip to content

feat(catalog): add typed Signal decoding and validation - #216

Merged
mikehostetler merged 3 commits into
release/v3from
codex/signal-213-typed-catalog
Oct 12, 2026
Merged

mikehostetler merged 3 commits into
release/v3from
codex/signal-213-typed-catalog

Conversation

@mikehostetler

@mikehostetler mikehostetler commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Generic Signal decoding checks the envelope but does not select a domain definition. Add an immutable Jido.Signal.Catalog built 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, including nil. 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:

  • Focused catalog, definition, and serialization tests: 80 tests, 0 failures.
  • Full suite and 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.
  • Property suite: 47 tests, 0 failures, 12 excluded. Fuzz suite: 47 tests, 0 failures, 35 excluded. Both reports finished with no missing contracts or report errors.
  • The new catalog case passed 40 generated property inputs and 500 generated fuzz inputs, plus 36 fixed examples per suite. An independent type/version table checks selection, data errors, constructor identity, and JSON metadata preservation.
  • Fixed regressions cover metadata/codec faults, malformed catalogs, module replacement, exact URI text and URNs, null context, absent/null data, and defaults/transforms that change data representation.
  • mix deps.get, mix deps.unlock --check-unused, mix hex.audit, and mix hex.build: passed. This branch includes the merged release/v3 Decimal 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.md change.

Chat/Messaging plan and Signal v3 assessment.

Closes #213.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@mikehostetler
mikehostetler merged commit ba1314f into release/v3 Oct 12, 2026
19 checks passed
@mikehostetler
mikehostetler deleted the codex/signal-213-typed-catalog branch October 12, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant