mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 20:07:04 +01:00
meta/scripts/optimize_vscode.py was 498 lines against a 250-line cap and completely untested, and at that path the repo-wide gate (--cov=python_pkg, fail_under = 100) could not see it. Moved verbatim to python_pkg/vscode_optimizer/_optimize.py - git records a pure rename, and the content is byte-identical to HEAD. The move and the tests are one commit by necessity: any intermediate state with the module under python_pkg/ but uncovered turns every pytest run in the repo red, including ci-mirror on pre-push for unrelated work. Running it by path no longer works after the move (sys.path[0] would be the module's own directory), so __main__.py replaces it, following the existing focus_policy convention rather than a sys.path insert. Nothing invoked the old path: grep over .sh/.desktop/.service/.yml/.py found zero callers. 98 tests reach 100% line and branch coverage. Patching is confined to real boundaries - subprocess.run, the module-level Path, builtins.input, sys.argv - so the forthcoming split has few monkeypatch targets to re-point. Writing the tests surfaced a pre-existing bug, left unfixed here and pinned by a strict xfail: _VENDOR_KW's "ati" key is a substring of "VGA compatible controller", which appears in every lspci display line, so it matches before "intel" is ever tried and Intel iGPUs are misreported as AMD. Verified: python3 -m python_pkg.vscode_optimizer --dry-run reproduces the pre-move 18-change plan and writes nothing; the real settings.json is untouched; repo-wide pytest is 1846 passed at 100%; over-cap files 37 -> 36. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| fixtures | ||
| lib | ||
| run_all | ||
| _schema_validation.py | ||
| _session_autopsy_mutations.py | ||
| check_agent_contract.sh | ||
| check_ai_evidence.sh | ||
| check_append_only_sessions.sh | ||
| check_no_binaries.sh | ||
| check_no_dufs_conf.sh | ||
| check_no_inline_python.sh | ||
| check_no_secrets.sh | ||
| check_polling_antipatterns.sh | ||
| check_python_location.sh | ||
| check_requirements_sync.py | ||
| ci_mirror.sh | ||
| disk_cleanup_check.sh | ||
| init_agent_artifacts.sh | ||
| install_hooks.sh | ||
| makepkg-manual-dlagent.sh | ||
| mutate_session_autopsy_hooks.py | ||
| pytest_changed_packages.py | ||
| run_prettier_capped.sh | ||
| run_with_heavy_lock.sh | ||
| trace_shell_split.sh | ||
| validate_contract.py | ||
| validate_evidence.py | ||
| verify_shell_split.sh | ||