From c518c44177f667bc02ba8d1eeedb338338b91b6b Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 10 Oct 2026 18:22:04 +0200 Subject: [PATCH] deps: earned_time 0.8.0 (per-minute tutor credit), fix stale 15-minute block comments Co-Authored-By: Claude Opus 5.5 (1M context) --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- requirements.txt | 2 +- steam_backlog_enforcer/_budget_view.py | 2 +- steam_backlog_enforcer/_ledger_earners.py | 5 +++-- steam_backlog_enforcer/tests/test_ledger_units.py | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b05a2c..dee2227 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -110,7 +110,7 @@ repos: - --disable-error-code=list-item additional_dependencies: - types-requests - - earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.7.0#subdirectory=earned_time + - earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.8.0#subdirectory=earned_time # =========================================================================== # PYLINT @@ -130,7 +130,7 @@ repos: # (steam_backlog_enforcer._mcp_server). additional_dependencies: - aiohttp==3.14.4 - - earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.7.0#subdirectory=earned_time + - earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.8.0#subdirectory=earned_time - howlongtobeatpy==1.0.24 - mcp==2.3.0 - pytest diff --git a/pyproject.toml b/pyproject.toml index ccc4c6e..6538df6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ dependencies = [ "websockets==17.2", # The earner registry (gaming budget terms); stdlib-only, so the root # daemon imports it from the desktop user's site-packages. - "earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.7.0#subdirectory=earned_time", + "earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.8.0#subdirectory=earned_time", ] # Optional extras. The `mcp` group is ONLY needed by the MCP server diff --git a/requirements.txt b/requirements.txt index 92ecb2c..75d7fa9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ aiohttp==3.14.4 bandit==1.9.4 codespell==2.4.3 coverage==7.16.2 -earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.7.0#subdirectory=earned_time +earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.8.0#subdirectory=earned_time howlongtobeatpy==1.0.24 mcp==2.3.0 mypy==2.4.0 diff --git a/steam_backlog_enforcer/_budget_view.py b/steam_backlog_enforcer/_budget_view.py index 9346e8a..e92b1cf 100644 --- a/steam_backlog_enforcer/_budget_view.py +++ b/steam_backlog_enforcer/_budget_view.py @@ -184,7 +184,7 @@ def build_rules(rules: PlaytimeRules) -> dict[str, Any]: "name": earner.name, "label": earner.label, "earned_seconds": rules.earned_seconds.get(earner.name, 0.0), - # The most a full day pays: the tutor's 4 blocks, not one. + # The most a full day pays: the tutor's 60 minutes, not one. "bonus_seconds": _most(earner) * 60, } for earner in registry_for(datetime.now().astimezone().date()) diff --git a/steam_backlog_enforcer/_ledger_earners.py b/steam_backlog_enforcer/_ledger_earners.py index e73f000..3aecfda 100644 --- a/steam_backlog_enforcer/_ledger_earners.py +++ b/steam_backlog_enforcer/_ledger_earners.py @@ -6,8 +6,9 @@ publishes HMAC-signed ``credit`` rows, so the shared reader is all it needs: it joins the budget with no code here. A *counted* gate (the Automation tutor, from ``earned_time.TUTOR_FROM``) pays -per unit -- each verified 15-minute block -- so :func:`ledger_units` reads its -unit count for the day instead of a yes/no. +per unit -- each verified active minute (earned_time >= 0.8; a legacy +15-minute block row counts 15) -- so :func:`ledger_units` reads its unit +count for the day instead of a yes/no. :func:`first_credits` feeds ``earned_time.resolve`` each penalised earner's first real credit (earned_time >= 0.6), so a gate that never paid out costs diff --git a/steam_backlog_enforcer/tests/test_ledger_units.py b/steam_backlog_enforcer/tests/test_ledger_units.py index 712fc5e..1ca4d57 100644 --- a/steam_backlog_enforcer/tests/test_ledger_units.py +++ b/steam_backlog_enforcer/tests/test_ledger_units.py @@ -1,6 +1,6 @@ """Tests for counted gate earners (the Automation tutor) in the gaming budget. -A counted gate pays per unit -- one verified 15-minute tutor block each -- +A counted gate pays per unit -- one verified active tutor minute each -- so :func:`ledger_units` reads its unit count for the day and ``resolve_budget`` turns it into gaming time through the registry. A stand-in counted earner is registered by patching ``earned_time.EARNERS``, which both