CultLib/packages/cultnet-rs/CHANGELOG.md
Libby 8f71bff69c cultnet error contract: one message_invalid code replaces malformed_document_put/delete
Q6-A of docs/cultnet-error-contract-cut.md. message_invalid joins the closed
cultnet.error.v0 code enum (both schema copies), with details.field naming the
request field at fault ("message" when the whole frame cannot be read).
C# ForMessageInvalid, Rust CultNetErrorCode::MessageInvalid, TS
cultNetMessageInvalidError and Python message_invalid_error all write the same
captured bytes (error-vectors.json plus the C# and Rust cases). cultmesh-py and
cultmesh-ts refuse malformed puts and deletes with it; the C# subscription
servers use it for the missing subscriptionId.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 09:14:12 +00:00

4 KiB

Changelog

All notable changes to cultnet-rs are recorded here, following Keep a Changelog. Earlier releases are recorded only in git history.

Unreleased

Added

  • CultNetErrorCode::MessageInvalid (message_invalid), the code for a request that lacks a required field or carries an ill-typed one; a captured-C#-bytes case pins it.
  • The provider half of gamecult.runtime_presence_health.v2 for Idunn-managed Rust services, in one module that builds and runs on every platform an Idunn driver launches (unix under Idunn's systemd driver, Windows under its host driver). IdunnRuntimeAuthority::open(target, health_contract, credentials) reads the runtime bundle, the candidate bind and the write lease from the launch environment Idunn set (no caller supplies a path) and checks every binding Idunn expects (target and health contract, activation bound to Expected, both signing credentials, the write-lease and candidate-bind environment; the candidate bind must equal Expected's route exactly). The credentials' delivery decides the custody the bundle is held to: IdunnRuntimeCredentials::from_systemd_descriptors (unix; found by name per sd_listen_fds_with_names(3), LISTEN_PID or the PrivatePIDs pid-1 rule, root-owned 0400 single-link read-only files, close-on-exec, LISTEN_* removed from the environment) carries root custody (bundle directory, expected.cc, activation.cc, their .lock siblings and every parent root-owned, not group- or world-writable, no symlinks, and the same for the write lease), while from_host_environment (the host driver's files; the provider identity is opened before the one-shot activation credential is read and removed, and a refusal leaves the credential in place) carries profile custody on every platform (the bundle is a real directory of real files, never a link: std's is_symlink refuses symlinks and, on Windows, junctions). No refusal names a path; an unreadable store is reported by its failure kind alone (not decodable, unsupported format, not found, permission denied, I/O error). IdunnRuntimePresenceSigner takes the authority by value, owns the reported health (RuntimePresenceState, starting Warming; report_health), signs validated presence records with sign / sign_at (returning SignedRuntimePresence: record, raw CultNet document and canonical digest), holds Idunn's process write lease through a ProcessWriteLeaseGuard (unix only; try_acquire_write_lease; the guard holds the lease's .lock shared and require_current detects replacement; a runtime whose Expected requires a lease is refused at open elsewhere with write_lease_required), keeps signing Failed, without a lease digest, after the lease is lost, and answers Idunn's route challenge from local authority with answer_route_observation. The module owns no network. No wire bytes change: its output passes authenticate_runtime_presence_claim and correlate_runtime_presence_claim. New unix-only dependencies: libc, fs2.
  • The launch-contract names both sides of an Idunn launch read: IDUNN_RUNTIME_BUNDLE_ENVIRONMENT, IDUNN_RUNTIME_CANDIDATE_BIND_ENVIRONMENT, IDUNN_PROCESS_WRITE_LEASE_ENVIRONMENT, IDUNN_ACTIVATION_CREDENTIAL_ENVIRONMENT, RUNTIME_PRESENCE_IDENTITY_BINDING and RUNTIME_PRESENCE_IDENTITY_FD_NAME.
  • Version 0.3.0: the unreleased register and CultMeshCdnChunkRef breaking changes below follow the 0.y.z minor lane.

Breaking

  • CultNetDocumentRegistry::register returns Result<&mut Self> where it returned &mut Self. A binding that claims a document type or a schema id another binding already holds is refused with cultcache_rs::SchemaConflictError (naming the new binding's schema id and both document types) and nothing is bound; binding a type to the schema id it already holds still replaces that binding. Callers chain register(...)?.
  • CultMeshCdnChunkRef gains a public id field, the decimal text of offset (the reference's element id, slot 4). A manifest written before ids reads ""; encoding writes the slot.