Skip to content

docs: explain is_compatible differences between vault-registry and access-lease/subscription - #144

Merged
Busiii-adetiba merged 2 commits into
SynapsVault:mainfrom
adenueltech:docs/issue-115-is-compatible
Oct 17, 2026
Merged

Busiii-adetiba merged 2 commits into
SynapsVault:mainfrom
adenueltech:docs/issue-115-is-compatible

Conversation

@adenueltech

Copy link
Copy Markdown
Contributor

Closes #115

What changed

docs/CONTRACTS.md listed is_compatible in each contract's table but never explained that the vault-registry version answers a different question. This PR adds a Version compatibility checks section under Common conventions and links it from the Versioning convention row.

vault-registry access-lease, subscription
Signature is_compatible(version: String) is_compatible()
Input caller-supplied version the version stored in the contract
Rule major.minor prefix match exact string equality
false when empty, >32 bytes, or different major.minor nothing stored (never initialised) or any component differs

The section also includes:

  • Worked examples. For a compiled 0.2.1: registry accepts "0.2.0", but a lease contract with stored 0.2.0 reports incompatible.
  • When to use each: the registry check is for clients/tools and doesn't depend on storage, init or upgrades; the lease/subscription check is for spotting a stale deployment.
  • The practical consequence: after a patch-only upgrade, access-lease and subscription report false until migrate runs, while vault-registry keeps accepting clients on the same major.minor.

The behaviour described is taken from the entrypoints' rustdoc and the last commit where CI passed (fce5c0e), including the existing is_compatible tests (VERSION → true, "99.0.0" → false, "" → false).

Note for maintainers

CI on main has been failing since Oct 16 (e.g. access-lease/src/lib.rs:195: expected ';'). On current main the contracts also route get_version/is_compatible through common helpers whose signatures (u32-based) don't match the calls, so CI on this PR will fail for reasons unrelated to this docs-only change. Issue #44 ("unify semantics") was closed by a README-only change, so the two behaviours documented here are still the intended ones.

Docs only, no code changes. Merges cleanly with #143 (the #103 docs PR).

🤖 Generated with Claude Code

…cess-lease/subscription (SynapsVault#115)

Add a "Version compatibility checks" section to docs/CONTRACTS.md that
contrasts the two is_compatible variants: vault-registry takes a caller-
supplied version and compares major.minor with the compiled version, while
access-lease and subscription take no argument and require the stored
version to equal the compiled version exactly. Includes signatures, failure
cases, worked examples and when to use each, and links it from the
Versioning convention.

Closes SynapsVault#115

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@adenueltech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

…ns (SynapsVault#115)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Busiii-adetiba
Busiii-adetiba merged commit 1d762de into SynapsVault:main Oct 17, 2026
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.

[docs and tooling] docs/CONTRACTS.md describes is_compatible for access-lease and subscription but not the difference from vau...

2 participants