Block ingest for retired WDMI slugs, purge project data via migration,
remove WDMI runbooks, and add offboard-project helper for future retirements.
Co-authored-by: Cursor <[email protected]>
Join er_projects in ingest auth to expose lowercase project slug. Record
error_hub_last_event_timestamp from stored events occurred_at and
error_hub_ingest_failures_total on HTTP 500 batches (BIT-4903 / BIT-4932).
Add integration assertion when ERROR_REPORTING_TEST_DATABASE_URL is set.
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-4932
Paperclip-Run: 00b93610-8794-4264-81a9-6f4cb39a9d8d
Made-with: Cursor
Concurrent POSTs with the same Idempotency-Key could pass the initial
SELECT and collide on INSERT into er_ingest_idempotency (unique on
ingest_key_id + idempotency_key), surfacing ER_DUP_ENTRY and risking
duplicate occurrences. Acquire a per-key MySQL named lock before the
idempotency read; on duplicate insert, roll back and replay the stored
response. Document 503 idempotency_busy when GET_LOCK times out.
Adds an integration test for parallel identical idempotent requests (BIT-2530).
Made-with: Cursor
CRM /smoke/crm.php BIT-SMOKE-CRM-DIRECT-FWD and similar probes can carry
unicode hyphen/minus characters; normalize before substring scan so
bitreport_smoke_marker still matches (BIT-933).
Paperclip-Issue: BIT-933
Paperclip-Run: 699684ed-75aa-4850-81a0-84bd717627e7
The wdmi-store/CRM post-deploy probe reports failures with the exact message
BIT-SMOKE error hub ingest live check, which did not match BIT-SMOKE- and
opened hub incidents (BIT-931 / ERRCLUSTER churn). Treat it like other smoke
traffic: skip at every level with bitreport_smoke_marker.
Document in RUNBOOK_INGEST_DEBUG and ingest-hardening-runbook; add unit and
integration coverage.
Made-with: Cursor
CRM PHP smoke (BIT-SMOKE-CRM-MAIN-DIRECT) can send the reserved token in
stack_trace while message stays generic, so the prior message-only noise
check missed it. Pass client stack text into evaluateNoise and bump
noise_ruleset_version to 1.0.3.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-957
Paperclip-Run: d61f6d49-e43c-4ff6-a694-cbc8edff0d33
Made-with: Cursor
Reserved BIT-SMOKE- messages (e.g. wdmi-store /smoke/wdmi.js direct-ingest
checks) are skipped at every ingest level so they do not open incidents or
trigger BIT-309 loops. Bump noise ruleset to 1.0.2; extend unit and integration
tests and ingest hardening runbook.
Paperclip-Issue: BIT-942
Made-with: Cursor
The Fastify JSON Schema for POST /v1/ingest/events used
additionalProperties:false on the root object. CRM direct-forward
smokes that attach batch metadata beside events were rejected with
HTTP 400 before the handler.
- ingestJsonSchemas.ts: shared event and batch schemas
- ingestJsonSchemas.test.ts: Ajv regression without MySQL
- integration.twoProjects.test.ts: end-to-end case when DB URL set
- docs/RUNBOOK_INGEST_DEBUG.md: document batch-level forwards
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-933
Paperclip-Run: f027c017-4cbf-4819-84bb-85922e5c0407
Made-with: Cursor
- 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
- Add NOISE_RULESET_VERSION 1.0.0 with CRM/WDMI parity (external resource,
ResizeObserver, WDMI media prefix, stale-bundle and transient JS strings).
- Skip ingest for matched noise; never suppress when level maps to critical.
- FINGERPRINT_POLICY_VERSION 1: NFKC/whitespace-normalized first line plus
project_slug|message|file|line basis (SHA-256) when client omits fingerprint.
- Response includes noise_filtered_count and policy version fields; OpenAPI
documents stored vs skipped result shapes.
Paperclip-Issue: BIT-727
Paperclip-Run-Id: ae412312-f71a-4efd-93e0-ca7289c93362
Made-with: Cursor
Replace Postgres with MariaDB 11 in docker-compose; convert all
database/error_reporting and db/migrations SQL to InnoDB-friendly syntax
(DATETIME(6), AUTO_INCREMENT, ON DUPLICATE KEY). Run admin portal DDL in the
same migrate one-shot as error_reporting.
Switch ingest-api, collector-worker, and api from pg to mysql2 (pools,
parameterized queries, transactions). Align ingest writes with
er_incident_occurrences and include project_id on idempotency inserts.
Add scripts/run-mysql-migrations.sh for host-side applies; update LXC
run-migrate/verify, deployment docs, and .env.example (mysql://, ER_MYSQL_*).
Verified: npm run build + npm test in ingest-api and collector-worker;
npm run build in api. Full docker compose not run here (no local daemon).
Co-Authored-By: Paperclip <[email protected]>