You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2026. It is now read-only.
Yes. This repo’s snapshotter path has selection-aware process_task, deferred preloader-failure handling, batched MISSED_SNAPSHOT Telegram reporting, and related reconcile logic. Recent reviews noted that automated tests are still narrow: helpers such as format_missed_batch_summary are covered, but higher-risk paths—reconciliation on success/failure, send-not-before backoff, retry scheduling, preloader defer + reconcile—lack regression coverage. Without dev test dependencies and a CI step that runs them, mistakes can ship (for example, await on a synchronous defer_preloader_failure_notification). A small guard exists under snapshotter/tests/, but CI does not consistently install/run pytest from the Poetry graph.
Describe the solution you'd like
Dependencies — Add pytest (and minimal async tooling if adopted, e.g. pytest-asyncio) under [tool.poetry.group.dev.dependencies] in pyproject.toml, refresh poetry.lock, and document the test command in the README or CONTRIBUTING if present.
CI — Add a workflow job that installs with dev groups and runs e.g. poetry run pytest snapshotter/tests/ (adjust scope as needed).
Docker / production image — Use poetry install --no-root --without dev (or Poetry 2 --only main / equivalent) in the Dockerfile so the runtime image does not ship pytest (negligible incremental image size for production).
Tests (phased) — Add integration-style tests when bandwidth allows: stub httpx for Telegram, fake or temp-file SlotSelectionTracker, cover _try_reconcile_preloader_missed, _flush_missed_batch / retry paths, and the preloader-defer → reconcile flow.
Describe alternatives you've considered
unittest only — No extra dev deps; weaker ergonomics for async and fixtures.
pip install pytest in CI only — Works but diverges from the lockfile and local dev setup.
Separate test image with dev deps — Heavier pipeline; optional follow-up.
Additional context
Broader tests were intentionally deferred to a future release after landing safety fixes in application code; this issue tracks pytest in dev + CI + Docker split and phased test depth.
Image size: keeping pytest in the dev group and excluding dev from the production poetry install keeps runtime image impact at ~0; installing pytest as a main dependency without excluding dev in Docker would add on the order of ~5–20 MB under site-packages (rough estimate).
Is your feature request related to a problem?
Yes. This repo’s snapshotter path has selection-aware
process_task, deferred preloader-failure handling, batchedMISSED_SNAPSHOTTelegram reporting, and related reconcile logic. Recent reviews noted that automated tests are still narrow: helpers such asformat_missed_batch_summaryare covered, but higher-risk paths—reconciliation on success/failure, send-not-before backoff, retry scheduling, preloader defer + reconcile—lack regression coverage. Without dev test dependencies and a CI step that runs them, mistakes can ship (for example,awaiton a synchronousdefer_preloader_failure_notification). A small guard exists undersnapshotter/tests/, but CI does not consistently install/runpytestfrom the Poetry graph.Describe the solution you'd like
pytest(and minimal async tooling if adopted, e.g.pytest-asyncio) under[tool.poetry.group.dev.dependencies]inpyproject.toml, refreshpoetry.lock, and document the test command in the README orCONTRIBUTINGif present.poetry run pytest snapshotter/tests/(adjust scope as needed).poetry install --no-root --without dev(or Poetry 2--only main/ equivalent) in theDockerfileso the runtime image does not ship pytest (negligible incremental image size for production).httpxfor Telegram, fake or temp-fileSlotSelectionTracker, cover_try_reconcile_preloader_missed,_flush_missed_batch/ retry paths, and the preloader-defer → reconcile flow.Describe alternatives you've considered
unittestonly — No extra dev deps; weaker ergonomics for async and fixtures.pip install pytestin CI only — Works but diverges from the lockfile and local dev setup.Additional context
poetry installkeeps runtime image impact at ~0; installing pytest as a main dependency without excluding dev in Docker would add on the order of ~5–20 MB undersite-packages(rough estimate).