Delete the persisted-behaviors feature per operator ruling

Operator ruling (docs/item-provenance-cut.md Progress header, 2026-09-17):
delete EntityPack.PersistedBehaviors, IPersistentBehavior,
PersistentBehaviorData and MarkerPersistentBehaviorData outright rather than
keep patching around a feature with no production writer. Key(5) is retired
and left unused; other MessagePack keys are untouched.

Removes the pack/unpack code that read and wrote the field, the feature-only
test ReopenedPackKeepsPersistedBehaviors and its BarePack initializer, and the
matching "not yet reached" mutation notes in tests/mutation_tests.py.
ReopenSurvivesAGeneratedShipWithEntities is kept: it pins the reopen defect
class against a real generated ship, independent of this feature.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-17 05:44:37 +02:00
commit 8fe09a2303
5 changed files with 4 additions and 101 deletions

View file

@ -129,33 +129,11 @@ public interface IOrderedBehavior
int Order { get; }
}
public interface IPersistentBehavior//<T> where T : IBehavior
{
PersistentBehaviorData Store();
void Restore(PersistentBehaviorData data);
}
public interface IPopulationAssignment
{
int AssignedPopulation { get; set; }
}
[MessagePackObject,
JsonObject(MemberSerialization.OptIn),
Union(0, typeof(MarkerPersistentBehaviorData))]
public abstract class PersistentBehaviorData
{
}
// No IBehavior implements IPersistentBehavior yet, so this abstract type has no production writer. This one
// concrete leaf exists so the wire format (EntitySerializer's PersistedBehaviors pairs array) can be exercised by
// tests ahead of a real persistent behavior landing.
[MessagePackObject]
public class MarkerPersistentBehaviorData : PersistentBehaviorData
{
[Key(0)] public int Value;
}
[Inspectable,
Union(0, typeof(GuidedWeaponData)),
Union(1, typeof(LauncherData)),