WIP: Preload resume: a test with both switches on, and the findings line says it is done #459

Draft
Jesper-A wants to merge 1 commit from Jesper-A/Darner:up-preload-resume-review into Main
Collaborator

Refs #140

Contributor role (optional)

  • Fluxer ID:

What it changes

Follow-up to #140 (merged at a01c0ac63). It answers the points of TrustNo1's review of #140 that main still lacks: #140 (comment) ("worth one test with both switches on") and the same asked on the re-review, #140 (comment). It is a new PR because #140 is merged.

  • The problem on main: docs/findings.md still says the record beside window_mark's mark is a "follow-up once #153 is on main ... with a test with both switches on". The code is on main (window_mark, resumed_from_record in apps/darner/src/play.rs), but that test is not. Read from the code only.
  • What this does: one test, play::tests::with_both_switches_the_progress_record_sits_beside_the_shared_mark_for_every_exe. With DARNER_WARM_SHARED=1 and DARNER_PRELOAD_RESUME=1 it checks, with two files of different bytes:
    • the record is written beside the mark window_mark returns, which is the shared mark;
    • the second file reads the same record and shows "resuming: 7 files were left" (28 of 35);
    • with the shared mark off, the second file's own mark has no record, so nothing is resumed;
    • a record that saw the library saved writes the shared mark, and neither file opens the window.
  • docs/findings.md: that line now says it is done.
  • No code change outside the test module, no new switch, no behaviour change.

The other points of the review were already in main, and this PR does not touch them: the record beside the mark window_mark returns, step 3 read through #215's parser, and the "shaders are not fully preloaded" line printed only for an unfinished record (e6da89bcb, test the_not_preloaded_warning_is_not_said_for_a_finished_record).

Merge check: this branch is on main 47d21cd3b. Main is now d91d8e4d6. git merge-tree --write-tree trustno1/main <branch> gives a clean tree, no conflicts.

How it was tested

  • Tested revision: branch up-preload-resume-review @ b88ccdf96, based on main 47d21cd3b.
  • Commands and results (scoped, per package; the three workspace gates were not run):
    • cargo clippy -p darner --all-targets --locked -- -D warnings, and the same with --all-features: clean.
    • cargo test -p darner --bin darner --locked: 193 passed, 0 failed, 1 ignored.
    • cargo xtask policy through the pre-commit hook: ok.
  • Changes a default: no. Test and text only.
  • A/B result: none. No speed claim.
  • Gates run on that revision: only the scoped ones above. Not run: the workspace clippy (with and without --all-features) and cargo test --workspace --locked. There is no CI.
  • Gameplay: not run in game. The runs asked for on #140 were done by akimfomin on #140 itself (#140 (comment) sums them up); nothing new was run for this PR.
  • Shader wave sizes tested: no shader change.
  • Hardware dependence: see "Spec dependence".
  • Coverage gaps: the test uses temporary files and the record's reader and writer; it does not run a preload or the window.

Spec dependence

  • Likely general: file names and marks, no GPU specifics.
  • May depend on our specs: nothing known.
  • Untested elsewhere: not applicable (no game run).

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only). Not run in game; a test and a text line only.
  • This PR contains one change based on main: one test and one findings line.
  • The diff follows docs/asset-policy.md. (A test and text only; cargo xtask policy ok on the commit through the pre-commit hook.)
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #451, #435 and #447 change apps/darner/src/play.rs (this adds a test in the test module; I did not compare hunks, so a textual conflict is possible). None touches the same test or the findings line. #450 (ours) changes preload_ui.rs and warm.rs, not these files.
  • Replaces or overlaps: none found.

This change was made with AI assistance (Claude Code).

Refs #140 ## Contributor role (optional) - Fluxer ID: ## What it changes Follow-up to #140 (merged at `a01c0ac63`). It answers the points of TrustNo1's review of #140 that main still lacks: https://git.gtahub.st/TrustNo1/Darner/pulls/140#issuecomment-860311 ("worth one test with both switches on") and the same asked on the re-review, https://git.gtahub.st/TrustNo1/Darner/pulls/140#issuecomment-862147. It is a new PR because #140 is merged. - The problem on main: `docs/findings.md` still says the record beside `window_mark`'s mark is a "follow-up once #153 is on main ... with a test with both switches on". The code is on main (`window_mark`, `resumed_from_record` in `apps/darner/src/play.rs`), but that test is not. Read from the code only. - What this does: one test, `play::tests::with_both_switches_the_progress_record_sits_beside_the_shared_mark_for_every_exe`. With `DARNER_WARM_SHARED=1` and `DARNER_PRELOAD_RESUME=1` it checks, with two files of different bytes: - the record is written beside the mark `window_mark` returns, which is the shared mark; - the second file reads the same record and shows "resuming: 7 files were left" (28 of 35); - with the shared mark off, the second file's own mark has no record, so nothing is resumed; - a record that saw the library saved writes the shared mark, and neither file opens the window. - `docs/findings.md`: that line now says it is done. - No code change outside the test module, no new switch, no behaviour change. The other points of the review were already in main, and this PR does not touch them: the record beside the mark `window_mark` returns, step 3 read through #215's parser, and the "shaders are not fully preloaded" line printed only for an unfinished record (`e6da89bcb`, test `the_not_preloaded_warning_is_not_said_for_a_finished_record`). Merge check: this branch is on main `47d21cd3b`. Main is now `d91d8e4d6`. `git merge-tree --write-tree trustno1/main <branch>` gives a clean tree, no conflicts. ## How it was tested - Tested revision: branch `up-preload-resume-review` @ `b88ccdf96`, based on main `47d21cd3b`. - Commands and results (scoped, per package; the three workspace gates were not run): - `cargo clippy -p darner --all-targets --locked -- -D warnings`, and the same with `--all-features`: clean. - `cargo test -p darner --bin darner --locked`: 193 passed, 0 failed, 1 ignored. - `cargo xtask policy` through the pre-commit hook: ok. - Changes a default: no. Test and text only. - A/B result: none. No speed claim. - Gates run on that revision: only the scoped ones above. Not run: the workspace clippy (with and without `--all-features`) and `cargo test --workspace --locked`. There is no CI. - Gameplay: not run in game. The runs asked for on #140 were done by akimfomin on #140 itself (https://git.gtahub.st/TrustNo1/Darner/pulls/140#issuecomment-862147 sums them up); nothing new was run for this PR. - Shader wave sizes tested: no shader change. - Hardware dependence: see "Spec dependence". - Coverage gaps: the test uses temporary files and the record's reader and writer; it does not run a preload or the window. ## Spec dependence - Likely general: file names and marks, no GPU specifics. - May depend on our specs: nothing known. - Untested elsewhere: not applicable (no game run). ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). Not run in game; a test and a text line only. - [x] This PR contains one change based on `main`: one test and one findings line. - [ ] The diff follows `docs/asset-policy.md`. (A test and text only; `cargo xtask policy` ok on the commit through the pre-commit hook.) - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #451, #435 and #447 change `apps/darner/src/play.rs` (this adds a test in the test module; I did not compare hunks, so a textual conflict is possible). None touches the same test or the findings line. #450 (ours) changes `preload_ui.rs` and `warm.rs`, not these files. - Replaces or overlaps: none found. This change was made with AI assistance (Claude Code).
Follow-up to #140 as merged: a test that, with DARNER_WARM_SHARED=1 and
DARNER_PRELOAD_RESUME=1, the progress record sits beside the mark
window_mark returns, is shared by exes with different bytes, and a finished
record writes the shared mark so neither exe opens the window. The findings
line that promised this as a follow-up now says it is done.

This change was made with AI assistance (Claude Code).
Jesper-A force-pushed up-preload-resume-review from b88ccdf96f to 0eaad255b6 2026-12-05 16:39:57 +00:00 Compare
Author
Collaborator

Closing this old-engine PR because post-merge replaced the stopped-preload record this test covers (preload.rs:16-21). A test can be redone on post-merge if a resume record comes.

Written with AI assistance (Claude Code).

Closing this old-engine PR because post-merge replaced the stopped-preload record this test covers (`preload.rs:16-21`). A test can be redone on post-merge if a resume record comes. Written with AI assistance (Claude Code).
Jesper-A closed this pull request 2026-12-06 01:26:14 +00:00
Jesper-A reopened this pull request 2026-12-06 01:51:48 +00:00
Author
Collaborator

Reopened: Main is the default branch again, so the close note above no longer applies.

Written with AI assistance (Claude Code).

Reopened: Main is the default branch again, so the close note above no longer applies. Written with AI assistance (Claude Code).
TrustNo1 changed title from WIP: [pr-tests][startup] Preload resume: a test with both switches on, and the findings line says it is done to WIP: Preload resume: a test with both switches on, and the findings line says it is done 2026-12-06 03:28:43 +00:00
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'up-preload-resume-review:Jesper-A-up-preload-resume-review'
git switch 'Jesper-A-up-preload-resume-review'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'Main'
git merge --no-ff 'Jesper-A-up-preload-resume-review'
git switch 'Jesper-A-up-preload-resume-review'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'Jesper-A-up-preload-resume-review'
git switch 'Jesper-A-up-preload-resume-review'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'Jesper-A-up-preload-resume-review'
git switch 'Main'
git merge --squash 'Jesper-A-up-preload-resume-review'
git switch 'Main'
git merge --ff-only 'Jesper-A-up-preload-resume-review'
git switch 'Main'
git merge 'Jesper-A-up-preload-resume-review'
git push origin 'Main'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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
TrustNo1/Darner!459
No description provided.