dorfteich/apps/api
Claude Fable 5 2bdb0ec2cf
Some checks failed
CI / Lint, typecheck, test (pull_request) Successful in 6m30s
CI / Auth e2e pack (pull_request) Failing after 5s
CI / Import/export fidelity gate (pull_request) Has been skipped
CI / Build container images (pull_request) Failing after 2s
#224: read-trail storage — partitioning, retention, admin query path
Convert read_events to monthly RANGE partitions on occurred_at, with a
DEFAULT partition as safety net: a lagging maintenance job must never
turn the trail's hard-failure semantics into an outage for classified
reads. The dedup unique pair (#223) moves to per-partition indexes
(PostgreSQL cannot carry it on the parent); a bucket spanning a month
boundary may record one duplicate — over-recording is acceptable, gaps
are not.

New daily job read-trail-maintenance (job-count fence 9 -> 10) creates
months ahead — each with its dedup index — and applies the trail's own
retention readTrail.retentionDays (default 365, deliberately independent
of audit.retentionDays): whole expired months are DROPped without
scanning, remainders deleted by range, every run audited as
read_trail.pruned (catalogue v1.2; the fence regex now admits an
underscore namespace).

Site-Admin query path GET /admin/system/read-events answers "who read
page X" and "what did user Y read" within a period — API-only by
design, documented. Growth measured and documented in data-model.md:
~1 MB per 1000 events including indexes.

Tests: retention pruning + audited deletion + admin queries on the
shared database; the partitioned shape, per-partition P2002 dedup,
months-ahead creation and DROP-based pruning against a fresh database
built by the real migration chain.

Refs #224.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUtYMxwTCMHG9mVHnwbFg8
2026-07-31 12:21:45 +02:00
..
assets #209: pandoc reference documents carry the VS-NfD marking for DOCX/ODT 2026-07-31 07:09:47 +02:00
prisma #224: read-trail storage — partitioning, retention, admin query path 2026-07-31 12:21:45 +02:00
scripts #209: pandoc reference documents carry the VS-NfD marking for DOCX/ODT 2026-07-31 07:09:47 +02:00
src #224: read-trail storage — partitioning, retention, admin query path 2026-07-31 12:21:45 +02:00
.swcrc Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
Dockerfile #209: pandoc reference documents carry the VS-NfD marking for DOCX/ODT 2026-07-31 07:09:47 +02:00
nest-cli.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
package.json Built-in MCP endpoint (Streamable HTTP) on top of the public API (#105) 2026-07-12 11:36:02 +02:00
tsconfig.build.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
tsconfig.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
vitest.config.ts Add user, identity, session, and auth-support data model 2026-07-05 00:42:22 +02:00
vitest.global-setup.ts Add the first-run setup wizard API with env-backed secret store (#80) 2026-07-11 15:10:28 +02:00