Knotrel Docs

Compatibility and deprecation policy

Status: APPROVED by the maintainer on 2026-11-21 (roadmap item 0.9.4); applies from v0.9.0. It implements readiness criterion 2 of the v1.0 assessment. Which surfaces are stable is listed in stability.md.

1. Versions

2. Stability classes

Class Promise May change
Stable Kept compatible as defined below; removed only after deprecation (section 4) Additively
Experimental Documented and supported, but may change or be removed in any minor release; each such change is listed in the release notes Anytime in a minor release
Internal No promise; not documented as an interface (test helpers, log text, help strings, file layouts) Anytime

New surfaces may start as experimental. Promotion to stable is recorded in the release notes and in stability.md. Every surface that is not listed is internal. An engine may be experimental as a qualification while its interfaces are Stable (section 2.2).

2.1 Guarantees of experimental items

An experimental item (Rust item, HTTP route, field, error code, variable value or metric label value) is:

Because the tools do not know the classes, removing an experimental Rust item still fails cargo-semver-checks. Such a removal is declared for one release only:

  1. the crate’s [package.metadata.cargo-semver-checks.lints] allows the failing lint, and a matching [[semver_exception]] entry in docs/api/public-api-policy.toml names the crate, the lint, the removed items, the decision and the release that ships the removal (until);
  2. the public API check (section 6) is the per-item guard while the lint exception exists: the snapshot diff shows exactly what was removed, and any stable item or implementation that is removed or narrowed without its own approved [[narrowing]] entry fails, whatever the crate-wide lint allows;
  3. once the workspace version is past until, the check fails until the lint and the entry are removed, so no exception outlives its release.

Removing an experimental HTTP element that OpenAPI does not mark x-knotrel-stability: experimental is listed in docs/api/approved-breaking-changes.yaml (section 6). These declarations document the change; they need no deprecation window.

2.2 Stable interface, experimental engine

Experimental engine is a qualification of an engine, not a fourth class: every interface of such an engine is classified Stable and follows the Stable promise of section 3 in full. The qualification says that the engine’s performance, maturity and usage recommendation carry no promise. It applies to the two non-default engines (maintainer decisions of 2026-11-22, freeze review), with their methods, fields and trait implementations (stability.md):

It promises, for the whole 1.x series:

It does not promise:

3. What “compatible” means

Rust crates (stable items). No item removed or renamed, no signature narrowed, no trait bound added, no enum made exhaustive or variant removed, no change of documented behavior or error contract. Additions are allowed, including new methods, new variants of #[non_exhaustive] enums, new fields of #[non_exhaustive] structs and new optional configuration. #[non_exhaustive] only permits these additions: it does not authorize removing or renaming a public variant, field or engine, which stays a breaking change under section 4 (only items classified Experimental follow section 2.1; the stable interfaces of an experimental engine, section 2.2, do not). The types that stay exhaustive are listed in stability.md.

Diagnostic values. Some stable structs report counters or storage figures: LifecycleStorage (from LifecycleGraph::storage_stats), ForestStats, HdtStats, HdtStorageStats and HdtLevelStorage. For them the stable contract is the field set, each field’s type, meaning and unit (counts or bytes, as documented), when the values are computed, and the properties their rustdoc lists under “Guaranteed” (equalities with the graph’s counts, sums, bounds, orderings, reset and saturation behavior). The exact numbers, capacity growth and retention, allocator and standard-library effects are listed under “Implementation-dependent”: they may change in any release, including a patch release, and such a change is not breaking. Breaking a guaranteed property is.

Public dependencies. knotrel-server’s stable API exposes axum::Router (axum 0.8) and tokio::net::TcpListener (tokio 1); these dependency versions are part of that API (stability.md). An upgrade of either to an incompatible version requires a SemVer assessment of Knotrel, recorded in the release notes; from 1.0 it is released as a major version unless the assessment shows the public API unchanged. Each crate declares its MSRV in rust-version: knotrel-core 1.98.1 and knotrel-server 1.100.0 (inherited from the workspace). Either is raised only in a minor release and announced in its notes. The toolchain used to develop the workspace is a separate development setting, not a promise.

HTTP API /v1 (stable routes). Changes inside /v1 are additive only:

Clients must ignore unknown response fields and handle unknown error codes as errors of their status class. Error message texts are internal.

Configuration. A stable KNOTREL_* variable keeps its name, accepted values and default; a new variable has a default that preserves previous behavior. A renamed variable keeps its previous name as a deprecated alias (section 4), with a documented rule for when both names are set: the console’s KNOTREL_UPSTREAM and KNOTREL_UPSTREAM_TIMEOUT are such aliases in 1.x (console.md). The KNOTREL_CONSOLE_ prefix and those two aliases belong to the console: the server never defines a setting under them and ignores them.

Metrics (GET /metrics, opt-in). Stable families keep their name, type, unit and label names; label values documented as a closed set are only extended. Help texts are internal.

Feeder protocol (integration contract). The request and response shapes, ordering, deduplication and readiness rules of the feeder routes follow the HTTP rules above.

Server and console. See section 5.

HTTP exceptions approved for v1.0.0. The maintainer approved these breaking HTTP changes on 2026-11-22 without the deprecation window of section 4 (contract freeze review, section 7); the release notes list them:

4. Deprecation

  1. A stable surface is deprecated in a release: the documentation marks it deprecated with its replacement, and the release notes list it. Rust items carry #[deprecated].
  2. It stays fully functional for at least one further minor release.
  3. Its removal is a breaking change: it happens only in a minor (before 1.0) or major (from 1.0) release, listed in the release notes.

Security fixes may shorten this when keeping the surface is unsafe; the release notes then say so.

5. Console and server compatibility

The console declares the servers it supports in console/package.json (knotrel.supportedServer, a semver range) and in docs/console.md.

Mandatory before every release, starting with v0.9.0:

  1. Run the console’s browser tests (npm run test:e2e) against a server built from the release candidate, and against the previous release’s server.
  2. Only then update knotrel.supportedServer to the versions verified, and the compatibility statement in docs/console.md; the range is never widened beyond what was tested.
  3. Record the result in the release notes.

The release checklist (AGENTS.md and the console release procedure) includes this step. The current range, and the servers it was verified against, are stated in docs/console.md; for 1.0 it is set by this check against the release candidate and the 0.9.x server.

6. Enforcement

7. What this does not cover

The PostgreSQL reference feeder (integrations/postgres-feeder) and other examples are examples: their code, configuration and output carry no stability promise. Persistent formats do not exist (Knotrel keeps no state on disk). Performance is not part of compatibility; it is reported per release in performance by version.