fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) #2298

Merged
HumanBean merged 4 commits from dazemc/Longshot:fix/oot-first-night into main 2026-11-23 16:09:31 +00:00
Contributor

Summary

A save that still holds HrlField_isFirstNightTime_Adult (0x8592aa82) can never leave 20:00. The game's fixed-time check (f_8347c020, called from f_803edf70) zeroes the clock step while that Bool is 1 and quest 0x4dbca27f is not Ready. The story event that should clear it never ran on the report's save, so the Sun's Song and Debug → Set time are overwritten and the clock snaps back to night (#1064). Clearing the Bool by hand made the clock run, so the state is the problem, not the clock code.

This clears the flag when the save is outside Hyrule Field, where the first adult night cannot be. oot_inventory_refresh (twice a second) already reads Sequence_CurrentBanc; for a map that does not start with HyruleField and with no event running, it now writes 0 through the game's own oot_gamedata_set_bool and logs one line. HOS_OOT_FIRST_NIGHT_FIX=0 turns the repair off for a run. Hyrule Field is left alone: the adult-in-the-Field stuck case still needs the first-night event, and is named under Risks.

How to see it on main: take a save that stands outside Hyrule Field and set the Bool at progress.sav 0xe738 to 1 (the reporter's save, or a copy of the repository's market-entrance). Load it and read 0x8592aa82 through the control bridge (subscribe/watch --flags): it stays 1 on main. With this change it becomes 0 and the log says oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field).

Files to read first: host/hos_main.c (oot_first_night_fix and its call in oot_inventory_refresh), tests/test_oot_first_night.py, gpu/vk/switches.def.

Fixes #1064.

Testing

Tested: Linux (Arch, kernel 7.3.4-zen2, NVIDIA RTX 4070 Ti, driver 620.70.06), the game from dev.py rt over the shared base a2dc5385, headless through the control bridge, one game at a time through the queue, from a copy of the repository's market-entrance save with progress.sav 0xe738 set to 1:

  • main @ a2dc5385: the watch read 0x8592aa82 as 1 (six samples), and the run log had no clear line (main-20261122-124620/log.txt:1496 is map: Market_Child (child), and the log holds no clear line).
  • this PR, game run at 409be93c (the build's own version line; git range-diff a2dc5385..409be93c 753fb5af..61cd6e8b shows the branch's two commits identical): the watch read 0, and the log had oot: cleared the first adult night's time lock once (fix-20261122-122723/log.txt:1483).
  • this PR, the control save with the flag left 0, run at 409be93c (control-20261122-124735): the game reached play (map: Market_Child (child) at log:1626) and its log had no clear line (the repair writes nothing to a clear save). The live flag read timed out in the client's 2 s line window, so the control's value is the save's Bool (0), not a bridge sample. The first control, control-20261122-122936, stopped at intro (control: state boot -> intro at frame 1, log:244) and is not this evidence.
  • tests/test_oot_first_night.py on main @ a2dc5385: FAIL: the flag is cleared outside Hyrule Field: flag 1 (want 0), clears 0 (want 1); here: PASS under gcc and clang, with the repair on and with HOS_OOT_FIRST_NIGHT_FIX=0; the negative control (the Hyrule Field check forced) fails at the same case.
  • tests/run_all.py --jobs 4, which is not mise run test (that is run_all.py --strict), and not at 61cd6e8b on 753fb5af: on the head before the switch row and the event guard it gave 826 passed, 20 failed, 107 skipped. All 20 failing files fail identically on main a2dc5385; only three of the 20 are named here (test_sim_turf_pools, test_switch_table, test_vibration_menu). At 61cd6e8b on 753fb5af only the changed set has run (run_all.py --changed: 87 passed, 0 failed, 4 skipped), so the full strict suite has not run at this head; the box is unticked, and the run is to do after #2239's off/on pair (Checklist).
  • host/hos_main.c compiles for Windows with llvm-mingw (syntax-only, against the base's generated headers; the pack built it for Linux). Not linked or run on Windows; the Windows build and run is in Still to test.

Still to test:

  • Windows: build and run the same flag-set save, expecting flag 0 and the same log line (by hand, or @Beanstalk a Windows run of the flag-set save).
  • The reporter's save, where quest 0x4dbca27f is not Ready: load it and see the clock advance after the repair (by hand, the reporter).
  • Adult in Hyrule Field with the flag stuck: this change deliberately leaves it alone; it needs the first-night event or a separate decision (by hand, a maintainer).

Measurements

Verdict: fixed outside Hyrule Field: 0x8592aa82 goes 1 → 0 and the clear line appears once. The control save (flag 0) on this PR reached play with no clear line. The A/B game runs were at 409be93c over a2dc5385; git range-diff shows the branch's two commits identical after the rebase to 753fb5af, and git diff 409be93c 61cd6e8b -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c is empty. Since 61cd6e8b, the switch row's kind word and the test's compiler selection have changed. The switch kind is read only for the log label switches::report prints, and the compiler selection change does not change the game code path. The clock lock itself is the reporter's quest state and is Still to test.

Baseline: the A/B ran against a2dc5385, the branch's pre-rebase base, and the base changed since: git diff --stat a2dc5385 753fb5af is 78 files, 8634 insertions, 5147 deletions, host/rx_backend.c and many tests among them. Among the files this change reads, the fix's own three are byte-identical across the bases (git diff a2dc5385 753fb5af -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c is empty); gpu/vk/switches.def differs between the bases in other switches' rows (added, removed and edited), while this PR's row is added by the branch and its text is unchanged since the run. So the base's other changes are outside the fix's own files, and the logic the A/B exercises is unchanged; the run does not need repeating for it.

Setup: Arch, kernel 7.3.4-zen2, RTX 4070 Ti, NVIDIA 620.70.06; shared base a2dc5385; market-entrance copy with the flag set; one queue job, one game at a time; the flag read through the control bridge's subscribe with flags=0x8592aa82, six samples after the save is in play.

Before: main @ a2dc5385 After: this PR @ 409be93c
0x8592aa82 after loading the flag-set save (Market_Child) 1 (six samples) 0
the oot: cleared the first adult night's time lock line absent present, once

Risks

The repair only runs outside Hyrule Field and never while an event is playing. It writes the game's Bool in memory; a save keeps it only when the game saves. If a save legitimately holds the flag outside the Field (for example the escape's cutscene before the first-night event), the clock starts running once no event is playing; the log names the map, and HOS_OOT_FIRST_NIGHT_FIX=0 leaves the save as it is. The adult-in-Hyrule-Field stuck case is not repaired: the first-night event still has to run. No save, options, cache or file format changes; a revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (Rebased onto 753fb5af. The in-game A/B at a2dc5385 stands: git range-diff shows the branch's two commits identical, and of the files this change reads the fix's three are byte-identical across the bases; the base's other changes are outside the fix's own files.)
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (Reason it is unticked: the strict suite has not been reported at this head. mise run test is tests/run_all.py --strict (mise.toml:140-143). What has run is tests/run_all.py --jobs 4 on the head before the switch row and the event guard — 826 passed, 20 failed, 107 skipped — not --strict and not at 61cd6e8b on 753fb5af; only three of the 20 failures are named (test_sim_turf_pools, test_switch_table, test_vibration_menu), though all 20 were rerun on main a2dc5385 and fail there too. At 61cd6e8b on 753fb5af the changed set is 87 passed, 0 failed, 4 skipped (run_all.py --changed), not the whole suite. The strict suite had not been queued at 4f01eae0: #2239's off/on pair held the PC until 18:04:49. The planned run was mise run test -- --jobs 5 under MemoryMax=12G, no swap, as dev.py queue run 1064-suite-4f01eae0 --mode light; a result at the current head is needed before the box is ticked.)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def. (The row says kill: the repair is on by default and HOS_OOT_FIRST_NIGHT_FIX=0 turns it off, which is docs/dev/reference/switches.md:61's kill; the kind is only printed by switches::report.)
  • A check under tests/ that reads changed source is updated, not weakened. (tests/perf_pose_test.c gets a stand-in for the refresh's new call; the pose check itself is unchanged.)
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: syntax-only, x86_64-w64-mingw32-clang -fsyntax-only on host/hos_main.c against the base's generated headers; not linked or run. Linux: the pack's build. The Windows build and run stays in Still to test.)
  • Docs updated. (The switch's row in gpu/vk/switches.def now says kill, as the reference defines it; the code comment names the Hyrule Field limit.)
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). (Reason: the in-game runs are an RTX 4070 Ti on Linux, Tier 1 (docs/dev/standards.md:13); the Windows half of Tier 1 has not run this change, and is in Still to test.)
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary A save that still holds `HrlField_isFirstNightTime_Adult` (`0x8592aa82`) can never leave 20:00. The game's fixed-time check (`f_8347c020`, called from `f_803edf70`) zeroes the clock step while that Bool is 1 and quest `0x4dbca27f` is not Ready. The story event that should clear it never ran on the report's save, so the Sun's Song and Debug → Set time are overwritten and the clock snaps back to night (#1064). Clearing the Bool by hand made the clock run, so the state is the problem, not the clock code. This clears the flag when the save is **outside Hyrule Field**, where the first adult night cannot be. `oot_inventory_refresh` (twice a second) already reads `Sequence_CurrentBanc`; for a map that does not start with `HyruleField` and with no event running, it now writes 0 through the game's own `oot_gamedata_set_bool` and logs one line. `HOS_OOT_FIRST_NIGHT_FIX=0` turns the repair off for a run. Hyrule Field is left alone: the adult-in-the-Field stuck case still needs the first-night event, and is named under Risks. How to see it on main: take a save that stands outside Hyrule Field and set the Bool at `progress.sav` 0xe738 to 1 (the reporter's save, or a copy of the repository's `market-entrance`). Load it and read `0x8592aa82` through the control bridge (`subscribe`/`watch --flags`): it stays 1 on main. With this change it becomes 0 and the log says `oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field)`. Files to read first: `host/hos_main.c` (`oot_first_night_fix` and its call in `oot_inventory_refresh`), `tests/test_oot_first_night.py`, `gpu/vk/switches.def`. Fixes #1064. ## Testing **Tested:** Linux (Arch, kernel 7.3.4-zen2, NVIDIA RTX 4070 Ti, driver 620.70.06), the game from `dev.py rt` over the shared base `a2dc5385`, headless through the control bridge, one game at a time through the queue, from a copy of the repository's `market-entrance` save with `progress.sav` 0xe738 set to 1: - main @ `a2dc5385`: the watch read `0x8592aa82` as **1** (six samples), and the run log had no clear line (`main-20261122-124620/log.txt:1496` is `map: Market_Child (child)`, and the log holds no clear line). - this PR, game run at `409be93c` (the build's own version line; `git range-diff a2dc5385..409be93c 753fb5af..61cd6e8b` shows the branch's two commits identical): the watch read **0**, and the log had `oot: cleared the first adult night's time lock` once (`fix-20261122-122723/log.txt:1483`). - this PR, the control save with the flag left 0, run at `409be93c` (`control-20261122-124735`): the game reached play (`map: Market_Child (child)` at log:1626) and its log had no clear line (the repair writes nothing to a clear save). The live flag read timed out in the client's 2 s line window, so the control's value is the save's Bool (0), not a bridge sample. The first control, `control-20261122-122936`, stopped at intro (`control: state boot -> intro at frame 1`, log:244) and is not this evidence. - `tests/test_oot_first_night.py` on main @ `a2dc5385`: `FAIL: the flag is cleared outside Hyrule Field: flag 1 (want 0), clears 0 (want 1)`; here: PASS under gcc and clang, with the repair on and with `HOS_OOT_FIRST_NIGHT_FIX=0`; the negative control (the Hyrule Field check forced) fails at the same case. - `tests/run_all.py --jobs 4`, which is not `mise run test` (that is `run_all.py --strict`), and not at `61cd6e8b` on `753fb5af`: on the head before the switch row and the event guard it gave 826 passed, 20 failed, 107 skipped. All 20 failing files fail identically on main `a2dc5385`; only three of the 20 are named here (`test_sim_turf_pools`, `test_switch_table`, `test_vibration_menu`). At `61cd6e8b` on `753fb5af` only the changed set has run (`run_all.py --changed`: 87 passed, 0 failed, 4 skipped), so the full strict suite has not run at this head; the box is unticked, and the run is to do after #2239's off/on pair (Checklist). - `host/hos_main.c` compiles for Windows with llvm-mingw (syntax-only, against the base's generated headers; the pack built it for Linux). Not linked or run on Windows; the Windows build and run is in Still to test. **Still to test:** - Windows: build and run the same flag-set save, expecting flag 0 and the same log line (by hand, or `@Beanstalk a Windows run of the flag-set save`). - The reporter's save, where quest `0x4dbca27f` is not Ready: load it and see the clock advance after the repair (by hand, the reporter). - Adult in Hyrule Field with the flag stuck: this change deliberately leaves it alone; it needs the first-night event or a separate decision (by hand, a maintainer). ## Measurements **Verdict:** fixed outside Hyrule Field: `0x8592aa82` goes 1 → 0 and the clear line appears once. The control save (flag 0) on this PR reached play with no clear line. The A/B game runs were at `409be93c` over `a2dc5385`; `git range-diff` shows the branch's two commits identical after the rebase to `753fb5af`, and `git diff 409be93c 61cd6e8b -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c` is empty. Since `61cd6e8b`, the switch row's kind word and the test's compiler selection have changed. The switch kind is read only for the log label `switches::report` prints, and the compiler selection change does not change the game code path. The clock lock itself is the reporter's quest state and is Still to test. Baseline: the A/B ran against `a2dc5385`, the branch's pre-rebase base, and the base changed since: `git diff --stat a2dc5385 753fb5af` is 78 files, 8634 insertions, 5147 deletions, `host/rx_backend.c` and many tests among them. Among the files this change reads, the fix's own three are byte-identical across the bases (`git diff a2dc5385 753fb5af -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c` is empty); `gpu/vk/switches.def` differs between the bases in other switches' rows (added, removed and edited), while this PR's row is added by the branch and its text is unchanged since the run. So the base's other changes are outside the fix's own files, and the logic the A/B exercises is unchanged; the run does not need repeating for it. Setup: Arch, kernel 7.3.4-zen2, RTX 4070 Ti, NVIDIA 620.70.06; shared base `a2dc5385`; `market-entrance` copy with the flag set; one queue job, one game at a time; the flag read through the control bridge's `subscribe` with `flags=0x8592aa82`, six samples after the save is in play. | | Before: main @ a2dc5385 | After: this PR @ 409be93c | |---|---|---| | `0x8592aa82` after loading the flag-set save (Market_Child) | 1 (six samples) | 0 | | the `oot: cleared the first adult night's time lock` line | absent | present, once | ## Risks The repair only runs outside Hyrule Field and never while an event is playing. It writes the game's Bool in memory; a save keeps it only when the game saves. If a save legitimately holds the flag outside the Field (for example the escape's cutscene before the first-night event), the clock starts running once no event is playing; the log names the map, and `HOS_OOT_FIRST_NIGHT_FIX=0` leaves the save as it is. The adult-in-Hyrule-Field stuck case is not repaired: the first-night event still has to run. No save, options, cache or file format changes; a revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. (Rebased onto `753fb5af`. The in-game A/B at `a2dc5385` stands: `git range-diff` shows the branch's two commits identical, and of the files this change reads the fix's three are byte-identical across the bases; the base's other changes are outside the fix's own files.) - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (Reason it is unticked: the strict suite has not been reported at this head. `mise run test` is `tests/run_all.py --strict` (`mise.toml:140-143`). What has run is `tests/run_all.py --jobs 4` on the head before the switch row and the event guard — 826 passed, 20 failed, 107 skipped — not `--strict` and not at `61cd6e8b` on `753fb5af`; only three of the 20 failures are named (`test_sim_turf_pools`, `test_switch_table`, `test_vibration_menu`), though all 20 were rerun on main `a2dc5385` and fail there too. At `61cd6e8b` on `753fb5af` the changed set is 87 passed, 0 failed, 4 skipped (`run_all.py --changed`), not the whole suite. The strict suite had not been queued at `4f01eae0`: #2239's off/on pair held the PC until 18:04:49. The planned run was `mise run test -- --jobs 5` under `MemoryMax=12G`, no swap, as `dev.py queue run 1064-suite-4f01eae0 --mode light`; a result at the current head is needed before the box is ticked.) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. (The row says `kill`: the repair is on by default and `HOS_OOT_FIRST_NIGHT_FIX=0` turns it off, which is `docs/dev/reference/switches.md:61`'s `kill`; the kind is only printed by `switches::report`.) - [x] A check under `tests/` that reads changed source is updated, not weakened. (`tests/perf_pose_test.c` gets a stand-in for the refresh's new call; the pose check itself is unchanged.) - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: syntax-only, `x86_64-w64-mingw32-clang -fsyntax-only` on `host/hos_main.c` against the base's generated headers; not linked or run. Linux: the pack's build. The Windows build and run stays in Still to test.) - [x] Docs updated. (The switch's row in `gpu/vk/switches.def` now says `kill`, as the reference defines it; the code comment names the Hyrule Field limit.) - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). (Reason: the in-game runs are an RTX 4070 Ti on Linux, Tier 1 (`docs/dev/standards.md:13`); the Windows half of Tier 1 has not run this change, and is in Still to test.) - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
The flag HrlField_isFirstNightTime_Adult holds the clock at 20:00 while the first-night quest is not Ready; a save that still holds it outside Hyrule Field can never leave night (#1064). This cuts oot_inventory_refresh out of host/hos_main.c and runs it against made-up save state, with the repair both on and off: on main the flag stays 1, which is the first case's FAIL. The repair comes with the fix.

Assisted-by: DeepSeek V4.1 Flash
fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
409be93cc8
f_8347c020 holds the clock at 20:00 while the saved Bool HrlField_isFirstNightTime_Adult (0x8592aa82) is 1 and quest 0x4dbca27f is not Ready. The flag is only meaningful in Hyrule Field's first adult night; a save in the Market, the castle or anywhere else that still holds it never leaves night. oot_inventory_refresh now clears the flag there with the game's own Bool, logs one line, and leaves Hyrule Field alone. HOS_OOT_FIRST_NIGHT_FIX=0 turns it off for a run.

Tested: gcc and clang, tests/test_oot_first_night.py: fails on main at 'the flag is cleared outside Hyrule Field', passes here; the negative control (the Hyrule Field check forced) fails at the same case. In-game run still to do.

Assisted-by: DeepSeek V4.1 Flash
Author
Contributor

Tested in game: Linux Arch (kernel 7.3.4-zen2), RTX 4070 Ti, NVIDIA 620.70.06; headless through the control bridge, one game at a time in the queue, from a copy of market-entrance with progress.sav 0xe738 set to 1: main a2dc5385 read 0x8592aa82 as 1 (six samples) and logged no clear line; this PR 409be93c read 0 and logged 'oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field)' once. The flag-clear control reached play with no clear line; its live flag read timed out in the client's 2 s window. Still to test: Windows and the reporter's quest state.

Tested in game: Linux Arch (kernel 7.3.4-zen2), RTX 4070 Ti, NVIDIA 620.70.06; headless through the control bridge, one game at a time in the queue, from a copy of market-entrance with progress.sav 0xe738 set to 1: main a2dc5385 read 0x8592aa82 as 1 (six samples) and logged no clear line; this PR 409be93c read 0 and logged 'oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field)' once. The flag-clear control reached play with no clear line; its live flag read timed out in the client's 2 s window. Still to test: Windows and the reporter's quest state.
Author
Contributor

Rebase note, and the control's one gap.

  • Main moved after this opened. The branch is based on a2dc5385; main is now 753fb5af (10 commits: prompts, guide docs, Streamline, launcher, #2213's check fixes, #2228, #2258, #2193, #2227, #2194). None touches host/hos_main.c or tests/test_oot_first_night.py; gpu/vk/switches.def did, so a rebase would place HOS_OOT_FIRST_NIGHT_FIX in the new order. The PR is mergeable but 10 commits behind; the in-game A/B at a2dc5385 is the branch's base and still holds. I did not rebase without a word: a rebase gate returned confirm, so it is the maintainer's or the owner's call.
  • Control, one gap. The flag-clear save (Bool already 0) reached play in Market_Child and its log had no clear line. Its live flag read timed out in the client's 2 s line window, so the control's value is the save's Bool (0), not a bridge sample. The main/fix A/B is the evidence: main read 0x8592aa82 as 1 (six samples), no line; this branch read 0 and logged the clear line once.
Rebase note, and the control's one gap. - **Main moved after this opened.** The branch is based on `a2dc5385`; main is now `753fb5af` (10 commits: prompts, guide docs, Streamline, launcher, #2213's check fixes, #2228, #2258, #2193, #2227, #2194). None touches `host/hos_main.c` or `tests/test_oot_first_night.py`; `gpu/vk/switches.def` did, so a rebase would place `HOS_OOT_FIRST_NIGHT_FIX` in the new order. The PR is mergeable but 10 commits behind; the in-game A/B at `a2dc5385` is the branch's base and still holds. I did not rebase without a word: a rebase gate returned confirm, so it is the maintainer's or the owner's call. - **Control, one gap.** The flag-clear save (Bool already 0) reached play in `Market_Child` and its log had no clear line. Its live flag read timed out in the client's 2 s line window, so the control's value is the save's Bool (0), not a bridge sample. The main/fix A/B is the evidence: main read `0x8592aa82` as 1 (six samples), no line; this branch read 0 and logged the clear line once.
dazemc changed title from fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) to WIP: fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) 2026-11-22 20:52:15 +00:00
dazemc force-pushed fix/oot-first-night from 409be93cc8
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 61cd6e8bdb
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 9s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-22 20:54:57 +00:00
Compare
dazemc changed title from WIP: fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) to fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) 2026-11-22 20:54:59 +00:00
Author
Contributor

@HumanBean: #1064's first-night clock fix is ready for the fork CI and a review.

  • Fixed: a save outside Hyrule Field that still holds the first adult night's time lock now clears it through the game's own Bool; Hyrule Field is left alone.
  • Evidence: Testing and Measurements and the game-run note: the test fails on main and passes here; the in-game A/B on base a2dc5385 read the flag 1 -> 0 with the clear line once; the changed set on head 61cd6e8b is 87 passed, 0 failed, 4 skipped.
  • Caveat: the A/B is on a2dc5385, not the rebased head 61cd6e8b; the rebase changed no host or test code, only the switch row's order (rebase note).
  • Wanted: approve the fork CI runs and review 61cd6e8b. Ready to merge is 0/4 until Windows and the reporter's quest state are tested.
@HumanBean: #1064's first-night clock fix is ready for the fork CI and a review. - Fixed: a save outside Hyrule Field that still holds the first adult night's time lock now clears it through the game's own Bool; Hyrule Field is left alone. - Evidence: [Testing and Measurements](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2298) and the [game-run note](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2298#issuecomment-74712): the test fails on main and passes here; the in-game A/B on base `a2dc5385` read the flag 1 -> 0 with the clear line once; the changed set on head `61cd6e8b` is 87 passed, 0 failed, 4 skipped. - Caveat: the A/B is on `a2dc5385`, not the rebased head `61cd6e8b`; the rebase changed no host or test code, only the switch row's order ([rebase note](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2298#issuecomment-74717)). - Wanted: approve the fork CI runs and review `61cd6e8b`. Ready to merge is 0/4 until Windows and the reporter's quest state are tested.
dazemc left a comment

Checked the checklist at 61cd6e8b against the diff, the four runs under work/runs-1064/, and current main 753fb5af. The fix and the game-free test look sound; these are the entries I can't settle as written.

  1. mise run test is not the run quoted, and the full-suite numbers are stale. mise run test is tests/run_all.py --strict (mise.toml:140-143). The body's 826 passed / 20 failed / 107 skipped came from tests/run_all.py --jobs 4 on the head before the switch row and the event guard, not at 61cd6e8b on 753fb5af; the head's 87 passed / 0 failed / 4 skipped is the changed set (--changed), not the whole suite. docs/dev/standards.md:84 and docs/dev/developing.md:205 say a skip is not a pass. The 20 failures are said to fail on main too, but only three are named. Settle with a full mise run test at 61cd6e8b on 753fb5af (CI has the Vulkan/SPIR-V headers) and the full list of failures that also fail on main, or untick the box and state the substitute and its limits.

  2. The Measurements table names the wrong commit for the After run. The table says After: this PR @ 61cd6e8b, while the body's Testing says the game run was at 409be93c over a2dc5385. The exact proof is [hos BaseProcExecutor5] oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field) at fix-20261122-122723/log.txt:1483; main-20261122-124620/log.txt:1496 has map: Market_Child (child) and no clear line. Change the After column to 409be93c (or build and run 61cd6e8b). The code path is identical: git range-diff a2dc5385..409be93c 753fb5af..61cd6e8b shows = for both commits, and git diff 409be93c 61cd6e8b -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c is empty, so the run still proves the fix's code path; the table just names a commit that did not run.

  3. The baseline sentence says only gpu/vk/switches.def changed, but the base diff is 78 files. git diff --stat a2dc5385 753fb5af is 78 files, 8634 insertions, 5147 deletions, including host/rx_backend.c and many tests. Only switches.def changed among the files this change reads: git diff a2dc5385 753fb5af -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c is empty. Scope the sentence and say why the other base changes don't touch the fix's code path; the run does not need repeating for the logic, but the claim as written is false. The same scope is needed for the one-topic box's "the rebase changed no host or test file": the branch's two commits are identical, but the base did change host and test files.

  4. The switch's kind is wrong. gpu/vk/switches.def:150 has SW(HOS_OOT_FIRST_NIGHT_FIX, attempt, ...), but the switch is on by default (host/hos_main.c:785, env_on_or(..., 1)) and =0 turns the repair off. docs/dev/reference/switches.md:61 defines kill for exactly that; :62 defines attempt as off for everyone, "an experiment nobody ships." Change the kind to kill. tests/test_switch_table.py:155-159 only checks the kind is one of the six, so it passes either way. This is also the only evidence for "Docs updated", so that row currently misdocuments the switch.

  5. The control bullet describes the rerun, but the first control did not reach play. control-20261122-122936 stops at control: state boot -> intro at frame 1 (log line 244) and has no map: line; it cannot support "the control save reached play." control-20261122-124735 reaches map: Market_Child (child) at log line 1626 and has no clear line. Name the rerun in Tested and say the first control stopped at intro; say which run the "live flag read timed out" caveat refers to.

  6. The Windows box says "builds", but the evidence is -fsyntax-only: the body says "Windows not linked or run." Either link it, or reword the box/evidence to "compiles (syntax-only)" and keep the Windows run in Still to test.

  7. The Tier 1 hardware box is unticked with no reason. The in-game run is on an RTX 4070 Ti on Linux, which is Tier 1 (docs/dev/standards.md:13); the body does not say whether that settles Tier 1 and Windows remains, or why not. Add the reason beside the box. (The other unticked merge boxes are clear: 0 reviews, and 10 checks pending / 1 successful.)

Lines I could read:

  • fix-20261122-122723/log.txt:1482: [hos BaseProcExecutor5] map: Market_Child (child); line 1483: [hos BaseProcExecutor5] oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field).
  • main-20261122-124620/log.txt:1496: [hos BaseProcExecutor3] map: Market_Child (child); no clear line anywhere in the log.
  • control-20261122-124735/log.txt:1626: [hos BaseProcExecutor1] map: Market_Child (child); no clear line anywhere in the log.
  • control-20261122-122936/log.txt:244: control: state boot -> intro at frame 1; no map: line.
Checked the checklist at `61cd6e8b` against the diff, the four runs under `work/runs-1064/`, and current `main` `753fb5af`. The fix and the game-free test look sound; these are the entries I can't settle as written. 1. **`mise run test` is not the run quoted, and the full-suite numbers are stale.** `mise run test` is `tests/run_all.py --strict` (`mise.toml:140-143`). The body's 826 passed / 20 failed / 107 skipped came from `tests/run_all.py --jobs 4` on the head before the switch row and the event guard, not at `61cd6e8b` on `753fb5af`; the head's 87 passed / 0 failed / 4 skipped is the changed set (`--changed`), not the whole suite. `docs/dev/standards.md:84` and `docs/dev/developing.md:205` say a skip is not a pass. The 20 failures are said to fail on `main` too, but only three are named. Settle with a full `mise run test` at `61cd6e8b` on `753fb5af` (CI has the Vulkan/SPIR-V headers) and the full list of failures that also fail on `main`, or untick the box and state the substitute and its limits. 2. **The Measurements table names the wrong commit for the After run.** The table says `After: this PR @ 61cd6e8b`, while the body's Testing says the game run was at `409be93c` over `a2dc5385`. The exact proof is `[hos BaseProcExecutor5] oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field)` at `fix-20261122-122723/log.txt:1483`; `main-20261122-124620/log.txt:1496` has `map: Market_Child (child)` and no clear line. Change the After column to `409be93c` (or build and run `61cd6e8b`). The code path is identical: `git range-diff a2dc5385..409be93c 753fb5af..61cd6e8b` shows `=` for both commits, and `git diff 409be93c 61cd6e8b -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c` is empty, so the run still proves the fix's code path; the table just names a commit that did not run. 3. **The baseline sentence says only `gpu/vk/switches.def` changed, but the base diff is 78 files.** `git diff --stat a2dc5385 753fb5af` is 78 files, 8634 insertions, 5147 deletions, including `host/rx_backend.c` and many tests. Only `switches.def` changed among the files this change reads: `git diff a2dc5385 753fb5af -- host/hos_main.c tests/test_oot_first_night.py tests/perf_pose_test.c` is empty. Scope the sentence and say why the other base changes don't touch the fix's code path; the run does not need repeating for the logic, but the claim as written is false. The same scope is needed for the one-topic box's "the rebase changed no host or test file": the branch's two commits are identical, but the base did change host and test files. 4. **The switch's kind is wrong.** `gpu/vk/switches.def:150` has `SW(HOS_OOT_FIRST_NIGHT_FIX, attempt, ...)`, but the switch is on by default (`host/hos_main.c:785`, `env_on_or(..., 1)`) and `=0` turns the repair off. `docs/dev/reference/switches.md:61` defines `kill` for exactly that; `:62` defines `attempt` as off for everyone, "an experiment nobody ships." Change the kind to `kill`. `tests/test_switch_table.py:155-159` only checks the kind is one of the six, so it passes either way. This is also the only evidence for "Docs updated", so that row currently misdocuments the switch. 5. **The control bullet describes the rerun, but the first control did not reach play.** `control-20261122-122936` stops at `control: state boot -> intro at frame 1` (log line 244) and has no `map:` line; it cannot support "the control save reached play." `control-20261122-124735` reaches `map: Market_Child (child)` at log line 1626 and has no clear line. Name the rerun in Tested and say the first control stopped at intro; say which run the "live flag read timed out" caveat refers to. 6. **The Windows box says "builds", but the evidence is `-fsyntax-only`:** the body says "Windows not linked or run." Either link it, or reword the box/evidence to "compiles (syntax-only)" and keep the Windows run in Still to test. 7. **The Tier 1 hardware box is unticked with no reason.** The in-game run is on an RTX 4070 Ti on Linux, which is Tier 1 (`docs/dev/standards.md:13`); the body does not say whether that settles Tier 1 and Windows remains, or why not. Add the reason beside the box. (The other unticked merge boxes are clear: 0 reviews, and 10 checks pending / 1 successful.) Lines I could read: - `fix-20261122-122723/log.txt:1482`: `[hos BaseProcExecutor5] map: Market_Child (child)`; line 1483: `[hos BaseProcExecutor5] oot: cleared the first adult night's time lock (the save was in Market_Child, outside Hyrule Field)`. - `main-20261122-124620/log.txt:1496`: `[hos BaseProcExecutor3] map: Market_Child (child)`; no clear line anywhere in the log. - `control-20261122-124735/log.txt:1626`: `[hos BaseProcExecutor1] map: Market_Child (child)`; no clear line anywhere in the log. - `control-20261122-122936/log.txt:244`: `control: state boot -> intro at frame 1`; no `map:` line.
fix(vk): HOS_OOT_FIRST_NIGHT_FIX is a kill switch, not an attempt
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
4f01eae093
The repair is on by default (host/hos_main.c:785, env_on_or(..., 1)) and
HOS_OOT_FIRST_NIGHT_FIX=0 turns it off, which is what
docs/dev/reference/switches.md:61 calls `kill`; `attempt` there is "off for
everyone: an experiment nobody ships". The kind is only printed by
switches::report, so this changes no run's behaviour. Raised by the review
on #2298.

Assisted-by: DeepSeek V4.1 Flash
dazemc changed title from fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) to WIP: fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) 2026-11-23 00:17:43 +00:00
Author
Contributor

@HumanBean: the audit on #2298 stands on every point; this pass fixed the code and the description, and the PR is back to WIP until the strict suite runs.

  • The switch's kind is now kill (4f01eae0, one commit on 61cd6e8b): the repair is on by default and HOS_OOT_FIRST_NIGHT_FIX=0 turns it off, which is what docs/dev/reference/switches.md:61 defines; :62's attempt is off for everyone. No test pinned the kind — tests/test_switch_table.py checks only that it is one of the six — so no test changed.
  • The CI ask from 22:44 was for 61cd6e8b; the head is now 4f01eae0, so that ask is stale. I am not re-asking in this pass.
  • The mise run test box is unticked, with the run it actually had: tests/run_all.py --jobs 4 on the head before the switch row and the event guard (826 passed, 20 failed, 107 skipped), not --strict and not at this head; only three of the 20 failures are named. The strict suite is not queued yet: #2239's off/on pair holds the PC until 18:04:49 and a queue job would void it. After it: mise run test -- --jobs 5 under MemoryMax=12G, no swap, at 4f01eae0.
  • Measurements now cite the run at 409be93c (not 61cd6e8b) and say the three code files are identical across them; the baseline says 78 files changed in the base and scopes the claim to the files this change reads; the control cites control-20261122-124735 (log:1626, no clear line) and says the earlier control-20261122-122936 stopped at intro (log:244); the Windows box says syntax-only and not linked or run; Tier 1 is unticked because the run is an RTX 4070 Ti on Linux and Windows has not run.

Approval and pr ready are yours once the suite result is in.

@HumanBean: the audit on #2298 stands on every point; this pass fixed the code and the description, and the PR is back to WIP until the strict suite runs. - The switch's kind is now `kill` (`4f01eae0`, one commit on `61cd6e8b`): the repair is on by default and `HOS_OOT_FIRST_NIGHT_FIX=0` turns it off, which is what `docs/dev/reference/switches.md:61` defines; `:62`'s `attempt` is off for everyone. No test pinned the kind — `tests/test_switch_table.py` checks only that it is one of the six — so no test changed. - The CI ask from 22:44 was for `61cd6e8b`; the head is now `4f01eae0`, so that ask is stale. I am not re-asking in this pass. - The `mise run test` box is unticked, with the run it actually had: `tests/run_all.py --jobs 4` on the head before the switch row and the event guard (826 passed, 20 failed, 107 skipped), not `--strict` and not at this head; only three of the 20 failures are named. The strict suite is not queued yet: #2239's off/on pair holds the PC until 18:04:49 and a queue job would void it. After it: `mise run test -- --jobs 5` under `MemoryMax=12G`, no swap, at `4f01eae0`. - Measurements now cite the run at `409be93c` (not `61cd6e8b`) and say the three code files are identical across them; the baseline says 78 files changed in the base and scopes the claim to the files this change reads; the control cites `control-20261122-124735` (log:1626, no clear line) and says the earlier `control-20261122-122936` stopped at intro (log:244); the Windows box says syntax-only and not linked or run; Tier 1 is unticked because the run is an RTX 4070 Ti on Linux and Windows has not run. Approval and `pr ready` are yours once the suite result is in.
Owner
@review
BeanBot left a comment

Recommendation: Approve. The repair clears the flag in the reported Linux test, but the new check ignores the configured C compiler and can be skipped on supported setups. The reported clock lock and the normal first-night story sequence still need an in-game check. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change clears a lingering first-adult-night flag outside Hyrule Field, with a switch to disable the repair. It leaves the Hyrule Field case unresolved and adds a default-on save-state modification whose effect on the normal story sequence has not yet been demonstrated.

Should fix (1): not blocking, but worth doing before merging.

  • L1 tests/test_oot_first_night.py:21: The test hard-codes gcc instead of using the suite's selected C compiler. (more on the line) Do: Use the suite's {cc} placeholder and handle the selected compiler command consistently with other C tests.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L2 host/hos_main.c:786: The observed flag change has not been shown to restore the reporter's clock or to preserve the normal first-night sequence. (more on the line) Do: Run the affected quest state and a normal first-adult-night transition with the repair enabled; check that time advances in the stuck case and that the intended event and time lock still complete normally.

@fix can do L1.

Checks: Still running: 9 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven for the reported clock lock: the Linux A/B observed the flag change from 1 to 0, but used a child save with the flag set artificially. The reporter's quest state and an advancing clock have not been tested.

Other systems: The repair runs during Link's updates on Windows and Linux, regardless of GPU, and can alter a flag later saved by the game. Windows was syntax-checked but not linked or run; the normal first-night sequence and the reporter's save remain untested.

Switches: HOS_OOT_FIRST_NIGHT_FIX is added, on by default; 0 disables the repair. Its row correctly identifies it as a kill switch, but the default's safety through the normal story sequence is unproven.

Reviewed: 4f01eae093 against 753fb5af68: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, the full diff, commit messages, the new test and perf_pose_test.c, and the changed host code with its caller and game-data helpers. Skimmed the switch reference and related tests. The rest of host/hos_main.c and switches.def were not read in full; recorded run files and the sibling Tooling checkout were unavailable.; nothing run (a code review).

Checked and fine:

  • The change adds no game-derived files, generated files, or renderer API changes.
  • All three commits record AI assistance.
  • The fixture exercises the switch-off path and the Field and active-event guards.

Testing: No commands from the pull request or tests were run, as requested. The supplied CI checks are still running.

Overlaps and merge order: Not checked; network access was unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The repair clears the flag in the reported Linux test, but the new check ignores the configured C compiler and can be skipped on supported setups. The reported clock lock and the normal first-night story sequence still need an in-game check. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change clears a lingering first-adult-night flag outside Hyrule Field, with a switch to disable the repair. It leaves the Hyrule Field case unresolved and adds a default-on save-state modification whose effect on the normal story sequence has not yet been demonstrated. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `tests/test_oot_first_night.py:21`: The test hard-codes gcc instead of using the suite's selected C compiler. (more on the line) **Do:** Use the suite's {cc} placeholder and handle the selected compiler command consistently with other C tests. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L2** `host/hos_main.c:786`: The observed flag change has not been shown to restore the reporter's clock or to preserve the normal first-night sequence. (more on the line) **Do:** Run the affected quest state and a normal first-adult-night transition with the repair enabled; check that time advances in the stuck case and that the intended event and time lock still complete normally. `@fix` can do L1. **Checks:** Still running: 9 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the reported clock lock: the Linux A/B observed the flag change from 1 to 0, but used a child save with the flag set artificially. The reporter's quest state and an advancing clock have not been tested. **Other systems:** The repair runs during Link's updates on Windows and Linux, regardless of GPU, and can alter a flag later saved by the game. Windows was syntax-checked but not linked or run; the normal first-night sequence and the reporter's save remain untested. **Switches:** HOS_OOT_FIRST_NIGHT_FIX is added, on by default; 0 disables the repair. Its row correctly identifies it as a kill switch, but the default's safety through the normal story sequence is unproven. **Reviewed:** 4f01eae09318 against 753fb5af6860: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, the full diff, commit messages, the new test and perf_pose_test.c, and the changed host code with its caller and game-data helpers. Skimmed the switch reference and related tests. The rest of host/hos_main.c and switches.def were not read in full; recorded run files and the sibling Tooling checkout were unavailable.; nothing run (a code review). **Checked and fine:** - The change adds no game-derived files, generated files, or renderer API changes. - All three commits record AI assistance. - The fixture exercises the switch-off path and the Field and active-event guards. **Testing:** No commands from the pull request or tests were run, as requested. The supplied CI checks are still running. **Overlaps and merge order:** Not checked; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
host/hos_main.c Outdated
@ -776,0 +783,4 @@
static int oot_first_night_fix(Ctx *c, const char *map) {
static int on = -1;
if (on < 0) on = env_on_or("HOS_OOT_FIRST_NIGHT_FIX", 1);
if (!on || !map[0] || !strncmp(map, "HyruleField", 11) || oot_event_playing(c)) return 0;
Member

L2 (should fix): The observed flag change has not been shown to restore the reporter's clock or to preserve the normal first-night sequence.

When: The recorded run uses a child Market save with the flag set artificially. The repair also clears a legitimately set flag outside the Field as soon as no event is playing, so the recorded run does not show what happens through the escape and first-night transition.

Do: Run the affected quest state and a normal first-adult-night transition with the repair enabled; check that time advances in the stuck case and that the intended event and time lock still complete normally.

**L2** (should fix): The observed flag change has not been shown to restore the reporter's clock or to preserve the normal first-night sequence. *When:* The recorded run uses a child Market save with the flag set artificially. The repair also clears a legitimately set flag outside the Field as soon as no event is playing, so the recorded run does not show what happens through the escape and first-night transition. **Do:** Run the affected quest state and a normal first-adult-night transition with the repair enabled; check that time advances in the stuck case and that the intended event and time lock still complete normally.
@ -0,0 +18,4 @@
import tempfile
from pathlib import Path
RUN_ALL_ARGS = ["--cc", "gcc"]
Member

L1 (should fix): The test hard-codes gcc instead of using the suite's selected C compiler.

When: On a supported clang-only machine, or when CC selects clang, run_all checks for gcc and skips this test if gcc is absent; when gcc is present it ignores CC. Thus the repair is not checked with the configured compiler and the strict suite can fail on a missing gcc.

Do: Use the suite's {cc} placeholder and handle the selected compiler command consistently with other C tests.

**L1** (should fix): The test hard-codes gcc instead of using the suite's selected C compiler. *When:* On a supported clang-only machine, or when CC selects clang, run_all checks for gcc and skips this test if gcc is absent; when gcc is present it ignores CC. Thus the repair is not checked with the configured compiler and the strict suite can fail on a missing gcc. **Do:** Use the suite's {cc} placeholder and handle the selected compiler command consistently with other C tests.
Owner
@fix
BeanBot force-pushed fix/oot-first-night from 4f01eae093
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 674fb6a3c9
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 37s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 39s
Third-party parts / As their notes say (pull_request) Successful in 50s
PR description / Description follows the template (pull_request_target) Failing after 26s
CI / Website build and checks (pull_request) Successful in 19m41s
2026-11-23 16:03:27 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The repair clears the flag in the reported test state, but it has not yet been shown to restore the reporter’s clock or preserve the normal first-night sequence. Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is 674fb6a3c9. I rebased it onto main (6acae6aa87). I edited its description to match the change.

Changed

  • Use the selected C compiler in tests/test_oot_first_night.py:24: Uses the suite’s {cc} placeholder and shared compiler-command parsing, including CC and compiler flags. Tests were not run, as requested.

Nothing was built or run: the checks run again on the new head.

The change clears a lingering first-night time lock outside Hyrule Field, with an event guard and a switch to disable the repair. The compiler-selection fix lets the game-free test use the suite’s selected compiler without changing the game repair.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L2 host/hos_main.c:786: The observed flag change has not been shown to restore the reporter's clock or to preserve the normal first-night sequence. When: The recorded run uses a child Market save with the flag set artificially. The repair also clears a legitimately set flag outside the Field as soon as no event is playing, so the recorded run does not show what happens through the escape and first-night transition. Do: Run the affected quest state and a normal first-adult-night transition with the repair enabled; check that time advances in the stuck case and that the intended event and time lock still complete normally.

Checks: they run again on this head; a failure shows on the pull request.

Also noticed (2; not asked for, not blocking)
  • The strict suite and Windows game run remain outstanding as recorded in the pull request.
  • The strict suite and Windows build and game run remain unreported at the current head.
More: does it help, other systems, switches, what was read

Does it help: Unproven for the reported clock problem: the Linux A/B read the flag as 1 on main and 0 with the repair, but did not show the reporter’s clock advancing or the normal story sequence completing.

Other systems: The repair runs on Windows and Linux and can affect saves outside Hyrule Field; Windows and the normal first-night sequence have not been run. GPU-specific behavior is not implicated.

Switches: HOS_OOT_FIRST_NIGHT_FIX defaults on; setting it to 0 disables the repair. Its kill-switch classification matches that behavior, but the default’s safety for the normal story sequence remains unverified.

Reviewed: 674fb6a3c9 against 6acae6aa87: Read tests/test_oot_first_night.py and tests/compiler_command.py in full, the compiler fix diff, the relevant host refresh and setter context, repository rules and PR template. The much larger base-to-HEAD diff and other changed files were skimmed, not read in full; recorded runs were assessed from the supplied description and comments.; nothing run (a code review).

Checked and fine:

  • The test passes the suite’s selected compiler through the shared compiler-command parser, including compiler flags.
  • The compiler-selection fix leaves the game repair in place.

Testing: No commands from the project were run. The supplied Linux game run and game-free test show the flag clearing; the reporter’s clock and normal first-night sequence still need in-game verification.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The repair clears the flag in the reported test state, but it has not yet been shown to restore the reporter’s clock or preserve the normal first-night sequence. Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is 674fb6a3c9e8. I rebased it onto `main` (6acae6aa8752). I edited its description to match the change. **Changed** - **Use the selected C compiler in tests/test_oot_first_night.py:24**: Uses the suite’s {cc} placeholder and shared compiler-command parsing, including CC and compiler flags. Tests were not run, as requested. Nothing was built or run: the checks run again on the new head. The change clears a lingering first-night time lock outside Hyrule Field, with an event guard and a switch to disable the repair. The compiler-selection fix lets the game-free test use the suite’s selected compiler without changing the game repair. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L2** `host/hos_main.c:786`: The observed flag change has not been shown to restore the reporter's clock or to preserve the normal first-night sequence. *When:* The recorded run uses a child Market save with the flag set artificially. The repair also clears a legitimately set flag outside the Field as soon as no event is playing, so the recorded run does not show what happens through the escape and first-night transition. **Do:** Run the affected quest state and a normal first-adult-night transition with the repair enabled; check that time advances in the stuck case and that the intended event and time lock still complete normally. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The strict suite and Windows game run remain outstanding as recorded in the pull request. - The strict suite and Windows build and game run remain unreported at the current head. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the reported clock problem: the Linux A/B read the flag as 1 on main and 0 with the repair, but did not show the reporter’s clock advancing or the normal story sequence completing. **Other systems:** The repair runs on Windows and Linux and can affect saves outside Hyrule Field; Windows and the normal first-night sequence have not been run. GPU-specific behavior is not implicated. **Switches:** HOS_OOT_FIRST_NIGHT_FIX defaults on; setting it to 0 disables the repair. Its kill-switch classification matches that behavior, but the default’s safety for the normal story sequence remains unverified. **Reviewed:** 674fb6a3c9e8 against 6acae6aa8752: Read tests/test_oot_first_night.py and tests/compiler_command.py in full, the compiler fix diff, the relevant host refresh and setter context, repository rules and PR template. The much larger base-to-HEAD diff and other changed files were skimmed, not read in full; recorded runs were assessed from the supplied description and comments.; nothing run (a code review). **Checked and fine:** - The test passes the suite’s selected compiler through the shared compiler-command parser, including compiler flags. - The compiler-selection fix leaves the game repair in place. **Testing:** No commands from the project were run. The supplied Linux game run and game-free test show the flag clearing; the reporter’s clock and normal first-night sequence still need in-game verification. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
HumanBean changed title from WIP: fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) to fix(oot): a save left outside Hyrule Field in the first adult night's time lock runs its clock again (#1064) 2026-11-23 16:09:04 +00:00
HumanBean deleted branch fix/oot-first-night 2026-11-23 16:09:34 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2298
No description provided.