cultnet: add unsupported_schema_version to the closed cultnet.error.v0 code set #26
Loading…
Reference in a new issue
No description provided.
Delete branch "libby/error-code-unsupported-schema-version"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steward ruling (a), follow-up
cultnet-py-peer-error-code-outside-enum: addunsupported_schema_versionto the closedcultnet.error.v0code set across C#, Rust, TypeScript and Python, each with a captured-bytes case.Shape:
code: "unsupported_schema_version",details: { field: "schemaVersion", value: <offered version> },routingHintnull,error: "unsupported_schema_version: <version>".Per runtime
cultnet-distributed-database.md: enum value,details.field/valuedescriptions, code list.CultNetErrorMessage.ForUnsupportedSchemaVersion; testErrorMessage_UnsupportedSchemaVersionRealBytes_MatchesItsSchemapins the serializer's bytes.CultNetErrorCode::UnsupportedSchemaVersion;error_message.rscaseunsupported_schema_versionwith the C# hex.CULTNET_ERROR_CODES, schema catalog, newunsupported_schema_version_errorbuilder;test_builder_produces_the_csharp_bytesasserts it equals the vector bytes.contracts/cultnet/interop/error-vectors.json: newunsupported_schema_versionvector (hex = C# serializer output, cross-checked by an independent msgpack encode).Behaviour change to flag
The Python interop peer and the cultmesh-py server used to answer a non-v0 message with a hand-built dict carrying
messageIdanddetails: {schemaVersion}, which the schema (additionalProperties false) does not allow. They now emit the contract shape through the builder, so that response no longer carriesmessageId. Tests updated accordingly. Other hand-built Python errors (malformed_document_putetc.) are untouched and still outside the enum; separate follow-up.Tests used
unsupported_schema_versionas the example of an unknown code; they now usenot_a_code.Local results (main
0fd9d255+ this, default build dirs)CultNetSchemaContractTests: 13 passed (incl. the new bytes test).error_message: 4 passed (incl. the new case via both the inline and file vectors).Address already in usein a RUDP port-binding test).esbuild bundles dist/content.js with platform 'browser', is my workspace's stray emptypackage.jsonabove the checkout, unrelated to this change.CI runners are stuck, so local only. Not merged.
🤖 Generated with Claude Code
Ruling (steward): add the code across C#, Rust, TypeScript and Python, each with a captured-bytes case. details = { field: "schemaVersion", value: <offered version> }, no routingHint. - schema (both copies), C# ForUnsupportedSchemaVersion + CultNetErrorCode.UnsupportedSchemaVersion in Rust, TS code list, Python CULTNET_ERROR_CODES and schema catalog. - bytes: error-vectors.json gains unsupported_schema_version (C# serializer output, checked by the C# test, the Rust error_message.rs case, and the TS/Python vector tests; the Python builder reproduces them). - cultnet-py interop_peer and cultmesh-py server now answer with the contract-shaped error (no extra messageId, details {field,value}) via messages.unsupported_schema_version_error. - tests that used unsupported_schema_version as the example of an unknown code now use not_a_code. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>