Skip to content

v5 - #163

Merged
rikedyp merged 71 commits into
masterfrom
v5
Aug 11, 2026
Merged

v5#163
rikedyp merged 71 commits into
masterfrom
v5

Conversation

@rikedyp

@rikedyp rikedyp commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Breaking API changes

  • GET /videos - the presenter query parameter is now presenter_id. Searches across multiple presenters return videos by any (OR semantics).
  • GET /videos - no longer 404s when nothing matches; it returns an empty
    page. Invalid parameters are 400 (was 422), and page, per_page, sort
    and the date range are now validated rather than silently coerced.
  • GET /events - has_videos must be true or false; anything else is a
    400 instead of being treated as "all events".
  • GET /videos/{youtube_id}/recommendations - default n is now 5 (was 1).
  • Error envelope reshaped error is the HTTP status code as an integer (was
    a machine-readable string). Every error also carries request and
    query_parameters; detail and report_url appear on 500 only, instead of
    being concatenated into message.
  • PATCH /crud/{table}/{id} - returns the updated record as a single object,
    not a one-element array. A non-numeric ID is 400; no matching row is 404.
  • POST /crud/{table} - an empty JSON array is now 400.
  • DELETE /crud/{table}/{id} - 409 removed from the spec.
  • Conditional requests - read endpoints send ETag, Last-Modified and
    Cache-Control, and answer 304 to If-None-Match / If-Modified-Since.
    CRUD endpoints send Cache-Control: no-store.
  • 503 while the cache is unavailable - read endpoints return a retryable
    503 where they previously failed with a 500.
  • Pagination - links report the requested per_page rather than one capped to
    the result count, and an empty result set is page 1 of 1.
  • Timestamps are UTC.
  • New GET /admin/refresh/status; POST /admin/refresh now answers 202
    with a monitorUrl pointing at it.

Serialised cache refresh

ADMIN.Refresh takes a refresh lock and hands the work to ADMIN.RunRefresh:
one refresh runs at a time with a single pending slot, and a stale lock is
recovered automatically. This removes the races and clobbering that could lock
the system up or let a request read a half-updated cache. A new REFRESH test
suite covers the lock, the status endpoint, and the accepted/pending paths.

Cold start from a persisted cache

The built cache is written to disk (ADMIN.WriteCache / ReadCache, validated by
CACHE.Valid) and re-read at startup, so a fresh process serves requests
immediately instead of failing until the first build completes.

OpenAPI spec conformance

The spec and the implementation were reconciled:

  • Corrected parameter and header
    definitions
  • Shared conditional-request and cache-header components in
    SPEC.apln
  • Richer error envelope
  • Proper schema for /teapot.

Other fixes

  • Clearer authentication errors
  • Static files fall through to the normal 404
    handler
  • SQL transactions are committed explicitly and only signal on a failed
    reconnect
  • Failed migrations are no longer recorded
  • Log output is size-capped.

Performance

  • Search indexing now only stems unique corpus terms, reducing external calls.
  • Search index lookup function is now explicitly hashed, rather than relying on index∘⍳

Tests, CI and docs

Test framework reworked around assertions that report their failures, suites run
against a clean database, cache builds are exercised in an isolate under test,
and Jenkins runs are timeout-bounded and fail fast on a bad cache build.
Obsolete CI/test-endpoints.sh removed.

@rikedyp

rikedyp commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

Closes #134 #137 #157 #159 #160 #161 #162

@rikedyp
rikedyp merged commit 17722ed into master Aug 11, 2026
2 checks passed
@rikedyp
rikedyp deleted the v5 branch August 11, 2026 18:04
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.

2 participants