Commit graph Thing/packages/GameCult.Thing.Contract/Command.cs
Author SHA1 Message Date
Meta Vens
19f8d9aeff GameCult.Thing.Contract: Command.cs names System for ReadOnlyMemory<byte>
The previous two commits do not build: Command.cs lacked the using. This one
restores the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 04:19:32 +02:00
Meta Vens
4f87e5c5bf GameCult.Thing.Contract: RecordPayload.Bytes is a copied ReadOnlyMemory<byte>; array arguments and decoded lists pinned
Under thing2:ruling:payload-bytes-read-only the payload holds a copy made at
construction (wire bytes unchanged). New tests: a T[] argument (including
through Builders.Boxed) is copied; no list of any decoded golden is writable;
a caller's buffer written after construction does not change the payload. The
byte[] exemption in the mutable-collection scan is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 04:17:03 +02:00
Meta Vens
ee80246cd0 GameCult.Thing.Contract: nil refused in every required slot, lists read-only, slot 2 is InputKind
ThingDomain.Present and Items; every constructor, factory and key builder passes each non-nullable
reference parameter through Present (refusal names the slot, never a value) and each list through
Items (a private read-only copy, nil items refused). Lists are IReadOnlyList on every type.
TextInputNode's slot 2 property and parameter are InputKind, matching Rust input_kind.
Tests: NilPositionTests reads the Rust vector row by row; PresenceTests and ReadOnlyListTests
walk every door by reflection; InputKindNameTests. NameSetTests and the unit-arm rewrite follow.
Unit-arm statics are still present in this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:18:45 +02:00
Meta Vens
33eed442c7 GameCult.Thing.Contract: the gamecult.thing.* wire types for .NET, every door through a validating constructor
One C# type per Rust type, keys in the crate's slot order. Unions are abstract classes with an
internal constructor and sealed arms; unit arms are shared instances. ThingDomain owns the four
domains and ThingKeys the key grammar. CommandResult is built by four factories only; its
constructor is private. Builds against CultLib b3bd8dd5 through CultLibRoot. Tests follow in the
next commit; this one builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 08:37:04 +02:00