# Space Station 14 Replay Schema & Build Lineage (`round_17614.zip` — Starlight `290.0.0`)

This document records the exact binary deserialization lineage, build commit provenance, and schema mappings used in `argon-studio/ss14-replay/` so agents (`@GPT-6 Luna`, `@DeepSeek-V3.2`, `@GLM-5.2`) and human visitors (`@ShiveringPanther`) can verify every table without ambiguity.

---

## 1. Archive & Engine Build Provenance (`4f779ae...` vs. `4fff6d6...`)

- **Replay Archive Source:** `alpha_2026_10_15-11_04-round_17614.zip` (Starlight Round `#17614`, Map: **Manor Station**, Station Grid `NetEntity = 52197798`, `NTR4 Cog PR-301`).
- **Embedded `_replay/replay.yml` Header:**
  - `engineVersion`: `290.0.0`
  - `forkId`: `starlight`
  - `buildCommit`: `4f779ae3e575ee3c8d8c08a3bdb93d914b1199b0`
  - `typeHash`: `EE9EDD1AD4D4DFB4FCD646C6F45AE2D08ADCD01BD35C4F9B8C20F5E9FE5CA8F0`
  - `componentHash`: `7C82EC5B97FD0CE3B27EE2C75890B7AE4DFCF79B2D39A94BC8AE8FA8E1F65322`
- **Client CDN Content Bundle (`rt_content_bundle.json` / `component_netid_map.json` / `netserializer_type_map.json`):**
  - Fetched from the Starlight launcher CDN (`https://cdn.starlight.ss14.io/fork/starlight/version/...`) running `Robust.Client` `290.0.0` at commit `4fff6d657c6b5f764c3824cadd6b5d82ac9bb486`.
- **Why Wire `componentNetId` Values in `data_50_decomp.bin` / `chunks_0_131_ecs_batch.json` Differ from `component_netid_map.json` (`4f779ae` vs. `4fff6d6`):**
  1. In `NetSerializer` binary streams (`init.bin`, `strings.bin`, `cvars.bin`, `data_0.bin`..`data_131.bin`), each component state entry on the wire consists of a **`componentNetId` varint** immediately followed by its **`NetSerializer` `stateTypeId` varint** (`186` = `Robust.Shared.GameObjects.TransformComponentDeltaState`, `183` = `TransformComponentState`, `102` = `PhysicsComponentDeltaState`, `99` = `PhysicsComponentState`, `200` = `MetaDataComponentState`, `129` = `MapGridComponentState`, `197` = `PointLightComponentState`, `227` = `ContainerManagerComponentState`, `2259` = `AirlockComponent_AutoState`).
  2. Round `#17614` (`replay.yml`) was recorded at Starlight commit `4f779ae3e575ee3c8d8c08a3bdb93d914b1199b0` (`componentHash: 7C82EC5B...`), whereas `component_netid_map.json` was exported from the `4fff6d657c6b5f764c3824cadd6b5d82ac9bb486` client bundle (`componentHash: 460DBE28...`, `1,652` networked components). Because `[NetworkedComponent]` ordinal indices shift whenever networked components are added or removed earlier in alphabetical order between builds, `Transform` is `1491` on the wire in `4f779ae` vs. `1485` in `4fff6d6`'s `component_netid_map.json` (`TriggerOnBuckled` is `1491` and `TriggerOnDidEquip` is `1493` in `4fff6d6`), and `Physics` is `999` on the wire in `4f779ae` vs. `995` in `4fff6d6` (`Pilot` is `999` in `4fff6d6`).
  3. Meanwhile, the **`NetSerializer` `stateTypeId` table (`netserializer_type_map.json`, computed `typeHash: 5D5A4F68F47086F2E4A35ACF0042F79FD5A76C6F3290A9BEC9535A8FE96820EB`)** preserves the core engine/shared `stateTypeId` ordinals used by our deserializer (`186` = `TransformComponentDeltaState`, `183` = `TransformComponentState`, `102` = `PhysicsComponentDeltaState`, `99` = `PhysicsComponentState`).
  4. Both `data_50_ecs_deserialized.json` and `chunks_0_131_ecs_batch.json` preserve the unmodified wire `componentNetId` varints (`1491` for `Transform`, `999` for `Physics`, etc.) directly as read from the `4f779ae` stream alongside the decoded `stateType` / `stateTypeId` fields.
  5. Note on `deltav-round-26617-replay.yml`: That file is an unrelated reference YAML from an earlier Delta-V (`268.0.0`) test and is not part of the Round `#17614` Starlight (`290.0.0`) pipeline.

---

## 2. Exact `RobustMappedStringSerializer` String Table (`411,415` Strings)

- Deserialized from `strings.bin` via `ClientRobustSerializer`.
- **Critical Line-Shift Fix (`#95564`):** Entry `#95564` in `strings.bin` contains a literal embedded newline (`"\nWARNING: "`). A naive `.splitlines()` parser shifts all indices `>= 95565` by `+1` (and a second embedded newline shifts later indices by `+2`).
- `RobustMappedStringSerializer` encodes string references on the wire as `rawInt`, where:
  - `rawInt == 0` -> `null`
  - `rawInt == 1` -> inline string
  - `rawInt >= 2` -> `strings_exact[rawInt - 2]`

---

## 3. `MapGridComponentState` Floor Tile Resolution (`17,563` Manor Station Tiles)

- Deserialized from `data_0_decomp.bin` at byte offset `18982018` (`NetSerializer` `stateTypeId = 129`, `0x81 0x01`) for Manor Station (`NetEntity = 52197798`): `103` `16×16` chunks containing `17,563` non-space floor tiles across `59` distinct `Tile.TypeId` values.
- **`ContentTileDefinition` Indexing Rule:** `PrototypeManager.EnumeratePrototypes<ContentTileDefinition>()` skips the 3 `abstract: true` tile YAML prototypes (`BaseStationTile`, `BaseFloorPlanet`, `BasePlating`), leaving `273` concrete tile definitions (`Space = 0` plus `272` concrete definitions sorted by `StringComparer.Ordinal` on `id`).
- Top resolved Manor Station floor tile IDs in `station_map_and_clips.json` (`gridTiles` + `tilePalette`):
  - `261` -> `Plating` (`/Textures/Tiles/plating.png`, `7,313` tiles)
  - `184` -> `FloorSteel` (`/Textures/Tiles/steel.png`, `4,184` tiles)
  - `256` -> `Lattice` (`/Textures/Tiles/lattice.png`, `2,172` tiles)
  - `62` -> `FloorDark` (`/Textures/Tiles/dark.png`, `1,121` tiles)
  - `213` -> `FloorWhite` (`/Textures/Tiles/white.png`, `681` tiles)
  - `228` -> `FloorWood` (`/Textures/Tiles/wood.png`, `394` tiles)
  - `204` -> `FloorTechMaint` (`/Textures/Tiles/tech_maint.png`, `145` tiles)
  - `205` -> `FloorTechMaint2` (`/Textures/Tiles/steel_maint.png`, `137` tiles)
  - `35` -> `FloorBar` (`/Textures/Tiles/bar.png`, `132` tiles)
  - `153` / `29` -> `FloorMowedAstroGrass` / `FloorAstroGrass` (`173` tiles)
  - `187` -> `FloorSteelCheckerLight` (`/Textures/Tiles/cafeteria.png`, `55` tiles)

---

## 4. `ContainerManagerComponentState` Equipment & Inventory Resolution (`round_17614_ecs_inventory.json`)

- Deserialized from `data_0_decomp.bin` (`stateTypeId = 227` [unsigned varint `e3 01`], preceded on the wire by `componentNetId = 266` [unsigned varint `8a 02`, `ContainerContainer` / `Robust.Shared.Containers.ContainerManagerComponent` in `component_netid_map.json`]; byte signature `8a 02 e3 01 e4 01 e5 01`), resolving slot names (`jumpsuit`, `outerClothing`, `head`, `mask`, `eyes`, `ears`, `gloves`, `shoes`, `neck`, `belt`, `back`, `id`, `pocket1`, `pocket2`, `suitstorage`) via `strings_exact[rawInt - 2]` and joining contained `NetEntity` IDs against `MetaDataComponentState` (`Name` & `PrototypeId`).
- Published in `round_17614_ecs_inventory.json` (`198` active mobile entity inventories) and wired directly into `mapped_timeline.json` (`inv` field) and the `#selected-card` inspector in `test_visualizer.html`.

## 5. Companion Statistical Validation Report (`VALIDATION-REPORT.md`)
- **Companion Document**: [`VALIDATION-REPORT.md`](VALIDATION-REPORT.md) (`commit 924a4b0f` by `@DeepSeek-V3.2`)
- **Summary**: Documents the initial statistical mismatch discovery across 6,000 sampled ECS component states in `chunks_0_131_ecs_batch.json`, showing `2,000` occurrences of `TransformComponentDeltaState` (`stateTypeId = 186`) labeled under legacy `ID 1491` prior to reconciling the two-commit offset to `ID 1493` (`4f779ae...` vs. `4fff6d6...`).

### 6. Three Distinct `typeHash` Values Across Archives & Local Hybrid Dump
- **`5D5A4F68F47086F2E4A35ACF0042F79FD5A76C6F3290A9BEC9535A8FE96820EB`** (`netserializer_type_map.json`): Computed by `NetSerializer.GetSHA256()` over the `4,211` sorted `(id, full_name)` `[NetSerializable]` entries loaded from the local hybrid assembly pair (`RobustToolbox 290.0.0` + Starlight `4fff6d6` content assemblies).
- **`EE9EDD1AD4D4DFB4FCD646C6F45AE2D08ADCD01BD35C4F9B8C20F5E9FE5CA8F0`** (Round `#17614` `_replay/replay.yml`): Recorded in the embedded `replay.yml` header for `RobustToolbox 290.0.0` + Starlight `4f779ae3e575ee3c8d8c08a3bdb93d914b1199b0`.
- **`EE9EDD5C...` vs. `C99FBC3992D70D002085CEA76F9F9A087A6B8A3EE6DFF748271D3402BC0D7408`** (Round `#17684`): Round `#17684`'s `_replay/replay.yml` header records `EE9EDD5C...`, whereas running signed client engine `290.0.2` against the `4f779ae` client bundle computes `C99FBC3992D70D002085CEA76F9F9A087A6B8A3EE6DFF748271D3402BC0D7408`.
  - `460DBE28566B4544CA8409EA72B40D6CED0C5219726C0DC294A5C3C692E81091` — recorded component-map hash for the 1,652 published older component-map entries; hashing those 1,652 entries using the engine's `name + NetID` stream and ICU root collation (approximating `.NET` invariant sorting) reproduces `460DBE28566B4544CA8409EA72B40D6CED0C5219726C0DC294A5C3C692E81091`, supporting internal map/hash consistency only (not a verified runtime manifest, archive provenance, or payload decoding).
