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>
4 KiB
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.v2for 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_PIDor thePrivatePIDspid-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.locksiblings and every parent root-owned, not group- or world-writable, no symlinks, and the same for the write lease), whilefrom_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'sis_symlinkrefuses 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).IdunnRuntimePresenceSignertakes the authority by value, owns the reported health (RuntimePresenceState, starting Warming;report_health), signs validated presence records withsign/sign_at(returningSignedRuntimePresence: record, raw CultNet document and canonical digest), holds Idunn's process write lease through aProcessWriteLeaseGuard(unix only;try_acquire_write_lease; the guard holds the lease's.lockshared andrequire_currentdetects replacement; a runtime whose Expected requires a lease is refused atopenelsewhere withwrite_lease_required), keeps signing Failed, without a lease digest, after the lease is lost, and answers Idunn's route challenge from local authority withanswer_route_observation. The module owns no network. No wire bytes change: its output passesauthenticate_runtime_presence_claimandcorrelate_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_BINDINGandRUNTIME_PRESENCE_IDENTITY_FD_NAME. - Version 0.3.0: the unreleased
registerandCultMeshCdnChunkRefbreaking changes below follow the 0.y.z minor lane.
Breaking
CultNetDocumentRegistry::registerreturnsResult<&mut Self>where it returned&mut Self. A binding that claims a document type or a schema id another binding already holds is refused withcultcache_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 chainregister(...)?.CultMeshCdnChunkRefgains a publicidfield, the decimal text ofoffset(the reference's element id, slot 4). A manifest written before ids reads""; encoding writes the slot.