Tests never open the live database - #9
Merged
Merged
Conversation
…SKILL_DATA_DB at an absent tmp path and clears ATTEST_DB too, and the two cite.check tests pin RSS_DB to their own file. On 2026-09-11 both opened ~/.hermes/.../hermes.db through resolve_db_path's skill-data fallback, found another session had migrated it to schema 10 while the code knew 9, and failed on a clean merged tip -- a test reading machine state fails for reasons unrelated to the branch. The tests that exercise the fallback itself already repoint SKILL_DATA_DB and are unaffected; the full suite is 1801 passed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What
tests/test_citations.py::test_cite_check_says_it_only_checked_the_keysandtest_cite_check_response_states_what_it_checkedfailed on a clean merged tip with:Both call the
cite.checktool, whose@toolwrapper opens the default DB. The hermetic fixture deletesRSS_DBbut nothing repointed the skill-data fallback, soresolve_db_pathopened the live~/.hermes/skills/science-recommendations/data/hermes.db, which another session had migrated to schema 10 while every checkout's code knew 9.Fix
conftest._hermetic_envrepointsattestation.db.SKILL_DATA_DBat an absent path undertmp_pathand clearsATTEST_DBalongsideRSS_DB, so no test can fall through to the live file. The fourresolve_db_pathtests that exercise the fallback already set their ownSKILL_DATA_DBand are unaffected.cite.checktests pinRSS_DBto a file undertmp_path, so they are hermetic even from a checkout that has a./hermes.dbin its cwd.Verified
All seven non-test hooks pass; full pytest 1801 passed, 2 skipped (previously 1801 passed, 2 failed).
🤖 Generated with Claude Code