Repository navigation
Fix stale calendar events and Docker health check - #2
Merged
Merged
Conversation
Two related issues where deleted events were not being cleaned up: 1. Subscription feeds: explicit window fetches (triggered by PDF generation) were advancing last_body_hash even though they only pruned events within the document year. The next non-explicit poller cycle would see a matching hash and fast-path past the global delete, leaving events outside the explicit window alive indefinitely. Fix: only advance last_body_hash on non-explicit (poller) fetches. 2. CalDAV sources: events were fetched live on every PDF generation with no background refresh, so removed CalDAV events persisted in the PDF until the next manual sync. Fix: add CaldavPollerService (mirrors the subscription poller – 15-minute cycle, authoritative snapshot per calendar URL) and a caldav_events table. generateDocumentPDF now triggers a fresh fetch into the DB then reads from it, consistent with the subscription pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
wget --spider is a GNU wget flag not supported by BusyBox, which ships with node:22-alpine. The health check was always exiting non-zero regardless of server state. Replaced with wget -O /dev/null which achieves the same result (discards body, exits non-zero on failure) with the BusyBox implementation. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
last_body_hash, causing the next poller cycle to fast-path past the global delete. Events removed from the feed but outside the document year would persist indefinitely. Fix: only advancelast_body_hashon non-explicit (background poller) fetches.CaldavPollerService(15-minute cycle, authoritative snapshot per calendar URL) and acaldav_eventstable.generateDocumentPDFnow refreshes into the DB then reads from it, consistent with the subscription pattern.wget --spideris a GNU wget flag unsupported by BusyBox (ships withnode:22-alpine), so the health check always exited non-zero. Replaced withwget -O /dev/null.Test plan
🤖 Generated with Claude Code