Repository navigation
fix(steam): stop marking working sessions as expired - #133
Conversation
Current Steam writes no MostRecent key in loginusers.vdf, so the post-switch watch never saw a sign-in and marked every switched account expired. The advanced Timestamp now decides alone; a MostRecent "0" still vetoes. A stored expired mark older than the account's last sign-in is no longer shown.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Head This fixes Steam accounts with working saved logins being shown as session expired. The login history no longer includes a No comments posted: the reviewers raised no finding. Review details
Commands run (11)Could not execute tests: no cargo/rustc in PATH or common cache locations, and rustup download to /tmp did not persist between execution calls so toolchain install under /work was not completed. Only static directory/README/Cargo metadata listing and diff inspection succeeded. Steam session-mark fix was not runtime-verified. failed · exit 1 · 0 s ls -R /work | head -n 200; echo "---"; cat /work/README.md 2>/dev/null | head -n 200; echo "---"; cat /work/package.json 2>/dev/null | head -n 200; echo "---"; cat /work/Cargo.toml 2>/dev/null | head -n 200; echo "---"; ls /work/*.mjs /work/*.md 2>/dev/null; cat /work/AGENTS.md 2>/dev/null | head -n 200passed · exit 0 · 0 s git -C /work diff --stat HEAD~1 2>/dev/null || git -C /work log --oneline -5; echo "==="; git -C /work diff HEAD~1 -- crates/accshift-core/src/platforms/session_marks.rs crates/accshift-core/src/platforms/steam/mod.rs crates/accshift-core/src/platforms/steam/session.rs 2>&1 | head -n 300
echo "---GATES---"; cat /work/scripts/gates.mjs 2>/dev/null | head -n 200
echo "---CONTRIB---"; cat /work/.github/CONTRIBUTING.md 2>/dev/null | head -n 300passed · exit 0 · 0 s git -C /work diff HEAD~1 -- crates/accshift-core/src/platforms/session_marks.rs crates/accshift-core/src/platforms/steam/session.rs crates/accshift-core/src/platforms/steam/mod.rs 2>&1 | head -n 500
echo "===TESTS DIFF==="; git -C /work diff HEAD~1 -- crates/accshift-core/src/platforms/steam/session_tests.rs crates/accshift-core/src/platforms/steam/tests.rs 2>&1 | head -n 400passed · exit 0 · 0 s git -C /work diff HEAD~1 -- crates/accshift-core/src/platforms/session_marks.rs crates/accshift-core/src/platforms/steam/mod.rs 2>&1 | cat
echo "===READ session.rs watch_step==="; sed -n '1,160p' /work/crates/accshift-core/src/platforms/steam/session.rspassed · exit 0 · 0 s cargo test -p accshift-core --lib platforms::steam::session::tests -- --test-threads=1 --nocapture 2>&1 | tail -n 80
echo "===EXIT:$?"passed · exit 0 · 0 s which rustc; which cargo; ls ~/.cargo/bin/ 2>&1 | head -n 20; ls /root/.cargo/bin/ 2>&1 | head -n 20; ls /usr/local/cargo/bin/ 2>&1 | head -n 20; find / -maxdepth 5 -name cargo -type f 2>/dev/null | head; echo "---"; cat /work/rust-toolchain* 2>/dev/null; cat /work/Cargo.toml | head -n 60passed · exit 0 · 0 s echo $PATH; echo "---HOME $HOME"; ls -la ~ 2>&1 | head -n 50; echo "--- env"; env | sort | head -n 50; echo "--- find cargo broader"; find /opt /usr /home /work -name "cargo*" 2>/dev/null | head -n 20; ls /opt/ 2>&1 | head -n 20; ls /usr/local/bin/ 2>&1 | head -n 40passed · exit 0 · 0 s which curl wget bun node python3 2>&1; curl --version 2>&1 | head -n 2; df -h 2>&1 | head -n 10; free -m 2>&1 | head -n 10passed · exit 0 · 0 s mkdir -p /work/.patrol-home /tmp/cargo-home; export HOME=/work/.patrol-home CARGO_HOME=/tmp/cargo-home RUSTUP_HOME=/tmp/rustup-home; curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh; echo "downloaded $? size:"; ls -lh /tmp/rustup.sh; head -n 5 /tmp/rustup.shfailed · exit 2 · 0 s export HOME=/work/.patrol-home CARGO_HOME=/tmp/cargo-home RUSTUP_HOME=/tmp/rustup-home PATH=/tmp/cargo-home/bin:$PATH
mkdir -p $HOME $CARGO_HOME $RUSTUP_HOME
sh /tmp/rustup.sh -y --profile minimal --default-toolchain stable 2>&1 | tail -n 40
echo "EXIT:$?"
ls -lh /tmp/cargo-home/bin/ 2>&1 | head -n 20passed · exit 0 · 0 s ls /work/ | head -n 50; echo "---check caches---"; ls -la /work/.cargo-home/bin 2>&1 | head; ls -la /work/.patrol-home 2>&1 | head; echo "---search host caches---"; ls /github 2>&1 | head; ls /opt/hostedtoolcache 2>&1 | head; find /usr /opt /github -maxdepth 6 -name "cargo" -type f 2>/dev/null | head; echo "---disk---"; df -h /work /tmp 2>&1 | head |
Note
Clanker Claude Opus 5.5 is responding on behalf of meetsu
Problem
After a Steam switch, accounts whose saved session works fine were marked "Session expired".
Current Steam no longer writes a
MostRecentkey inconfig/loginusers.vdf. On a real install, none of the 85 entries has one. Each entry only hasAccountName,PersonaName,RememberPassword,WantsOfflineMode,SkipOfflineModeWarning,AutoLoginandTimestamp.The post-switch watch only concluded "signed in" when the timestamp advanced and
MostRecentwas"1". With the key missing, every read while Steam ran said "not signed in". After two reads the watch concluded "refused" and stored an expired mark.Fix
LoginEntry.most_recentis nowOption<bool>, andNonemeans the key is absent.MostRecent "0"still vetoes it.detected_atis older than the account's last sign-inTimestamp. Steam has signed that account in since, either from accshift or by hand. This also clears the wrong marks already stored by 2.0.0.Tests
a_sign_in_without_any_most_recent_key_reads_signed_inuses a fixture in the current Steam format. It failed before the fix (left: NotSignedIn, right: SignedIn).an_expired_mark_older_than_the_last_sign_in_is_stalefailed before the fix.an_expired_mark_from_before_the_last_steam_sign_in_is_not_shownruns end to end throughplatform_marks, withpath_overridepointing at a temporary Steam folder.build-safe node scripts/gates.mjsexits 0: fmt, clippy, rust (2040 passed, 0 failed), worker, bundle and streamdeck all pass.Not verified: a real switch on a live Steam client.
Summary by CodeRabbit