Migration guide: 0.x to 1.0¶
SYNAPSE CHANNEL 0.x releases are pre-1.0 development releases. The 1.0
line makes the documented public surfaces stable: the package export facade, the
wire message vocabulary, the federation consumer primitives, and the classified
CLI tiers.
This guide is for operators who pin SYNAPSE in local hubs, fleet waiters, automation scripts, or out-of-tree integrations.
What stays stable¶
The stable contract is guarded in CI:
- Package exports:
synapse_channel.__all__, pinned bytests/test_public_api.py. - Wire vocabulary:
MessageTypename/value pairs, reserved envelope keys, andWIRE_PROTOCOL_VERSION, pinned bytests/test_wire_surface_freeze.py. - Federation primitives: out-of-tree imports listed in
tests/test_federation_consumer_contract.py. - CLI tiers: subcommand classification in
synapse_channel.surface_taxonomy, checked bytests/test_surface_taxonomy.py. - Capability counts:
tools/capability_manifest.py --check.
The wire-protocol integer is independent from the package version. A 1.0 package
may still speak wire protocol 2; only wire-incompatible changes bump
WIRE_PROTOCOL_VERSION.
Before upgrading¶
- Record the installed version and hub health:
synapse --version
synapse doctor
- Stop long-running fleet waiters cleanly, then upgrade the package in the environment that owns the hub and in each waiter environment:
python -m pip install --upgrade synapse-channel
For pipx installs:
pipx upgrade synapse-channel
-
Restart the hub first, then restart waiters. Mixed
0.xand1.0peers may connect if their wire versions overlap, but a single fleet should converge on one package line before release or sustained soak work. -
Re-run:
synapse --version
synapse doctor
synapse who
Integration checks¶
For Python integrations, import only names from synapse_channel.__all__ or the
documented deep federation primitives. Treat any other deep import as private
unless a guide names it.
For wire clients:
- Read the hub's
protocol_versionfrom thewelcomeframe or/health. - Accept the negotiated-down version reported by the client or multi-hub fetcher.
- Do not assume package version and wire version are the same value.
- Keep unknown fields in envelopes and JSON documents non-fatal unless the specific command documents a closed schema.
For CLI automation:
- Prefer stable-tier commands for daily operations.
- Pin exact package versions when using
experimentalcommands. - Review the changelog for any
0.xcommand-shape changes before upgrading.
Store and dashboard checks¶
The event store remains SQLite/WAL. Before a release cut or fleet upgrade, keep a copy of the hub database and verify the read-side feeds you rely on:
synapse event-query ./hub.db "universal-receipts all" --json
synapse causality ./hub.db --json
synapse reliability ./hub.db --json
For dashboards started with --feeds-db, verify the durable feed endpoints after
the hub upgrade:
/events.json/state-at.json/receipts.json/operator-actions.json/reliability.json
When an upgrade fails¶
- Keep the database copy.
- Capture
synapse doctorand the hub startup error. - Downgrade only the package, not the database file, unless the changelog says a migration changed the store format.
- File the failure with the package version,
WIRE_PROTOCOL_VERSION, command line, and the smallest event-store excerpt that reproduces the read-side problem.
Release-cut checklist¶
Before declaring a 1.0 upgrade complete:
tests/test_public_api.pypasses with the exact export list.tests/test_wire_surface_freeze.pypasses with the exact wire map.tests/test_federation_consumer_contract.pypasses.tools/capability_manifest.py --checkpasses.mkdocs build --strictincludes this guide.- The fleet's hub and waiters report the intended package version.