fix(test): de-flake test_doctor_runs_on_brain#157
Merged
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary
WalkthroughAn integration test for the doctor diagnostic function was modified to pass Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
Gradata
added a commit
that referenced
this pull request
May 1, 2026
…135) (#158) Closes #135. Bundles handoff-watchdog.js + handoff-inject.js under src/gradata/hooks/assets/claude_code/. Adds install_js_hooks() + JS_HOOK_REGISTRY at STANDARD profile, --include-watchdog CLI flag, package-data wiring. 7 new unit+integration tests pass; full suite 4118 passed, 1 known flake (now fixed in #157). Co-authored-by: Oliver <oliver@spritesai.com>
This was referenced May 1, 2026
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.
Root cause:
test_doctor_runs_on_braincallsdiagnose(brain_dir=...)which defaults toinclude_cloud=True. The cloud probes (_check_cloud_config,_check_cloud_reachable,_check_cloud_auth) check~/.gradata/config.tomland dialapi.gradata.ai. In CI runners (and on dev machines without cloud credentials)cloud_configreturnsfailbecause[cloud]credentials are missing, which flips overall status tobroken. The test only intends to assert the local brain is healthy.Fix:
Pass
include_cloud=Falseto scope the doctor to local brain checks (python, sqlite, system.db, manifest, etc.) — exactly what the fixture sets up. No production behavior changes; doctor implementation untouched.Result: 4112 pass, 4 skipped, 0 fail (local
pytest -m "not integration").