mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-10 18:07:07 +01:00
Re-point paths for the ~ reorganisation (home-tidy)
Also bumps mcp 2.2.0, ruff 0.16.7, types-requests 2.33.0.20260906 and, in web/, react 19.3.0, vitest 5.0.0 (+ coverage-v8), eslint 10.10.0, typescript-eslint 8.70.0, vite 8.3.0 and the small ones, so the freshness gate lets this through. Web lint/build/tests/coverage (100 %) unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwtowrowDXx6ccmWVPkCaF
This commit is contained in:
parent
494e8f1c02
commit
4783753b3f
@ -203,7 +203,7 @@ repos:
|
||||
|
||||
# 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
|
||||
# Shared gate in ~/src/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
|
||||
|
||||
@ -74,7 +74,7 @@ an exempt extension, no `# noqa`-style suppressions.
|
||||
|
||||
A refactor without a gate silently regrows. Before this task is done:
|
||||
|
||||
1. Wire the shared gate `~/utils/scripts/check_file_length.sh` into this repo's
|
||||
1. Wire the shared gate `~/src/utils/scripts/check_file_length.sh` into this repo's
|
||||
`.pre-commit-config.yaml` as a local hook. If the repo has no pre-commit
|
||||
config, add a minimal one.
|
||||
2. The hook checks **files in the commit** (not the whole tree), so unrelated
|
||||
@ -85,7 +85,7 @@ A refactor without a gate silently regrows. Before this task is done:
|
||||
|
||||
## Done condition
|
||||
|
||||
- `bash ~/utils/scripts/check_file_length.sh --all` from this repo root exits 0.
|
||||
- `bash ~/src/utils/scripts/check_file_length.sh --all` from this repo root exits 0.
|
||||
- The repo's own test suite and coverage bar are still green.
|
||||
- `pre-commit run --files <changed files>` passes.
|
||||
- A deliberately over-250-line test file, staged, makes `git commit` **fail**.
|
||||
|
||||
12
install.sh
12
install.sh
@ -18,17 +18,17 @@ echo
|
||||
echo "Checking for guard-lib (required by 'block-gaming')..."
|
||||
if command -v guardctl >/dev/null 2>&1; then
|
||||
echo "guardctl found on PATH."
|
||||
elif [[ -x "$HOME/utils/guard-lib/install.sh" ]]; then
|
||||
echo "guardctl not found - installing guard-lib from $HOME/utils/guard-lib..."
|
||||
elif [[ -x "$HOME/src/utils/guard-lib/install.sh" ]]; then
|
||||
echo "guardctl not found - installing guard-lib from $HOME/src/utils/guard-lib..."
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
bash "$HOME/utils/guard-lib/install.sh"
|
||||
bash "$HOME/src/utils/guard-lib/install.sh"
|
||||
else
|
||||
echo "guard-lib install needs root: sudo bash \"$HOME/utils/guard-lib/install.sh\""
|
||||
echo "guard-lib install needs root: sudo bash \"$HOME/src/utils/guard-lib/install.sh\""
|
||||
echo "('block-gaming' will not work until that is done; the rest of this tool is unaffected.)"
|
||||
fi
|
||||
else
|
||||
echo "Warning: guardctl not found and ~/utils/guard-lib is not present."
|
||||
echo "'block-gaming' requires guard-lib - set up ~/utils/guard-lib and run its install.sh, then re-run this installer."
|
||||
echo "Warning: guardctl not found and ~/src/utils/guard-lib is not present."
|
||||
echo "'block-gaming' requires guard-lib - set up ~/src/utils/guard-lib and run its install.sh, then re-run this installer."
|
||||
echo "(The rest of this tool is unaffected.)"
|
||||
fi
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Session prompt: take pylint from 8.65 to 10.00
|
||||
|
||||
Paste everything below the line into a fresh Claude Code session started in
|
||||
`~/steam-backlog-enforcer`.
|
||||
`~/src/steam-backlog-enforcer`.
|
||||
|
||||
---
|
||||
|
||||
@ -12,7 +12,7 @@ weakening the linter.
|
||||
|
||||
The pre-commit pylint hook runs with `--fail-under=8.0`, so at 8.65 the repo
|
||||
passes its gate while carrying ~1600 findings. The threshold is hiding the
|
||||
debt rather than measuring it. The same job was done in `~/utils/crdt-sync`
|
||||
debt rather than measuring it. The same job was done in `~/src/utils/crdt-sync`
|
||||
on 2026-08-21 (8.58 -> 10.00); this repo has the identical shape of problem,
|
||||
only larger.
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Session prompt: continue the 250-line cap refactor
|
||||
|
||||
Paste everything below the line into a fresh Claude Code session started in
|
||||
`~/steam-backlog-enforcer`.
|
||||
`~/src/steam-backlog-enforcer`.
|
||||
|
||||
---
|
||||
|
||||
@ -25,7 +25,7 @@ bash scripts/check_file_length.sh --all # 39 files over the cap
|
||||
Already done (do not redo):
|
||||
|
||||
- **The gate is live.** `scripts/file_length/` is a vendored copy of
|
||||
`~/utils/file_length/`, wired as the `file-length` pre-commit hook. It is
|
||||
`~/src/utils/file_length/`, wired as the `file-length` pre-commit hook. It is
|
||||
excluded from ruff/mypy/pylint and must stay byte-identical to upstream.
|
||||
`pre-commit install` has been run (it never had been — only `pre-push`).
|
||||
- `main.py` → `main/` package; `_total_block`, `_playtime`, `_mcp` split.
|
||||
@ -163,7 +163,7 @@ Long jobs (`scripts/ci_mirror.sh`, full-suite runs) go in the background with
|
||||
## Done condition
|
||||
|
||||
- `bash scripts/check_file_length.sh --all` → exit 0, and the todo's literal
|
||||
`bash ~/utils/scripts/check_file_length.sh --all` → exit 0 (running both
|
||||
`bash ~/src/utils/scripts/check_file_length.sh --all` → exit 0 (running both
|
||||
catches drift between the vendored copy and upstream).
|
||||
- `.ci-mirror-venv/bin/python -m pytest steam_backlog_enforcer/tests/ -q` →
|
||||
green at exactly 100%.
|
||||
|
||||
@ -22,7 +22,7 @@ dependencies = [
|
||||
# dependency so the systemd/CLI system-python path stays dependency-light and
|
||||
# never has to import the MCP SDK.
|
||||
[project.optional-dependencies]
|
||||
mcp = ["mcp==2.1.1"]
|
||||
mcp = ["mcp==2.2.0"]
|
||||
|
||||
# Explicit package discovery. Without this, setuptools' flat-layout
|
||||
# auto-discovery aborts because the repo root holds two top-level dirs
|
||||
@ -38,7 +38,7 @@ include = ["steam_backlog_enforcer*"]
|
||||
[tool.ruff]
|
||||
target-version = "py314"
|
||||
include = ["*.py", "**/*.py"]
|
||||
# scripts/file_length is a VENDORED copy of ~/utils/file_length and must stay
|
||||
# scripts/file_length is a VENDORED copy of ~/src/utils/file_length and must stay
|
||||
# byte-identical to upstream; ruff --unsafe-fixes otherwise strips its print()
|
||||
# calls (T201) and silently guts the gate's reporting.
|
||||
exclude = [".git", ".venv", "__pycache__", "build", "dist", ".eggs", "scripts/file_length"]
|
||||
|
||||
@ -6,7 +6,7 @@ bandit==1.9.4
|
||||
codespell==2.4.3
|
||||
coverage==7.16.0
|
||||
howlongtobeatpy==1.0.23
|
||||
mcp==2.1.1
|
||||
mcp==2.2.0
|
||||
mypy==2.3.1
|
||||
pre-commit==4.6.2
|
||||
pylint==4.0.8
|
||||
@ -17,6 +17,6 @@ pytest-sugar==1.1.1
|
||||
pytest-timeout==2.4.0
|
||||
pytest-xdist==3.8.0
|
||||
requests==2.34.2
|
||||
ruff==0.16.5
|
||||
types-requests==2.33.0.20260712
|
||||
ruff==0.16.7
|
||||
types-requests==2.33.0.20260906
|
||||
websockets==17.1
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ============================================================================
|
||||
# Fail if any dependency in the commit is behind its ecosystem's newest stable.
|
||||
#
|
||||
# Thin delegate to the shared gate in ~/utils, which owns the registry
|
||||
# Thin delegate to the shared gate in ~/src/utils, which owns the registry
|
||||
# adapters, the pre-release rules and the allowlist semantics. Copying that
|
||||
# logic here is what lets one repo's idea of "current" drift from every other
|
||||
# repo's -- so this script only locates the shared checker and forwards its
|
||||
@ -18,12 +18,12 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
readonly SHARED_GATE="${UTILS_ROOT:-$HOME/utils}/scripts/check_dependency_freshness.sh"
|
||||
readonly SHARED_GATE="${UTILS_ROOT:-$HOME/src/utils}/scripts/check_dependency_freshness.sh"
|
||||
|
||||
main() {
|
||||
if [[ ! -x "$SHARED_GATE" ]]; then
|
||||
echo "Error: shared dependency-freshness gate not found at $SHARED_GATE" >&2
|
||||
echo " Clone github.com/kuhyx/utils to ~/utils, or set" >&2
|
||||
echo " Clone github.com/kuhyx/utils to ~/src/utils, or set" >&2
|
||||
echo " UTILS_ROOT to where it lives." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
# which is the largest avoidable cost in an LLM-assisted workflow. The cap
|
||||
# applies to code AND prose; generated files, markup and data are exempt.
|
||||
#
|
||||
# This is a VENDORED copy of ~/utils/file_length/. It is vendored rather than
|
||||
# This is a VENDORED copy of ~/src/utils/file_length/. It is vendored rather than
|
||||
# referenced because pre-commit's `entry:` is not shell-expanded and CI
|
||||
# runners have no ~/utils -- an external reference would pass locally and
|
||||
# runners have no ~/src/utils -- an external reference would pass locally and
|
||||
# silently skip on push.
|
||||
#
|
||||
# Usage:
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ============================================================================
|
||||
# Fail if any markdown file breaks the shared naming convention.
|
||||
#
|
||||
# Thin delegate to the shared gate in ~/utils, which owns the four namespaces
|
||||
# Thin delegate to the shared gate in ~/src/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
|
||||
@ -16,12 +16,12 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
readonly SHARED_GATE="${UTILS_ROOT:-$HOME/utils}/scripts/check_md_naming.sh"
|
||||
readonly SHARED_GATE="${UTILS_ROOT:-$HOME/src/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 " Clone github.com/kuhyx/utils to ~/src/utils, or set" >&2
|
||||
echo " UTILS_ROOT to where it lives." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -13,28 +13,28 @@
|
||||
"coverage": "vitest run --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "19.2.8",
|
||||
"react-dom": "19.2.8"
|
||||
"react": "19.3.0",
|
||||
"react-dom": "19.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
"@testing-library/dom": "10.4.1",
|
||||
"@testing-library/jest-dom": "7.0.1",
|
||||
"@testing-library/react": "16.3.3",
|
||||
"@testing-library/user-event": "14.6.6",
|
||||
"@testing-library/user-event": "14.6.7",
|
||||
"@types/node": "26.4.0",
|
||||
"@types/react": "19.2.18",
|
||||
"@types/react-dom": "19.2.5",
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "6.1.1",
|
||||
"@vitest/coverage-v8": "4.1.11",
|
||||
"eslint": "10.9.1",
|
||||
"@vitest/coverage-v8": "5.0.0",
|
||||
"eslint": "10.10.0",
|
||||
"eslint-plugin-react-hooks": "7.1.1",
|
||||
"eslint-plugin-react-refresh": "0.5.5",
|
||||
"eslint-plugin-react-refresh": "0.5.6",
|
||||
"globals": "17.12.0",
|
||||
"jsdom": "30.0.1",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "8.69.0",
|
||||
"vite": "8.2.2",
|
||||
"vitest": "4.1.11"
|
||||
"typescript-eslint": "8.70.0",
|
||||
"vite": "8.3.0",
|
||||
"vitest": "5.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user