Skip to content

chore: place project into hibernation - #271

Merged
ChristopherRotnes merged 5 commits into
masterfrom
fix/sporty-sync-user-agent
Sep 4, 2026
Merged

chore: place project into hibernation#271
ChristopherRotnes merged 5 commits into
masterfrom
fix/sporty-sync-user-agent

Conversation

@ChristopherRotnes

Copy link
Copy Markdown
Owner

Summary

Disables all CI/CD, deployments, and scheduled functions. Database and resources kept intact for recovery.

Changes

  • GitHub Actions workflows disabled (ci.yml, audit.yml, cleanup-staging.yml)
  • Azure Functions timers disabled (sportySyncTimer, recsCacheCleanup)
  • HIBERNATION.md added with recovery instructions

Status

All code changes are non-destructive and easily reversible. No resources deleted, only automation disabled.

Recovery

See HIBERNATION.md for reactivation steps (~20 minutes total).

🤖 Generated with Claude Code

ChristopherRotnes and others added 5 commits May 27, 2026 22:36
…e sessions

Sporty's API ignores period_start and always returns sessions from tomorrow
onwards, so same-day sessions could only ever be captured the night before.
Adding a 22:00 UTC timer run (midnight Oslo CEST) ensures next-day sessions
are captured while Sporty still treats them as "tomorrow".

The sync now also deletes future gym_calendar rows within the sync window
before each upsert, removing cancelled/rescheduled sessions that Sporty
has dropped. The cleanup only runs when Sporty returns data (guards against
API outages) and never touches rows before the next Oslo midnight (preserves
same-day sessions from the 22:00 UTC run across later runs in the same day).
Backfill runs (shiftDays != 0) skip the cleanup entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Supabase rejects POST/DELETE with sb_secret service role key when
no User-Agent is present — treats the request as a browser call.
Azure Functions native fetch sends no User-Agent by default, so
the cleanup DELETE and upsert POST were silently failing after each
sync run. The cleanup wiped future gym_calendar rows; the upsert
then failed to re-insert them, leaving gym_calendar empty from
June 6 onwards while GET requests (health check) still worked.

Added User-Agent header to both write requests. Post-deploy a
manual backfill sync is needed to restore June 6+ data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Disable all CI/CD, deployments, and scheduled functions:
- GitHub Actions workflows: ci.yml, audit.yml, cleanup-staging.yml
- Azure Functions timers: sportySyncTimer, recsCacheCleanup

Database and resources kept intact — project can be reactivated.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@ChristopherRotnes
ChristopherRotnes merged commit f9c942e into master Sep 4, 2026
@ChristopherRotnes
ChristopherRotnes deleted the fix/sporty-sync-user-agent branch September 4, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant