Repository navigation
TEST Use shared watchdog for backend correctness helpers - #3459
Roman Lutz (romanlutz) merged 4 commits into
Conversation
Keep manual-send terminal polling non-cancelling and align the analytics singleton correctness test with the shared deadlock backstop. Guard these budgets and prove a timed-out observer leaves a send able to finish. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b1dc1a4-802e-4475-9c27-f178cf67a8ab
Preserve both manual-send async helper imports and adjacent watchdog/scorer guidance while retaining main's newer ownership tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b1dc1a4-802e-4475-9c27-f178cf67a8ab
Raise async and repeated send class backstops above the shared completion watchdog, guard their effective timeout markers, and document the budgets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b1dc1a4-802e-4475-9c27-f178cf67a8ab
Resolve combined async helper imports and retain both manual-send watchdog and target-discovery documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b1dc1a4-802e-4475-9c27-f178cf67a8ab
|
Follow-up: make send cleanup ownership consistent across the helper's callers.
Please apply the existing Review authored with GitHub Copilot. |
|
Follow-up: remove the remaining short correctness deadlines in the same manual-send tests, not only the shared completion helper. Current main still has these limits:
These tests check ownership and independent progress, not a response-time requirement. A busy worker can still fail them after this PR raises the final completion budget. Open #3491 fixes analytics and other watchdogs, but does not cover these cases. Please handle these together: use shared correctness watchdogs, make the whole-test backstop leave room for cleanup, and observe the owned task as well as its readiness signal so early failure is reported at once. For the per-conversation finalization case, retain polling or a scoped completion signal for that conversation: waiting for the entire send would deadlock against the deliberately held siblings. Keep the existing conflict, held-peer, and independent-progress assertions. Larger backstops need not add sleeps or increase successful test duration. Review authored with GitHub Copilot. |
Description
Remove two remaining accidental speed requirements from backend correctness tests using the existing finite
TEST_WATCHDOG_SECONDSbackstop:_settle_send_asyncnow defaults to the shared 300-second watchdog rather than ten seconds. It still polls through finalization to a semantic terminal state, and expiration still leaves the actual send running.timeout=0, checks that the send has no cancellation request, then releases it and verifies successful completion and reservation cleanup. The existing failure-teardown test also uses deterministic zero-timeout expiry and checks that only lifecycle shutdown cancels the send.Production deadlines, intentional timeout coverage, and the async helper implementation are unchanged. This completes remaining adoption after #3203, #3268, and #3278. Open #3443 is complementary: its analytics changes cover explicit-expiry checkpoint and cleanup observation, not singleton-controller correctness budgets. This PR does not depend on it.
Merged upstream main
ddaa6af996ac6fc1debf2828d0eb050ea509b7b8without rebasing. Conflict resolution preserved both the combined async helper imports and main's newer message-send ownership tests, plus both adjacent documentation sections.Tests and Documentation
Validated after merging main on Windows with CPython 3.14.4:
uv sync --frozen --extra alluv run --no-sync pytest -q -n 4 --dist=loadfile tests\unit\test_async_utils.py tests\unit\backend\test_message_send_service.py tests\unit\backend\test_conversation_editor.py tests\unit\backend\test_temporary_components.py tests\unit\backend\test_analytics_routes.py tests\unit\backend\test_analytics_lifecycle.py tests\unit\analytics\test_execution.pyuv run --no-sync ruff check tests\unit\backend\mocks.py tests\unit\backend\conftest.py tests\unit\backend\test_analytics_routes.py tests\unit\backend\test_message_send_service.pyuv run --no-sync ruff format --check tests\unit\backend\mocks.py tests\unit\backend\conftest.py tests\unit\backend\test_analytics_routes.py tests\unit\backend\test_message_send_service.pyuv run --no-sync ty check --output-format concise tests\unit\backend\mocks.py tests\unit\backend\conftest.py tests\unit\backend\test_analytics_routes.py tests\unit\backend\test_message_send_service.pyuv run --no-sync python -m build_scripts.validate_docsgit diff --cached --checkApplicable merge-commit pre-commit hooks passed. A worktree-local pre-commit cache was used to avoid contention on the shared cache lock.
Updated
doc/contributing/4_running_tests.mdto explain the manual-send watchdog and non-cancelling observer ownership. JupyText is not applicable: no notebooks or executable documentation samples changed. Full-suite and macOS/Linux CI were not run locally. The overloaded-runner failure was not reproduced with real ten/thirty-second delays; regression guards verify the budgets directly without sleeps or global clock patches.