Skip to content

Allow a url without content_hash (parity with vcon 1.0.6) - #11

Merged
howethomas merged 1 commit into
mainfrom
url-without-hash-1.0.6
Nov 20, 2026
Merged

howethomas merged 1 commit into
mainfrom
url-without-hash-1.0.6

Conversation

@howethomas

Copy link
Copy Markdown
Contributor

Follows the IETF vCon WG direction on draft-ietf-vcon-vcon-core#40 and matches the Python reference vcon 1.0.6.

  • A url without a content_hash on a Dialog, Attachment or Analysis: no error and no warning. The old warning ("... has a url but no content_hash (an external reference MUST have both; this will be an error in vcon 1.1).") is gone.
  • Attachment content rule: Attachment at index N must include body+encoding or url. (was ... or url+content_hash.).
  • Dialog.validate() / Attachment.validate() no longer require a content_hash with a url; a malformed one is still rejected.
  • Unchanged: a malformed content_hash is an isValid() error; redacted_from / amended_from with a url still need a content_hash.
  • Tests, CHANGELOG (unreleased 1.0.0), README and CLAUDE.md updated.

Parity against vcon 1.0.6 (Vcon(d, migrate_legacy=False).is_valid() and get_validation_warnings()), verdicts, errors and warnings in the same order:

Corpus Files Identical
real-world + Appendix B corpus 257 257
synth cases (1.0.4) 147 147
synth cases (1.0.5, JWS/JWE) 176 175
url/content_hash cases (1.0.6) 23 22

The two differences are the known 0.4.0 message, which names each library's own migrate function (migrate040To050() vs migrate_0_4_0_to_0_5_0()).

Not published to npm.

…vcon 1.0.6)

Follows the IETF vCon WG direction on draft-ietf-vcon-vcon-core issue #40 and
the reference library vcon 1.0.6: no error and no warning for a url without a
content_hash. An Attachment needs body+encoding or url. Dialog.validate() and
Attachment.validate() drop the same requirement but still reject a malformed
content_hash; redacted_from / amended_from with a url still need one.
@howethomas
howethomas merged commit 411d534 into main Nov 20, 2026
2 checks passed
@howethomas
howethomas deleted the url-without-hash-1.0.6 branch November 20, 2026 23:48
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