Skip to content

Port to vCon core-05 (syntax 0.5.0), release 1.0.0 - #72

Merged
howethomas merged 12 commits into
mainfrom
core-05
Nov 15, 2026
Merged

howethomas merged 12 commits into
mainfrom
core-05

Conversation

@howethomas

Copy link
Copy Markdown
Contributor

Summary

Retargets the library to draft-ietf-vcon-vcon-core-05 (syntax "0.5.0") and bumps it to 1.0.0. Readers accept 0.4.0 and 0.5.0; writers emit 0.5.0. The Dialog Object lost its transfer, recording-set, party history and originator content, which moved to the new Session and Event Objects.

Added

  • Session and SessionReference, the top-level sessions array, Vcon.add_session().
  • Event, the top-level events array, Vcon.add_event(), with the per-event-type parameter table enforced.
  • redacted_from, amended_from, redacted_strings; Dialog redacted_segments; Attachment session; Analysis sessions, attachment, analysis.
  • migrate_0_4_0_to_0_5_0() (table driven, Appendix A.1) returning a MigrationResult with a full MigrationReport; Vcon.migrate_0_4_0_to_0_5_0(), migrate_legacy and strict_migration load options. Signed input is migrated as its unsigned payload and flagged resign_required; the library never re-signs.
  • Vcon.get_validation_warnings() for SHOULD-level findings; Vcon.sign(key, alg="RS256").

Breaking changes

  • build_new() emits "vcon": "0.5.0"; a vCon declaring "0.4.0" is migrated on load (use migrate_legacy=False to keep the raw dict).
  • Vcon.redacted and Vcon.amended become redacted_from and amended_from (old names kept as deprecated aliases).
  • Dialog types are recording, text and incomplete. audio and video still work but warn and build a recording. The transfer and recording-set types and the Dialog parameters party_history, originator, transferee, transferor, transfer_target, original, consultation, target_dialog, transfer, recordings, recording_set are removed (ValueError). PartyHistory is deprecated; add_transfer_dialog() raises NotImplementedError.
  • Dialog parties are contributors only; receivers are the parties of the Session that lists the Dialog.
  • add_incomplete_dialog() no longer writes a body.
  • Attachments need party plus dialog or session; the dialog default of 0 is gone.
  • add_analysis() takes dialog as an optional keyword.
  • is_valid() checks Session, Event, attachment and analysis references, the Event parameter table, extensions and critical coverage, and that vcon is "0.5.0".
  • sign() and verify() reject JWS alg "none" with AlgorithmNotPermittedError.

See CHANGELOG.md for the full list and MIGRATION_GUIDE.md for upgrade steps.

Testing

  • poetry run pytest: 568 passed, 7 skipped (the skips are pre-existing FFmpeg, performance and advanced-feature placeholders).
  • scripts/check_version.py: pyproject, setup.py and changelog all report 1.0.0.
  • A converter importing this exact source tree regenerated 8,181 files (migration of 0.4.0 input, building 0.5.0 output, lawful-basis attachments); all of them validate against the core-05 JSON Schema.

Release

The branch merges cleanly into main. The release will be tagged v1.0.0 after this is merged; the existing tag-triggered workflow then publishes to the package index.

howethomas and others added 11 commits November 1, 2026 13:03
Add Session, Session_Reference and Event objects with the top-level sessions
and events arrays, and enforce the per-event-type parameter table in
validation. Rename redacted/amended to redacted_from/amended_from, add
Attachment.session, and require party plus dialog or session on attachments.
Remove the transfer and recording-set dialog types and the party_history,
originator and transfer parameters from Dialog; allow empty Dialog objects.

Reject JWS alg "none" on sign and verify. Make is_valid() require that
extensions lists every extension in use, that a Session exists when there is
dialog or events, and that references resolve.

Add migrate_0_4_0_to_0_5_0(), a table-driven implementation of Appendix A.1
that keeps every index stable by leaving removed dialogs as {} and returns a
report of inferred values, fallbacks and unresolved items. Readers migrate
documents that declare 0.4.0 on load.

Vendor the core-05 Appendix C schema and Appendix B examples for the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Refuse input without "vcon" that already carries 0.5.0-only parameters
  (sessions, events, redacted_from, amended_from, redacted_strings); it was
  re-migrated and its sessions and events overwritten.
- Recording-sets: take membership from recording_set back-references as well
  as the recordings list; a set listed inside another becomes a "child"
  Session_Reference (indices are allocated before filling, so forward
  references work); unmapped recording-set parameters and stray
  recording_set/recordings values are reported with their values.
- Transfers: a transfer Dialog's originator is reported, not dropped. T4 now
  runs before T3, so party_history Events list every Session of their Dialog,
  including the Sessions created for a transfer's calls (AMB-3).
- party_history: the time fallback chain is Dialog start, then created_at
  (strict raises); the unusable original time is kept in the report;
  extension parameters are carried onto the Event unless they clash with a
  core Event parameter, and either way are reported.
- text/incomplete Dialogs whose first party is null no longer promote a
  receiver to sender/originator; an empty Party Object stands in and the
  gap is reported.
- New step T10c: an attachment with neither dialog nor session is scoped to
  the only Session when exactly one exists (reported as inferred), and
  reported as unresolved otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Migrating on load rewrote a signed 0.4.0 vCon as its unsigned payload, so
verify() could no longer run and a load-and-save path replaced a signed
record with an unsigned one. A signed 0.4.0 vCon is now kept as loaded;
migration is explicit through Vcon.migrate_0_4_0_to_0_5_0().

An unmigrated 0.4.0 dict (signed, or migrate_legacy=False) is no longer run
through the 0.5.0 property allow-lists, which stripped party_history,
originator, redacted and the other legacy parameters in strict and meta mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With neither dialog nor session, add_attachment(), add_lawful_basis_attachment()
and add_wtf_transcription_attachment() scoped the attachment to every Session
and added an empty placeholder Session when there was none. For a consent
record that asserts a scope nobody stated. A given dialog_index was also
widened to every Session listing that dialog.

Now the scope is defaulted only when it is unambiguous (exactly one Session,
which is then the whole conversation); otherwise ValueError. dialog_index
alone stays dialog-only, with a warning for lawful_basis. add_tag() keeps the
whole-vCon behaviour since tags describe the entire vCon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core-05 section 4.5.1 defines recording, text and incomplete (or an
extension value). Dialog(type="audio"/"video") now warns and builds a
"recording", and the video helpers write "recording"; the media kind stays in
mediatype. A stored vCon with audio/video Dialogs still validates, with a
warning.

Validation also warns on a Session originator equal to its first party
(4.2.4) and on Session or attachment references to an empty placeholder
Dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vcon.redacted and Vcon.amended become deprecated aliases of redacted_from and
amended_from. PartyHistory is kept as a deprecated class with to_event().
Dialog.is_transfer() warns and returns False. add_transfer_dialog() raises
NotImplementedError naming the Event replacement instead of AttributeError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The extension validator checked only the body. It now warns when a
lawful_basis attachment has no party, or no session (core-05 scopes a basis
to Sessions; an attachment needs dialog or session).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A null vCon parties value crashed when an unknown-party placeholder was
needed; it is now treated like absent and reported. Dialog starts that are
not RFC 3339 date-times (free-form strings, out-of-range fields) are no
longer used as a Session start: strict mode raises MigrationError, default
mode records an unresolved entry. Matches the TypeScript port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runner image no longer provides Python 3.12.8, so the version-check and build-linux jobs failed at setup. Use the floating 3.12 so the runner picks a current patch release. Date the 1.0.0 entry 2026-11-15 and the 0.10.0 entry 2026-09-26 (its tag date).
@howethomas
howethomas merged commit 846dcb5 into main Nov 15, 2026
7 of 8 checks passed

This branch had an error being deployed

1 failed deployment
github-pages — acd65a25 Deployed Nov 15, 2026 by howethomas via docs #102
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