Commit graph Aetheria/tests/Aetheria.Shared.Tests/Aetheria.Shared.Tests.csproj
Author SHA1 Message Date
Meta Vens
b997b80f81 AetheriaBuild.Build: one player entry point; AetheriaStores.Open refuses a missing catalog
AetheriaBuild (Assets/Editor) sets the version, builds Addressables, builds the
Win64 player, stages GameData through PlayerStaging, publishes AetherDb to
ModTools and removes the Burst debug folder; any failure exits 1 naming the step.
PlayerStaging is Unity-free and linked into Aetheria.Shared.Tests. A read-only
AetheriaStores.Open of a nonexistent catalog throws.

Builds on the headless side; the Unity .meta files and the batchmode run follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:55:32 +02:00
Meta Vens
a5fb3b84d2 Cut 1 fix batch 3 (F1): load real GameplaySettings, fix the speed-cap test
RestoredHullsTests.Settings() hand-set thermal radiation/conduction at
their bare-class defaults (1/1/1) against the shipped 3 / 1e-8 / 0.01
(Assets/Resources/Settings.asset), so equipped parts froze toward 0 K on
real physics and every test built on that fixture ran on thermal behaviour
nobody ships. It now loads the real GameplaySettings through
AuthoredSettings (tools/AetherDb/AuthoredSettings.cs), the same headless
YAML reader tools/AetherDb already uses to inspect Settings.asset outside
Unity -- the tests project now references AetherDb.csproj to reuse it
instead of hand-copying the same fields a second time.

LonginusNeverExceedsItsRestoredTopSpeedUnderFullThrust no longer needs
OverrideShutdown to keep the ship flying (that was compensating for the
broken fixture shutting equipment down within ~1s); it now drives a
generated Longinus (seed-pinned, including ItemManager.Random, which
defaults to a DateTime.Now seed and was making item quality -- and so
the measured speed -- non-deterministic) for 5s, the window Soul measured
before this loadout's thrusters cross 386 K and shut down. The tolerance
is now asymmetric instead of the old +-10: +4 on the ceiling (the mixer's
own tick order settles real, unforced flight at the cap plus one tick's
acceleration, measured at ~103.3 for this loadout) and -3 on the floor
(tight enough to catch a nerfed TopSpeed catalog value, which +-10 or a
wider ceiling would not).

Every other test in the file now runs on real settings instead of the
frozen fixture; all 15 tests in RestoredHullsTests pass unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 01:48:58 +02:00
Meta Vens
c2026142be Pin AetheriaStores routing with tests; make PlayerSettings readable
Cut 8b. tests/Aetheria.Shared.Tests (xunit, net10.0) builds a temp-directory
catalog through AetheriaStores.Open(catalogWritable: true) per test:
- OpenThenFlushLeavesEveryFileByteIdentical: the catalog, plus run and
  player stores seeded with their globals, a SavedZone and an InputLayout.
- WeaponWrittenThroughGearHandleReloadsAsWeapon
- CatalogRefusesWrites: bytes unchanged too.
- SavedZoneNeverLandsInCatalog: no home without a run store; the snapshot
  schemas show where it landed.
- FactionIsASingletonInstance: through a ref, a ref-keyed map key, and the
  name index.
- MissingCatalogGlobalIsLoud: uses a test-only [CultGlobal] routed to the
  catalog. The game has no catalog globals yet.

The first test found a real defect. PlayerInputSettings.InputActionMap was
keyed by (string, int), and CultLib's untrusted-data MessagePack security
has no hash-resistant comparer for a tuple, so a player store could never
be read back. It is now action name to binding index to path; its two
Unity readers change in the Unity commit.

Each test was checked to fail with the rule it pins removed; see the
report.

Builds: Aetheria.Shared, AetherDb, Aetheria.Shared.Tests (6/6 pass).
Unity does not build yet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 19:12:54 +02:00