mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-28 06:09:12 +01:00
Compare commits
2 Commits
075f7bae8c
...
e2d08f33a7
| Author | SHA1 | Date | |
|---|---|---|---|
| e2d08f33a7 | |||
| a889341979 |
38
.github/workflows/md-naming.yml
vendored
Normal file
38
.github/workflows/md-naming.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: md-naming
|
||||||
|
|
||||||
|
# The four markdown namespaces, enforced on push as well as at commit time.
|
||||||
|
# The local pre-commit hook can be skipped (a fresh clone that never ran
|
||||||
|
# `pre-commit install` has no hooks at all), so the convention needs a second
|
||||||
|
# gate that no one can forget to install.
|
||||||
|
#
|
||||||
|
# Deliberately a SEPARATE workflow from any release job: a badly named doc
|
||||||
|
# should fail lint, not block publishing an artifact.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
md-naming:
|
||||||
|
name: markdown naming convention
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# The gate and its exemption list live in the shared utils repo so every
|
||||||
|
# repo enforces the same namespaces. Checking it out beats vendoring a
|
||||||
|
# copy here, which is exactly how a gate and a survey start disagreeing.
|
||||||
|
- name: Check out the shared gate
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: kuhyx/utils
|
||||||
|
path: .utils
|
||||||
|
|
||||||
|
- name: Enforce the naming convention
|
||||||
|
run: bash .utils/scripts/check_md_naming.sh --all
|
||||||
|
|
||||||
|
# Warns only: no machine can prove a task is finished, so an old TODO
|
||||||
|
# gets a nudge, never a failure.
|
||||||
|
- name: Warn about stale TODOs
|
||||||
|
run: PYTHONPATH=.utils python3 .utils/md_naming/stale.py
|
||||||
@ -235,3 +235,13 @@ repos:
|
|||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
require_serial: true
|
require_serial: true
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
|
|
||||||
|
# Four markdown namespaces (README / CLAUDE* / DOCS* / TODO*), plus the
|
||||||
|
# rule that a TODO carries "REMOVE ME AFTER FINISH" and nothing else may.
|
||||||
|
# Shared gate in ~/utils owns the namespaces and the exemption list, so
|
||||||
|
# one repo's idea of a valid name cannot drift from every other repo's.
|
||||||
|
- id: md-naming
|
||||||
|
name: markdown naming convention
|
||||||
|
entry: scripts/check_md_naming.sh
|
||||||
|
language: system
|
||||||
|
files: \.(md|markdown)$
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
# Design audit — screen-locker
|
|
||||||
|
|
||||||
Generated against safe-design-rules (anthonyhobday.com/sideprojects/saferules).
|
|
||||||
Report only — nothing in this repo was changed by the audit itself.
|
|
||||||
|
|
||||||
This repo has two UI surfaces, audited separately below. `~/utils/gatelock`
|
|
||||||
was checked with `git -C ~/utils/gatelock rev-parse --show-toplevel` → prints
|
|
||||||
`/home/kuhy/utils`, i.e. gatelock is a subdirectory of the `~/utils` monorepo,
|
|
||||||
**not its own git repo**. Per audit scope, no separate gatelock report was
|
|
||||||
written; see the "Shared gatelock library" section at the end instead.
|
|
||||||
|
|
||||||
Split into one file per audited surface to stay under the repo's 250-line
|
|
||||||
cap; the findings themselves are unchanged.
|
|
||||||
|
|
||||||
## Sections
|
|
||||||
|
|
||||||
- [Python/Tkinter lock UI](docs/design-audit/python-tkinter-lock-ui.md) — `screen_locker/`
|
|
||||||
- [Flutter workout app](docs/design-audit/flutter-workout-app.md) — `stronglift_replacement/workout_app/`
|
|
||||||
- [Shared gatelock library](docs/design-audit/shared-gatelock-library.md) — `~/utils/gatelock`
|
|
||||||
@ -91,3 +91,5 @@ A refactor without a gate silently regrows. Before this task is done:
|
|||||||
## Verify
|
## Verify
|
||||||
|
|
||||||
Run the suite, then actually run the locker entry point — this repo deploys from the working tree, so a broken import is a live outage.
|
Run the suite, then actually run the locker entry point — this repo deploys from the working tree, so a broken import is a live outage.
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
@ -174,3 +174,5 @@ The code matches the pinned gatelock 0.4.0; this machine has 0.5.0 installed.
|
|||||||
Resync with `pip install -r requirements.txt`. **Do not "fix" the code to
|
Resync with `pip install -r requirements.txt`. **Do not "fix" the code to
|
||||||
match the installed version** — that would break CI. See the comment in
|
match the installed version** — that would break CI. See the comment in
|
||||||
`scripts/_popup_form_check.py`.
|
`scripts/_popup_form_check.py`.
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
@ -139,3 +139,5 @@ is exactly the change that can cause one.
|
|||||||
another class's private attribute is a real finding.
|
another class's private attribute is a real finding.
|
||||||
- Do not touch `refactor_claude_todo.md`'s 250-line work; that is a separate,
|
- Do not touch `refactor_claude_todo.md`'s 250-line work; that is a separate,
|
||||||
in-progress task with its own prompt file.
|
in-progress task with its own prompt file.
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
@ -122,3 +122,5 @@ emulator and not a debug-only Flutter driver session.
|
|||||||
unfocus without popping the route (tap dead space, or `dumpsys input_method`
|
unfocus without popping the route (tap dead space, or `dumpsys input_method`
|
||||||
to check `mInputShown` first) and must distinguish "tree is partial" from
|
to check `mInputShown` first) and must distinguish "tree is partial" from
|
||||||
"element is genuinely absent" rather than reporting a false negative.
|
"element is genuinely absent" rather than reporting a false negative.
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
@ -204,3 +204,5 @@ Current real state for comparison: `screen_locker/extra_benefits_state.json` and
|
|||||||
icon at `~/.config/i3/scripts/screen_locker_tray.py` (outside the repo, shells
|
icon at `~/.config/i3/scripts/screen_locker_tray.py` (outside the repo, shells
|
||||||
out to the CLI, refreshes every 60s), and the lock screen itself. No i3blocks
|
out to the CLI, refreshes every 60s), and the lock screen itself. No i3blocks
|
||||||
integration exists despite `format_summary_line` being described as one.
|
integration exists despite `format_summary_line` being described as one.
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
@ -228,3 +228,5 @@ state what you felt and heard; do not infer them from the code.
|
|||||||
what counts as a workout** — enforcement depends on it, and it is out of scope.
|
what counts as a workout** — enforcement depends on it, and it is out of scope.
|
||||||
- The repo enforces a 250-line file cap and bans `# noqa`; ruff runs
|
- The repo enforces a 250-line file cap and bans `# noqa`; ruff runs
|
||||||
`select = ["ALL"]` on the Python side.
|
`select = ["ALL"]` on the Python side.
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
32
scripts/check_md_naming.sh
Executable file
32
scripts/check_md_naming.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# ============================================================================
|
||||||
|
# Fail if any markdown file breaks the shared naming convention.
|
||||||
|
#
|
||||||
|
# Thin delegate to the shared gate in ~/utils, which owns the four namespaces
|
||||||
|
# (README / CLAUDE* / DOCS* / TODO*), the "REMOVE ME AFTER FINISH" marker rule
|
||||||
|
# and the exemption list. Copying that logic here is what lets one repo's idea
|
||||||
|
# of a valid name drift from every other repo's -- so this script only locates
|
||||||
|
# the shared checker and forwards its arguments.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# scripts/check_md_naming.sh <file> [<file> ...] # pre-commit passes these
|
||||||
|
# scripts/check_md_naming.sh --all # whole tree, from cwd
|
||||||
|
# ============================================================================
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
readonly SHARED_GATE="${UTILS_ROOT:-$HOME/utils}/scripts/check_md_naming.sh"
|
||||||
|
|
||||||
|
main() {
|
||||||
|
if [[ ! -x "$SHARED_GATE" ]]; then
|
||||||
|
echo "Error: shared markdown-naming gate not found at $SHARED_GATE" >&2
|
||||||
|
echo " Clone github.com/kuhyx/utils to ~/utils, or set" >&2
|
||||||
|
echo " UTILS_ROOT to where it lives." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec bash "$SHARED_GATE" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
@ -28,3 +28,5 @@ Technical Requirements:
|
|||||||
App should work on rooted and unrooted phones with minimum android version of at least 12
|
App should work on rooted and unrooted phones with minimum android version of at least 12
|
||||||
Full test coverage (100%) (but first check the functionality and if the functionality fully works and is approved by user THEN start writing ANY tests at all please)
|
Full test coverage (100%) (but first check the functionality and if the functionality fully works and is approved by user THEN start writing ANY tests at all please)
|
||||||
I connected an unrooted phone with adb on to the pc use it for testing
|
I connected an unrooted phone with adb on to the pc use it for testing
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
@ -18,3 +18,5 @@ Implementing design_v2.md improvements.
|
|||||||
## Next Steps
|
## Next Steps
|
||||||
- Clarify user intent on "no break between sets" (contradicts design_v2.md which
|
- Clarify user intent on "no break between sets" (contradicts design_v2.md which
|
||||||
explicitly requested per-set breaks)
|
explicitly requested per-set breaks)
|
||||||
|
|
||||||
|
REMOVE ME AFTER FINISH
|
||||||
Loading…
Reference in New Issue
Block a user