1754 Commits

Author SHA1 Message Date
bvandeusen 58b29cc4bd M1/#292: album queries (upsert/get/list-by-artist) 2026-04-19 02:31:31 +00:00
bvandeusen 7c46d8358f M1/#292: artist queries (upsert/get/list) 2026-04-19 02:31:27 +00:00
bvandeusen a243357ce6 M1/#292: down migration for core library 2026-04-19 02:31:23 +00:00
bvandeusen 75733a0f7f M1/#292: core library migration (artists/albums/tracks/users) 2026-04-19 02:31:21 +00:00
bvandeusen 0776dd05ae M1/#292: sqlc v2 config → dbq package via pgx/v5 2026-04-19 02:31:10 +00:00
bvandeusen 8dd064616a M1/#292: add Makefile with sqlc generate + test/lint/build 2026-04-19 02:31:06 +00:00
bvandeusen d358d7e1a0 M1/#292: wire auth.Bootstrap into startup 2026-04-19 02:31:05 +00:00
bvandeusen d7e04a757a M1/#292: test env overrides for admin bootstrap 2026-04-19 02:30:51 +00:00
bvandeusen 70cd49299a M1/#292: add Auth.AdminBootstrap config + env overrides 2026-04-19 02:30:39 +00:00
bvandeusen 69ffc32b7d M1/#292: go.sum tidy for bcrypt 2026-04-19 02:30:27 +00:00
bvandeusen 8f2317c567 M1/#292: add golang.org/x/crypto as direct dep (bcrypt) 2026-04-19 02:27:26 +00:00
bvandeusen 2062ec53bb Merge pull request 'M1/#291: wire Postgres migrations + pgxpool' (#4) from dev into main 2026-04-19 01:38:09 +00:00
bvandeusen 79cd25b24a M1/#291: drop goose-style stub migration (replaced by 0001_init.*) 2026-04-19 01:35:23 +00:00
bvandeusen 08a627b10b M1/#291: placeholder down migration 2026-04-19 01:12:39 +00:00
bvandeusen ceb0161677 M1/#291: placeholder up migration to establish runner 2026-04-19 01:12:37 +00:00
bvandeusen 3e6ce809d0 M1/#291: document SMARTMUSIC_* env vars + test DSN 2026-04-19 01:12:35 +00:00
bvandeusen c252608558 M1/#291: add minstrel service to compose stack 2026-04-19 01:12:31 +00:00
bvandeusen e54482409a M1/#291: run migrations + open pool on startup 2026-04-19 01:12:23 +00:00
bvandeusen 9c66736916 M1/#291: env-gated migration test against real postgres 2026-04-19 01:12:12 +00:00
bvandeusen 380a76c053 M1/#291: wire pgxpool + golang-migrate runner with embedded migrations 2026-04-19 01:12:02 +00:00
bvandeusen 8041d19dbe M1/#291: sync go.sum for pgx + golang-migrate deps 2026-04-19 01:11:46 +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 d70ac2c81c ci(release): switch registry login to REGISTRY_TOKEN (#3)
Uses the repo-scoped REGISTRY_TOKEN PAT (write:package) for docker
login instead of the default GITHUB_TOKEN, which Forgejo does not
issue with container-registry write scope.
2026-04-18 23:33:08 +00:00
bvandeusen aa7599f91d ci(release): use REGISTRY_TOKEN secret for Forgejo registry push
The default GITHUB_TOKEN provided by Forgejo Actions lacks write:package
scope, so docker buildx push failed with 401 reqPackageAccess. Swap in
the repo-level REGISTRY_TOKEN secret (a PAT scoped write:package) for
docker login; github.actor still supplies the username.

Also drops the transient Docker environment diagnostics step — the
registry was the issue, the socket/buildx setup is fine.
2026-04-18 23:29:15 +00:00
bvandeusen 04e63f220b ci(release): add workflow_dispatch + docker diagnostics (#2)
Enables manual retrigger of release.yml and dumps docker/buildx state
before the build so the next failure is diagnosable without guessing
at socket mounts or buildx driver setup.
2026-04-18 23:21:17 +00:00
bvandeusen 0f9efed50c ci(release): add workflow_dispatch + pre-build docker diagnostics
Adds a manual-trigger hook so we don't need a fresh commit to re-run
this pipeline, and dumps docker/buildx state before the build so CI
failures are diagnosable without docker.sock guesswork.
2026-04-18 23:19:06 +00:00
bvandeusen 72b8e00d80 M0: repo scaffolding, CI pipelines, and Go skeleton (#1)
Closes milestone M0: CI (test + release), Forgejo runner on go-ci label,
Go skeleton (cmd/minstrel, config, logging, server with /healthz,
migrations stub), Dockerfile, docker-compose, golangci-lint config.

Preserves `dev` branch for ongoing feature work per the documented
dev → main → tag release workflow.
2026-04-18 22:00:45 +00:00
bvandeusen 8fbf355305 fix(server): silence errcheck on deferred Body.Close 2026-04-18 21:48:07 +00:00
bvandeusen 4c5b4d1790 fix(server): rename unused request param to _ for revive/unused-parameter 2026-04-18 21:47:52 +00:00
bvandeusen 743fbe9d5c ci(lint): drop revive exported rule; require no doc-comment boilerplate
Revive's `exported` check forced doc comments on every exported symbol —
that conflicts with the project's policy of only writing comments when
the "why" is non-obvious. Keep `var-naming`, `unused-parameter`, and
`early-return` for signal that doesn't mandate prose.
2026-04-18 21:47:40 +00:00
bvandeusen 9bce7fee10 ci: add .golangci.yml config for CI lint step 2026-04-18 21:21:14 +00:00
bvandeusen 70c89bb7df feat(skel): example YAML config mirroring Default() 2026-04-18 21:21:08 +00:00
bvandeusen b40e379b84 feat(skel): docker-compose for local Postgres (integration-test stack) 2026-04-18 21:21:01 +00:00
bvandeusen 7077614116 feat(skel): multi-stage Dockerfile for minstrel runtime
Builder uses golang:1.23-bookworm (matches runner-base:go-ci).
Runtime is debian:bookworm-slim with ffmpeg (server spec §3) plus a
non-root minstrel user. Release workflow builds from this Dockerfile.
2026-04-18 21:20:54 +00:00
bvandeusen ff7cd8d38b feat(skel): placeholder migration so embed.FS has a file to index 2026-04-18 21:20:45 +00:00
bvandeusen 9b9e0e4011 test(db): verify migrations stub loads embedded files and returns ErrNotConfigured 2026-04-18 21:20:40 +00:00
bvandeusen 58fa790b2b feat(skel): db package with embedded migrations stub
Establishes the embed.FS and migrations/ layout up front. Migrate()
returns ErrNotConfigured intentionally — the real goose runner lands in
M2 alongside Postgres work, avoiding a toolchain bump to Go 1.24/1.25
through goose's transitive modernc.org/libc dependency chain.
2026-04-18 21:20:34 +00:00
bvandeusen 4dbf02d645 test(server): verify /healthz returns 200 with {"status":"ok"} 2026-04-18 21:20:23 +00:00
bvandeusen 16f2fc2ce4 feat(skel): chi router with RequestID/Recoverer middleware and /healthz 2026-04-18 21:20:17 +00:00
bvandeusen d206f9281f feat(skel): slog logger factory with text|json format and level parsing 2026-04-18 21:20:10 +00:00
bvandeusen a29d876ac4 test(config): cover defaults, YAML load, missing file, env overrides 2026-04-18 21:20:02 +00:00
bvandeusen d2d8612e06 feat(skel): config loader with YAML + SMARTMUSIC_* env overlay 2026-04-18 21:19:50 +00:00
bvandeusen be181f8245 feat(skel): add cmd/minstrel entrypoint
Parses --config / SMARTMUSIC_CONFIG, loads YAML config with env overlay,
initializes slog, starts the chi HTTP server, and shuts down cleanly on
SIGINT/SIGTERM.
2026-04-18 21:19:39 +00:00
bvandeusen f98b9f66aa feat(skel): add go.sum for initial dependency set 2026-04-18 21:19:26 +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
bvandeusen 8b9f57128a ci: add release workflow for image build + push on main and v* tags 2026-04-18 19:21:38 +00:00
bvandeusen 83d71f6703 ci: re-trigger test workflow against rebuilt go-ci image 2026-04-18 19:07:30 +00:00
bvandeusen fa5a24140b ci: slim test workflow to lint + unit tests, drop Postgres service 2026-04-18 18:50:31 +00:00
bvandeusen 078e6e989b ci: retarget test workflow to go-ci runner label 2026-04-18 18:17:16 +00:00
bvandeusen fba1366537 ci: add Forgejo Actions test workflow with Postgres service 2026-04-18 18:07:50 +00:00