Repository navigation
fix: throttle repeated readiness failure logs - #785
Open
ibrahimmaq14 wants to merge 1 commit into
Open
ibrahimmaq14 wants to merge 1 commit into
ibrahimmaq14 wants to merge 1 commit into
Conversation
ibrahimmaq14
marked this pull request as ready for review
November 24, 2026 10:38
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #597
Reproduction and root cause
Run
uv run --frozen python -m pytest -q tests/test_health.pywith the regression test applied to the original handler. Three requests across/readyand/api/automation/readyeach returned the expected 503 JSON and emitted an ERROR with a full traceback. The test expected one ERROR and found three. The handler previously logged every connection exception unconditionally.Fix
Remember the last exception type and message in app state and log a full traceback when the failure changes. After a successful connection, clear the state and emit one INFO recovery log. State updates run without an await after the connection check. Both readiness routes continue to check the database on every probe and return the same 200 and 503 responses.
Verification
tests/test_health.py.tests/test_health.pyon Python 3.12.15 (Windows).uv run --frozen ruff check: passed.uv run --frozen ruff format --check: 269 files already formatted.uv run --frozen pyright --pythonplatform Linux: 0 errors, 0 warnings, 0 informations.uv run --frozen pre-commit run --all-files --show-diff-on-failure: all five hooks passed. Whole-project Linux Pyright also reported 0 errors, warnings, or infos.tests/test_windows_runner.py,tests/test_execution.py,tests/test_preset_runner_refresh.py,tests/test_plugin_specs.py): 105 passed, 26 skipped.tests/test_health.py,tests/test_pr_artifacts_workflow.py,tests/test_verify_automation_skill.py, andtests/test_git_sync_router.py::TestGitSyncCheckAgainstARealRepowith Node available and LF checkout: 75 passed. This rerun covered every failing or errored test from the full Linux run.AI disclosure: Codex assisted with issue research, reproduction, implementation, testing, and drafting this PR on behalf of the contributor.
Jev-Fast-Audit
⚡ Jev fast audit · estimates · 0.23s · commit 3594bca
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage: complete supplied coverage; 5/5 hunks, 2/2 files.
All estimates and evidence