Repository navigation
Send Modern riders stuck an hour in one line another way - #2272
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The Generated by Claude Code |
|
The docs preview for this pull request was removed when it closed. |
📸 Screenshot drift checkNo drift: the committed screenshots already match a fresh deterministic generation. ✅ |
e8f2602 to
e3259ef
Compare
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
e3259ef to
8350f49
Compare
maniator
left a comment
There was a problem hiding this comment.
Independent review of 8350f49: CONDITIONAL GO (CI is red: the install is over its 4.5 MiB budget)
Stand-in PR review plus a /gds-code-review lean pass (Blind Hunter, Edge Case Hunter, Acceptance Auditor, Hot-Path Auditor, triage), since Copilot, Codex and PR-Agent are down. This covers the whole diff over main at 4f4aa54 (#2246 merged). e3259ef and 8350f49 differ only by moving the four line functions into expected_lines.rs, and I checked that no line changed meaning.
Blocker: CI
engine-wasm fails on verify-precache: "the precache is 4.51 MiB, over its 4.5 MiB budget". main measures 4.49 MiB, so this PR's WASM growth tips it over. The e2e jobs fail with it. #2238 at 816f20b hits the same check at 4.50 MiB, so the two together will be further over. The 4.5 MiB budget is the owner's own number. Either shrink the engine back under it, or ask Naftali to raise PRECACHE_BUDGET_BYTES and record the reason, as the check asks.
What I checked myself
- The tests bite. All 10
line_counttests pass. With therestore_oldestcall taken out ofadopt.rs,a_reload_counts_the_same_linesfails. - Same game after a reload, through a real jam. maxed Modern on a weekday: reloading a copy every minute from 9:20 AM to 1:20 PM and comparing it a minute later gave 0 mismatches in 240. At the end, 354 riders had waited over an hour. Without
restore_oldest, the same probe gives 215 mismatches in 240, starting 3 minutes in. The 13-hour, 3-day hourly check had 0 divergences on maxed Modern and on the owner's tower. - The A* bound from #2246 stays admissible. A boarding now costs
max(expected, oldest), which is at least the expected cost, soleast_coststays a lower bound and searches stay exact. - Once per line.
passed_an_hourfires only on the step a wait crossesGIVE_UP. A rider who stays keeps the wait, so it never fires again. A rider who moves starts the new line at 0.planno longer joins a line, so a rider who weighs another way and stays is not counted twice (weighing_another_way_and_staying_joins_no_line_twice).keep_lineskeeps the last count with the crowd until the pass ends, so a route started mid-pass still reads it. - Classic is untouched. All three parts read
routes_by_expected_time().
Cost (HP-2): within what the owner accepted
The owner chose "Stack it on the speed-up" on 2026-11-15 on a card that said "17% more than the speed-up alone". My whole-tick timings against main with #2246 (weekday, 8 to 10 AM, best of 7 per run, median of three interleaved rounds) fall inside that:
| Tower | Edit every minute | 8-9 AM | 9-10 AM |
|---|---|---|---|
| owner | none | 20.1 / 19.7 (-2%) | 7.3 / 7.2 (-1%) |
| owner | stop set and cleared | 151.8 / 143.6 (-5%) | 132.0 / 131.7 (0%) |
| split-tower-16 | none | 54.6 / 52.4 (-4%) | 78.8 / 80.6 (+2%) |
| split-tower-16 | stop set and cleared | 186.2 / 194.3 (+4%) | 295.8 / 303.0 (+2%) |
| maxed-modern | none | 165.6 / 173.4 (+5%) | 297.4 / 316.7 (+6%) |
| maxed-modern | stop set and cleared | 331.1 / 329.4 (-1%) | 610.5 / 616.3 (+1%) |
The added cost shows where hour-long lines form (maxed Modern from 9 AM). That is the re-route searches the card named.
Notes, no change asked
- The Bulletin warning can fire every hour while a jam lasts, which is up to four red lines over a morning rush. That is what was asked for. Say so if it turns out to be noisy.
- Riders who re-route reset their wait, so a jam everyone escapes makes no Bulletin line. That reads right: the warning names lines people are still stuck in.
Conditions
engine-wasmgreen: under the 4.5 MiB budget, or the owner raises it in his own words.- All of CI green on that head.
Hot-path record (section 6), 8350f49, whole diff
| Item | Result | What was checked | Findings and resolution |
|---|---|---|---|
| HP-1 | clear | rethink_long_wait <- motion::advance (per person per step: an early return unless a Waiting rider's wait just crossed GIVE_UP). LineCount::see (per person per step). cost_of (per boarding link per Modern search). warn_long_lines <- the hourly pass. restore_oldest <- load. |
none |
| HP-2 | clear | No new per-step scan. One extra route search per rider whose line passes an hour, about 8,400 over the author's 1.5-day run. +5 to 6% on maxed Modern in the jam hours (table above), inside the 17% the owner accepted on the decision card | accepted by the owner |
| HP-3 | clear | the motion pass refills spare instead of allocating a map each pass, and Line is Copy |
none |
| HP-4 | clear | no sort. warn_long_lines uses one max_by with a fixed tie-break |
none |
| HP-5 | clear | FastMap<(shaft, floor), Line> as before, with the wait folded into the same entry |
none |
| HP-6 | clear | cost_of is the same single lookup |
none |
| HP-7 | clear | reroute was split into take_route, re-read as new: same body |
none |
| HP-8 | clear | no cache. oldest is recounted from the saved people at load (restore_oldest), and the mutation above shows a reload diverges without it |
none |
| HP-9 | n/a | nothing over budget beyond the owner's acceptance | none |
| HP-10 | clear | deterministic. Reload gives the same game through a live jam (0 of 240 per-minute reloads) and hourly over 3 days | none |
| HP-11 | finding (1) | no binding change, but the WASM grows the install over its 4.5 MiB budget (4.51 MiB) | Blocker above |
| HP-12 | n/a | no rendering change. The Bulletin line is engine text | none |
Reviewed against Verticopolis conventions (.github/copilot-instructions.md).
Generated by Claude Code
8350f49 to
8ed7a5d
Compare
|
Generated by Claude Code |
8ed7a5d to
9402d34
Compare
On a tower whose Metro line under the basement express jams in the morning rush, hundreds of riders stood in that line for hours. Now a rider whose wait in one line passes an hour is routed again from where they stand, once per line, and walks to another way up when it is quicker. The router also counts how long each line has already kept its riders, so a boarding costs the longer of the expected wait and the one the line shows. Each hour the Bulletin names the worst landing where someone passed an hour in line. The lines keep one map, riders and longest wait together, and the motion pass refills the last count's map instead of allocating a new one. Planning a route no longer joins its line until the rider takes it, so a rider who weighs another way and stays is counted once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7trYcRHkvnh6N2YZqqjw
The Metro platform in metro-line-east holds a different mix of riders now that riders stuck an hour in one line look for another way. Rendered in the pinned Playwright image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7trYcRHkvnh6N2YZqqjw
306e64d to
6ac7d9d
Compare
It made the split tower's simulation up to 27% slower per game day than before it landed (about 8% even with the planned route cache), and no change may ship slower than 4.0. It returns in 4.2 with a re-route that costs nothing. Nothing released carried it, so this note is internal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7traFk8vS886Znni3dx3
It made the split tower's simulation up to 27% slower per game day than before it landed (about 8% even with the planned route cache), and no change may ship slower than 4.0. It returns in 4.2 with a re-route that costs nothing. #2272's note stays, since only a release consumes notes; its lines come out of the 4.1 changelogs when the release is cut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7traFk8vS886Znni3dx3
What & why
In Modern towers, riders stuck an hour in one elevator line now look for another way, and the Bulletin says where the lines are jammed. On the owner's tower the Metro line under the basement express kept hundreds of riders for hours every weekday morning, because the express runs full both ways in the rush.
GIVE_UP) is routed again, once per line, from where they stand (line_count::rethink_long_wait). If the quickest way still starts with this line, they keep their place. Otherwise they walk to the new way up, and their hour counts in the trip's wait. Housekeepers keep to their cars, and riders on the floor they set out from still turn back on their own patience.Crowd::shaft_lines) now hold aline_count::Lineper landing: the riders and the longest wait in the line. A boarding costs the longer of the expected wait and that measured one, so a line that barely moves stops drawing new riders.routing::planreturns a route without joining its line, so a rider who weighs another way and stays is counted once.This was stacked on #2246 (route search speed-up), as the owner chose; #2246 has merged and this is rebased onto
mainafter it.Closes: n/a (no issue)
Type of change
Game mode impact
All three parts read
routes_by_expected_time(), the Modern router rule. Classic counts no lines, re-routes nobody and warns about nothing;classic_riders_and_housekeepers_keep_their_lineandclassic_makes_no_line_bulletinpin that.Quality gates
npm run typechecknpm run lintnpm test(CI runs it)npm run build(CI runs it)Engine:
cargo fmt --check,cargo clippy --all-targets --features tooling,conformance -D warningsandcargo test --features conformancepass. I regenerated the conformance lock, the fuzz corpus golden,frame-days.json, the card-text record and the compat record.The rule tests in
crowd/line_count_tests.rs:the_router_counts_a_lines_longest_waitthe_motion_pass_counts_the_longest_wait_in_each_linean_hour_in_a_stuck_line_sends_a_rider_another_way: the rider walks to the local from the lobby, with their hour counted in the trip.a_rider_keeps_their_place_while_their_line_is_still_the_quickesta_rider_weighs_another_way_once_per_lineclassic_riders_and_housekeepers_keep_their_lineweighing_another_way_and_staying_joins_no_line_twicea_reload_counts_the_same_lines: riders and longest waits match after a save and load.a_line_past_an_hour_makes_the_bulletin_onceclassic_makes_no_line_bulletinVersioning
.changesnote with the rightapp:andcrate:levels, or this PR changes no deployed pathpackages/verticopolis-engine/README.mdand/orengine-rs/CRATE_README.md, or read both and putreadmes: unchangedin the note, or this PR changes no engine sourceapp: minor(a new Modern behavior and Bulletin line) andcrate: patch(the conformance lock moves; no save, layout or interface change).readmes: unchanged.Complexity
motion::advanceruns every chunk of every step. It callsrethink_long_waitper person: a few compares, and a route search only for a Waiting rider whose wait just passed an hour.LineCount::seeper person: one map entry per line, as before, with the wait folded into it.cost_ofper boarding link in every Modern search: one map lookup, as before (riders and wait share the entry).warn_long_linesonce per game hour: one pass over the people.mainmainOn that tower this PR adds about 8,400 route searches over the run (one per rider whose line passes an hour). The owner chose to ship it stacked on #2246, so the game stays faster than today.
mainThe commuters' mean wait at 1 PM drops from 364 to 267 crowd seconds.
Hot-path record (section 6): this comes with the review.
Screenshots / recordings
features/metro-line-east.pngshows a different mix of riders on the Metro platform, since riders who passed an hour in line now look for another way. Rendered in the pinned Playwright image (full Chromium) and checked againstmain: only that platform's riders differ.Notes for reviewers
mainat 5ba9bc0 (after Raise the install budget to 6 MiB #2275, the 6 MiB install budget, which clears the engine-wasm precache check).keep_lines).linesrows are unchanged ([shaft, floor, riders]). A load counts the longest waits again from the saved people (restore_oldest), so no save format moves.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ms7trYcRHkvnh6N2YZqqjw