Skip to content

feat(xsender): read the CDR's document description - #9

Merged
carlosthe19916 merged 1 commit into
mainfrom
feat/cdr-document-description
Nov 16, 2026
Merged

carlosthe19916 merged 1 commit into
mainfrom
feat/cdr-document-description

Conversation

@carlosthe19916

Copy link
Copy Markdown
Member

Why

xhandler 6.0.0-alpha.2 adds document_description to the CDR. For an accepted guía de remisión, it's the URL its printed copy's QR code must encode. The core always sends it (null for other documents).

The answer models use extra="forbid", so every CDR from the alpha.2 core would fail validation. That includes the release's own sync PR.

What

  • The answers (CDR, Fault, NoCDR, SendResult, VerifyResult, ConsultStatus, ConsultResult) get an _Answer base with extra="ignore", so a newer core never breaks them. The inputs stay strict.
  • CDR.document_description: str | None.

The binding keeps working with older cores, where the field is absent.

This is interim. After alpha.2, the binding will generate its answer types from the core's schema, so later fields need no hand edit (project-openubl/xhandler-rust#613, docs/adrs/BINDINGS.md).

Verified

  • The test suite passes on this branch's committed core (alpha.1).
  • The xsender tests also pass on a core built from xhandler-rust main, which sends document_description.
  • Without this change, 3 xsender tests fail on that core with a pydantic validation error.

Senior review

Two passes, no findings to fix in this change.

🤖 Generated with Claude Code

xhandler 6.0.0-alpha.2 adds `document_description` to the CDR: for an
accepted guía de remisión, the URL its printed copy's QR code must encode.
The binding reads it, and keeps working with older cores, where it's absent.

Interim until the binding generates its answer types from the core's schema
(xhandler-rust docs/adrs/BINDINGS.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@carlosthe19916
carlosthe19916 merged commit dde3695 into main Nov 16, 2026
17 checks passed
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