Add §5.9 for feed_ref_5 / ref_5 tier upload (same class as BIT-888/BIT-876),
extend §5 hub er-cli queries, and index the fingerprint in the opening
context paragraph.
Paperclip-Agent: david-santos
Paperclip-Issue: BIT-891
Paperclip-Run: c0b4b925-5684-44e1-a90a-4ae92057a5a7
Made-with: Cursor
Add section 5.4 for _maintenance_sync_product_overwrite.php, er-cli query, and fix
the DNS summary cross-refs to point at OAuth token sections (5.3/5.4) instead of 5.2.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-890
Paperclip-Run: e1985c94-73be-4bf0-b14f-7150afad45e4
Made-with: Cursor
Add §5.7 for feed_op_2 / op_2 tier upload (same class as BIT-883/BIT-876),
extend §5 hub er-cli queries, and index the fingerprint in the opening
context paragraph.
Paperclip-Issue: BIT-888
Made-with: Cursor
Extend RUNBOOK_REPORTER_CRM_TASKS_DUE_TIME with the recurrence linked to
BIT-887 (same empty-string TIME bind as BIT-885), er-cli query, and §5.2.
Paperclip-Issue: BIT-887
Made-with: Cursor
Add RUNBOOK_REPORTER_CRM_TASKS_DUE_TIME.md for ERRSIG:3be5c05002bd:
MySQL rejects '' for TIME columns; normalize to NULL in CRM before bind.
Link from RUNBOOK_TRIAGE related docs.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-885
Paperclip-Run: 6b1f0af9-ac3e-4eb8-9a53-cc22e64f15c4
Made-with: Cursor
Add hub runbook section 5.2 for cURL 35 on sheets.googleapis.com from
_maintenance_sync_product_supplier_fees.php, cross-link BIT-862, and note
recurrence as deploy or persistent network/TLS.
Paperclip-Agent: david-santos
Paperclip-Issue: BIT-863
Paperclip-Run: b924d445-99ed-429c-b1a2-950c0978781a
Add §5.3 for the classic feed upload fingerprint seen on wdmi-store recurrence
loops; clarify parity with BIT-875 triage and er-cli queries.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-882
Paperclip-Run: a95c759f-916c-4ba8-9327-e61c552394c2
Made-with: Cursor
Document recurrence alongside BIT-878: same stack and root cause (CRM host
permissions / log path), distinct hub fingerprint. Add er-cli query for the
new signature and a small table in §5.1.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-879
Paperclip-Task: 2134c338-de72-41d1-8aad-9e287910b69c
Paperclip-Run: 18910b59-5b0b-4cc0-8e1e-d80c27a6f798
Made-with: Cursor
Add RUNBOOK_REPORTER_CRM_LOGGER_MKDIR.md for ERRSIG:76ad405bed13:
triage on host (Logger path, PHP user, permissions), infra and code
mitigations, and er-cli queries. Link from RUNBOOK_TRIAGE.
Paperclip-Agent: 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376
Paperclip-Issue: BIT-878
Paperclip-Run: f47e59b9-c7a3-49e6-96b0-b2ad7bac70fd
Made-with: Cursor
Add RUNBOOK_REPORTER_WDMI_FLEXIT_XML.md with triage for ERRSIG:6f82e20ec332
(_flexit.php / __maintenance_build.php). Link from RUNBOOK_TRIAGE.
Paperclip-Issue: BIT-877
Paperclip-Run: 2cc00999-26eb-466e-8a13-0bb214a07349
Paperclip-Agent: jos-alves
Made-with: Cursor
Accept stack_trace as an alias for stacktrace. When both are absent, store a
synthesized stack line derived from context so recent-errors always exposes
dedupe-friendly text. Fingerprints still ignore synthesized stacks so grouping
matches legacy omit-stack payloads.
PHP ingest client: fatal shutdown handler now sends a minimal stack line.
Paperclip-Agent: David Santos (id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-796
Paperclip-Run: 7f4a8c69-7b5b-47f2-9fc9-c99e6d57f2d2
Made-with: Cursor
Add occurred_at stats and ingest key rate limit SQL to deploy/lxc/run-migrate.sh
so fresh and repeat LXC installs match docker-migrate ordering (BIT-771).
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-771
Paperclip-Run: 9d930ca7-5aba-4b1b-906c-80677815557c
Made-with: Cursor
Lightweight drop-in clients for sending errors to the ingest API:
- clients/node/errorReporter.mjs (ESM) and .cjs (CommonJS)
- clients/php/ErrorReporter.php (PHP 8+)
Both use Bearer auth against /v1/ingest/events, fire-and-forget,
zero external dependencies.
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-750
Paperclip-Run: c2c29aef-e79f-4e69-98ed-3353d04b7a6d
The single-domain deployment (errors.bitreport.pt) routed all traffic
through the admin-ui, whose auth middleware redirected /v1/ingest/events
and /health to /login — making the ingest API unreachable from outside.
- middleware.ts: pass through /v1/* and /health without auth redirect
- next.config.ts: rewrite /v1/* and /health to ingest-api backend
(INGEST_API_URL env, default http://127.0.0.1:3041)
- docker-compose.yml: set INGEST_API_URL=http://ingest-api:3041
- env examples: document INGEST_API_URL
- scripts/onboard-project.sh: generate project + ingest key SQL
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-750
Paperclip-Run: dc5b7949-b24d-4867-a2cd-cf4f47477ef8
Add canonical HTTP_CONTRACTS with curl for hub + ingest endpoints, operator
runbooks for ingest debugging and five common hub flows, and Grafana/Prometheus
scraping notes. Extend ERROR_MONITORING_PUBLIC_API with stats + curl examples;
align purge and resolve-by-pattern docs with the Fastify implementation.
Add optional smoke scripts under scripts/examples/.
Paperclip-Agent: 5d084b36-f38f-42a5-a92a-520005afda4f
Paperclip-Issue: BIT-736
Paperclip-Run: ad2c5129-df54-44aa-afd4-6f9f7486c1a1
Made-with: Cursor
Add POST /api/error-monitoring/resolve-by-pattern with advanced filters:
severity, project_slug, fingerprint, message_pattern, time range.
Enhance purge-resolved with optional older_than_days threshold so only
stale resolved incidents are deleted.
27 contract tests (vitest) cover all four mutation endpoints: auth gating,
validation, response shapes, and CRM-compatible behaviour.
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-732
Paperclip-Run: 749dfb41-182b-48c8-b6e7-74f14bdb9d41
- scripts/er-cli.sh: CLI operacional sem UI com comandos list-open,
export, resolve, resolve-by-pattern e purge; idempotente, dry-run
em resolve-by-pattern e purge, autenticação via ERROR_RESOLVE_API_KEY
- docs/RUNBOOK_TRIAGE.md: runbook completo de triagem, resolução, deploy
e fecho com checklist de validação pós-deploy e tabela de escalada
Paperclip-Issue: BIT-730
Paperclip-Run: f06292f3-5ab7-4715-9b61-6dee07a47ad7
Extend GET /v1/stats/trend with granularity=hour (UTC buckets) and granularity=day
response envelope. Enrich GET /v1/stats/summary per-project totals and critical
counts. Add GET /v1/stats/recurrence for top incidents by occurrence volume in
a sliding window. Add index on er_incident_occurrences(occurred_at) for range
queries. Wire admin dashboard to summary, 24h/14d trends, and recurrence table.
Document contract in docs/ADMIN_STATS_API.md.
Paperclip-Agent: Pedro Alves (urlKey pedro-alves; id d706f4e6-5d05-4cec-b6e8-f8fb1f203aae)
Paperclip-Issue: BIT-728
Paperclip-Run: 948904bb-20d7-4d29-9cd7-4c22544f7570
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
Document the public CRM-shaped API matrix, emit audit rows for resolve,
bulk-resolve, and purge (including dry run), apply a dedicated per-IP
rate limit on mutation routes, and return 403 when a valid session lacks
RBAC for the action. Add Vitest coverage for authorizeMutation.
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-731
Paperclip-Run: 7d0edfac-5676-41fa-85c2-86d01a808894
Made-with: Cursor
Add POST /api/error-monitoring/resolve, bulk-resolve, and purge-resolved with
resolve key or admin JWT (errors:triage / errors:delete). Extend GET
recent-errors with status, severity, project_slug, q, offset, and stable
ordering. Document contracts in api/docs/ERROR_MONITORING_PUBLIC_API.md;
add vitest for public auth helpers. Proxy new routes and widen admin-ui
middleware for /api/error-monitoring/*.
Paperclip-Issue: BIT-726
Paperclip-Run: 3fbf92be-736e-4b11-8e90-cf993d8cd5ca
Paperclip-Agent: Pedro Alves (id d706f4e6-5d05-4cec-b6e8-f8fb1f203aae)
Made-with: Cursor
Keep /api/error-monitoring/recent-errors reachable for Paperclip error loop (including path variants) so central hub returns JSON instead of 307 /login.
Register the same handler as /v1/paperclip/recent-errors so NPM and direct
API probes (e.g. :3200) match Paperclip default PAPERCLIP_ERROR_API_QUERY.
Admin UI proxy now calls the Fastify path for a single contract end-to-end.
Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-702
Paperclip-Run: 4ba525c4-3929-475c-a845-400c49eda817
Made-with: Cursor
Add Fastify GET /v1/paperclip/recent-errors returning CRM-compatible JSON (data
envelope, project_slug per row, status open for open/investigating incidents).
Admin UI proxies the public path /api/error-monitoring/recent-errors to the API
base; middleware bypasses the session redirect for that path only.
Auth matches CRM env names: ERROR_RESOLVE_API_KEY or ERROR_REPORTING_API_KEY for
?api_key=, DEBUG_VIEW_ERRORS_KEY for ?view_errors=.
Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-684
Paperclip-Run: cf7cb964-6953-4476-af09-3feb5d10da17
Made-with: Cursor
Next build inlines bare process.env.* as undefined without .env at build time.
Use Reflect.get for admin API base and demo flag; add .env.production default for LXC.
- Middleware: require development+demo or SKIP_LOGIN for unauthenticated access.
- Document SKIP_LOGIN and stricter demo in .env.example.
- Ship bitreport-error-reporting-api.service (PORT via ExecStart env; shared env has PORT for ingest).
Align LXC deploy with BIT-465: write-version-json.sh, optional
webhook-deploy.sh, verify.sh fails when ER_VERSION_JSON_PATH is set but
missing/invalid, env.example + nginx sketch + runbook updates.
Ignore deploy/lxc/runtime/ (generated on server).
- Add middleware redirecting unauthenticated users to /login unless dev+demo
- Disable demo incident data when NODE_ENV=production
- Forward __Host-access cookie on SSR fetches to admin API
- Document NPM /admin/ proxy to Fastify api (§14.2.2)
Co-Authored-By: Paperclip <[email protected]>