Commit Graph

4 Commits

Author SHA1 Message Date
ef39152f4e Add structured error logging to OCI handlers
Every 500 response in the OCI package silently discarded the actual
error, making production debugging impossible. Add slog.Error before
each 500 response with the error and relevant context (repo, digest,
tag, uuid). Add slog.Info for state-mutating successes (manifest push,
blob upload complete, deletions).

Logger is injected into the OCI Handler via constructor, falling back
to slog.Default() if nil.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 12:47:44 -07:00
15a306dc4a Fix OCI route mounting — integrate into authenticated /v2 group
NewRouter now accepts an optional OCI handler to mount inside the
authenticated /v2 route group, avoiding chi's Mount conflict on
an existing path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:22:31 -07:00
8cf26895a3 Wire up mcrsrv server, status, and snapshot commands
Server command loads config, opens and migrates DB, creates auth
client, blob storage, GC collector, policy engine, OCI handler,
mounts HTTP routes (OCI + admin REST), starts optional gRPC server,
and handles graceful shutdown on SIGINT/SIGTERM.

Status command performs a health check against the /v1/health endpoint
with optional CA cert for TLS verification.

Snapshot command performs VACUUM INTO to /srv/mcr/backups/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:17:44 -07:00
369558132b Initial scaffolding: module, directory structure, Makefile, linter config 2026-03-19 11:29:32 -07:00