mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-26 13:47:16 +01:00
Point run_phone wrapper at phone-focus-mode
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
32b94bfbd2
commit
4097807ef1
@ -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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -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)"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,22 +1,29 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# run_phone.sh — Visible entrypoint for the phone focus mode workflow.
|
# 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:
|
# Quick reference:
|
||||||
# ./scripts/run_all/run_phone.sh Everyday: backup + monitor + minor repair.
|
# ./meta/scripts/run_all/run_phone.sh Everyday: backup + monitor + minor repair.
|
||||||
# Shows a warning if the phone was wiped.
|
# Shows a warning if the phone was wiped.
|
||||||
# ./scripts/run_all/run_phone.sh fresh-phone Full recovery after a factory reset.
|
# ./meta/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.
|
# ./meta/scripts/run_all/run_phone.sh doctor Diagnose and repair security drift.
|
||||||
# ./scripts/run_all/run_phone.sh backup Incremental backup only.
|
# ./meta/scripts/run_all/run_phone.sh backup Incremental backup only.
|
||||||
# ./scripts/run_all/run_phone.sh monitor Health snapshot only.
|
# ./meta/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 --help Show full usage.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
_REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
_REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
|
||||||
_IMPL="${_REPO_ROOT}/phone_focus_mode/run_phone.sh"
|
# shellcheck source=../../../linux_configuration/lib/extracted_repos.sh
|
||||||
|
source "${_REPO_ROOT}/linux_configuration/lib/extracted_repos.sh"
|
||||||
|
|
||||||
if [[ ! -x "${_IMPL}" ]]; then
|
_PFM_DIR="$(require_extracted_repo phone-focus-mode "run_phone.sh")"
|
||||||
printf 'ERROR: implementation script not found or not executable: %s\n' "${_IMPL}" >&2
|
_IMPL="${_PFM_DIR}/run_phone.sh"
|
||||||
exit 1
|
|
||||||
|
if [[ ! -f "${_IMPL}" ]]; then
|
||||||
|
printf 'ERROR: implementation script not found: %s\n' "${_IMPL}" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec bash "${_IMPL}" "$@"
|
exec bash "${_IMPL}" "$@"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user