Skip to content

Pin renderedstep/engine#96's head (d57d7f9): grow an overdue arc step only in ground nobody has written - #372

Merged
calebl merged 2 commits into
mainfrom
fm/ta-quest-deadline-generated-once-server
Oct 30, 2026
Merged

calebl merged 2 commits into
mainfrom
fm/ta-quest-deadline-generated-once-server

Conversation

@calebl

@calebl calebl commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

The server half of renderedstep/engine#96. That PR brings the quest deadline into line with VISION principle 7: the engine does not change the world after it has generated it. An overdue arc step no longer adds a doorway to a room already written, or puts a thing in one. This PR does each item in that PR's "What the server pin PR must change" section and pins the engine to its head, d57d7f9.

The Ruby mirror (app/models/quest/deadline.rb)

  • #run! now places from #way_on(written) instead of #anchor. written is the room passed to .after_realizing!.
  • #way_on first looks for rooms the party can reach (hops) that are not realized, not a place (Location#place?, the engine's is_place), and have fewer than MAX_EXITS doorways out. Among those it takes the least [z, -hops, id]. If there are none, it uses written, provided it is reached, not a place, and has a doorway to spare. Otherwise it returns nil.
  • #place_a_place! and #build_somewhere_to_keep_them! open their door off that room.
  • #place_a_person! tries deepest_room_of_a_place_we_can_reach first even when way_on is nil. That room may already be written, because bringing a person into a place is the one addition the principle allows. It builds a place only when way_on has a room.
  • #place_a_thing! runs Location::Generator#own_box! (the engine's lay_out_alone) before admitting the thing. That way a thing in a stand-alone stub gets a spot.
  • #anchor still gives the same answer. It now shares the #deepest search with #way_on. It stays for lib/engine_vectors/deadline.rb, and test/engine_vectors/deadline.json does not change.
  • The header's "where" and "NOT A ROUTE" paragraphs are updated, along with the PHASES wording, to say the door never goes off a written room.

Tests (test/models/quest/deadline_test.rb)

  • The thing test now says what it covers: with nothing unwritten, the thing lies in the room just written.
  • The anchor-by-storey test is renamed for the way on. It also asserts that the cellar gains no door.
  • New tests:
    • a thing lies in an unwritten stub, which gets its own box first
    • an unwritten reachable room is preferred to the room just written
    • a written room other than the one being written never gains a doorway or a thing (two placements in a row)
    • for each of place, thing and person, nothing is placed when neither an unwritten room nor the room being written will take it
  • With #anchor swapped back into #run!, four of the new tests fail.

Vendored from the engine PR

  • Scripts: lib/engine_sweep/scripts/a-deadline-places-what-the-arc-waits-for.yml (changed) and a-deadline-leaves-written-rooms-as-they-were.yml (new), with their header comments. Both re-emit byte-identical to the engine's parity/scripts/ through the README's YAML command.
  • Goldens: test/engine_parity/a-deadline-places-what-the-arc-waits-for.json and a-deadline-leaves-written-rooms-as-they-were.json. parity/records/ has nowhere to go in this repo, so it is not vendored here.
  • Checks files, from bin/rails engine:checks:
    • The existing one moves by one line. The Wash House's exits now include where Warden Hesk is room 1.
    • The new one has the expected character_in_a_stub warning for the placed warden.
  • ext/renderedstep/Cargo.toml and Cargo.lock now pin d57d7f9a4d8eadadf1d64135c7f06b565bec7552.

Not done: item 6, the optional EngineSweep::Invariants check that no room realized before a step gains or loses a doorway or world thing during it. As a global invariant it would also apply to legitimate edges, such as a new room's exit written back into an older realized room. It needs its own scoping, so I've left it to a separate change.

No prompt changes and no model calls.

Gates (run with no provider key set)

  • bin/rails test: 5451 runs, 0 failures
  • bin/rails engine:rust_gates: PASSED, 109 scripts
  • bin/rails engine:vendored: byte for byte at d57d7f9
  • bundle exec rubocop: no offenses
  • bin/rails zeitwerk:check: passes
  • bin/brakeman: no warnings

Once renderedstep/engine#96 merges, this needs re-pinning to its merge commit.

… only in ground nobody has written

VISION principle 7: the engine does not change the world after it has
generated it. Quest::Deadline now places from #way_on -- the deepest
reachable room nobody has written, else the room being written, else
nothing (the step waits for the next room written) -- instead of #anchor,
which stays only for the engine's deadline vector. A person may still be
brought into a written room of a place; a thing in a stand-alone stub
first gets the box its writing would give it.

Vendors the changed and new sweep scripts and goldens from the engine PR,
and the checks files they move.
calebl added a commit to renderedstep/engine that referenced this pull request Oct 30, 2026
…ten ground (renderedstep/server b2a4523)

The game's pin PR (renderedstep/server#372) carries the Ruby mirror of
deadline::way_on, both deadline scripts and their goldens, records and
checks, all byte for byte this repository's. No golden moves here.
@calebl
calebl merged commit 86b9764 into main Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant