Align hub rate-limit error context with @fastify/rate-limit types, parse RATE_*
and body-size env vars via parsePositiveIntEnv, wire POST /admin/auth/login to
the login preset, increment er_api_rate_limit_rejections_total per bucket, and
document ingest_token_id plus Prometheus scraping notes.
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
- api: Align rate-limit plugin docs with actual store (in-memory unless wired in
index); type errorResponseBuilder context; augment FastifyRequest with optional
ingest_token_id instead of casting to any.
- web: Upgrade to Next 15 / React 19; add ESLint 9 flat config, tsconfig,
next-env.d.ts; outputFileTracingRoot so file tracing stays within this product tree.
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-2479
Paperclip-Run: e3292ca4-a7b9-42f1-83ca-bc3d78906532
Add automated test, build, and validation pipeline:
- Test stages: npm test for ingest-api and api (Vitest)
- Lint/typecheck: admin-ui (Next.js ESLint + TypeScript)
- Docker build validation: validate all service containers
- Parallel jobs with Node 20, npm cache for fast iteration
- Documentation: docs/CI_PIPELINE.md with setup and troubleshooting
Addresses BIT-2498, BIT-2481 acceptance criteria for CI pipeline.
Paperclip-Agent: Patrícia Santos (urlKey patr-cia-santos; id 0f76874a-ad67-4a54-86f1-68a54dd1996f)
Paperclip-Issue: BIT-2498
Fetch stats summary first and tolerate trend/recurrence failures with Promise.allSettled so KPI totals no longer fall back to the 500-row incidents list cap.
Top KPI cards used the paginated incidents list, so totals stuck near the API list cap. When operational stats load, sum byProject rollups from GET /v1/stats/summary instead.
Paperclip-Issue: BIT-2202
Paperclip-Run: 4c8f9b0e-4283-4fd7-9c20-f032f14f3719
Add docs/MONITORING.md with links to OBSERVABILITY_PROMETHEUS.md, RUNBOOK_SLO.md,
deploy/grafana dashboard JSON, paperclip MONITORING_INDEX (BIT-221), and
ENVIRONMENTS § Observability. Extend README § Docs with the same entry point.
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-1949
Paperclip-Run: 1f160242-9803-4a1b-a07b-828d0dc629aa
Pointer-only index of triage, ingest, reporter, SLO, ops, deployment, and
reference docs; cross-links to paperclip company runbooks and hub contract.
Paperclip-Agent: Bug Squasher (urlKey bug-squasher; id 4669adc7-6368-43ef-bf27-5a601a6b7b83)
Paperclip-Issue: BIT-1948
Paperclip-Run: 7d4e556d-80f6-4674-acb6-efdb6c650ae7
BIT-1599 follow-up: recent-errors changes live in api/; restart
bitreport-error-reporting-api.service alongside other units.
Register ER_REPO_ROOT as a safe directory when root runs git against a
tree owned by error-reporting (avoids dubious ownership failure on
write-version-json / verify).
Paperclip: BIT-1599
Made-with: Cursor
Extract gitea_repo from context_json and include it as a top-level field
on each row returned by GET /api/error-monitoring/recent-errors.
Supports gitea_repo, giteaRepo, repo_full_name, and repository keys.
Added unit tests covering the include and omit cases.
Paperclip-Issue: BIT-1291
Co-Authored-By: Paperclip <[email protected]>
Translates CRM-shaped ErrorMonitoringReporter payloads (project_slug,
gitea_repo at top level) to ingest-api /v1/ingest/events format. Both
routing fields are promoted into the event context so they are persisted
in context_json and surfaced by GET /api/error-monitoring/recent-errors,
unblocking ERRSIG routing validation for CasamentoWeb.
Auth: X-Error-Monitoring-Key is forwarded as Bearer to the ingest-api;
the key must be registered in er_ingest_keys for the target project.
Paperclip-Issue: BIT-1541
Co-Authored-By: Paperclip <[email protected]>
Extend official Node/PHP reporter clients to attach optional project routing metadata (`project_name`, `project_slug`, `gitea_repo`) via env/options so product repos can emit deterministic ERRSIG routing context at source.
Clarify Permission denied (publickey) after LAN path is fixed.
Paperclip-Issue: BIT-1044
Paperclip-Run: d953718f-48be-4046-b7d7-ca7c22ad4315
Paperclip-Agent: 5d084b36-f38f-42a5-a92a-520005afda4f
Cross-reference CTO escalation when the Importer LAN host or routing
is fleet-wide broken.
Paperclip-Issue: BIT-1044
Paperclip-Run: fa1577c6-5dcf-4fc2-b208-fab8979f8f4a
Paperclip-Agent: 5d084b36-f38f-42a5-a92a-520005afda4f
§4.1: add explicit note that triage/close guidance §6.1 lives in hub file
docs/RUNBOOK_TRIAGE.md (relative link RUNBOOK_TRIAGE.md from this doc),
not the BIT-1020 Paperclip URL — addresses CTO comment on wake.
Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-1020
Paperclip-Run: 42a75567-a4ef-40dd-8806-c7d192547d2b
Made-with: Cursor
Add a table linking the epic required actions (reachability, timeouts,
retry/backoff, production validation) to existing §2–§4 and triage
guidance. Clarifies that Importer PHP changes ship from WDMI_UBUNTU/WDMI,
not the errors hub repository.
Refs: BIT-1020
Made-with: Cursor
Document LAN sanity (gateway + CT 220 vs Importer-only failure). On SSH
failure, print neighbour state and point operators to --diagnose.
Paperclip-Issue: BIT-1044
Paperclip-Run: 147742f4-8b99-40fa-8e50-d4e8c4b052a4
Paperclip-Agent: 5d084b36-f38f-42a5-a92a-520005afda4f
Add operational checklist for Paperclip host to WDMI Importer (192.168.1.123):
network prerequisites, authorized_keys for paperclip@bitreport-cto, Proxmox
alternative path, and an executable acceptance script.
Cross-link from RUNBOOK_REPORTER_WDMI_CACHE_MKDIR.md.
Paperclip-Issue: BIT-1044
Paperclip-Run: b99b90b0-311f-442e-82ce-5c8644abffb1
Add ISO-8601 occurred_at to each row returned by GET /api/error-monitoring/recent-errors
so operators can script post-deploy stability checks (BIT-1048).
Extend verify_pmx_bet_due_time_deploy.sh with a hub mode that queries open CRM
incidents matching ERRSIG 90a47beec0d7 and fails if the latest occurrence is
within HUB_DUE_TIME_STABILITY_SEC (default 7200). Skips with exit 0 when no
resolve key is present.
Document the field in HTTP_CONTRACTS, ERROR_MONITORING_PUBLIC_API, and
RUNBOOK_REPORTER_CRM_TASKS_DUE_TIME §6.2.2.
Paperclip-Agent: 5d084b36-f38f-42a5-a92a-520005afda4f
Paperclip-Issue: BIT-1048
Paperclip-Run: 5138810f-9498-49a1-81eb-291fdeba8abc
- §4: document WDMI_UBUNTU main commits 3a2ea9ce / d692ed43 as canonical Importer
hardening for BIT-1020; keep WDMI 1cadbb29 as parallel tree note.
- §5.28 (BIT-925): cross-link consolidation to BIT-1020 and §4.
Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-1020
Paperclip-Run: a1ee8fee-32bc-4b3b-b9e9-1bf6ab015806
Made-with: Cursor
BIT-922 was cancelled as systemic duplicate (CTO); runbook still documents
ERRSIG/cluster for er-cli while Paperclip work consolidates under BIT-1020.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-922
Paperclip-Run: 9ac7572f-36d0-42f0-941a-5218fa7d01e2
Made-with: Cursor
Add scripts/crm/verify_pmx_bet_profile_and_limit_deploy.sh (gitea + runtime) to assert
CRM_Project main contains the BIT-881 UserController/Sanitize fix and the DatabaseManager
LIMIT/OFFSET integer bind chain (c0afd0183). Document §6 in the Sanitize and SQL LIMIT
runbooks for operators closing the error loop after deploy.
Paperclip: BIT-881, BIT-937
Paperclip-Run-Id: b075f087-a1e8-47cd-aca7-fbfcec7a21bb
Paperclip-Agent: d706f4e6-5d05-4cec-b6e8-f8fb1f203aae
Made-with: Cursor
Add scripts/crm/verify_pmx_bet_due_time_deploy.sh with gitea (ancestor
check vs CRM_Project main) and runtime (SSH to crm-repo) modes. Point
the due_time runbook at the script for operators without VPN on runners.
Paperclip-Issue: BIT-1049
- Add ERRSIG 0bf2057f8082 / ERRCLUSTER d7e969f3ad1b to RUNBOOK_REPORTER_WDMI_FEED_UPLOAD
context index and new §5.44 with er-cli snippets and CRM host map
- Cross-link §5.8, §5.43, and bdc23104564d / c53fefa72645 index entries with BIT-1007
Paperclip-Task: BIT-1007
Paperclip-Run-Id: 02e148f8-b0eb-492c-b32c-cf7846121e2e
Made-with: Cursor
BIT-894 was closed as duplicate of BIT-1020 (systemic feed upload API
timeout/no response). §5.11 now records that relationship and sends
product fix tracking to BIT-1020 while keeping ERRSIG/cluster er-cli
indexing unchanged.
Paperclip-Run-Id: 11d3a474-fe95-4fa6-b9a1-ce6b1f78fe09
Made-with: Cursor
§5.14 (BIT-897 / be2d7dd9daae) now lists the aggregated unique_id labels from the
parent issue body so operators can cross-check hub payloads against Paperclip.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-1042
Paperclip-Run: 7636703d-5004-41ee-b3f5-82de003e41a7
Made-with: Cursor
§5.18 documents 2026-04-05 GET/POST smoke to clients.wdmi.pt (403/401,
~0.2s) so operators narrow root cause to wdmi-store guest path when
the hub still sees Feed upload API no response.
API unit tests: npm test in api/ (vitest) — all passed.
Paperclip-Issue: BIT-901
Paperclip-Run-Id: 60f7c57f-cbf7-4897-bc05-c10c9cb2d673