Commit graph

2,043 commits

Author SHA1 Message Date
Meta Vens
46efccbec8 Record the Cut C follow-up and close the provenance schema cut
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:47:33 +02:00
Meta Vens
5e9634efcd Pin Brand's same-maker tie-break with a test and a mutant
Brand()'s ordering by record key was only exercised indirectly, through
a test that gives each candidate product a different maker. Add a test
with two FactionProductData for the same maker and same design, distinct
record keys, asserting Brand returns the one first in record-key order.

Add the corresponding mutant (OrderBy -> OrderByDescending at Brand's
ordering) to mutation_tests.py so a regression there gets caught.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:42:48 +02:00
Meta Vens
fc1c0526fe Census: list every distinct maker, don't invent a single one
MakerOf picked the first product for a design from any maker, the same
tie-break Brand() uses to resolve a runtime item's actual attribution.
That made census silently agree with an attribution it has no business
asserting on its own. Census's job is to report what the catalog says,
including when a design has more than one seller.

MakerOf now lists every distinct maker that sells a design (via its
products, manufacturer set), in record-key order, or "(none)" when no
product sells it. The existing duplicate (maker, design) detector is
unchanged. Verified byte-identical `census` output before and after,
since today's catalog has no design with two makers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:42:37 +02:00
Meta Vens
40055024b5 Record Soul passing provenance Cut C
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:37:11 +02:00
Meta Vens
7941aec861 Record role authoring as required Terminus content
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:35:47 +02:00
Meta Vens
0de7453953 Record the stats and power design direction as a target
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:31:37 +02:00
Meta Vens
847cb9c22c Record provenance Cut C landed
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:16:17 +02:00
Meta Vens
b2036fb8f1 Cut C: rewrite the catalog to clear the Manufacturer slot's drift
Probe Q3's body: re-upsert every stored ItemData with its own key in one
commit, through a throwaway scratch console (not part of the repo). Every
record schema-migrated from key 3 (Manufacturer) as an ignored extra slot
after the field's deletion; the rewrite clears that, matching the probe.

115 ItemData records rewritten, 12,686,267 -> 12,683,061 bytes. Reopening
reports 0 ignored-extra-slot migrations across all 180 stored records.
AetherDb factions/dangling/station-fit/loadout-1/hardpoint-fit are byte
identical before and after; census is also identical, because every design's
old Manufacturer field already agreed with the product that sells it (probe
Q1: 0 designs with more than one maker, 0 unset-maker products).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:09:43 +02:00
Meta Vens
333a73709a Cut C: delete ItemData.Manufacturer, derive census makers from products
The manufacturer does not belong to a design (operator ruling); it lives on
FactionProductData and branding is derived, never stored on the design.

- Delete ItemData.cs key 3 (Manufacturer), with a retired-key comment.
- AetherDb census now attributes a design's maker to the first product (in
  record-key order) that sells it, matching ItemManager.Brand's rule; a
  design no product sells shows "(none)".
- AetheriaStoresTests' catalog fixture moves its Manufacturer reference onto
  a FactionProductData selling the design, and FactionIsASingletonInstance
  reads it from there.
- mutation_tests.py gets a paired mutation for that fixture wiring.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:03:15 +02:00
Meta Vens
976e80d782 Record fork E as ruled: keep every weapon and behavior type
Today's catalog is the post-breach minimum, not the consumer set. Fire control
must map every behavior type.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 11:59:53 +02:00
Meta Vens
d78945f66b Record fork T as ruled: targeting system is interior Tool gear
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 11:56:50 +02:00
Meta Vens
8c74856d44 Record persisted behaviors deleted; Cut C next
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:48:46 +02:00
Meta Vens
8fe09a2303 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>
2026-09-17 05:44:37 +02:00
Meta Vens
f9b6263d3d Record Soul passing the Cut B fix batch
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:40:07 +02:00
Meta Vens
59fda60cf2 Record the ruling to delete persisted behaviors
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:28:03 +02:00
Meta Vens
aa96f2ecb4 Record fork W as ruled: per-hardpoint arc override, turrets 360
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:24:54 +02:00
Meta Vens
bf6edcaafe Record the Cut B fix batch and the dead persisted-behavior finding
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:24:30 +02:00
Meta Vens
c2ff543109 Fix F5: mutation_tests.py normalizes line endings and stops counting compile errors as kills
Anchors were authored with bare "\n" and this checkout is CRLF, so every
multi-line anchor matched zero times and aborted before ever mutating
anything. detect_newline() reads each file's own line ending and
translates both anchor and replacement to it before matching, counting
and writing back; the untouched bytes around the match are written
through unchanged, so the restore stays byte-exact.

run_test() now distinguishes a build failure ("Build FAILED"/"error CS"
in the dotnet test output, which never reaches "Passed!"/"Failed!") from
a genuine test failure. A build failure reports ERROR and is never
counted as a kill, since the mutation may have broken something the
target test never got a chance to exercise. Verified with a deliberate
syntax-breaking mutation, run standalone and reverted (not committed).

Added mutants for F1-F4's rules (docs/item-provenance-cut.md, Cut B, and
its F1 ruling). Two of Cut 0's named F1 mutations ("pack drops data",
"unpack ignores the lookup") are not included: no IBehavior implements
IPersistentBehavior, so Pack's filter and Restore's lookup are always
fed an empty set and mutating either body is unobservable through any
live path. Recorded as not yet reached in the script's own comment
rather than paired with a test that can't tell the difference.

Ran on this checkout (CRLF, HEAD 080d3b49) against the CultLib a0813c6
worktree: all 17 mutations behaved as expected (16 KILLED, 1 GREEN
control), run window 2026-09-17T03:18:14Z-03:20:46Z UTC.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:22:40 +02:00
Meta Vens
090d5554c6 Record that the simulation is 2D and arcs are planar by rule
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:15:40 +02:00
Meta Vens
a5c108866a Map per-hardpoint firing arcs from item rotation
Imagination pass. Mount direction is Entity.Direction rotated by the item's
rotation; FiringArc 120 is one GameplaySettings default; the check is planar;
HardpointTransforms and the .99 aim checks are deleted. Fork W (turrets) open.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:15:09 +02:00
Meta Vens
6963ac7a74 Record the arc default and rotation-derived mount direction
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:12:53 +02:00
Meta Vens
080d3b492c Fix F6: update the stale RunSave.Clear comment to include the ledger
Clear removes every record IsRunRecord names, and RunTypes has included
ProvenanceLedger since Cut B; the comment listed only the four earlier
run record types.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:12:31 +02:00
Meta Vens
561c5b8564 Fix F4: cover GetPrice, the durability/thermal exponent paths, role fills, Produced brand, and multi-zone GC roots
Adds tests for behavior that Cut B shipped without coverage:
- GetPriceReadsLotQuality: price varies with the lot's quality through
  GameplaySettings.QualityPriceModifier.
- EvaluateDurabilityExponentReadsLotQuality: ItemManager.Evaluate's
  durability exponent path reads the lot's quality independently of the
  quality-for-role term.
- EquippedItemThermalExponentReadsLotQuality: EquippedItem's thermal
  exponent (Entity.cs) reads the lot's quality on a real equip.
- CreateLotFillsRolesFromProductSpread: CreateLot(product) fills role
  quality from the product's own per-role spread, not the design default.
- BrandReadsProducedFaction: Brand resolves the maker off a Produced
  origin, not only Attributed.
- CommitTakesRootsFromEveryZone (RunSaveTests): GC roots are collected
  from every committed zone, not only the first.

All six verified by mutation (GetTier/Evaluate/CreateLot/Brand paths
patched to ignore the lot or return a fixed value; RunSave.Commit's roots
truncated to zones.Take(1)) and reverted after confirming the kill.
42 of 42 tests pass on the real code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:11:43 +02:00
Meta Vens
cb2febec90 Fix F3: two tiers and a no-reroll check in StatsReadTheLot
A single-tier fixture cannot fail "GetTier ignores lot quality": every
lot resolves to the only tier regardless of its own Quality. Added a
second tier (Rare, threshold .5) and a second lot whose quality (.6)
lands in it, and asserted GetTier resolves each lot to its own tier.

Also asserts that minting a second instance from an existing lot does
not re-roll the lot's quality.

Verified by mutation, then reverted: GetTier hardcoded to a fixed
quality, and CreateInstance(int) re-rolling the lot's quality, both
fail this test. 36 of 36 tests pass on the real fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:05:09 +02:00
Meta Vens
cf4b9dd99b Record fork A as ruled: firing arcs are per hardpoint
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:04:44 +02:00
Meta Vens
4bda4c8dd9 Record fork F as ruled: resolve on arrival with deviation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:02:58 +02:00
Meta Vens
4fc9070b07 Fix F2: stop verifying the GC walk with itself in MaterializedLotsSurviveSaveAndReload
The test read reloaded instances through EntitySerializer.Items, the same
enumerator RunSave.Commit uses to compute GC roots. Dropping a root from
Items would silently agree with itself: the root's lot would never be
written, and the test would never look for it.

Rewritten to hand-mint one real lot per EntityPack root (Hull, Equipment,
CargoBays, DockingBays, CargoContents, Children, DockingBayContents)
through ItemManager, so the expected lot ids are known independently of
any enumerator, then read the reloaded pack's own fields directly.
Verified: reverting Items to skip the Equipment root now fails this test
with "Lot 2 is not in the provenance ledger" (previously green). Reverted
after confirming the kill; 36 of 36 tests pass on the real fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:02:48 +02:00
Meta Vens
b1c241fb82 Re-map playground Cut 2 as fire control with subsystem reveal
Imagination pass. Hits are rolled from targeting-system, sensor and weapon
spread factors; subsystems reveal between the armor and gear info thresholds;
Unity effects become presentation. Forks F, A, T, V, E, L await rulings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 05:01:27 +02:00
Meta Vens
e4df73e4fe Fix F1: PersistedBehaviors as a pairs array, per Cut 0's ruling
Dictionary<int2, PersistentBehaviorData[]> has no hash-resistant comparer
under CultCache's UntrustedData security, so any run store holding an
entity threw MessagePackSerializationException on reopen, even when the
dictionary was empty. EntityPack.PersistedBehaviors (key 5, unchanged)
becomes (int2 position, PersistentBehaviorData[] data)[], matching
Equipment/CargoBays/DockingBays. Pack writes pairs; Unpack builds a local
lookup before restoring behaviors.

PersistentBehaviorData had no concrete leaf and no Union, so nothing could
ever exercise its wire format; added MarkerPersistentBehaviorData as the
one placeholder leaf so ReopenedPackKeepsPersistedBehaviors can round-trip
real data ahead of a real IPersistentBehavior implementer landing.

Tests: RunSaveTests.BarePack uses an empty pairs array.
Added ReopenedPackKeepsPersistedBehaviors (a hand-built pack with two
positions, each with one persisted behavior, round-trips through commit
and reopen) and ReopenSurvivesAGeneratedShipWithEntities (a real ship from
LoadoutGenerator against a catalog fixture, committed into a SavedZone and
reopened, pinning the defect at the layer Soul's probe found it).
MaterializedLotsSurviveSaveAndReload and CommitKeepsOnlyReachableLots go
green; 36 of 36 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:58:15 +02:00
Meta Vens
562cdcf2b8 Record the subsystem-reveal targeting ruling
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:50:14 +02:00
Meta Vens
df4056123a Record the fire-control ruling: hits are rolled, not detected
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:49:13 +02:00
Meta Vens
1eb01a4277 Record the reopen-defect ruling: persisted behaviors as a pairs array
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:48:14 +02:00
Meta Vens
559db068b2 Map the headless playground cut
Imagination pass. Cut 0 makes runs reopenable; Cut 1 moves the run lifecycle
into a ServerShared Run owner; Cut 2 moves damage, death, loot and pickup out
of Unity; Cut 3 adds AetherDb play; Cut 4 adds smoke scenarios. Forks R, P, H,
D, S, N await rulings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:46:12 +02:00
Meta Vens
122769ff59 Record provenance Cut B landed and Soul's findings
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:45:45 +02:00
Meta Vens
1e647953e5 Add mutation tests proving Cut B's new rules fail under their own mutation
tests/mutation_tests.py applies each named mutation from the cut map's
Cut B table to an exact, unique source anchor, runs the one test that
must catch it, restores the file byte-for-byte, and reports kill/survive.
A no-op control (anchor rewritten to itself) proves the read/replace/
restore path is transparent. Covers the four rules whose tests currently
pass: MissingLotIsLoud (indexer and Reachable throw on an absent lot),
MatchingHardpointsShareALot (same lot, not a fresh mint), Brand's and
Materialize's record-key order, and StatsReadTheLot (Evaluate reads the
lot's role fills, QualityForRole's fallback). All 8 mutations (7 rules
+ control) behave as expected.

MaterializedLotsSurviveSaveAndReload and CommitKeepsOnlyReachableLots
are not yet reached: they fail before any mutation is applied, blocked
by the CultLib int2 dictionary-key gap reported in the previous commit
and the landing report.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:22:29 +02:00
Meta Vens
76c331e9bc Test the lot ledger, its GC, and stats reading through it
Every existing ItemManager/RunSave.Commit call site now threads a
ProvenanceLedger. Five new tests and one rewrite cover the rulings this
cut lands: a materialized ship's lots survive a real save and reload
with unchanged quality and Attributed provenance; RunSave.Commit keeps
only lots reachable from a save's packed entities, closing over
Produced.Facility/Inputs, while the live ledger keeps everything;
ProvenanceLedger's indexer and Reachable are loud on a missing lot;
matching hardpoints mint from the same lot; Evaluate/GetTier read a
lot's Quality and per-role fills; and Brand's first-in-key-order rule
is asserted directly instead of through the old Product field.

Two of these (MaterializedLotsSurviveSaveAndReload,
CommitKeepsOnlyReachableLots) currently fail: committing any EntityPack
into the run store and reopening it throws
`TypeAccessException: No hash-resistant equality comparer available
for type: CultMath.int2`, because EntityPack.PersistedBehaviors is a
Dictionary<int2, ...> and CultMessagePackSecurity registers a
collision-resistant comparer only for CultRecordRef<T>. This predates
this cut (PersistedBehaviors is untouched here) and is a CultLib gap,
not a defect in this schema; see the landing report.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:17:13 +02:00
Meta Vens
415f8e1152 Add the lot ledger and mint every crafted instance through it
Quality, Ingredients and Product leave CraftedItemInstance; a unit now
carries only a LotId into the run-scoped ProvenanceLedger. ItemManager
gains the one lot-minting path (CreateLot/CreateInstance(int)), GetLot,
and Brand(), which derives a maker and product from provenance instead
of a stored field. RunSave persists the ledger pruned to what the saved
zones' entities still reach; the live ledger is never pruned, so a
floor pickup collected after a save still resolves. CopyBuild is gone:
matching hardpoints now share the same lot instead of copying values.
PropertiesPanel shows the derived brand where the design's manufacturer
used to be. AetherDb's census flags duplicate (maker, design) products
and its save command checks every crafted instance's lot against a real
run store.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 04:16:23 +02:00
Meta Vens
d8c4ec4dd8 Record provenance Cut A landed and verified
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 03:46:43 +02:00
Meta Vens
69801bbb2c Delete the re-mint path and the dead debug menu
Cut A of docs/item-provenance-cut.md. TradeMenuDebug.cs was dead (its
script GUID appears in no scene/prefab/asset and no other .cs names the
type). ItemManager.Instantiate and CreateInstance(SimpleCommodityData,
int) re-rolled quality and dropped provenance on every load; nothing
outside EntitySerializer called them once the instantiate parameter is
gone. EntitySerializer.Unpack/Restore no longer thread an instantiate
flag, so Temperature and Armor are restored unconditionally like every
other caller already got. The starting ship and spawnturret now keep
what the generator built instead of re-minting.

Verification: Aetheria.Shared, tools/AetherDb build green against
CultLib a0813c6; tests/Aetheria.Shared.Tests 29 passed (unchanged); the
four negative greps in the map are empty. Unity compile is still owed
(the editor is open on this project; batchmode was not run per
instructions).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 03:42:12 +02:00
Meta Vens
7425ff1be4 Map the item provenance schema cut
Imagination pass. Cut A deletes the re-mint path and TradeMenuDebug; Cut B
moves quality and product onto lots in a run-store ledger with a placeholder
origin and derived branding; Cut C removes ItemData.Manufacturer and rewrites
the catalog. N1 (Produced.Station type) defaults to a run-scoped integer id.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 03:38:04 +02:00
Meta Vens
b0df689d55 Record F4 as ruled: quality stored per lot per role
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 03:20:18 +02:00
Meta Vens
605d3af60a Record F1 as ruled: one run-store lot ledger
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:58:10 +02:00
Meta Vens
30c316a303 Record the placeholder origin and in-place factory construction rulings
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:54:48 +02:00
Meta Vens
ec1d961bef Map the item provenance substrate and its forks
Imagination pass. Body map of items, mint sites, stations, persistence and
quality readers; identity/lifecycle/authority table; schema-cut forks F0, F1,
F4 and future forks F2-F10.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:45:58 +02:00
Meta Vens
130df11240 Put the provenance schema in Terminus scope and generation after it
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:43:10 +02:00
Meta Vens
c25e8cefd3 Record synthesis down to mining, consumer goods and routes
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:40:00 +02:00
Meta Vens
e875b08d31 Record that Terminus synthesizes provenance backwards from products
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:36:38 +02:00
Meta Vens
dbe1dd8319 Record the item provenance rulings as a target
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:35:37 +02:00
Meta Vens
bf822e9646 Record the Studio click-through and the dropped grouping features
The click-through passed with the AmmoType refs repointed and the schematic
underlay fixed. It also surfaced that the cutover dropped the Database Tools'
record grouping and drag-and-drop without recording them; CultLib's
studio-grouping cut map owns restoring them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:08:41 +02:00
Meta Vens
37f513e5dc Keep the schematic underlay under the shape grid
The port dropped the legacy drawer's FlexibleSpace, so the grid's group
stretched to the inspector width and the texture was fitted there instead.
Checked by the operator in Studio on LonginusX.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 02:08:40 +02:00