Fix now-micros clock offset and harden the build

now-micros added get-internal-real-time (process uptime on SBCL) to the
wall-clock seconds, so every event timestamp drifted ahead of real time by
the process's uptime. On a long-lived pod this reached days (~404,580s at
~4d16h uptime), corrupting score-event ts values in SQLite and on the
WebSocket scorestream while the kernel clock, NTP, and date(1) stayed correct.

- db.lisp: read the system real-time clock directly via
  sb-unix:unix-gettimeofday; drop the get-internal-real-time term.
- db.lisp: add check-clock-sanity, cross-checking now-micros against
  get-universal-time and warning on >5s drift; call it from start-server
  before any events are recorded.
- Makefile: default to the host /usr/bin/sbcl (overridable via SBCL=...).
  A Homebrew SBCL records CC=gcc-12 in sbcl.mk, which can't link against the
  system glibc; the Fedora-packaged sbcl uses the system gcc.

Fixes catalyst-ctfd/openshift-space-challenge-tng#36

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Anthony Green2026-06-14 16:21:49 -0400 ccc3c9777250285269a6f454497ff2488ca162b3
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>