mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 15:43:06 +02:00
Replaces the auto-reassign-to-shorter-game logic (which fired while the current game was still in progress) with a strict workflow: 1. Check if assigned game is finished. 2. If not, do nothing. 3. If yes, pick the next shortest game and prompt the user. 4. If the user skips, ignore that game for 7 days and pick the next shortest candidate. Changes: - State: add skipped_until + skip_for_days + active_skipped_ids. - scanning.pick_next_game: optional on_select callback drives a sequential picker that filters skipped IDs; legacy cmd_pick flow preserved when on_select is None. - _cmd_done._finalize_completion: pick + prompt via on_select. - _cmd_done: remove _try_reassign_shorter_game and helpers (_apply_cached_confidence_to_games, _should_reassign_candidate, _echo_reassign_decision, _evaluate_reassign_iteration) plus call site in cmd_done. - Tests: drop obsolete _try_reassign_shorter_game suite; add TestPromptKeepOrSkip, TestPickNextGameSequential, and State skipped_until tests.
43 lines
2.4 KiB
JSON
43 lines
2.4 KiB
JSON
{
|
|
"intent": "Steam backlog enforcer must only prompt the user about the next game once the current assigned game is actually complete; skipped picks are ignored for 7 days.",
|
|
"scope": [
|
|
"python_pkg/steam_backlog_enforcer/config.py",
|
|
"python_pkg/steam_backlog_enforcer/scanning.py",
|
|
"python_pkg/steam_backlog_enforcer/_cmd_done.py",
|
|
"python_pkg/steam_backlog_enforcer/tests/*"
|
|
],
|
|
"changes": [
|
|
"State.skipped_until + skip_for_days + active_skipped_ids with ISO-8601 expiry pruning",
|
|
"pick_next_game gains optional on_select callback driving a sequential while-True picker that filters finished + active-skipped IDs",
|
|
"_cmd_done._prompt_keep_or_skip emits Y/n prompt; non-TTY accepts silently",
|
|
"_finalize_completion uses pick_next_game(on_select=_prompt_keep_or_skip)",
|
|
"Removed _try_reassign_shorter_game + _apply_cached_confidence_to_games + _should_reassign_candidate + _echo_reassign_decision + _evaluate_reassign_iteration and call site in cmd_done",
|
|
"Dropped now-unused imports (_confidence_fail_reasons, _refresh_candidate_confidence, load_hltb_count_comp_cache, _pick_next_shortest_candidate)"
|
|
],
|
|
"verification": [
|
|
{
|
|
"command": "python -m pytest python_pkg/steam_backlog_enforcer/tests/ --cov=python_pkg.steam_backlog_enforcer --cov-branch",
|
|
"result": "pass",
|
|
"evidence": "622 passed; steam_backlog_enforcer modules at 100% coverage"
|
|
},
|
|
{
|
|
"command": "pre-commit run --files python_pkg/steam_backlog_enforcer/_cmd_done.py python_pkg/steam_backlog_enforcer/tests/test_cmd_done_part2.py python_pkg/steam_backlog_enforcer/tests/test_main_part2.py python_pkg/steam_backlog_enforcer/tests/test_main_part3.py",
|
|
"result": "pass",
|
|
"evidence": "ruff/ruff-format/mypy/pylint/bandit/pytest-coverage all pass"
|
|
},
|
|
{
|
|
"command": "./run.sh (Fluffy Store 9/13 achievements)",
|
|
"result": "pass",
|
|
"evidence": "Output: 'NOT COMPLETE: 4 achievements remaining. Keep going!' — no swap prompt fired"
|
|
}
|
|
],
|
|
"risks": [
|
|
"Loss of auto-recovery when current game's HLTB confidence is bad (was force-reassign); accepted by user request",
|
|
"skipped_until pruning relies on ISO parse; malformed entries are silently dropped"
|
|
],
|
|
"rollback": [
|
|
"git revert the commit; deletes State.skipped_until field at runtime gracefully (default_factory dict)",
|
|
"Validate by running pytest and ./run.sh after revert"
|
|
]
|
|
}
|