Skip to content

Pin renderedstep/engine#98's head (064084f): let a floor fall in a game when its countdown runs out, and the player on it with it - #374

Merged
calebl merged 2 commits into
mainfrom
fm/ta-floors-s6
Oct 30, 2026
Merged

calebl merged 2 commits into
mainfrom
fm/ta-floors-s6

Conversation

@calebl

@calebl calebl commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Stage 6 of the dungeon plan, server half ("The countdown and the collapse").
A floor that says minutes: gives way in a game that many story minutes
after that game first stood on it; a player on it then dies with it. The
collapse is the game's only: the world's rows are untouched (VISION.md
principle 7). The narrator is not told. A world without minutes plays as
before; no checked-in story world turns it on.

  • Migration 20261031120000 AddMinutesToFloorsAndFellAtToPlaythroughFloors,
    the engine's version and declaration. schema.rb moves to 2026_10_31_120000.
  • Floor validates minutes as a positive integer or nil.
    Playthrough::FloorReached#falls_at and #fallen?.
  • Playthrough#fallen?(location) mirrors Game::fallen (the room's own floor
    row or its parent's, the first by id). #cast_in returns nobody on a fallen
    floor, so #foes_in follows; #exits leaves such rooms out, and
    Classifier#exits_here now reads #exits, so Mechanics::State follows.
  • Loader reads floor minutes (a positive integer only; absent writes nil);
    the exporter writes it when set.
  • The extension's glance_json, Playthrough::Glance (Floor, #floor,
    #collapse, console lines) and Protocol::V1#glance carry floor and
    collapse; docs/protocol/v1/openapi.json and v1.md add them as revision 1.7.
  • The play page's end notice prints the collapse sentence on its own line
    before the death statement, which is unchanged.
  • Story::Doctor: floor_fallen_with_no_countdown (manual, never repaired).
  • SqlitePackage already copies playthrough_floors column for column; its
    test now pins fell_at.
  • Sweep: world a-floor-that-falls, scripts waiting-out-a-floor and
    a-floor-falls-behind-you, goldens vendored and checks files written.

Against the engine PR's list

renderedstep/engine#98 lists 11 items under "What the server pin PR must change". This PR covers all of them, with three differences:

  • Item 2. The model is Playthrough::FloorReached (table playthrough_floors), the name stage 5 gave it, not Playthrough::Floor.
  • Item 5. Mechanics::State reads exits through Playthrough::Classifier#exits_here. That method used to read Location#exits directly, so it now reads Playthrough#exits.
  • Item 10, the world dump. parity/worlds/a-floor-that-falls.sql belongs to the engine repo. I built it from this branch's loader as the engine's parity README says, in a scratch export of this commit. Its rows match the engine PR's hand-made dump exactly. The only differences are the position of the schema_migrations row and ar_internal_metadata.schema_sha1, which come from loading the schema rather than migrating. The engine PR can keep its dump or take this one.

Gates (both provider keys unset, no model calls)

  • bin/rails test: 5474 runs, 0 failures, 0 errors (includes rake game:sweep)
  • bin/rails engine:rust_gates: PASSED, 112 scripts
  • bin/rails engine:vendored: VENDORED at 064084f
  • bundle exec rubocop: no offenses. bin/rails zeitwerk:check: all good. bin/brakeman: no warnings.

Once renderedstep/engine#98 merges, this moves to its merge commit.

…me when its countdown runs out, and the player on it with it

Stage 6 of the dungeon plan, server half ("The countdown and the collapse").
A floor that says `minutes:` gives way in a game that many story minutes
after that game first stood on it; a player on it then dies with it. The
collapse is the game's only: the world's rows are untouched (VISION.md
principle 7). The narrator is not told. A world without `minutes` plays as
before; no checked-in story world turns it on.

- Migration 20261031120000 AddMinutesToFloorsAndFellAtToPlaythroughFloors,
  the engine's version and declaration. schema.rb moves to 2026_10_31_120000.
- Floor validates `minutes` as a positive integer or nil.
  Playthrough::FloorReached#falls_at and #fallen?.
- Playthrough#fallen?(location) mirrors Game::fallen (the room's own floor
  row or its parent's, the first by id). #cast_in returns nobody on a fallen
  floor, so #foes_in follows; #exits leaves such rooms out, and
  Classifier#exits_here now reads #exits, so Mechanics::State follows.
- Loader reads floor `minutes` (a positive integer only; absent writes nil);
  the exporter writes it when set.
- The extension's glance_json, Playthrough::Glance (Floor, #floor,
  #collapse, console lines) and Protocol::V1#glance carry `floor` and
  `collapse`; docs/protocol/v1/openapi.json and v1.md add them as revision 1.7.
- The play page's end notice prints the collapse sentence on its own line
  before the death statement, which is unchanged.
- Story::Doctor: floor_fallen_with_no_countdown (manual, never repaired).
- SqlitePackage already copies playthrough_floors column for column; its
  test now pins fell_at.
- Sweep: world a-floor-that-falls, scripts waiting-out-a-floor and
  a-floor-falls-behind-you, goldens vendored and checks files written.
calebl added a commit to renderedstep/engine that referenced this pull request Oct 30, 2026
…ver 383a67d

The game's pin PR (renderedstep/server#374) reads minutes:, so the dump is
now the one its own loader writes from a schema load: minutes is written by
the loader rather than by hand. The rows are the same; only timestamps, the
schema digest and the order the dump lists them in moved. No golden or
records file moves.
@calebl
calebl merged commit 77eebf8 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