cultnet: add unsupported_schema_version to the closed cultnet.error.v0 code set #26

Merged
libby merged 2 commits from libby/error-code-unsupported-schema-version into main 2026-11-07 16:16:17 +00:00
Member

Steward ruling (a), follow-up cultnet-py-peer-error-code-outside-enum: add unsupported_schema_version to the closed cultnet.error.v0 code set across C#, Rust, TypeScript and Python, each with a captured-bytes case.

Shape: code: "unsupported_schema_version", details: { field: "schemaVersion", value: <offered version> }, routingHint null, error: "unsupported_schema_version: <version>".

Per runtime

  • Schema (both copies) and cultnet-distributed-database.md: enum value, details.field/value descriptions, code list.
  • C#: CultNetErrorMessage.ForUnsupportedSchemaVersion; test ErrorMessage_UnsupportedSchemaVersionRealBytes_MatchesItsSchema pins the serializer's bytes.
  • Rust: CultNetErrorCode::UnsupportedSchemaVersion; error_message.rs case unsupported_schema_version with the C# hex.
  • TypeScript: code list entry; the vector loop covers decode/re-encode.
  • Python: CULTNET_ERROR_CODES, schema catalog, new unsupported_schema_version_error builder; test_builder_produces_the_csharp_bytes asserts it equals the vector bytes.
  • contracts/cultnet/interop/error-vectors.json: new unsupported_schema_version vector (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 messageId and details: {schemaVersion}, which the schema (additionalProperties false) does not allow. They now emit the contract shape through the builder, so that response no longer carries messageId. Tests updated accordingly. Other hand-built Python errors (malformed_document_put etc.) are untouched and still outside the enum; separate follow-up.

Tests used unsupported_schema_version as the example of an unknown code; they now use not_a_code.

Local results (main 0fd9d255 + this, default build dirs)

  • C# CultNetSchemaContractTests: 13 passed (incl. the new bytes test).
  • Rust error_message: 4 passed (incl. the new case via both the inline and file vectors).
  • Python cultnet-py 131 OK; cultmesh-py 108 OK on two runs (one earlier run hit a flaky Address already in use in a RUDP port-binding test).
  • TypeScript cultnet-ts: 263 of 264; the one failure, esbuild bundles dist/content.js with platform 'browser', is my workspace's stray empty package.json above the checkout, unrelated to this change.

CI runners are stuck, so local only. Not merged.

🤖 Generated with Claude Code

Steward ruling (a), follow-up `cultnet-py-peer-error-code-outside-enum`: add `unsupported_schema_version` to the closed `cultnet.error.v0` code set across C#, Rust, TypeScript and Python, each with a captured-bytes case. Shape: `code: "unsupported_schema_version"`, `details: { field: "schemaVersion", value: <offered version> }`, `routingHint` null, `error: "unsupported_schema_version: <version>"`. ## Per runtime - Schema (both copies) and `cultnet-distributed-database.md`: enum value, `details.field/value` descriptions, code list. - C#: `CultNetErrorMessage.ForUnsupportedSchemaVersion`; test `ErrorMessage_UnsupportedSchemaVersionRealBytes_MatchesItsSchema` pins the serializer's bytes. - Rust: `CultNetErrorCode::UnsupportedSchemaVersion`; `error_message.rs` case `unsupported_schema_version` with the C# hex. - TypeScript: code list entry; the vector loop covers decode/re-encode. - Python: `CULTNET_ERROR_CODES`, schema catalog, new `unsupported_schema_version_error` builder; `test_builder_produces_the_csharp_bytes` asserts it equals the vector bytes. - `contracts/cultnet/interop/error-vectors.json`: new `unsupported_schema_version` vector (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 `messageId` and `details: {schemaVersion}`, which the schema (additionalProperties false) does not allow. They now emit the contract shape through the builder, so that response no longer carries `messageId`. Tests updated accordingly. Other hand-built Python errors (`malformed_document_put` etc.) are untouched and still outside the enum; separate follow-up. Tests used `unsupported_schema_version` as the example of an unknown code; they now use `not_a_code`. ## Local results (main 0fd9d255 + this, default build dirs) - C# `CultNetSchemaContractTests`: 13 passed (incl. the new bytes test). - Rust `error_message`: 4 passed (incl. the new case via both the inline and file vectors). - Python cultnet-py 131 OK; cultmesh-py 108 OK on two runs (one earlier run hit a flaky `Address already in use` in a RUDP port-binding test). - TypeScript cultnet-ts: 263 of 264; the one failure, `esbuild bundles dist/content.js with platform 'browser'`, is my workspace's stray empty `package.json` above the checkout, unrelated to this change. CI runners are stuck, so local only. Not merged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultnet: add unsupported_schema_version to the closed cultnet.error.v0 code set
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Has been cancelled
0bffcf0f9f
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>
Merge remote-tracking branch 'origin/main' into t26
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 6m33s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 25s
d18def46b3
libby merged commit ec7a009b02 into main 2026-11-07 16:16:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!26
No description provided.