closedhumanPR #19Communication

feat(comms): versioned message envelopes with forward/backward compat…

- plugin: VersionedComms (registered as comms/versioned)

Author

Status
Closed without merging
Opened on
Jun 5
Branch
hackathon/mahesh-comms-schema-versioning

Description

The pitch.

- plugin: VersionedComms (registered as comms/versioned)
- scenario: comms_versioning + factory (mixed v1/v2 senders, a forwarder that round-trips each envelope through comms, a sink) -> scenarios/comms_versioning.yaml
- validators: 3 adversarial checks (schema_version present, unknown-field preserved, unsupported-major rejected) -- FAIL on nest_native, PASS on versioned
- tests: 17 new (plugin round-trip / forward / backward / major-safety + validators)

Deterministic across seeds 42/7/1337. DoD green: ruff check, ruff format, pyright (0 errors), pytest (356 passed).

## Summary by Sourcery

Introduce a versioned comms plugin and scenario to exercise schema-versioned JSON message envelopes and validate cross-version compatibility and safety.

New Features:
- Add a VersionedComms plugin that serializes messages as schema-versioned JSON envelopes with forward, backward, and major-version safety semantics.
- Add a comms_versioning scenario and YAML configuration to simulate mixed-version agents communicating through the configured comms plugin.

Enhancements:
- Add comms_versioning validators to assert schema_version presence, preservation of unknown fields, and rejection of unsupported major versions.
- Register the new comms plugin and scenario in the core plugin and scenario registries.

Tests:
- Add unit tests for the VersionedComms plugin covering round-trip behavior, forward compatibility, backward compatibility, and major-version rejection semantics.
- Add tests for comms_versioning validators to ensure they pass on versioned traces and fail on legacy nest_native-style traces.
- Extend validator registration tests to cover the new comms_versioning validator group.

Try it

Open PR on GitHubView diff

Checkout locally

git fetch origin pull/19/head:pr-19
git checkout pr-19