Repository navigation
Pin renderedstep/engine#102's merge commit: a seeded building's own kind decides how its inside is laid out - #398
Merged
Merged
Conversation
… kind decides how its inside is laid out A place whose own kind is a building word (Location::Kind::BUILDINGS) is laid out as that building, whatever building the place call names; a place with no own kind, or a room's word, follows the call as before. Nothing a model is sent changes. - Location::Generator#realize! mirrors the engine's lay_out for the Ruby loop: the place's own building word wins over the call's place_kind. - WorldSeed::Loader#validate_kinds! admits a building word on a place stub (width and depth, no parent) as well as a room's word; a room with a parent or a stub with no footprint still carries a room's word only. - Location#a_building_word_is_a_floors returns early for a place too, and the comments that said only a floor carries a building word are reworded. - Sweep: world the-shrine-on-the-square and script a-seeded-temple-keeps-its-rooms, golden vendored from the pin and checks file written with engine:checks. - Tests: the loader admits a temple on a place stub and refuses it on a placed room and on a footprintless stub; the generator lays a seeded temple out as a temple when the call answers warehouse, and a non-building own kind follows the call; the floor test now covers a place, a placed room and a footprintless stub.
The engine PR merged; between its head (4a27bc8) and the merge commit only the engine's own CI workflow changed, so no golden, script or vector portion moves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The server half of renderedstep/engine#102 (items 1 to 4 of its "What the game needs"). A place whose own
kindis a building word (Location::Kind::BUILDINGS) is now laid out as that building, whatever building the place call'splace_kindnames. A world file'sThe Shrine, kind: templegets a temple's rooms even when the call answerswarehouse. A place with no own kind, or with a room's word, follows the call as before.Location::Generator#realize!: the same change for the Ruby loop the tests still play. The place's own building word wins over the call'splace_kind.WorldSeed::Loader#validate_kinds!admitsKINDS + BUILDINGSon a location that haswidthanddepthand noparent. Afloor:still takesBUILDINGS, and every other location takesKINDSonly.Location#a_building_word_is_a_floorsnow returns early for aplace?too. The comments abovevalidates :kindandvalidate_kinds!said only a floor carries a building word; they are reworded.lib/engine_sweep/worlds/the-shrine-on-the-square.ymland new scriptlib/engine_sweep/scripts/a-seeded-temple-keeps-its-rooms.yml, both exactly as given in the engine PR.ext/renderedstep/Cargo.toml(andCargo.lock) point at the engine PR's merge commit1041056. Between the PR head (4a27bc8) and that commit only the engine's CI workflow changed. The goldentest/engine_parity/a-seeded-temple-keeps-its-rooms.jsonis copied from that commit. The checks file was written withSCRIPT=a-seeded-temple-keeps-its-rooms bin/rails engine:checksand is identical to the one in the engine PR. The records and the world SQL are read from the pinned engine source; nothing else is copied into this repository.Nothing a model is sent changes
No prompt, schema, narrator sentence or word of the three checked-in worlds changes. The place call is asked the same question either way; only its answer is set aside.
Tests
test/lib/world_seed/loader_test.rb: akind: templestub with a footprint and no parent loads, and its row keepstemple. The same word is refused on a room placed in a parent, and on a stub with no footprint.test/models/location/generator_test.rb: a place seededtempleis laid out as a temple when the call answerswarehouse, and its entry room isshrine, notoffice. A place whose own kind issquarefollows the call.test/models/floor_test.rb: the old test said a place may carry a building's word only when it is a floor. It now checks four cases: a place and a floor are valid with a building's word; a placed room and a stub with no footprint are not.Checks (offline,
OPENROUTER_API_KEYandTYPESAFE_API_KEYunset)bin/rails test: 5507 runs, 0 failures, 0 errors, 0 skips.bundle exec rubocop: no offenses.bin/rails zeitwerk:check: all is good.bin/brakeman --no-pager: no warnings.bin/rails engine:rust_gates: all 115 scripts pass (goldens, invariants, doctor and audit).bin/rails engine:vendored: the goldens, scripts and vector portions match1041056byte for byte.No post-update step is needed.