BS-PR-605 - Prefab authoring v2: nested instances, variants, and structural overrides #43

Closed
opened 2026-07-10 04:03:36 -04:00 by Rbanh · 1 comment
Owner

Summary

Complete the prefab workflow for reusable production content beyond transform/material override v2.

Scope

  • Stable nested prefab instance semantics with cycle detection.
  • Property and structural override tracking keyed by stable actor/component identity.
  • Apply/revert at field, component, child, and instance scopes.
  • Prefab variants with a documented inheritance policy.
  • Clear broken-source, changed-base, and conflict states with repair actions.
  • Unpack and convert-to-local workflows that preserve authored results.

Acceptance criteria

  • Nested instances and variants round-trip without duplicated generated state.
  • Overrides survive source reimport and child rename when stable IDs remain.
  • Apply/revert/unpack are undoable and tested.
  • Cycles, missing sources, and conflicts are visible and recoverable.
  • Prefab docs and sample fixtures cover the supported contract.
## Summary Complete the prefab workflow for reusable production content beyond transform/material override v2. ## Scope - Stable nested prefab instance semantics with cycle detection. - Property and structural override tracking keyed by stable actor/component identity. - Apply/revert at field, component, child, and instance scopes. - Prefab variants with a documented inheritance policy. - Clear broken-source, changed-base, and conflict states with repair actions. - Unpack and convert-to-local workflows that preserve authored results. ## Acceptance criteria - [x] Nested instances and variants round-trip without duplicated generated state. - [x] Overrides survive source reimport and child rename when stable IDs remain. - [x] Apply/revert/unpack are undoable and tested. - [x] Cycles, missing sources, and conflicts are visible and recoverable. - [x] Prefab docs and sample fixtures cover the supported contract.
Rbanh added this to the M6 - Reliability, recovery, and project workflow milestone 2026-07-10 04:03:36 -04:00
Author
Owner

Acceptance completed on 2026-07-11.

Runtime findings closed during the final smoke pass

  • Repaired three committed Crate actors whose serialized ChildOf referenced missing entity 4294966618. Scene validation now rejects missing hierarchy parents and cycles before ECS/Avian startup.
  • Removed the duplicate immediate scene-load hydration pass that could replace freshly generated collider children before the normal ordered hydration schedule.
  • Added the schema-aware .scn.ron runtime loader used by both game and editor. It validates/migrates through the Bevy-free scene crate and strips the schema envelope in memory before WorldDeserializer.
  • Added an asynchronous AssetServer regression proving assets/prefabs/example_variant.scn.ron loads as a DynamicWorld.

Automated evidence

  • cargo fmt --all -- --check
  • git diff --check
  • cargo validate-levels -> validate-levels: ok
  • cargo clippy --workspace --all-targets --all-features --offline -- -D warnings
  • cargo test --workspace --all-features --offline
    • editor: 110 passed
    • game: 5 passed
    • game_hot: 14 passed
    • scene: 23 passed, 1 intentionally ignored migration helper
    • settings: 7 passed
    • shared: 50 passed
    • sim: 2 passed
  • cargo build -p game -p editor --release --offline

Live / packaged evidence

  • Dragged the committed example_variant.scn.ron fixture into the live editor.
  • Inspector reported Ready, the hierarchy expanded through both nested variant links, and Unpack Layer / Convert to Local were available.
  • Optimized target/release/editor --project . and target/release/game each remained alive through clean startup smoke windows with no collider panic.
  • Live screenshot captured at /tmp/blacksite-schema-loader-live.png in the development workspace.
Acceptance completed on 2026-07-11. ### Runtime findings closed during the final smoke pass - Repaired three committed `Crate` actors whose serialized `ChildOf` referenced missing entity `4294966618`. Scene validation now rejects missing hierarchy parents and cycles before ECS/Avian startup. - Removed the duplicate immediate scene-load hydration pass that could replace freshly generated collider children before the normal ordered hydration schedule. - Added the schema-aware `.scn.ron` runtime loader used by both `game` and `editor`. It validates/migrates through the Bevy-free `scene` crate and strips the schema envelope in memory before `WorldDeserializer`. - Added an asynchronous AssetServer regression proving `assets/prefabs/example_variant.scn.ron` loads as a `DynamicWorld`. ### Automated evidence - `cargo fmt --all -- --check` - `git diff --check` - `cargo validate-levels` -> `validate-levels: ok` - `cargo clippy --workspace --all-targets --all-features --offline -- -D warnings` - `cargo test --workspace --all-features --offline` - editor: 110 passed - game: 5 passed - game_hot: 14 passed - scene: 23 passed, 1 intentionally ignored migration helper - settings: 7 passed - shared: 50 passed - sim: 2 passed - `cargo build -p game -p editor --release --offline` ### Live / packaged evidence - Dragged the committed `example_variant.scn.ron` fixture into the live editor. - Inspector reported **Ready**, the hierarchy expanded through both nested variant links, and **Unpack Layer** / **Convert to Local** were available. - Optimized `target/release/editor --project .` and `target/release/game` each remained alive through clean startup smoke windows with no collider panic. - Live screenshot captured at `/tmp/blacksite-schema-loader-live.png` in the development workspace.
Rbanh closed this issue 2026-07-10 20:23:01 -04:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Falling-Metal-Interactive/Blacksite#43
No description provided.