Repository navigation
Align bodies and attachments with draft-04; release on tag push (0.10.0) - #65
Merged
Merged
Conversation
Under -04 section 2.3.2, a "json"-encoded body is the JSON value itself,
not a json.dumps string; add_tag()'s list body and
add_lawful_basis_attachment()'s object body were already correct. This
brings every other body-reading site, plus attachment defaults, in line:
- New vcon.body.decode_body() (also Vcon.decoded_body()) accepts both the
-04 shape and a legacy JSON-string body. Used by get_tag()/add_tag() and
by the lawful-basis/WTF extension validators and processors.
- add_tag() normalizes a legacy string tags body to a list in place.
- add_attachment(), add_lawful_basis_attachment(), and
add_wtf_transcription_attachment() now default party/dialog to 0 and
start to the vCon's created_at (the WG JSON schema requires all three on
every attachment); Attachment.__init__ applies the same defaults, plus
mediatype="application/json" for encoding="json" bodies.
- Dialog.to_dict() no longer emits empty meta: {} / metadata: {}.
- New b64url_encode()/b64url_decode() helpers in dialog.py: inline
base64url bodies the library writes are now unpadded (RFC 7515-style,
per -04), and internal decode sites accept both padded and unpadded
input.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test_dialog.py / test_dialog_more.py: base64url bodies the library writes are now unpadded, so decode with the padding-tolerant b64url_decode() instead of base64.urlsafe_b64decode() directly. - test_vcon.py: add_attachment()/find_attachment_by_purpose() now include the required start/party/dialog defaults in their output. - test_body_decode.py: new coverage for vcon.body.decode_body(), Vcon.decoded_body(), get_tag() on a raw legacy string body, and the lawful-basis/WTF validators accepting a legacy string body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tests/schema/vcon_json_schema.json vendored from vcon-adapter-template (see tests/schema/SOURCE.md for exact commit/date); matches the appendix schema in draft-ietf-vcon-vcon-core-04. - tests/test_schema_compliance.py builds a vCon using only public helpers (add_tag, add_lawful_basis_attachment, add_dialog with and without inline audio, add_attachment) and validates it against that schema with no post-processing; also covers a legacy string tags body normalizing back to a schema-valid list via add_tag(). - jsonschema added as a dev dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- python-publish.yml now triggers on push of a v* tag instead of release: published, so the tag push is the release; nothing else should publish. Auth is unchanged (stored PYPI_API_TOKEN secret via pypa/gh-action-pypi-publish) since this repo wasn't already set up for PyPI trusted publishing (OIDC) -- noted as a separate follow-up. Before publishing, the workflow now fails unless the pushed tag equals v<pyproject version>. - scripts/check_version.py: compares pyproject.toml's version against the newest CHANGELOG.md "## [x.y.z]" heading and setup.py's hardcoded version; also checks a --tag argument against pyproject.toml. - python-package-poetry.yml: new version-check job runs the guard above on every push/PR (also added pull_request to the trigger, which was push-only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- setup.py version to match pyproject.toml (0.10.0). - CHANGELOG.md: 0.10.0 Unreleased entry covering the -04 body/attachment changes in this release. - API_REFERENCE.md / MIGRATION_GUIDE.md: note that get_tag()/add_tag() accept a legacy JSON-string tags body, and that new attachments get start/party/dialog defaults filled in per the WG JSON schema. Not tagged; the tag push is the release (see the publish workflow). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The global was declared but never assigned, so the monotonic guard never fired and flake8 7 reports F824. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
howethomas
had a problem deploying
to
github-pages
September 26, 2026 21:23 — with
GitHub Actions
Failure
This branch had an error being 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.
Aligns body and attachment handling with draft-ietf-vcon-vcon-core-04 and moves releases to tag push. Version 0.10.0.
Changes
decode_body()(andVcon.decoded_body()): every reader of ajson-encoded body accepts the raw JSON value (-04) or a legacy JSON string. Applied to tags, lawful basis validation and processing, and the WTF extension.party/dialogto 0,mediatypetoapplication/jsonforencoding: json, andstartto the vCon'screated_at. The WG schema requires these on every attachment.Dialog.to_dict()no longer emits emptymeta/metadata.uuid8_timenow records the last timestamp, so its monotonic guard works (also clears flake8 F824).tests/schema/).Release
python-publish.ymlruns onv*tag push instead ofrelease: published, and fails before publishing if the tag does not matchpyproject.toml.version-checkjob comparespyproject.toml,setup.pyand the newest CHANGELOG heading. The package workflow now also runs on pull requests.Breaking output shape
Callers that check for the absence of
party,dialog,startormediatypeon attachments, or decode inline bodies with a strict padded base64 decoder, will see a difference. SeeMIGRATION_GUIDE.md.Not in scope
add_wtf_transcription_analysis()still writes a JSON string body for an analysis entry.recording-setdialog type is not yet accepted byDialog; adapters currently patchVALID_TYPES.Tests
277 passed, 7 skipped (baseline 265).
🤖 Generated with Claude Code