# TASK-006 — Standalone emulator_worker repo

**Status:** Completed
**Branch:** feature/TASK-006-emulator-own-repo
**Started:** 2026-10-12
**Last updated:** 2026-10-12

## Goal
Move the Python emulator poll worker out of `baskit_app` into [overdrive/emulator_worker](https://bitbucket.org/overdrive/emulator_worker) and make it runnable as a long-lived service on a dedicated host (SDK cmdline only, no Android Studio).

## Acceptance criteria
- [x] Standalone repo with package, pytest CI, host-setup docs, systemd + Windows service notes
- [x] OS-agnostic config, golden AVD fail-fast, file + stdout logging
- [x] `emulator_worker/` removed from `baskit_app`; docs point at Bitbucket
- [x] `pytest tests -m "not live"` passes in new repo (7 tests)

## Files touched
| File | Notes |
|------|-------|
| `emulator_worker/` (deleted from baskit_app) | Moved to Bitbucket repo |
| `README.md`, `docs/CHANGELOG.md`, `docs/NewKnowledgeBase.md` | Link standalone worker |
| `docs/emulator_spike.md` | Pointer to worker repo docs |
| `scope/Task_emulator_worker.md`, `.gitignore` | Updated references |
| Bitbucket `overdrive/emulator_worker` | Full worker tree + deploy docs |

## Decisions
- 2026-10-12 — Keep poll loop (no inbound HTTP); Ops `WORKER_ALLOWED_IPS` secures claims from the dedicated host.

## Session log
### 2026-10-12 — Cursor
- Did: Cloned empty Bitbucket repo; copied worker + tests; added pyproject, CI, host_check, logging, deploy units; removed in-app copy; TASK-006 + TASK-003 update.
- Broke / deferred: Production host provisioning and golden bake still manual (see worker `docs/host-setup.md`).
- Commits: (pending in baskit_app; emulator_worker repo commit local)

## Next steps
1. Push `emulator_worker` to Bitbucket and install on chosen Windows/Linux host.
2. Ops: enable worker flag, set `WORKER_ALLOWED_IPS` to host public IP.
3. Resume TASK-003 manual E2E once host + Ops migrate are ready.

## Open questions
- Which production VM (Windows WHPX vs Linux KVM) — repo supports both.
