fetch_ml/internal/storage
Jeremie Fraeys fbcf4d38e5
feat(storage): add groups, tasks, tokens, and audit database schemas
Add comprehensive database storage layer for new features:

- db_groups.go: Lab group management with members, roles (admin/member/viewer),
  and group-based task visibility queries

- db_tasks.go: Task visibility system (private/lab/institution/open),
  task sharing with expiry, public clone tokens, and optimized
  ListTasksForUser() for access control

- db_tokens.go: Secure token management for public task access and cloning,
  with SHA-256 hashed token storage and automatic cleanup

- db_audit.go: Audit log persistence with checkpoint chains, tamper
  detection, and log rotation support

- schema_sqlite.sql: Updated schema with:
  - groups, group_members tables
  - tasks.visibility enum, task_shares with expiry
  - access_tokens table with hashed tokens
  - audit_logs, audit_checkpoints tables
  - indexes for all foreign keys and query patterns

- db_experiments.go: Add CascadeVisibilityToTasks() for propagating
  visibility changes from experiments to associated tasks
2026-03-08 12:48:42 -04:00
..
dataset.go refactor(queue): integrate scheduler backend and storage improvements 2026-02-26 12:06:46 -05:00
db_audit.go feat(storage): add groups, tasks, tokens, and audit database schemas 2026-03-08 12:48:42 -04:00
db_connect.go refactor(queue): integrate scheduler backend and storage improvements 2026-02-26 12:06:46 -05:00
db_experiments.go feat(storage): add groups, tasks, tokens, and audit database schemas 2026-03-08 12:48:42 -04:00
db_groups.go feat(storage): add groups, tasks, tokens, and audit database schemas 2026-03-08 12:48:42 -04:00
db_jobs.go feat(storage): add groups, tasks, tokens, and audit database schemas 2026-03-08 12:48:42 -04:00
db_metrics.go refactor(queue): integrate scheduler backend and storage improvements 2026-02-26 12:06:46 -05:00
db_tasks.go feat(storage): add groups, tasks, tokens, and audit database schemas 2026-03-08 12:48:42 -04:00
db_tokens.go feat(storage): add groups, tasks, tokens, and audit database schemas 2026-03-08 12:48:42 -04:00
migrate.go refactor(dependency-hygiene): Fix Redis leak, simplify TUI wrapper, clean go.mod 2026-02-17 21:13:49 -05:00
paths.go refactor: Phase 3 - fix config/storage boundaries 2026-02-17 12:49:53 -05:00
schema_embed.go refactor(storage,queue): split storage layer and add sqlite queue backend 2026-01-05 12:31:02 -05:00
schema_postgres.sql refactor: update WebSocket handlers and database schemas 2026-02-18 14:36:30 -05:00
schema_sqlite.sql feat(storage): add groups, tasks, tokens, and audit database schemas 2026-03-08 12:48:42 -04:00