diff --git a/docs/superpowers/evidence/i3blocks-gaming-budget-earners-2026-10-05.json b/docs/superpowers/evidence/i3blocks-gaming-budget-earners-2026-10-05.json deleted file mode 100644 index 484c788d..00000000 --- a/docs/superpowers/evidence/i3blocks-gaming-budget-earners-2026-10-05.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "intent": "The i3 gaming-budget block lists every earned_time earner the enforcer reports (now including Anki), so a new earner needs only an icon here, and sub-hour bonuses read as minutes.", - "scope": [ - "linux_configuration/i3blocks/gaming_budget.sh", - "linux_configuration/tests/test_i3blocks_gaming_budget.sh", - "Non-goal: no change to how the budget is computed; the block still only reads steam-backlog-enforcer's /api/budget" - ], - "changes": [ - "Unearned bonuses come from .rules.earners ([{name, label, earned_seconds, bonus_seconds}], steam-backlog-enforcer 7ab65dd) with an icon map {workout ๐Ÿ’ช, leetcode ๐Ÿงฉ, reading ๐Ÿ“–, anki ๐Ÿ—‚}; an unmapped earner shows its label", - "A daemon without .rules.earners falls back to the old three fixed fields and the configured sizes", - "bonus_hm prints '30m' for sizes under an hour instead of '0h30'" - ], - "verification": [ - { - "command": "bash linux_configuration/i3blocks/gaming_budget.sh (live enforcer API)", - "result": "pass", - "evidence": "'๐ŸŽฎ 2h10 left ยท 4h53/7h03 +๐Ÿ“–1h +๐Ÿ—‚30m' / '๐ŸŽฎ 2h10' / #50FA7B; /api/budget lists workout and leetcode earned, reading 0/3600, anki 0/1800" - }, - { - "command": "user looked at the bar", - "result": "pass", - "evidence": "kuhy confirmed the '+๐Ÿ—‚30m' bar 'looks ok' (2026-10-05)" - }, - { - "command": "bash linux_configuration/tests/test_i3blocks_gaming_budget.sh", - "result": "pass", - "evidence": "All gaming_budget checks passed, incl. the new .rules.earners case: registry order, earned omitted, daemon sizes win over config, label for an unmapped earner, 30m and 1h30 sizes; old-daemon fallback cases unchanged" - } - ], - "risks": [ - "An earner whose name is missing from the icon map shows its text label, which is wider in the bar." - ], - "rollback": [ - "git revert this commit; the block goes back to the three fixed bonuses and Anki disappears from the bar" - ] -} diff --git a/docs/superpowers/evidence/run-phone-wrapper-extracted-2026-11-08.json b/docs/superpowers/evidence/run-phone-wrapper-extracted-2026-11-08.json new file mode 100644 index 00000000..3703e435 --- /dev/null +++ b/docs/superpowers/evidence/run-phone-wrapper-extracted-2026-11-08.json @@ -0,0 +1,30 @@ +{ + "intent": "meta/scripts/run_all/run_phone.sh runs the phone-focus-mode workflow again instead of failing with 'implementation script not found'.", + "scope": [ + "meta/scripts/run_all/run_phone.sh", + "Non-goal: the unrooted-mode changes in the extracted phone-focus-mode repo" + ], + "changes": [ + "Resolve the extracted phone-focus-mode checkout via linux_configuration/lib/extracted_repos.sh (require_extracted_repo) instead of the deleted in-repo phone_focus_mode/ dir", + "Fix the _REPO_ROOT depth (meta/scripts/run_all is three levels deep) and the usage paths in the header" + ], + "verification": [ + { + "command": "bash meta/scripts/run_all/run_phone.sh --help; echo $?", + "result": "pass", + "evidence": "before: 'ERROR: implementation script not found ... wt/meta/phone_focus_mode/run_phone.sh', exit 1; after: phone-focus-mode usage printed, exit 0" + }, + { + "command": "shellcheck -x meta/scripts/run_all/run_phone.sh && shfmt -d meta/scripts/run_all/run_phone.sh", + "result": "pass", + "evidence": "no findings, no diff" + } + ], + "risks": [ + "require_extracted_repo clones ~/src/phone-focus-mode when it is missing; same behaviour as the other extracted-repo callers" + ], + "rollback": [ + "git revert the commit", + "Re-run --help; it fails again with 'not found' (the previous state)" + ] +} diff --git a/meta/scripts/run_all/run_phone.sh b/meta/scripts/run_all/run_phone.sh index 79ba54ce..5fe0995c 100755 --- a/meta/scripts/run_all/run_phone.sh +++ b/meta/scripts/run_all/run_phone.sh @@ -1,22 +1,29 @@ #!/usr/bin/env bash # run_phone.sh โ€” Visible entrypoint for the phone focus mode workflow. # +# The implementation lives in the extracted phone-focus-mode repo +# (~/src/phone-focus-mode); this wrapper only resolves and execs it. +# # Quick reference: -# ./scripts/run_all/run_phone.sh Everyday: backup + monitor + minor repair. -# Shows a warning if the phone was wiped. -# ./scripts/run_all/run_phone.sh fresh-phone Full recovery after a factory reset. -# ./scripts/run_all/run_phone.sh doctor Diagnose and repair security drift. -# ./scripts/run_all/run_phone.sh backup Incremental backup only. -# ./scripts/run_all/run_phone.sh monitor Health snapshot only. -# ./scripts/run_all/run_phone.sh --help Show full usage. +# ./meta/scripts/run_all/run_phone.sh Everyday: backup + monitor + minor repair. +# Shows a warning if the phone was wiped. +# ./meta/scripts/run_all/run_phone.sh fresh-phone Full recovery after a factory reset. +# ./meta/scripts/run_all/run_phone.sh doctor Diagnose and repair security drift. +# ./meta/scripts/run_all/run_phone.sh backup Incremental backup only. +# ./meta/scripts/run_all/run_phone.sh monitor Health snapshot only. +# ./meta/scripts/run_all/run_phone.sh --help Show full usage. set -euo pipefail -_REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" -_IMPL="${_REPO_ROOT}/phone_focus_mode/run_phone.sh" +_REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" +# shellcheck source=../../../linux_configuration/lib/extracted_repos.sh +source "${_REPO_ROOT}/linux_configuration/lib/extracted_repos.sh" -if [[ ! -x "${_IMPL}" ]]; then - printf 'ERROR: implementation script not found or not executable: %s\n' "${_IMPL}" >&2 - exit 1 +_PFM_DIR="$(require_extracted_repo phone-focus-mode "run_phone.sh")" +_IMPL="${_PFM_DIR}/run_phone.sh" + +if [[ ! -f "${_IMPL}" ]]; then + printf 'ERROR: implementation script not found: %s\n' "${_IMPL}" >&2 + exit 1 fi exec bash "${_IMPL}" "$@"