test(health): assert detectBlindspot's branch, not the build that made the DB - #24
Merged
Merged
Conversation
…e the DB
The "(d) missing recall_log reads as not instrumented" check relies on the
table being absent at that point. That is not a property of the test — it is a
property of whichever engine created DB_PATH. A build that instruments recall
creates recall_log in initMemory(), the "no table" state becomes unreachable,
and the check fails with a perfectly correct value:
✗ (d) missing recall_log reads as "not instrumented"
— {"available":false,"reason":"no recall_log rows in the last 7 days"}
Nothing is wrong with detectBlindspot there; the test simply cannot reach the
branch it wants to assert. Dropping the table first tests the logic either way.
Found while rebasing a downstream runtime (which does instrument recall) onto
main — the kind of failure that reads as a real regression and costs a while to
disbelieve.
Verified against both engines: 63/63 on a build without instrumentation, and
62/1 -> 63/0 on one with it.
Co-authored-by: 千夏 <qianxia@clawgamers.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MXAntian
marked this pull request as ready for review
August 3, 2026 05:53
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.
The problem
The
(d) missing recall_log reads as "not instrumented"check relies on the table being absent at that point. That is not a property of the test — it is a property of whichever engine createdDB_PATH.A build that instruments recall creates
recall_logininitMemory(). The "no table" state becomes unreachable and the check fails with a perfectly correct value:Nothing is wrong with
detectBlindspot. The test simply cannot reach the branch it wants to assert.The fix
DROP TABLE IF EXISTS recall_logbefore the check — one line, tests the logic either way. The test already recreates the table two lines later for the empty/stalled cases, so this fits what it was already doing.How it turned up
Rebasing a downstream runtime (which does instrument recall) onto
main. It reads as a real regression in #15's work and costs a while to disbelieve — worth removing.Verification
🤖 Generated with Claude Code