Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(signals): author fresh reports for new entities in web-vitals and csp scouts (#73661)

Lucas Ricoy149072009216
diff --git a/products/signals/skills/signals-scout-csp-violations/SKILL.md b/products/signals/skills/signals-scout-csp-violations/SKILL.md
index f95914f74fe6..eae645475848 100644
--- a/products/signals/skills/signals-scout-csp-violations/SKILL.md
+++ b/products/signals/skills/signals-scout-csp-violations/SKILL.md
@@ -24,7 +24,7 @@ You are a focused CSP scout. Spot meaningful changes in this team's `$csp_violat
CSP violations are unusual on the noise/signal spectrum: a single user with a misbehaving browser extension can pollute thousands of reports, while a genuine script compromise might surface as five carefully crafted requests from a fresh domain. **Reach (distinct users + distinct documents) matters more than raw count**. Internalize that shape.
-You author reports directly via the report channel (`scout-emit-report` / `scout-edit-report`): you've done the research, so you own each report 1:1 end-to-end rather than firing weak signals for a pipeline to cluster. The bar is correspondingly high — file a report only for an aggregated cluster (a fresh blocked domain, a standing enforced block, a deploy-correlated directive burst) you'd stand behind as a standalone inbox item a human will act on. A cluster the inbox already covers that's still active (or recovered then relapsed) is an **edit**, not a new report. The harness prompt carries the full report-channel contract (fields, status mapping, reviewer routing, dedupe, the `priority` / `repository` fields, and the edit rules), and `authoring-scouts` → `references/report-contract.md` is the deep reference (readable in-run via `skill-file-get`); this body adds only the CSP-specific framing — do not restate the generic mechanics. (Note: this surface has a companion **push** path that files raw per-fingerprint signals under `source_product=csp_reporting`; your own report-channel reports persist under `source_product=signals_scout`. Both live in the same inbox — see Decide for how they interact.)
+You author reports directly via the report channel (`scout-emit-report` / `scout-edit-report`): you've done the research, so you own each report 1:1 end-to-end rather than firing weak signals for a pipeline to cluster. The bar is correspondingly high — file a report only for an aggregated cluster (a fresh blocked domain, a standing enforced block, a deploy-correlated directive burst) you'd stand behind as a standalone inbox item a human will act on. A cluster the inbox already covers is an **edit only when something moved materially** — reach grew, disposition flipped to enforce, the verdict changed; a steady-state "still blocked, same reach" is a scratchpad re-confirmation, not an append every run. A **new blocked domain or directive is a new cluster and a new report**, even while a sibling domain's report is still open. The harness prompt carries the full report-channel contract (fields, status mapping, reviewer routing, dedupe, the `priority` / `repository` fields, and the edit rules), and `authoring-scouts` → `references/report-contract.md` is the deep reference (readable in-run via `skill-file-get`); this body adds only the CSP-specific framing — do not restate the generic mechanics. (Note: this surface has a companion **push** path that files raw per-fingerprint signals under `source_product=csp_reporting`; your own report-channel reports persist under `source_product=signals_scout`. Both live in the same inbox — see Decide for how they interact.)
## Quick close-out: is CSP reporting even active?
@@ -53,7 +53,7 @@ Four cheap reads cold-start a run:
- `scout-scratchpad-search` (`text=csp` or `text=blocked`) — durable team steering from past CSP runs. Entries with `pattern:`, `noise:`, `addressed:`, `dedupe:`, `allowlist:`, `report:`, or `reviewer:` key prefixes tell you the team's healthy domains, recurring browser-extension noise, clusters already surfaced, which report covers a cluster, who owns a surface, and what to skip.
- `scout-runs-list` (last 7d) — what prior CSP scouts found and ruled out.
- `scout-project-profile-get` — the `$csp_violation` row in `top_events` carries `count`, `distinct_users`, `recent_24h_count`, `recent_24h_users`, plus `existing_inbox_reports`. Pattern the count/users ratio against the table below.
-- `inbox-reports-list` (`ordering=-updated_at`, `search`=the blocked domain / directive) — the reports already in the inbox. **Two source_products matter here:** your own report-channel reports persist under `source_product=signals_scout` (search these for edit-vs-author — don't filter them out), while the companion push path files raw per-fingerprint signals under `source_product=csp_reporting` (check these to stay quiet when the push path already covers a cluster — see Decide). A cluster you've reported before is an **edit**, not a fresh report; pull the closest matches with `inbox-reports-retrieve` before authoring.
+- `inbox-reports-list` (`ordering=-updated_at`, `search`=the blocked domain / directive) — the reports already in the inbox. **Two source_products matter here:** your own report-channel reports persist under `source_product=signals_scout` (search these for edit-vs-author — don't filter them out), while the companion push path files raw per-fingerprint signals under `source_product=csp_reporting` (check these to stay quiet when the push path already covers a cluster — see Decide). A cluster you've reported before is an edit candidate (see Decide for the material-change bar); pull the closest matches with `inbox-reports-retrieve` before authoring.
### Profile shape — count vs distinct_users
@@ -170,8 +170,8 @@ Memory is a continuous activity. Write a scratchpad entry whenever you observe s
- key `allowlist:csp_violations:gtm` — _"`*.googletagmanager.com`, `*.googlesyndication.com`, `*.doubleclick.net` are the team's expected analytics/ads domains — known, vetted, do not re-surface."_
- key `noise:csp_violations:chrome-extension-scheme` — _"Blocked URL pattern `chrome-extension://*` is a recurring browser-extension noise source for this team — skip unless `disposition=enforce` and `effective_directive=script-src`."_
- key `addressed:csp_violations:cdn.suspicious.example.com` — _"Surfaced fresh `script-src` cluster from `cdn.suspicious.example.com` on 2026-05-12; team confirmed it was a legitimate new vendor, allowlisted in policy on 2026-05-13. Do not re-file unless the domain re-appears after policy was widened."_
-- key `dedupe:csp_violations:a1b2c3d4` — _"Fingerprint `a1b2c3d4...` (`script-src` | `evil.example.com/x.js` | `/checkout` | `bundle.js`) — surfaced 2026-05-08, report still open in inbox. If this exact fingerprint fires again, edit the existing report; don't author fresh."_
-- key `report:csp_violations:<blocked_domain>-<directive>` — _the `report_id` of a report you filed for a cluster on this domain/directive, so the next run edits it (append_note with the fresh reach) instead of duplicating._
+- key `dedupe:csp_violations:a1b2c3d4` — _"Fingerprint `a1b2c3d4...` (`script-src` | `evil.example.com/x.js` | `/checkout` | `bundle.js`) — surfaced 2026-05-08, report still open in inbox, reach ~120 users/24h. If this exact fingerprint fires again at the same reach, re-confirm here (date + level) and skip; edit the report only on material movement (see Decide). Never author fresh while the report is live."_
+- key `report:csp_violations:<blocked_domain>-<directive>` — _the `report_id` of a report you filed for a cluster on this domain/directive, so the next run can re-find it instead of duplicating — and edit it only on material movement (see Decide), not to log an unchanged re-observation._
- key `reviewer:csp_violations:<area>` — _a resolved owner (bare lowercase GitHub login) for the security / frontend / policy surface, so reports route to a human faster._
By run #5 you'll have a per-team domain allowlist in the scratchpad, known browser-extension noise patterns, and the typical per-directive shape — and burn near-zero time on cold-start exploration.
@@ -180,8 +180,8 @@ By run #5 you'll have a per-team domain allowlist in the scratchpad, known brows
The generic report mechanics — searching the inbox for your own prior reports (via the `report:csp_violations:*` pointer, else an `inbox-reports-list` search on the specific blocked domain / directive, not a broad word like `script-src`), edit-vs-author, the status rules, reviewer routing, non-idempotent dedup, and the `priority` / `repository` fields — live in the harness prompt and in `authoring-scouts` → `references/report-contract.md`. Do not re-derive them here. This section is only the CSP judgment layered on top:
-- **Edit** when a still-live report already tracks the domain/directive cluster — a fresh domain still blocked, an enforced block still degrading users, a directive burst still elevated. A persistent cluster is one report across runs: a new window confirming it's ongoing is a re-escalation (`append_note` the fresh reach / occurrences), not a fresh report per tick.
-- **Author** when nothing live covers the cluster. A report-worthy finding names the blocked domain, the effective directive(s), the document URL(s), the distinct-user count, and a time range in the `evidence`, with an explicit lens (policy widen / compromise / vendor drift). Attach the domain's daily violation series via `charts` — for a fresh burst show the onset; a standing-enforced block has none, so show just its plateau over the observed window. These are investigations, not code fixes → `actionability=requires_human_input` + `repository=NO_REPO`. Priority: a `disposition=enforce` block on a `script-src` / `connect-src` directive with broad reach, or a suspected compromise, is **P1–P2** (functionality broken / possible security incident); a policy-allowlist-gap or vendor-drift finding is **P2–P3** by reach. After authoring, write the `report:csp_violations:<domain>-<directive>` pointer so the next run edits it.
+- **Edit** when a still-live report already tracks the same domain/directive cluster **and the picture moved materially** — reach grew past the last noted level, disposition flipped report-only → enforce, a new document surface joined, or the verdict changed. (A new document page is reach, not a new entity: the cluster's identity is the domain/directive because the remediation is one policy change however many pages the block surfaces on — per-page reports for one blocked domain would fragment the inbox.) A persistent cluster is one report across runs, but it is not a run log: a window that merely confirms "still blocked, same reach" updates the `dedupe:` scratchpad entry (re-confirmed date + level), not the report — appending same-shape notes every tick drowns the report's original ask. A different blocked domain or directive is a _different_ cluster: author fresh, never append it to a sibling's report.
+- **Author** when nothing live covers the cluster. A report-worthy finding names the blocked domain, the effective directive(s), the document URL(s), the distinct-user count, and a time range in the `evidence`, with an explicit lens (policy widen / compromise / vendor drift). Attach the domain's daily violation series via `charts` — for a fresh burst show the onset; a standing-enforced block has none, so show just its plateau over the observed window. These are investigations, not code fixes → `actionability=requires_human_input` + `repository=NO_REPO`. Priority: a `disposition=enforce` block on a `script-src` / `connect-src` directive with broad reach, or a suspected compromise, is **P1–P2** (functionality broken / possible security incident); a policy-allowlist-gap or vendor-drift finding is **P2–P3** by reach. After authoring, write the `report:csp_violations:<domain>-<directive>` pointer so the next run can re-find it (and edit only on material change).
- **Remember** if below the bar but worth carrying forward (a fresh domain with only 3 distinct users — let it ripen), or to record what you ruled out.
- **Skip** with a one-line note if a `noise:` / `allowlist:` / `addressed:` / `dedupe:` entry, or an existing inbox report, already covers it.
diff --git a/products/signals/skills/signals-scout-web-vitals/SKILL.md b/products/signals/skills/signals-scout-web-vitals/SKILL.md
index 6964a46efd80..b76633a4c771 100644
--- a/products/signals/skills/signals-scout-web-vitals/SKILL.md
+++ b/products/signals/skills/signals-scout-web-vitals/SKILL.md
@@ -37,7 +37,10 @@ You author reports directly via the report channel (`scout-emit-report` /
end-to-end rather than firing weak signals for a pipeline to cluster. The bar is
correspondingly high — file a report only for a volume-gated, band-classified page finding
you'd stand behind as a standalone inbox item a human will act on. A page the inbox
-already covers (still slow, worsening, or relapsing) is an **edit**, not a new report.
+already covers is an **edit** when the picture moved materially (deepening, recovering,
+re-crossing a band); steady-state "still slow, same level" is a scratchpad
+re-confirmation, not an append every run — and a report that closed or already shipped
+its fix (`ready` with an open or merged implementation PR) is done absorbing appends.
The harness prompt carries the full report-channel contract (fields, status mapping,
reviewer routing, dedupe, and the edit rules); this body adds only the web-vitals framing.
@@ -135,8 +138,9 @@ Four cheap reads cold-start a run:
- `scout-project-profile-get` — confirm `$web_vitals` is in `top_events` and read
its `count` / `recent_24h_count` to size the surface before querying.
- `inbox-reports-list` (`search`=a path/metric term, `ordering=-updated_at`) — the reports
- already in the inbox. A page you've reported before is an **edit**, not a fresh report;
- pull the closest matches with `inbox-reports-retrieve` before authoring. Your own
+ already in the inbox. A page you've reported before is an edit candidate (see Decide
+ for the material-change bar); pull the closest matches with `inbox-reports-retrieve`
+ before authoring. Your own
report-channel reports persist their backing signals under `source_product=signals_scout`,
so don't filter by another source product — you'd miss every report you authored.
@@ -358,7 +362,8 @@ the category in the key prefix — `pattern:`, `noise:`, `addressed:`, `dedupe:`
don't mint a dated variant.
- key `report:web_vitals:checkout-inp` — _"Report `019f0a96-…` covers the `/checkout`
INP finding. Edit it (append_note the fresh p75 + sample count) while the page stays
- slow and the report is still live; if it was resolved and the page later re-crosses,
+ slow and the report is still live and not scope-frozen; if it closed (or shipped its
+ fix — `ready` with an open or merged implementation PR) and the page later re-crosses,
that's a fresh report."_
- key `reviewer:web_vitals:marketing-site` — _"Marketing-site performance reports route
to `alice` (GitHub login)."_
@@ -382,8 +387,12 @@ For each candidate, the call is **edit an existing report, author a new one, rem
sample count), or rewrite the title/summary on a report you authored. This is the
default when a match exists — a chronically slow page is one report across weeks, not
one per run. `edit-report` can't change status, so if the matched report is `resolved` /
- `suppressed` / `failed`, don't append (it won't resurface) — author a fresh report for
- the relapse and repoint the `report:` key.
+ `suppressed` / `failed`, don't append (it won't resurface) — and a `ready` report whose
+ implementation PR is open or merged is equally done absorbing scope: its fix is already
+ cut, so anything it doesn't cover is genuinely new. (A PR closed without merging never
+ shipped — that report isn't frozen; when you can't tell the PR's state, treat it as
+ frozen: a rare duplicate beats burying new work under a shipped fix.) In both cases
+ author a fresh report and repoint the `report:` key.
- **Author** (`scout-emit-report`) only when nothing live covers it — one report
per page+metric problem, never one per query row. A **report-worthy finding**
(confidence ≥ 0.8): names the **page** (host + path), the **metric**, the **p75 value