ingest-api: allow unknown event JSON fields for forward-compatible clients

- Relax Fastify/AJV schema on ingest events (additionalProperties: true)
  so CRM/deploy smokes sending extra keys no longer fail validation with 400.
- Add integration test when ERROR_REPORTING_TEST_DATABASE_URL is set.
- Document BIT-SMOKE / BIT-931 triage in RUNBOOK_INGEST_DEBUG; note in
  ingest-hardening-runbook.

Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: 35542fda-44d4-4154-b95d-1a7de3566204
Paperclip-Run: 3682ff13-02fc-4749-a460-6414830dccc7
Made-with: Cursor
This commit is contained in:
Peter Spark committed 2026-04-05 04:33:08 +00:00
1 parent d7f9642606
commit d47a061399
4 files changed
+57 -1

No files matched your search

@@ -16,6 +16,11 @@ Use this after deploying ingest API or changing fingerprint / noise / rate-limit
Per-key overrides: set `rate_limit_max` and/or `rate_limit_window_ms` on the key row; NULL means inherit the corresponding env default.
## Request schema (forward compatibility)
- Top-level body must remain `{ "events": [ … ] }` only (no extra root keys).
- Each **event** object must include `schema_version`, `occurred_at`, `level`, and `message`. Additional event-level properties are **accepted and ignored** by the processor so integrators can attach metadata without breaking validation.
## Fingerprint quality
- Server-side fingerprint policy version is returned on each ingest response as `fingerprint_policy_version`.