Repository navigation
Lay out a building as its own kind when it has one, as a floor already is - #102
Merged
Merged
Conversation
…y is A place's own kind (locations.kind) now decides the sort each of its rooms is dealt whenever that kind is a building word, floor or not: a world that seeds "The Shrine, kind: temple" gets a temple's rooms even when the place call answers warehouse. A place with no own kind, or one that is not a building word, is laid out from the place call's place_kind as before. Nothing a model is sent changes: the place call's prompt and schema are the same, and a test holds the request byte for byte equal with and without the stub's own kind. A stub an exits answer wrote carries one of the room kinds, and three of those (workshop, shop, ruin) are building words too, so such a stub is now laid out as that building whatever place_kind says. No existing golden or records file moved. New world the-shrine-on-the-square (the game's loader with a building word admitted on a stub with a footprint) and script a-seeded-temple-keeps-its-rooms, in PASSING with a golden and records: the place call answers warehouse, and the records hold the rooms dealt shrine, shrine, study, storeroom and storeroom.
… own kind (renderedstep/server ad6bce7)
calebl
added a commit
to renderedstep/server
that referenced
this pull request
Dec 3, 2026
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.
calebl
added a commit
to renderedstep/server
that referenced
this pull request
Dec 3, 2026
Pin renderedstep/engine#102's merge commit: a seeded building's own kind decides how its inside is laid out
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
A place's own kind (
locations.kind) now decides the word each of its rooms is dealt whenever that kind is a building word (kind::buildings()), floor or not. Before, only a floor's own kind counted; every other place was laid out as whatever building the place call'splace_kindnamed. A world that seeds "The Shrine,kind: temple" now gets a temple's rooms even when the place call answerswarehouse.One clause in
lay_out(src/turn/told/realize.rs):A place with no own kind, or with an own kind that is not a building word, is laid out from
place_kindas before.A side effect on stubs the model writes. A stub that an exits answer wrote carries one of the room kinds (
kind::kinds()). Three of those are building words too:workshop,shopandruin. Such a stub is now laid out as that building, whateverplace_kindsays. No existing golden or records file moved because of this. The one sweep stub it touches, The Lamp Yard, saysworkshopin both answers.Nothing a model is sent changes
The place call's prompt, its schema and every other request are unchanged.
tests/seeded_kind.rs::the_place_call_is_sent_the_same_request_whatever_the_stubs_own_kindwalks into The Shrine twice, once withkind: templeand once with no kind, and asserts that the place-call request bodies are equal.Tests
tests/seeded_kind.rsuses the new world, The Shrine on the Square. The place call always answerswarehouse.a_seeded_temple_is_laid_out_as_a_temple_whatever_the_place_call_answers: the entry room isshrine, not a warehouse'soffice. Every other room is dealt from a temple's bands, and one of them is astudy. This test fails with the old clause.a_stub_with_no_kind_of_its_own_follows_the_place_call: the rooms areoffice, thenstoreroomfor the rest.a_stub_whose_own_kind_is_not_a_buildings_follows_the_place_call: own kindsquare, entry roomoffice.the_place_call_is_sent_the_same_request_whatever_the_stubs_own_kind: the test above.Sweep
parity/worlds/the-shrine-on-the-square.sql. It holds The Square (realized, the opening) and The Shrine, a stub with a 12×10 footprint,kind: templeandpopulation: nobody.parity/scripts/a-seeded-temple-keeps-its-rooms.yml, listed inPASSINGwith a golden and a records file. It types/move The Shrine, and the place call answerswarehousewith a cellar. The records hold the rooms as dealt:shrine,shrine,studyon storey 0 andstoreroom,storeroomon storey −1. With the old clause they would be a warehouse'sofficeandstorerooms. The golden'shereis the shrine kit (altar, bench, candle, candle stand, dried flowers, prayer card, small bell, statue). With the old clause it is the office kit, and the check then fails on that script.parity --write paritywrote only the new script's files.Gate (offline, both provider keys unset)
cargo fmt --check: clean.cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo test --workspace --locked: 534 passed, 0 failed. This includes the shape check over every world, the new one too, and the doctor tests over the three checked-in worlds.parity --check parity: 111 of 115 agree. The four that do not are thePASSING_WITH_RUNNERscripts, the same as on main.fight --check sim: all 10 fight goldens agree.engine:rust_gates: run in a scratch copy of the game atbf35540, with the changes listed below and the extension built from this branch.parity/runner.sh: all 115 listed scripts agree.engine:rust_gates: all 115 pass (goldens, invariants, doctor and audit) once the new script's checks file is written. The doctor reports the new world as "playable, 2 warnings":no_arcandroom_without_a_layoutfor The Square.What the game needs (paired PR in renderedstep/server)
The world dump came from the game's loader in a scratch copy of the game at
bf35540. That copy had the three changes below, which the game needs for real:Location::Generator#realize!(app/models/location/generator.rb, around line 437): the same change for the Ruby loop the tests still play.WorldSeed::Loader#validate_kinds!(lib/world_seed/loader.rb, around line 1854) admitsLocation::Kind::BUILDINGSonly on a location withfloor:. It refuseskind: templeon The Shrine. The scratch copy admitsKINDS + BUILDINGSon a location withwidth,depthand noparent(a place), and onlyKINDSeverywhere else:Location#a_building_word_is_a_floors(app/models/location.rb, around line 529) also needs|| place?on its early return. Its comments, the one abovevalidate_kinds!and the one abovevalidates :kindboth say that only a floor carries a building word, and they need rewording.lib/engine_sweep/worlds/the-shrine-on-the-square.yml. The script, with itswhy:notes, islib/engine_sweep/scripts/a-seeded-temple-keeps-its-rooms.yml. Both are below. The script is this PR'sparity/scriptsfile before its comments andwhy:notes were taken out.ext/renderedstep/Cargo.tomlto this PR's merge commit. Vendorparity/goldens/a-seeded-temple-keeps-its-rooms.json,parity/records/a-seeded-temple-keeps-its-rooms.jsonandparity/worlds/the-shrine-on-the-square.sql. Addtest/engine_parity/a-seeded-temple-keeps-its-rooms.checks.json(SCRIPT=a-seeded-temple-keeps-its-rooms bin/rails engine:checks). Below is the one the scratch copy wrote.SERVER_COMMITin.github/workflows/ci.ymlstill namescfe509a. That commit has neither the script nor the loader change, sorunner.shreports the new script as absent there. It moves to the game branch that carries items 1–3 once that branch exists.lib/engine_sweep/worlds/the-shrine-on-the-square.ymllib/engine_sweep/scripts/a-seeded-temple-keeps-its-rooms.ymltest/engine_parity/a-seeded-temple-keeps-its-rooms.checks.json{ "script": "a-seeded-temple-keeps-its-rooms", "doctor": { "headline": "playable, 2 warnings", "findings": [ [ "no_arc", "warning", "this story has no arc, so no playthrough of it can ever reach an ending: there is no quest for a beat to belong to and no outcome to select. A world file's `quests:` block is where one is written", "manual" ], [ "room_without_a_layout", "warning", "\"The Square\" has no layout: nobody can be given a spot in it, so what is within reach there cannot be measured", "manual" ] ] }, "audit": { "headline": "1 scenes, nothing to report", "flags": [], "unjudged": [] } }