D3D12-GAME-ACTIONS-AND-WATCH-NO-STDERR-PANIC: never panic on closed stderr in game_actions and watch #2945
Open
bobcatchris wants to merge 2 commits from
upstream-pr/2945 into main
pull from: upstream-pr/2945
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Reference
ProjectLeonida/mandy!2945
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2945"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-01T20:28:03Z.
Summary
Claimed in the coordination issue as:
D3D12-GAME-ACTIONS-AND-WATCH-NO-STDERR-PANIC(https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7324371405), following@KelboLive's review note on #2840.Replaces panicking
eprintln!calls on background/hook paths inapps/leonidawith falliblelet _ = writeln!(std::io::stderr(), ...):d3d12/apps/leonida/src/game_actions.rs:log/log_to: writes%TEMP%\leonida-actions\log.txtfirst and writes to stderr withlet _ = writeln!(std::io::stderr(), ...)so a closed stderr pipe at shutdown never panics the title frame hook orleonida-game-actionsthread and never loses thelog.txtentry.deferred(unsafe extern "win64" fn): replaces theeprintln!in thecatch_unwinderror handler (which sat outsidecatch_unwindon anextern "win64"callback, where a stderr panic would abort across FFI) withlog(...), keeping it panic-free and also recording the failure inlog.txt.d3d12/apps/leonida/src/run.rs:report_watch(under#[cfg(all(windows, feature = "diagnostics"))], placed belowwatchsotools/d3d12_switches.pykeepsLEONIDA_WATCH's existing doc summary verbatim) usinglet _ = writeln!(std::io::stderr(), ...)so the detachedLEONIDA_WATCHpolling thread does not panic if stderr is closed.Tests & Verification
eprintln!restored inlog_toandreport_watch, both new subprocess closed-stderr tests fail (RED_EXIT=101, child panics on closed stderr pipe):game_actions::tests::log_writes_file_and_does_not_panic_when_stderr_pipe_is_closedrun::tests::watch_report_does_not_panic_when_stderr_pipe_is_closedcargo test --locked -p leonida --bin leonida --features diagnostics -- run::tests game_actions::tests: 11 passed, 0 failed.cargo test --locked -p leonida --bin leonida: 43 passed, 0 failed.python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: exit 0.python -I scripts/check_no_game_data.py d3d12/apps/leonida/src/game_actions.rs d3d12/apps/leonida/src/run.rs: exit 0.AI Assistance
AI-assisted using Gemini 4 Neon, including a separate read-only independent review pass (which caught a
d3d12_switches.pydoc-comment shadowing risk inrun.rsbefore opening the PR).Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T20:51:16Z.
Independent closed-stderr check for the launcher helpers on
8dc38550merged into1e3e316c. Under Win64 Wine 11.22, the two unmodified closed-pipe subprocess tests passed 3/3 each here and 3/3 each with #2946 and #2947 applied on the same base. The child checks that stderr really rejects a write. The action fixture verifies both file lines, and the watch fixture invokes the helper with three synthetic values.Restoring the old
eprintln!placement inlog_toand the old write inreport_watchon the combined tree made each of the same fixtures exit 101 in all three repeats. Thegame_actions::testsandrun::testsgroups passed 11/11 on both unmodified PR trees. The title watch worker and deferred game callback were outside this run.MEASURED with synthetic inputs, OpenAI Codex and a separate read-only review.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T21:28:41Z.
Review: COMMENTED
Reviewed at
8dc3855.log_towriting the file sink before the fallible stderr write is the right order, and restoringeprintln!makes the child test exit 101, so the guard is real. The FFI path is safe too:logsits outsidecatch_unwind, but no longer panics, so theextern "win64"callback cannot unwind across the boundary. No diagnostic regression — game actions still reachlog.txt(the deferred failure now gains a file entry too), and watch output is identical on a valid stderr.Tests are 11/11 under diagnostics and 43/43 default,
switches.mdcheck passes, and the merge is clean against current main.On the duplication with #2946/#2947: three PRs hand-rolling
let _ = writeln!(stderr, ...)across four files is tolerable for one-line call sites, and a shared helper would add aleonida_coreAPI for little gain — worth revisiting only if more detached diagnostic paths adopt it. Note the other detached paths still oneprintln!(player.rs,player_find.rs,native_scan.rs,agility.rs), which is outside this PR's claim but the natural next follow-up.Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-01T22:25:30Z.
Updated in fast-forward commit
d2c08c14fsowatch_report_does_not_panic_when_stderr_pipe_is_closedalso compiles and runs under defaultcargo test --workspace --exclude xtask --locked(.github/workflows/d3d12.yml:76), matchingprofile/stacksin #2947 (#[cfg(all(windows, any(feature = "diagnostics", test)))]onreport_watch).Verified locally:
cargo clippy --locked --no-deps -p leonida --all-targets -- -D warnings: 0 warnings, exit 0.cargo build --locked -p leonida --all-targets: 0 warnings, exit 0.cargo test --locked -p leonida --bin leonida -- run::tests game_actions::tests: 11 passed, 0 failed.cargo test --locked -p leonida --bin leonida --features diagnostics -- run::tests game_actions::tests: 11 passed, 0 failed.AI-assisted: Gemini 4 Neon
Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T05:33:41Z.
VERIFY-2945 — Linux, Fedora 45, Rust 1.98.1, cross-compiled for x86_64-pc-windows-gnu, Wine 11.21, no GPU device, no game files
Verdict: PASS. The pull request removes the last
eprintln!calls from the logging/watch paths — which abort the process when stderr is a closed pipe — and replaces them with best-effort writes that still feed the file sink. I reproduced the panic on the old expression and its absence on the new one under Wine, and the wholeleonidasuite shows no regression.Head
d2c08c14ff896, base the currentmain(8422def759cda), merge base99a29d10ee73, 2 files, +118/−7:d3d12/apps/leonida/src/game_actions.rs,d3d12/apps/leonida/src/run.rs.1. What it changes
eprintln!panics when the write to stderr fails, and three call sites sat on paths that can run at shutdown or on background threads where stderr may be a closed pipe:game_actions::logbegan witheprintln!("Leonida: game actions: {line}"). It is refactored intolog→log_to(dir, line), which writes the file sink first, then stderr best-effort: The comment says it outright: "does NOT useeprintln!, which panics if stderr fails … failed stderr writes are silently dropped."deferredtitle-frame hook's failure path switched fromeprintln!(...)tolog("the runtime's work in the title failed; …"), so that diagnostic also survives a broken stderr and reaches the log file;run::watch's value-change print switched fromeprintln!("Leonida: title+{rva:#x} = {value:#x}")to a newreport_watch(rva, value)that is the samelet _ = writeln!(std::io::stderr(), …)best-effort form, gated#[cfg(all(windows, any(feature = "diagnostics", test)))]with anallow(dead_code)for the non-diagnostics build.This is a root-cause fix (remove the panicking primitive from these paths), not a workaround; the helper extraction keeps it simple and modular, and the logging keeps its file sink as the durable record.
2. The new test checks the property that matters
The property is "a closed stderr pipe must not abort the process, and the file sink still gets the line." Both new tests are self-spawning: the parent spawns the test binary as a child with
stdin/stdout/stderrpiped, then drops the child's stderr (and stdin) so the child genuinely has a closed stderr pipe; the child assertswriteln!(stderr, "probe").is_err()and then calls the code under test; the parent asserts the child exited successfully with1 passedand (forlog_to) that both lines reachedlog.txt.Because the child asserts that writing to stderr fails, a pass proves the closed-pipe condition really held at runtime — if the write had succeeded, that
assert!would panic the child and the parent's"1 passed"check would fail. So these are not device-gated early-return tests (trap 1 does not apply). Running them directly in the PR's unittests binary under Wine:For the "never panic" claim I also reproduced the root cause on the old expression. I built a scratch Windows binary (run under Wine, because on Linux Rust's std reopens a closed fd 2 to
/dev/null, which masks the bug entirely) whose child is spawned with a closed stderr pipe:The old
eprintln!(exactly what the base'slog()did first) panics and kills the process (exit 101); the newlet _ = writeln!(std::io::stderr(), …)returns normally with the file sink intact. That is the bug the pull request fixes, shown on the old code and the new code.3. What the tests do here
tools/wine_red_green.py 2945 --crate leonida. The red side (merge base + only the PR's test changes) does not compile — the tests calllog_toandreport_watch, which only the pull request adds — so the tool falls back to "merge base vs green": does the head turn any test that passes on the base red?game_actions::tests::log_writes_file_and_does_not_panic_when_stderr_pipe_is_closed,run::tests::watch_report_does_not_panic_when_stderr_pipe_is_closed— bothokAgainst the repository's rule "a new test that fails on
mainand passes with the pull request": the new tests cannot compile onmain(they calllog_to/report_watch), and I showed separately that the old code really panics on a closed stderr, so the rule's intent — the test discriminates the bug — holds.4. Any failure I saw, and why it is not this pull request
None. No test failed on either side, so there is nothing to attribute. The only build failure was the expected red-side compile error (the tests reference
log_to/report_watch, absent on the base), which is why the tool fell back to base-vs-green.5. What I did not check
deferredtitle-frame hook, theleonida-game-actionsthread, or therun::watchpolling thread against a running game. The behaviour was verified through the extracted helpers and their self-spawning tests only.report_watch's#[cfg(all(windows, any(feature = "diagnostics", test)))]gating under a--no-default-features/non-diagnostics build; it compiled and ran in the default test build here, and the head built cleanly for the Windows target, but I did not build the non-diagnostics configuration separately.agility,census,settings_line) were run as part of the tool's 45/47 sweep but I did not enumerate their individual names; the per-test table above is driven by the tool's parsed results.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:31:44Z.
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:21:34Z.
RUN (in game, batch of seventeen render-path pull requests), each head merged with
git merge --no-ffonto main3c106eb2f, in one build: #311115b579756, #29485284c6eae, #26981f188c4f7, #294644bf554fe, #3001d924cbb65, #28320c861595a, #291558e8535cf, #2822d359a2f85, #2896c9c6b103d, #29838278ef1b9, #3115ba5121192, #2945d2c08c14f, #297574512d658, #295126da88e8e, #2800b6ebcedd4, #28937c7e99b48, #3113fa1460b6b(and #30970d7a451ab, merged since). RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:29:25Z.
Verification of #2945 (D3D12-GAME-ACTIONS-AND-WATCH-NO-STDERR-PANIC): third-party code review on Linux x86_64. The code was not built:
apps/leonidais Windows-only.d2c08c14f, merge base99a29d10e. It merges cleanly intomain45dc41f95. Diff:game_actions.rs+67/-6,run.rs+51/-1. CI passes on this head (6/6).Review
game_actions::lognow writeslog.txtfirst and then callslet _ = writeln!(stderr, ...), so a closed stderr no longer panics on the title's frame hook or on the actions thread. Thedeferredfailure path now goes throughlog(), so it is also written tolog.txt. That is a small behaviour change, and an improvement.run.rs: the watch thread'seprintln!is replaced byreport_watch. Its cfg isall(windows, any(feature = "diagnostics", test)), which matcheswatch'sall(windows, feature = "diagnostics")and the tests module'sall(test, windows). Noeprintln!is left ingame_actions.rsorrun.rs.1 passedand, forlog_to, the file contents. This is a sound pattern.$(git rev-parse --short HEAD)" literally; the hash it refers to isd2c08c14f.Status: the maintainer's in-game run on the current head is not posted yet.
Verdict: ready on code review (not built here: Windows-only). It still needs the in-game run.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-02T21:02:16Z.
@MoonEyes Updated the unexpanded commit reference in the comment above to
d2c08c14f, and noted thatd2c08c14falready has your2026-12-02T18:21:34Zin-game batch PASS (head kept untouched).AI-assisted: Gemini 4 Neon
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T05:13:27Z.
VERIFY-2945 — el cuarto caso del
eprintln!que hacepanic, y el binario sigue con un solo testEl título:
D3D12-GAME-ACTIONS-AND-WATCH-NO-STDERR-PANIC: never panic on close…Y este es el cuarto de la noche, todos del mismo autor en
leonidayleonida-loader:#2840(player context),#2946(crash),#3001(audio) y este. Cuatro maneras distintas de llegar al mismo sitio: una línea de log en un camino de apagado, en un proceso cuyostderrpuede estar cerrado.Y lo que hace a este distinto de los otros tres:
run.rs+52 — no es sólo unlet _, es cómo se cierra la partida.game_actions.rsson los comandos yrun.rsel bucle; que el segundo crezca 52 líneas en un cambio titulado «never panic» sugiere que el pánico estaba en el desmontaje y no en un mensaje.Lo que verifiqué: el binario compila y su único test pasa — y para un cambio en el camino de apagado, eso es literalmente nada. Lo que no puedo verificar: el apagado con el
stderrcerrado, que es lo que el PR arregla y lo que el test no ejerce.Y la observación que ya hice en
#2983sigue en pie, ahora con dos PRs del mismo autor:leonidatiene un test, y tres PRs suyos tocan su camino de salida sin tocar ese test. Si el autor tiene el arnés del hijo constderrroto que usó#2840(PLAYER_CONTEXT_CLOSED_STDERR_TEST), reutilizarlo aquí y en#3001es la única cosa que convertiría estos tres en verificables.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.