Files
tazlin 18d1a5c0a8 feat(moderation): keep evidence text in object storage behind per-subject countermeasures
- Capture keeps the row as an outbox (text_state pending, text_sha256, text_chars); the quorum applier moves text to evidence/{id}.json every 5 s under an advisory lock and sets stored in one conditional update, deleting objects of rows retention cleared meanwhile and keeping objects another run recorded
- Retention deletes a batch's objects in one bulk call inside the row lock and flags only successes; a store outage holds back only rows with a stored object
- The listing returns text_state, a 10-minute presigned text_url for stored events, and the digest and length; stages stay inline while pending
- The evidence store client needs its own endpoint, bucket and credentials and is off without all four; legacy prompt and image buckets are untouched
- Rejections are counted per IP subject per hour: past HORDE_MODERATION_SUBJECT_TEXT_CAP_PER_HOUR events keep digest and length only; past HORDE_MODEL_REJECTION_TIMEOUT_THRESHOLD model rejections time out the address, every one in raid mode; moderators are exempt; one moderator notice per subject, action and hour carrying the latest event id and review link; countermeasures degrade to none on Redis errors
- Capture, backlog, rejection-rate, distinct-subject and observation-timestamp instruments for flood detection
- ADR 0016, reference doc with the edge rule text, privacy document gated on the configured store, env template
2026-10-01 17:52:36 -04:00
..
2023-03-06 23:55:27 +01:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2023-03-21 13:42:32 +01:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2023-05-03 18:48:45 +02:00
2024-08-10 15:45:14 +02:00
2023-05-08 02:34:08 +02:00
2023-05-09 00:36:12 +02:00
2023-05-20 22:57:18 +02:00
2024-08-10 15:45:14 +02:00
2023-08-31 17:12:00 +02:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2024-02-03 15:57:01 +01:00
2024-02-28 00:46:22 +01:00
2024-05-21 23:44:28 +02:00
2024-11-03 19:50:02 +01:00
2024-11-03 19:50:02 +01:00
2025-06-08 16:47:24 +02:00
2024-08-10 15:45:14 +02:00

AI-Horde Database Information

pg_cron config

Warning

: All .sql files found in a directory deeper than sql_statements/ will be dynamically run, not only the ones specifically identified in this document. Only place .sql files you intend to run in these directories. This does not apply to the sql_statements level (i.e., sql_statements/4.35.1.sql is not automatically run, but sql_statements/cron/your_new_file.sql will be.)

  • cron/
    • schedule_cron_job.sql
      • Creates a stored procedure which schedules a new pg_cron job to execute a specified stored procedure at intervals defined by a cron schedule string, if a job with the same command doesn't already exist.
      • e.g., CALL schedule_cron_job('0-59 * * * *', 'compile_imagegen_stats_totals');
  • stored_procedures
    • compile_*gen_stats_*.sql
      • These files defined stored procedures which populated the compiled_* tables and generally represent minute/hour/day/total statistics about generations.
    • cron_jobs/
      • Schedules any stats compile jobs via schedule_cron_job.