Summary
On current upstream head 58d4e0c63979fa6d7056e39df94a407e64bad14d, assignment --force list still restores ~/Library/Caches/org.sshwy.pku3b/ua.json and reuses that Blackboard session if it is valid. The command therefore ignores the fresh-session part of --force.
Reproduction
Environment used for the reproduced run:
- macOS
- current upstream binary built from
58d4e0c63979fa6d7056e39df94a407e64bad14d
- existing
cfg.toml for a valid account
- temporary
HOME containing only that config and a valid Blackboard cookie jar copied to the legacy shared path ~/Library/Caches/org.sshwy.pku3b/ua.json
Reproduction steps:
- Create a fresh temporary
HOME.
- Symlink the existing
cfg.toml into ~/Library/Application Support/org.sshwy.pku3b/cfg.toml under that temporary home.
- Create
~/Library/Caches/org.sshwy.pku3b/ under that temporary home.
- Copy a valid Blackboard session cookie jar into
~/Library/Caches/org.sshwy.pku3b/ua.json.
- Run:
env HOME=/tmp/pku3b-upstream-force-reuse.XXXXXX NO_COLOR=1 RUST_LOG=info /private/tmp/pku3b-upstream-58d4e0c-node1/target/release/pku3b assignment --force list
Observed result
The command exits 0, prints the normal assignment listing, and logs:
[INFO pku3b::api::builder] Cache TTL: None
[INFO pku3b::api::builder] Download Artifact TTL: None
[INFO pku3b::api::blackboard] reuse saved login session
That shows --force disabled the TTL caches but still restored and reused the saved Blackboard session.
Expected result
assignment --force list should not restore or reuse a saved Blackboard login session. It should start from a fresh Blackboard session path for that run.
Why this appears to be happening
The current upstream flow still wires the shared cookie-restore path in the force case:
src/utils.rs:26-27 uses one shared Blackboard cookie path: projectdir().cache_dir().join("ua.json")
src/cli/mod.rs:138-146 always sets cookie_restore_path(Some(utils::default_user_agent_data_path()))
src/cli/mod.rs:150-154 calls build_client(!force), so force disables TTL caching but does not disable Blackboard cookie restore/save
src/api/blackboard.rs:6-21 reuses any restored session whose Blackboard homepage preflight succeeds and logs reuse saved login session
src/http.rs:48-65 saves and loads the cookie jar directly on that shared path
Distinction from nearby issues
This is different from the other open Blackboard session bugs:
- not the cache-path failure in
#44, because the cache path is valid here
- not the cross-account reuse in
#45, because the configured account is unchanged here
- not the stale-session reauthentication failure in
#46, because the saved session is valid and the command succeeds by reusing it
Summary
On current upstream head
58d4e0c63979fa6d7056e39df94a407e64bad14d,assignment --force liststill restores~/Library/Caches/org.sshwy.pku3b/ua.jsonand reuses that Blackboard session if it is valid. The command therefore ignores the fresh-session part of--force.Reproduction
Environment used for the reproduced run:
58d4e0c63979fa6d7056e39df94a407e64bad14dcfg.tomlfor a valid accountHOMEcontaining only that config and a valid Blackboard cookie jar copied to the legacy shared path~/Library/Caches/org.sshwy.pku3b/ua.jsonReproduction steps:
HOME.cfg.tomlinto~/Library/Application Support/org.sshwy.pku3b/cfg.tomlunder that temporary home.~/Library/Caches/org.sshwy.pku3b/under that temporary home.~/Library/Caches/org.sshwy.pku3b/ua.json.Observed result
The command exits
0, prints the normal assignment listing, and logs:[INFO pku3b::api::builder] Cache TTL: None[INFO pku3b::api::builder] Download Artifact TTL: None[INFO pku3b::api::blackboard] reuse saved login sessionThat shows
--forcedisabled the TTL caches but still restored and reused the saved Blackboard session.Expected result
assignment --force listshould not restore or reuse a saved Blackboard login session. It should start from a fresh Blackboard session path for that run.Why this appears to be happening
The current upstream flow still wires the shared cookie-restore path in the force case:
src/utils.rs:26-27uses one shared Blackboard cookie path:projectdir().cache_dir().join("ua.json")src/cli/mod.rs:138-146always setscookie_restore_path(Some(utils::default_user_agent_data_path()))src/cli/mod.rs:150-154callsbuild_client(!force), soforcedisables TTL caching but does not disable Blackboard cookie restore/savesrc/api/blackboard.rs:6-21reuses any restored session whose Blackboard homepage preflight succeeds and logsreuse saved login sessionsrc/http.rs:48-65saves and loads the cookie jar directly on that shared pathDistinction from nearby issues
This is different from the other open Blackboard session bugs:
#44, because the cache path is valid here#45, because the configured account is unchanged here#46, because the saved session is valid and the command succeeds by reusing it