Convention (maintainer rule, 2026-07-04): development & utility scripts should be written in Python wherever practical, to stay cross-platform (Windows / macOS / Linux). Do not introduce new bash-only (.sh) or PowerShell-only dev scripts. Rationale: the primary dev machine is Windows, where bash-only helpers require Git Bash and hit portability gaps (jq not installed, taskkill vs kill, path/quoting differences — all encountered in practice). Python is already the precedent: .claude/hooks/check-spdx.py, .claude/skills/preflight/api37_e2e.py. (Scope = auxiliary scripts only — product code stays Kotlin, Gradle stays Kotlin DSL.)
Scope of this ticket:
Convert .claude/skills/preflight/local_instrumented.sh → local_instrumented.py — the last bash holdout. Port the manual cold-boot + targeted connectedDebugAndroidTest + orphan-kill/teardown hygiene to Python (stdlib subprocess; the emulator/adb orphan-kill must work on Windows and *nix — taskkill/kill abstracted). Preserve the CLI (comma-separated test-class arg) and the EXIT-trap teardown so it self-cleans even if the caller stops. Update local_instrumented.README.md.
Rewire preflight (original scope): swap preflight's local api35DebugAndroidTest / api36DebugAndroidTest steps (GMD — snapshot-fails locally under AEHD 2.2) to invoke the new local_instrumented.py, so preflight no longer hits the GMD failure locally.
Document the convention in CLAUDE.md — a short "Dev scripts: prefer Python for cross-platform portability" note under the build/test section.
Going-forward: any new util/CI-helper script starts in Python.
Original context retained: follow-up to #269 (PR #280 shipped the local_instrumented.sh helper — manual cold-boot + orphan-kill/teardown hygiene). #269's DoD wanted preflight's local api35/api36 E2E rewired off GMD; #280 shipped the primitive but preflight's SKILL.md steps still call the GMD tasks. Review the approach before implementing (touches the local merge-gate). Not blocking.
**Convention (maintainer rule, 2026-07-04):** development & utility scripts should be written in **Python wherever practical**, to stay **cross-platform** (Windows / macOS / Linux). Do not introduce new bash-only (`.sh`) or PowerShell-only dev scripts. Rationale: the primary dev machine is Windows, where bash-only helpers require Git Bash and hit portability gaps (`jq` not installed, `taskkill` vs `kill`, path/quoting differences — all encountered in practice). Python is already the precedent: `.claude/hooks/check-spdx.py`, `.claude/skills/preflight/api37_e2e.py`. (Scope = auxiliary scripts only — product code stays Kotlin, Gradle stays Kotlin DSL.)
**Scope of this ticket:**
1. **Convert `.claude/skills/preflight/local_instrumented.sh` → `local_instrumented.py`** — the last bash holdout. Port the manual cold-boot + targeted `connectedDebugAndroidTest` + orphan-kill/teardown hygiene to Python (stdlib `subprocess`; the emulator/adb orphan-kill must work on Windows *and* *nix — `taskkill`/`kill` abstracted). Preserve the CLI (comma-separated test-class arg) and the EXIT-trap teardown so it self-cleans even if the caller stops. Update `local_instrumented.README.md`.
2. **Rewire preflight** (original scope): swap preflight's local `api35DebugAndroidTest` / `api36DebugAndroidTest` steps (GMD — snapshot-fails locally under AEHD 2.2) to invoke the new `local_instrumented.py`, so preflight no longer hits the GMD failure locally.
3. **Document the convention in `CLAUDE.md`** — a short "Dev scripts: prefer Python for cross-platform portability" note under the build/test section.
4. Going-forward: any new util/CI-helper script starts in Python.
---
_Original context retained:_ follow-up to #269 (PR #280 shipped the `local_instrumented.sh` helper — manual cold-boot + orphan-kill/teardown hygiene). #269's DoD wanted preflight's local api35/api36 E2E rewired off GMD; #280 shipped the primitive but preflight's SKILL.md steps still call the GMD tasks. Review the approach before implementing (touches the local merge-gate). Not blocking.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Convention (maintainer rule, 2026-07-04): development & utility scripts should be written in Python wherever practical, to stay cross-platform (Windows / macOS / Linux). Do not introduce new bash-only (
.sh) or PowerShell-only dev scripts. Rationale: the primary dev machine is Windows, where bash-only helpers require Git Bash and hit portability gaps (jqnot installed,taskkillvskill, path/quoting differences — all encountered in practice). Python is already the precedent:.claude/hooks/check-spdx.py,.claude/skills/preflight/api37_e2e.py. (Scope = auxiliary scripts only — product code stays Kotlin, Gradle stays Kotlin DSL.)Scope of this ticket:
.claude/skills/preflight/local_instrumented.sh→local_instrumented.py— the last bash holdout. Port the manual cold-boot + targetedconnectedDebugAndroidTest+ orphan-kill/teardown hygiene to Python (stdlibsubprocess; the emulator/adb orphan-kill must work on Windows and *nix —taskkill/killabstracted). Preserve the CLI (comma-separated test-class arg) and the EXIT-trap teardown so it self-cleans even if the caller stops. Updatelocal_instrumented.README.md.api35DebugAndroidTest/api36DebugAndroidTeststeps (GMD — snapshot-fails locally under AEHD 2.2) to invoke the newlocal_instrumented.py, so preflight no longer hits the GMD failure locally.CLAUDE.md— a short "Dev scripts: prefer Python for cross-platform portability" note under the build/test section.Original context retained: follow-up to #269 (PR #280 shipped the
local_instrumented.shhelper — manual cold-boot + orphan-kill/teardown hygiene). #269's DoD wanted preflight's local api35/api36 E2E rewired off GMD; #280 shipped the primitive but preflight's SKILL.md steps still call the GMD tasks. Review the approach before implementing (touches the local merge-gate). Not blocking.