test: refresh two stale expectations against current production behavior#10
Open
nikrich wants to merge 1 commit into
Open
test: refresh two stale expectations against current production behavior#10nikrich wants to merge 1 commit into
nikrich wants to merge 1 commit into
Conversation
- test_macos_connector_normalizes_jxa_payload: also patch _fetch_via_eventkit to return None. The connector now tries EventKit before JXA, so on dev machines with calendar access granted the subprocess.run mock was bypassed and real events leaked in. - test_render_emits_wikilinks_for_artifacts: assert the humanized alias (|Defer simi]]) introduced by the slug-humanizer feature. Path slug is still validated separately. No production code changes — both tests were drifting from existing behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying ghost-brain with
|
| Latest commit: |
a7cb3bc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8ec591a9.ghost-brain.pages.dev |
| Branch Preview URL: | https://fix-stale-test-expectations.ghost-brain.pages.dev |
2 tasks
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.
Summary
Two test failures on dev machines that hadn't been caught because production-side changes drifted away from their original test fixtures. No production code changes — only test expectations updated.
test_macos_connector_normalizes_jxa_payload— The connector now tries EventKit before falling back to JXA (thesubprocess.runpath). On dev machines with calendar access granted, EventKit succeeds, returns real calendar events, and thesubprocess.runmock is never reached. Fix: also patch_fetch_via_eventkitto returnNone, forcing the JXA fallback path deterministically.test_render_emits_wikilinks_for_artifacts— Commit0ab0897humanized wikilink aliases (defer-simi→Defer simi). The test was not updated and still expects the raw-slug alias. Fix: assert the humanized alias and validate the path slug separately.Both passed everywhere CI runs (no calendar access → JXA path runs; whichever digest test order was happening). They surfaced on the dev box where I was running
pytest tests ghostbrainbefore starting a new feature.Test plan
pytest tests/test_calendar.py::test_macos_connector_normalizes_jxa_payload— passespytest tests/test_weekly_digest.py::test_render_emits_wikilinks_for_artifacts— passespytest tests ghostbrain— 324 passed, 0 failures🤖 Generated with Claude Code