dorfteich/apps/api/src/admin
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
..
admin.controller.ts Add the first-run setup wizard API with env-backed secret store (#80) 2026-07-11 15:10:28 +02:00
admin.e2e.db.test.ts Add account/session endpoints and typed instance settings with admin API 2026-07-05 05:26:45 +02:00
admin.module.ts #195: trashed content leaves the search index itself 2026-07-30 14:07:34 +02:00
backup-admin.controller.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00
backup-admin.e2e.db.test.ts #192: deploy-level backup target allowlist 2026-07-30 12:17:14 +02:00
backup-admin.service.ts #192: deploy-level backup target allowlist 2026-07-30 12:17:14 +02:00
backup-allowlist-empty.e2e.db.test.ts #192: deploy-level backup target allowlist 2026-07-30 12:17:14 +02:00
backup-allowlist.e2e.db.test.ts #192: deploy-level backup target allowlist 2026-07-30 12:17:14 +02:00
pseudonymization.service.ts #195: trashed content leaves the search index itself 2026-07-30 14:07:34 +02:00
quota-admin.controller.ts Add Site-Admin quota override management UI (#58) 2026-07-10 00:14:28 +02:00
quota-admin.e2e.db.test.ts Add Site-Admin quota override management UI (#58) 2026-07-10 00:14:28 +02:00
quota-admin.service.ts Add Site-Admin system panel with persistent audit trail (#86) 2026-07-11 20:03:05 +02:00
site-admin.guard.ts Add account/session endpoints and typed instance settings with admin API 2026-07-05 05:26:45 +02:00
system-admin.controller.ts #224: read-trail storage — partitioning, retention, admin query path 2026-07-31 12:21:45 +02:00
system-admin.e2e.db.test.ts Add Site-Admin system panel with persistent audit trail (#86) 2026-07-11 20:03:05 +02:00
system-admin.service.ts #224: read-trail storage — partitioning, retention, admin query path 2026-07-31 12:21:45 +02:00
user-admin.controller.ts Add Site-Admin user management (#59) 2026-07-10 00:31:41 +02:00
user-admin.e2e.db.test.ts Add Site-Admin user management (#59) 2026-07-10 00:31:41 +02:00
user-admin.service.ts Add Site-Admin system panel with persistent audit trail (#86) 2026-07-11 20:03:05 +02:00