Problem
Feed producer verification currently requires manual testing on a local dev machine:
- ProjectProducer: tested by cd-ing to different git repos and checking
hookwise status-line output
- CalendarProducer: requires real Google OAuth token and calendar events
- WeatherProducer: requires network access to Open-Meteo API
There's no CI-compatible sandbox that can validate these producers end-to-end.
What's needed
A hermetic testing infrastructure that can run in CI (GitHub Actions) to validate feed producers produce correct data and the full pipeline (producer → daemon cache → bridge → status-line render) works.
Scope
-
Git sandbox for ProjectProducer:
- Create temp git repos with known state (specific branch, commits, dirty/clean)
- Verify producer output matches expected values
- Test edge cases: detached HEAD, empty repo (no commits), shallow clone, non-git directory
- Could use
git init + scripted commits in a temp directory
-
Calendar mock server for CalendarProducer:
- HTTP test server that mimics Google Calendar API responses
- CalendarProducer already has a
baseURL field for endpoint override
- Generate deterministic events (upcoming, current, all-day, past)
- Test token refresh flow with mock OAuth endpoint
-
Weather mock server for WeatherProducer:
- HTTP test server mimicking Open-Meteo API
- WeatherProducer already uses
p.client which can be injected
- Deterministic responses for various weather codes
-
Full pipeline integration test:
- Start daemon with mock/sandbox producers
- Wait for cache files to be written
- Run
hookwise status-line and verify rendered output contains expected segments
- This closes the Go→JSON→CLI rendering gap
Non-goals (for now)
- Real API integration tests (too flaky for CI)
- TUI snapshot tests for feed data (covered separately)
Context
During #57 (ProjectProducer fix), verification required:
- Rebuilding the binary (
make install)
- Manually writing cache files to
~/.hookwise/state/project.json
- Running
hookwise status-line in two different repos
- Visual inspection of ANSI output
This manual process is error-prone and doesn't scale to CI.
Related
Problem
Feed producer verification currently requires manual testing on a local dev machine:
hookwise status-lineoutputThere's no CI-compatible sandbox that can validate these producers end-to-end.
What's needed
A hermetic testing infrastructure that can run in CI (GitHub Actions) to validate feed producers produce correct data and the full pipeline (producer → daemon cache → bridge → status-line render) works.
Scope
Git sandbox for ProjectProducer:
git init+ scripted commits in a temp directoryCalendar mock server for CalendarProducer:
baseURLfield for endpoint overrideWeather mock server for WeatherProducer:
p.clientwhich can be injectedFull pipeline integration test:
hookwise status-lineand verify rendered output contains expected segmentsNon-goals (for now)
Context
During #57 (ProjectProducer fix), verification required:
make install)~/.hookwise/state/project.jsonhookwise status-linein two different reposThis manual process is error-prone and doesn't scale to CI.
Related
docs/retro-weather-feed-bug-29.md: cross-boundary testing gaps