Commit Graph

7 Commits

Author SHA1 Message Date
bvandeusen 6a62120457 chore(deps): Go server bumps (x/crypto, pgx, migrate, pgerrcode)
Direct bumps:
- golang.org/x/crypto v0.35.0 → v0.51.0 (security backports;
  single highest-priority bump in the audit)
- github.com/jackc/pgx/v5 v5.7.4 → v5.9.2
- github.com/golang-migrate/migrate/v4 v4.18.2 → v4.19.1
- github.com/jackc/pgerrcode 2022-04-16 → 2025-09-07 (untagged
  pseudo refresh)

Side effects (good):
- `go mod tidy` dropped three transitives that migrate v4.18
  pulled in but v4.19 no longer needs: hashicorp/errwrap,
  hashicorp/go-multierror, go.uber.org/atomic.

Toolchain note:
- `go.mod` `go` directive auto-bumped 1.23.0 → 1.25.0 because
  x/crypto v0.51.0 declares Go 1.25 as its minimum. If the
  go-ci runner image isn't on Go 1.25+, CI will bounce on
  this; the runner image bump is operator infra (memory:
  project_forgejo_ci.md). Tracked in Fable #464.

Reference: Fable #464 + audit note #460.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 13:02:32 -04:00
bvandeusen 46c8edfa82 feat(playlists): gocron-based per-user scheduler
Builds the per-user daily-at-03:00-local scheduler for #392 Half B.
Uses github.com/go-co-op/gocron/v2 with WithLocation(userTZ) for
each user's job. Hourly reconciliation pass keeps the in-memory
job set in sync with the active-users query.

Start sequence: clear stale in_flight rows; register a daily job
for every active user at their stored timezone; fire a one-shot
runOnce to catch up missed schedules during downtime; start gocron.

Stop drains and shuts down the gocron loop.

Refresh(ctx, userID) removes the user's existing job (if any) and
registers a fresh one at their current timezone — wired into the
PUT /api/me/timezone handler and new-user registration in the next
commit.

Server struct gains PlaylistScheduler; main.go constructs it after
the eventbus and threads it through to api.Mount. The existing
StartSystemPlaylistCron call stays for one more commit so we don't
have a window where no scheduler is running; Task 3 deletes it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:57:13 -04:00
bvandeusen 9c7dec60a9 fix(server): go mod tidy after sync_test brings testify direct
internal/sync/changes_test.go imports github.com/stretchr/testify/require,
moving testify from indirect to direct. Also pulled in testify's own
indirects (go-spew, go-difflib) and promoted pgerrcode to direct.

Caught by CI go vet on 6fb6729.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 22:45:15 -04:00
bvandeusen c5d83364cd M1/#293: add dhowden/tag dep for library scanner 2026-04-19 15:11:40 +00:00
bvandeusen 8f2317c567 M1/#292: add golang.org/x/crypto as direct dep (bcrypt) 2026-04-19 02:27:26 +00:00
bvandeusen e0b7e27d78 M1/#291: add pgx/v5 + golang-migrate deps, pinned for Go 1.23 2026-04-19 01:05:12 +00:00
bvandeusen 417e3d05dd feat(skel): add go module definition
Initial module at git.fabledsword.com/bvandeusen/minstrel pinned to go
1.23.0 to match the runner-base:go-ci image. Dependencies kept minimal
(chi router, yaml.v3) so CI's first run is fast and contained.
2026-04-18 21:19:17 +00:00