: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(signals): retire confidence from the scout emit contract (phase 1) (#103827)
posthog[bot]4018f5482d64
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 7ae59f2668bc..6d7671198337 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -9085,9 +9085,9 @@ snapshots:scenes-app-inbox-selfdrivingsection--settings-tab-narrow--light:hash: v1.k794b7964.bc690ec63fc78a5be3c81b9d3fff83716f69d0ffecaa7ec5b20318983808bc4e.S8Pbf4Hj1-mIxKF7R6_7lVDwWT5GpUE7zObcG1aMe5Mscenes-app-inbox-signal-cards--all-sources--dark:- hash: v1.k794b7964.8220c14a1dc6de9d9aa2fa2fa829bff1d19230cf7cdb947906b3fee3ead37d98.BBzXUXAId7C0u5sasTEYZBdaqZjXRU20paQFY6thp3s+ hash: v1.k794b7964.c23ba49824c663d604c2fb7b3a9f1e619538a8467f84f8ef83db26c2e585ab1b.Sxd64grePFgHAwyuax_T65ns2I4GkYa0Do6P8rVwFIIscenes-app-inbox-signal-cards--all-sources--light:- hash: v1.k794b7964.0934851297243b7d23bdd81a483207f45c9d2c3d1610ef6e110f7caff8bdd827.7VHcEHSf7WtelKnEDOy6Rr2-Bu9t6I3J3f4-OuLUQAA+ hash: v1.k794b7964.82ff1df10835c398041a84fd05d088e2e18ca090f13500a4c9f15a00afd0261f.j4BEJwUkF_TVRlMJf2yzkCu_M8sNeuNr-8LdPTfNeaIscenes-app-inbox-signal-cards--error-tracking-stack-trace--dark:hash: v1.k794b7964.1079c33189e18745b6948c8d893f67cc548ab1d97d91726856404d6fffe2144f.nN2u5Dah5xh1s43vMIoK393U45xSnh0a__0Fj8IZiQsscenes-app-inbox-signal-cards--error-tracking-stack-trace--light:@@ -9097,13 +9097,13 @@ snapshots:scenes-app-inbox-signal-cards--generic-fallbacks--light:hash: v1.k794b7964.99a6d0f14c60332de91b3c7eecd0aa469b3ab570dc56a248530902be720605f1.wxsV2n4HR7EbwyJAhKUCb8YLML76Rm7_vAY9HIX2uvIscenes-app-inbox-signal-cards--long-scout-name--dark:- hash: v1.k794b7964.b2e99d4820680f66e3212a4f962d4f3713a73a159f59086e16f07b4df66b8316.UWE7fkQqx9v-0GWV7x4J1jxtB99WS0AZTQUwqMkksQs+ hash: v1.k794b7964.3c84a2677fe12f1175020d96c2965a18d314044f07ab720e1d48691b2a825f1b.5LExKKJgm5K4cqExN7REXA10tdrPe74Hh3_WkruHcPIscenes-app-inbox-signal-cards--long-scout-name--light:- hash: v1.k794b7964.ffc87636a6b64853d6b32bcbae10cf7a016c8e95e9e5278532adbdbec288b8d7.oAZ01yIyGZHoU2KKWICIp21AMUMjOMRyK3HMJJ0gtik+ hash: v1.k794b7964.dc2c2401caa03067bc945d8ea5578af6aa4d8c0571bd17fb0319bd3d89593fa7.PPZuVTjgRYPn8qMXA-1MSmAUJDRbXlr8bU7KVcUN0YUscenes-app-inbox-signal-cards--recording-previews--dark:- hash: v1.k794b7964.332fb846f1ddbf430f392188c98ab57a969085094889663e8a21ec75a4d67201.L1IaKE4jStdzeNM6SdUxGGTbAliLekreOFZtPWI-NzE+ hash: v1.k794b7964.cb3a4e79c789f3a2fc8ccdc420495fcae6b328b69705eb57d6331336c8b8c9ba.EODwNRc2i_iOlRkOLVcv9rvWoJF8SS2an1X2GMM4zjQscenes-app-inbox-signal-cards--recording-previews--light:- hash: v1.k794b7964.6b527e665e887ea72acf2fcc4d849f2b35f713e93344221c56f9b5b2a6e6d29d.8ZlFVasXh6oOnU0_2GgV1d7HWNrPYXn3bBQwexcQ79w+ hash: v1.k794b7964.0a6ac73c8d8029b03d050a2efeddd471d3cd36af049b2ab4ad679cb25de1352a.k1Gn4kk4BeeTBM2kRF13mk16k80M3taFG7Lcpd6VX6gscenes-app-inbox-signal-cards--ticket-attachments--dark:hash: v1.k794b7964.c7cabd5d71fbeb9c77fd395ad60ca1524e64bb04c38d3b19a4b506aecb2135eb.rNerWVnQ2qhn1NscqDV1Uf8e0HzTup6OKzH1fClOX8sscenes-app-inbox-signal-cards--ticket-attachments--light:diff --git a/products/desktop/packages/api-client/src/posthog-client.ts b/products/desktop/packages/api-client/src/posthog-client.tsindex 0dc910505a40..ef99eec16ecd 100644--- a/products/desktop/packages/api-client/src/posthog-client.ts+++ b/products/desktop/packages/api-client/src/posthog-client.ts@@ -720,7 +720,6 @@ export interface ScoutEmission {finding_id: string;description: string;weight: number;- confidence: number;severity: string | null;/** Slug tags the scout attached to this finding (lowercase kebab-case, e.g. `cost-spike`). */tags?: string[];diff --git a/products/desktop/packages/core/src/scouts/scoutPrompts.test.ts b/products/desktop/packages/core/src/scouts/scoutPrompts.test.tsindex 6f92e9bf89f7..ca4ca68f405b 100644--- a/products/desktop/packages/core/src/scouts/scoutPrompts.test.ts+++ b/products/desktop/packages/core/src/scouts/scoutPrompts.test.ts@@ -8,7 +8,6 @@ const base = {findingId: "finding-123",description: "Spike in TypeError on /checkout over the last hour.",severity: "high" as string | null,- confidence: 0.82,};describe("buildScoutFindingDiscussPrompt", () => {@@ -20,7 +19,6 @@ describe("buildScoutFindingDiscussPrompt", () => {expect(prompt).toContain("Run ID: run-abc");expect(prompt).toContain("Finding ID: finding-123");expect(prompt).toContain("Severity: high");- expect(prompt).toContain("Confidence: 82%");expect(prompt).toContain(base.description);expect(prompt).toContain("exploring-scouts");});diff --git a/products/desktop/packages/core/src/scouts/scoutPrompts.ts b/products/desktop/packages/core/src/scouts/scoutPrompts.tsindex 9463e9c63824..dd01de7c6349 100644--- a/products/desktop/packages/core/src/scouts/scoutPrompts.ts+++ b/products/desktop/packages/core/src/scouts/scoutPrompts.ts@@ -45,7 +45,7 @@ export const SCOUT_RECENT_SIGNALS_PROMPT = `What signals have my scouts emittedUse the exploring-scouts skill from the PostHog MCP to pull the most recent scout runs that emitted findings and walk me through the signals:- What each signal says, in plain language-- Which scout emitted it, when, and its severity/confidence where available+- Which scout emitted it, when, and its severity where available- Whether it looks genuinely actionable or like noiseGroup by scout, newest first. Close with a short note on overall signal quality and any scouts that look noisy or suspiciously silent. If the skill is unavailable, fall back to the signals-scout MCP tools directly (runs list with emitted filter, run emissions).`;@@ -62,7 +62,6 @@ export function buildScoutFindingDiscussPrompt({findingId,description,severity,- confidence,question,}: {skillName: string;@@ -71,7 +70,6 @@ export function buildScoutFindingDiscussPrompt({findingId: string;description: string;severity: string | null;- confidence: number;question?: string;}): string {const trimmedQuestion = question?.trim();@@ -80,7 +78,6 @@ export function buildScoutFindingDiscussPrompt({`Run ID: ${runId}`,`Finding ID: ${findingId}`,severity ? `Severity: ${severity}` : null,- `Confidence: ${Math.round(confidence * 100)}%`,].filter(Boolean).join("\n");diff --git a/products/desktop/packages/ui/src/features/scouts/components/ScoutEmissionCard.tsx b/products/desktop/packages/ui/src/features/scouts/components/ScoutEmissionCard.tsxindex faa4f179804a..afd25df405e1 100644--- a/products/desktop/packages/ui/src/features/scouts/components/ScoutEmissionCard.tsx+++ b/products/desktop/packages/ui/src/features/scouts/components/ScoutEmissionCard.tsx@@ -73,9 +73,6 @@ export function ScoutEmissionCard({/><CompassIcon size={14} className="shrink-0 text-(--iris-9)" /><SeverityBadge severity={emission.severity} />- <span className="text-[11px] text-gray-10">- confidence {Math.round(emission.confidence * 100)}%- </span><span className="flex-1" /><RelativeTimestamp timestamp={emission.emitted_at} /></button>diff --git a/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingDiscussButton.tsx b/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingDiscussButton.tsxindex 06861bf73b65..07e2f8326e18 100644--- a/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingDiscussButton.tsx+++ b/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingDiscussButton.tsx@@ -40,7 +40,6 @@ export function ScoutFindingDiscussButton({findingId: emission.finding_id,description: emission.description,severity: emission.severity,- confidence: emission.confidence,question: question.trim() || undefined,}),[@@ -50,7 +49,6 @@ export function ScoutFindingDiscussButton({emission.finding_id,emission.description,emission.severity,- emission.confidence,question,],);diff --git a/products/desktop/packages/ui/src/features/scouts/components/ScoutOutputSection.test.tsx b/products/desktop/packages/ui/src/features/scouts/components/ScoutOutputSection.test.tsxindex 40fa996c1f22..43cb816ded51 100644--- a/products/desktop/packages/ui/src/features/scouts/components/ScoutOutputSection.test.tsx+++ b/products/desktop/packages/ui/src/features/scouts/components/ScoutOutputSection.test.tsx@@ -81,7 +81,6 @@ describe("ScoutOutputSection", () => {run_id: run.run_id,source_id: "source-example",description: "A sample finding.",- confidence: 1,severity: null,emitted_at: "2026-01-01T00:00:00Z",},@@ -95,7 +94,7 @@ describe("ScoutOutputSection", () => {const { rerender } = render(<ScoutOutputSection runs={[run]} loading={false} />,);- const toggle = screen.getByRole("button", { name: /confidence/ });+ const toggle = screen.getByRole("button", { expanded: false });expect(toggle).toHaveAttribute("aria-expanded", "false");expect(screen.queryByRole("link", { name: "Open task run" })).toBeNull();diff --git a/products/signals/backend/contracts.py b/products/signals/backend/contracts.pyindex f0cbeec04b06..9485e5034f2e 100644--- a/products/signals/backend/contracts.py+++ b/products/signals/backend/contracts.py@@ -329,7 +329,9 @@ class SignalsScoutSignalExtra(SignalExtraBase):finding_id: strskill_name: strskill_version: int- confidence: float+ # Deprecated: scouts are no longer asked for a confidence score. Kept optional so historical+ # signals and any custom skill still sending one continue to validate.+ confidence: float | None = Noneseverity: ReportPriority | None = Nonehypothesis: str | None = Noneevidence: list[SignalsScoutEvidenceEntry]diff --git a/products/signals/backend/migrations/0143_scout_emission_confidence_nullable.py b/products/signals/backend/migrations/0143_scout_emission_confidence_nullable.pynew file mode 100644index 000000000000..e5910064d2db--- /dev/null+++ b/products/signals/backend/migrations/0143_scout_emission_confidence_nullable.py@@ -0,0 +1,15 @@+from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [+ ("signals", "0142_untrack_signalscoutemission_weight"),+ ]++ operations = [+ migrations.AlterField(+ model_name="signalscoutemission",+ name="confidence",+ field=models.FloatField(blank=True, null=True),+ ),+ ]diff --git a/products/signals/backend/migrations/max_migration.txt b/products/signals/backend/migrations/max_migration.txtindex 5a497f7ede81..847e18f9c327 100644--- a/products/signals/backend/migrations/max_migration.txt+++ b/products/signals/backend/migrations/max_migration.txt@@ -1 +1 @@-0142_untrack_signalscoutemission_weight+0143_scout_emission_confidence_nullablediff --git a/products/signals/backend/models.py b/products/signals/backend/models.pyindex adf4c474cf8d..84028be6be05 100644--- a/products/signals/backend/models.py+++ b/products/signals/backend/models.py@@ -2689,7 +2689,9 @@ class SignalScoutEmission(TeamScopedRootMixin, UUIDModel):# upstream by `MAX_FINDING_DESCRIPTION_LENGTH` on the emit serializer and the emit_signal# token cap, so it stays well clear of row-size concerns.description = models.TextField()- confidence = models.FloatField()+ # Deprecated: the emit contract no longer asks for a confidence score, so new rows are NULL.+ # Retained until emits carrying one have tailed off.+ confidence = models.FloatField(null=True, blank=True)severity = models.CharField(max_length=20, null=True, blank=True)# Slug tags the scout attached to the finding (normalized lowercase kebab-case, capped at# emit). This row is what feeds the per-scout tag-vocabulary feedback loop in the run promptdiff --git a/products/signals/backend/scout_chat.py b/products/signals/backend/scout_chat.pyindex c7afc6a5f4da..12d266c3f543 100644--- a/products/signals/backend/scout_chat.py+++ b/products/signals/backend/scout_chat.py@@ -62,7 +62,7 @@ SCOUT_RECENT_SIGNALS_PROMPT = """What signals have my scouts emitted recently?Use the exploring-scouts skill from the PostHog MCP to pull the most recent scout runs that emitted findings and walk me through the signals:- What each signal says, in plain language-- Which scout emitted it, when, and its severity/confidence where available+- Which scout emitted it, when, and its severity where available- Whether it looks genuinely actionable or like noiseGroup by scout, newest first. Close with a short note on overall signal quality and any scouts that look noisy or suspiciously silent. If the skill is unavailable, fall back to the signals-scout MCP tools directly (runs list with emitted filter, run emissions)."""diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.mdindex d101525f79f1..9d085a777d4d 100644--- a/products/signals/backend/scout_harness/AGENTS.md+++ b/products/signals/backend/scout_harness/AGENTS.md@@ -143,7 +143,7 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e- Emit happens via the harness's `emit_signal_*` tools, which call `emit_signal()` with `source_product="signals_scout"` and `source_type="cross_source_issue"`.From there the signal flows through the same emitter → buffer → grouping v2 path as any other source.- `weight` is the pipeline's promotion knob, not a scout judgment, so no scout surface carries it: not the emit schema, not the skills, not the emission rows the API returns. The harness pins every emitted finding to `SCOUT_SIGNAL_WEIGHT = 1.0` (`tools/emit.py`), so a fresh report's `total_weight` meets `WEIGHT_THRESHOLD` (default 1.0) on the first signal and promotes immediately.- Promotion is governed by the `confidence` emit-gate (≥ ~0.65), dedupe, and the safety filter.+ Promotion is governed by the scout's own judgment about what is worth emitting, dedupe, and the safety filter.- Findings can carry `tags` — lowercase kebab-case category slugs, normalized and capped by `normalize_tags` in `tools/emit.py`. Tags persist in the signal's `extra.tags` (queryable in the signal store) and on the `SignalScoutEmission` row.The vocabulary lives in the scout loop, not the harness: the base prompt's _Tagging your findings_ section instructs each scout to maintain a `tags:<domain>:taxonomy` scratchpad entry (read first-move like any memory, evolved as categories emerge), and the emission rows are the queryable ground truth a scout can audit its taxonomy against. The harness only normalizes, caps, and persists.- Scratchpad entries and run history are read at prompt assembly time. The agent can also write scratchpad entries mid-run via `remember` / `forget` — that's how a specialist with no anomalies to chase records "no LLM activity here, close out fast" so future runs of the same skill short-circuit cold.diff --git a/products/signals/backend/scout_harness/prompt.py b/products/signals/backend/scout_harness/prompt.pyindex 425a302da81d..9561b3202ec5 100644--- a/products/signals/backend/scout_harness/prompt.py+++ b/products/signals/backend/scout_harness/prompt.py@@ -344,10 +344,11 @@ Default to recent windows (~last 72h) when querying, since fresh evidence is usu_FINDING_SCHEMA = """# Finding schema+Emit only what you are confident is real. When you are not sure, write a scratchpad entry instead. An unsure finding costs the reader more than a silent run.+When you call `scout-emit-signal`:- `description`: the inbox surface and the dedupe key. Your skill body owns the prose contract.-- `confidence` ∈ [0, 1]: your certainty the finding is real. This is the emit gate: below ~0.65, prefer a scratchpad entry over emitting.- `evidence`: a list of citations, capped at 20 entries.- `tags`: optional category slugs for the finding; see *Tagging your findings* below.- `finding_id`: a stable id for this finding, echoed into the signal for traceability. It does NOT dedupe: emitting the same id twice creates two signals, so emit each finding exactly once and never retry an emit."""diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex 76b652ed8acb..200ebdeff070 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -319,7 +319,8 @@ class SignalScoutEmissionSerializer(serializers.ModelSerializer):confidence = serializers.FloatField(min_value=0.0,max_value=1.0,- help_text="Agent's confidence the finding is real in [0, 1].",+ allow_null=True,+ help_text="Deprecated and no longer set on new findings. Null unless the run supplied one.",)severity = serializers.ChoiceField(choices=[(p.value, p.value) for p in Priority],@@ -1316,7 +1317,9 @@ class EmitFindingRequestSerializer(serializers.Serializer):confidence = serializers.FloatField(min_value=0.0,max_value=1.0,- help_text="Agent's confidence the finding is real in [0, 1]. Persisted in `extra`.",+ required=False,+ allow_null=True,+ help_text="Deprecated and ignored. Nothing reads it; omit it. Still range-checked when supplied.",)evidence = serializers.ListField(child=EvidenceEntrySerializer(),diff --git a/products/signals/backend/scout_harness/slack_delivery.py b/products/signals/backend/scout_harness/slack_delivery.pyindex a57fde629e18..55d2b2c6f020 100644--- a/products/signals/backend/scout_harness/slack_delivery.py+++ b/products/signals/backend/scout_harness/slack_delivery.py@@ -250,11 +250,11 @@ def build_scout_slack_message(emission: SignalScoutEmission) -> tuple[list[dict]details: list[str] = []if emission.severity:details.append(escape_slack_mrkdwn(emission.severity))- details.append(f"{round(emission.confidence * 100)}% confidence")if emission.tags:safe_tags = [escape_slack_mrkdwn(str(tag)).replace("`", "'") for tag in emission.tags[:5]]details.append(" ".join(f"`{tag}`" for tag in safe_tags))- blocks.append({"type": "context", "elements": [{"type": "mrkdwn", "text": " · ".join(details)}]})+ if details:+ blocks.append({"type": "context", "elements": [{"type": "mrkdwn", "text": " · ".join(details)}]})skill_segment = quote(emission.scout_run.skill_name, safe="")finding_segment = quote(emission.finding_id, safe="")diff --git a/products/signals/backend/scout_harness/tools/emit.py b/products/signals/backend/scout_harness/tools/emit.pyindex 890c14c39863..00e6a9d11a35 100644--- a/products/signals/backend/scout_harness/tools/emit.py+++ b/products/signals/backend/scout_harness/tools/emit.py@@ -50,8 +50,8 @@ SOURCE_TYPE = SignalSourceConfig.SourceType.CROSS_SOURCE_ISSUE.value# circuit breaker.MAX_EVIDENCE_ENTRIES = 20-# Scouts don't reason about weight. Every finding that clears the confidence emit-gate-# promotes on its first signal — weight is the pipeline's promotion knob, not a scout+# Scouts don't reason about weight. Every finding a scout chooses to emit promotes on+# its first signal — weight is the pipeline's promotion knob, not a scout# judgment. Pinned to 1.0 so a fresh report's `total_weight` meets `WEIGHT_THRESHOLD`# (default 1.0) immediately. See products/signals/backend/scout_harness/AGENTS.md.SCOUT_SIGNAL_WEIGHT = 1.0@@ -74,7 +74,7 @@ MAX_FINDING_ID_LENGTH = 100class InvalidEmitError(ValueError):- """The agent tried to emit with an invalid shape (empty description, bad confidence, etc)."""+ """The agent tried to emit with an invalid shape (empty description, too much evidence, etc)."""@dataclass(frozen=True)@@ -118,8 +118,8 @@ async def emit_finding(team: Team,run: SignalScoutRun,description: str,- confidence: float,evidence: list[EvidenceEntry],+ confidence: float | None = None,hypothesis: str | None = None,severity: str | None = None,dedupe_keys: list[str] | None = None,@@ -160,7 +160,6 @@ async def emit_finding(finding_id=finding_id,skill_name=run.skill_name,skill_version=run.skill_version,- confidence=confidence,severity=severity,evidence_count=len(evidence),)@@ -211,8 +210,8 @@ def emit_finding_sync(team: Team,run: SignalScoutRun,description: str,- confidence: float,evidence: list[EvidenceEntry],+ confidence: float | None = None,hypothesis: str | None = None,severity: str | None = None,dedupe_keys: list[str] | None = None,@@ -255,7 +254,6 @@ def emit_finding_sync(finding_id=finding_id,skill_name=run.skill_name,skill_version=run.skill_version,- confidence=confidence,severity=severity,evidence_count=len(evidence),)@@ -345,13 +343,13 @@ def normalize_tags(tags: list[str] | None) -> list[str] | None:def _validate_inputs(description: str,- confidence: float,+ confidence: float | None,evidence: list[EvidenceEntry],finding_id: str | None,) -> None:if not description or not description.strip():raise InvalidEmitError("description must not be empty")- if not 0.0 <= confidence <= 1.0:+ if confidence is not None and not 0.0 <= confidence <= 1.0:raise InvalidEmitError(f"confidence must be in [0.0, 1.0], got {confidence}")if len(evidence) > MAX_EVIDENCE_ENTRIES:raise InvalidEmitError(f"evidence has {len(evidence)} entries, max is {MAX_EVIDENCE_ENTRIES}")@@ -380,7 +378,7 @@ def _build_extra(finding_id: str,skill_name: str,skill_version: int,- confidence: float,+ confidence: float | None,evidence: list[EvidenceEntry],hypothesis: str | None,severity: str | None,@@ -398,9 +396,10 @@ def _build_extra("finding_id": finding_id,"skill_name": skill_name,"skill_version": float(skill_version),- "confidence": confidence,"evidence": [asdict(e) for e in evidence],}+ if confidence is not None:+ extra["confidence"] = confidenceif task_id is not None:extra["task_id"] = task_idif hypothesis is not None:@@ -427,7 +426,7 @@ def _record_emit(run_id: Any,finding_id: str,description: str,- confidence: float,+ confidence: float | None,severity: str | None,source_id: str,tags: list[str] | None,@@ -485,7 +484,6 @@ def _log_extra(finding_id: str,skill_name: str,skill_version: int,- confidence: float,severity: str | None,evidence_count: int,) -> dict[str, Any]:@@ -497,7 +495,6 @@ def _log_extra("finding_id": finding_id,"skill_name": skill_name,"skill_version": skill_version,- "confidence": confidence,"severity": severity,"evidence_count": evidence_count,}diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.pyindex 12770942ab14..1262ce9ea870 100644--- a/products/signals/backend/scout_harness/views.py+++ b/products/signals/backend/scout_harness/views.py@@ -760,7 +760,7 @@ class SignalScoutRunViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):summary="List a run's emitted findings",description=("Return the findings a `SignalScoutRun` emitted to the inbox, newest first — one row per emit "- "with its `description` (the finding text as surfaced), `confidence`, `severity`, and "+ "with its `description` (the finding text as surfaced), `severity`, and ""the deterministic `source_id` that joins back to the underlying signal. Lets a team and its ""agents see *what* a run surfaced without parsing `emitted_finding_ids` or scanning the signal ""store. Strictly team-scoped — a run UUID belonging to another team returns 404."@@ -1046,7 +1046,7 @@ class SignalScoutRunViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):200: OpenApiResponse(response=EmitFindingResponseSerializer, description="Finding emitted, or skipped by a preflight gate."),- 400: OpenApiResponse(description="Invalid emit shape (description, confidence, evidence cap)."),+ 400: OpenApiResponse(description="Invalid emit shape (description, evidence cap)."),404: OpenApiResponse(description="Run not found for this project."),},summary="Emit a finding for a run",@@ -1101,7 +1101,7 @@ class SignalScoutRunViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):team=self.team,run=run,description=data["description"],- confidence=data["confidence"],+ confidence=data.get("confidence"),evidence=evidence,hypothesis=data.get("hypothesis") or None,severity=data.get("severity") or None,diff --git a/products/signals/backend/test/test_scout_harness_api.py b/products/signals/backend/test/test_scout_harness_api.pyindex c7923e9e4e8e..8aca2d055254 100644--- a/products/signals/backend/test/test_scout_harness_api.py+++ b/products/signals/backend/test/test_scout_harness_api.py@@ -859,6 +859,31 @@ class TestScoutHarnessEmitFindingAPI(APIBaseTest):assert response.status_code == status.HTTP_400_BAD_REQUESTmock_emit.assert_not_called()+ def test_emit_finding_without_confidence_leaves_it_unset(self) -> None:+ # `confidence` is retired from the emit contract: an emit that omits it succeeds, keeps the+ # key out of the signal's `extra`, and records NULL on the emission row.+ run = _make_run(self.team)+ payload = self._payload()+ payload.pop("confidence")+ with patch("products.signals.backend.facade.api.emit_signal", new_callable=AsyncMock) as mock_emit:+ response = self.client.post(self._emit_signal_url(str(run.id)), data=payload, format="json")+ assert response.status_code == status.HTTP_200_OK+ assert mock_emit.await_args is not None+ assert "confidence" not in mock_emit.await_args.kwargs["extra"]+ assert SignalScoutEmission.objects.get(scout_run=run).confidence is None++ @parameterized.expand([("below_range", -0.1), ("above_range", 1.1)])+ def test_emit_finding_rejects_out_of_range_confidence(self, _name: str, confidence: float) -> None:+ # A custom scout still sending the retired field gets the same error it got before, not a+ # silently accepted value.+ run = _make_run(self.team)+ with patch("products.signals.backend.facade.api.emit_signal", new_callable=AsyncMock) as mock_emit:+ response = self.client.post(+ self._emit_signal_url(str(run.id)), data=self._payload(confidence=confidence), format="json"+ )+ assert response.status_code == status.HTTP_400_BAD_REQUEST+ mock_emit.assert_not_called()+def test_emit_finding_rejects_non_in_progress_run(self) -> None:TaskRun = apps.get_model("tasks", "TaskRun")run = _make_run(self.team, task_run_status=TaskRun.Status.COMPLETED)diff --git a/products/signals/backend/test/test_scout_harness_tools.py b/products/signals/backend/test/test_scout_harness_tools.pyindex 24b1e23291f5..b07ff5d6604d 100644--- a/products/signals/backend/test/test_scout_harness_tools.py+++ b/products/signals/backend/test/test_scout_harness_tools.py@@ -837,6 +837,10 @@ class TestValidateEmitInputs:with pytest.raises(InvalidEmitError, match="confidence"):_validate_inputs("ok", confidence, [], None)+ def test_omitted_confidence_passes(self) -> None:+ # The field is retired, so an emit that sends nothing must not trip the range check.+ _validate_inputs("ok", None, [], None)+def test_too_many_evidence_entries_raises(self) -> None:many = [EvidenceEntry(source_product="logs", summary=f"e{i}") for i in range(MAX_EVIDENCE_ENTRIES + 1)]with pytest.raises(InvalidEmitError, match="evidence"):@@ -942,6 +946,26 @@ class TestBuildEmitExtra:for opt in ("task_id", "hypothesis", "severity", "dedupe_keys", "time_range", "mcp_trace_id", "tags"):assert opt not in extra+ def test_extra_omits_confidence_when_not_supplied(self) -> None:+ # Retired field: absent from `extra` rather than a null the pydantic contract would carry.+ extra = _build_extra(+ run_id="run-uuid",+ task_run_id="task-run-uuid",+ task_id=None,+ finding_id="finding-uuid",+ skill_name="signals-scout-errors",+ skill_version=2,+ confidence=None,+ evidence=[EvidenceEntry(source_product="error_tracking", summary="500s on /checkout")],+ hypothesis=None,+ severity=None,+ dedupe_keys=None,+ time_range=None,+ mcp_trace_id=None,+ tags=None,+ )+ assert "confidence" not in extra+def test_skill_version_cast_to_float(self) -> None:extra = self._minimal()# SignalsScoutSignalExtra.skill_version is float in posthog/schema.py.diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex a0993ac2c9d9..9a60b32dd04c 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -1429,7 +1429,7 @@ export interface SignalsScoutSignalExtraApi {finding_id: stringskill_name: stringskill_version: number- confidence: number+ confidence?: number | nullseverity?: ReportPriorityApi | nullhypothesis?: string | nullevidence: SignalsScoutEvidenceEntryApi[]@@ -4658,11 +4658,12 @@ export interface SignalScoutEmissionApi {/** The emitted finding prose — the signal's `description` as surfaced to the inbox. */description: string/**- * Agent's confidence the finding is real in [0, 1].+ * Deprecated and no longer set on new findings. Null unless the run supplied one.* @minimum 0* @maximum 1+ * @nullable*/- confidence: number+ confidence: number | null/** Optional severity tag — one of P0, P1, P2, P3, P4 — or null if the run didn't set one.** * `P0` - P0@@ -4861,11 +4862,12 @@ export interface EmitFindingRequestApi {*/description: string/**- * Agent's confidence the finding is real in [0, 1]. Persisted in `extra`.+ * Deprecated and ignored. Nothing reads it; omit it. Still range-checked when supplied.* @minimum 0* @maximum 1+ * @nullable*/- confidence: number+ confidence?: number | null/*** Citations supporting the finding. Capped at 20 entries.* @maxItems 20diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex dc0eaedf004f..efb63f095327 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -1448,7 +1448,7 @@ export const getSignalsScoutRunsEmissionsUrl = (projectId: string, runId: string}/**- * Return the findings a `SignalScoutRun` emitted to the inbox, newest first — one row per emit with its `description` (the finding text as surfaced), `confidence`, `severity`, and the deterministic `source_id` that joins back to the underlying signal. Lets a team and its agents see *what* a run surfaced without parsing `emitted_finding_ids` or scanning the signal store. Strictly team-scoped — a run UUID belonging to another team returns 404.+ * Return the findings a `SignalScoutRun` emitted to the inbox, newest first — one row per emit with its `description` (the finding text as surfaced), `severity`, and the deterministic `source_id` that joins back to the underlying signal. Lets a team and its agents see *what* a run surfaced without parsing `emitted_finding_ids` or scanning the signal store. Strictly team-scoped — a run UUID belonging to another team returns 404.* @summary List a run's emitted findings*/export const signalsScoutRunsEmissions = async (diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 331b9cf5b6db..e11a5f17d6fb 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -1815,7 +1815,8 @@ export const SignalsScoutEmitSignalBody = /* @__PURE__ */ zod.number().min(signalsScoutEmitSignalBodyConfidenceMin).max(signalsScoutEmitSignalBodyConfidenceMax)- .describe("Agent's confidence the finding is real in [0, 1]. Persisted in `extra`."),+ .nullish()+ .describe('Deprecated and ignored. Nothing reads it; omit it. Still range-checked when supplied.'),evidence: zod.array(zoddiff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutEmissionCard.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutEmissionCard.tsxindex 61afe88c8c55..c73fdc28e55d 100644--- a/products/signals/frontend/inbox/components/config/scouts/ScoutEmissionCard.tsx+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutEmissionCard.tsx@@ -27,7 +27,7 @@ function MonoId({ label, value }: { label: string; value: string }): JSX.Element/*** One emitted finding in the scout detail Signals section. Shares the collapse/expand grammar of- * the run rows: a header (chevron · severity · confidence · timestamp) that stays visible, a 2-line+ * the run rows: a header (chevron · severity · timestamp) that stays visible, a 2-line* markdown preview when collapsed, and the full markdown plus an id/task-run footer when expanded.** `isDeepLinked` marks the finding the current `/inbox/scouts/<skill>/<finding>` URL points at — it@@ -56,7 +56,6 @@ export const ScoutEmissionCard = memo(function ScoutEmissionCard({showScout?: boolean}): JSX.Element {const [expanded, setExpanded] = useState(isDeepLinked)- const confidencePercent = Math.round((emission.confidence ?? 0) * 100)const cardRef = useRef<HTMLDivElement>(null)// A deep-linked finding may mount after the URL is already settled (emissions load async), so@@ -116,9 +115,6 @@ export const ScoutEmissionCard = memo(function ScoutEmissionCard({{prettifyScoutSkillName(skillName)}</span>)}- <span className="whitespace-nowrap text-[11px] text-muted tabular-nums">- {confidencePercent}% confidence- </span><span className="flex-1" /><ScoutTimestamp time={emission.emitted_at} /></button>diff --git a/products/signals/frontend/inbox/components/findings/FindingsPanel.tsx b/products/signals/frontend/inbox/components/findings/FindingsPanel.tsxindex 8c1814f53f13..7150cc7f3d58 100644--- a/products/signals/frontend/inbox/components/findings/FindingsPanel.tsx+++ b/products/signals/frontend/inbox/components/findings/FindingsPanel.tsx@@ -22,7 +22,6 @@ const SORT_OPTIONS: { value: FindingsSortKey; label: string }[] = [{ value: 'newest', label: 'Newest' },{ value: 'oldest', label: 'Oldest' },{ value: 'severity', label: 'Severity' },- { value: 'confidence', label: 'Confidence' },]/**diff --git a/products/signals/frontend/inbox/components/signalCards/SignalCards.stories.tsx b/products/signals/frontend/inbox/components/signalCards/SignalCards.stories.tsxindex 2e92346e4175..9c733e118032 100644--- a/products/signals/frontend/inbox/components/signalCards/SignalCards.stories.tsx+++ b/products/signals/frontend/inbox/components/signalCards/SignalCards.stories.tsx@@ -97,7 +97,6 @@ const scannerFinding = makeSignal({scanner_type: 'ux',observation_id: 'obs-1',session_id: 'sess-2',- confidence: 0.82,problem_type: 'dead_end',start_time: 72,end_time: 90,@@ -178,7 +177,6 @@ const scoutFinding = makeSignal({finding_id: 'finding-1a2b3c4d',skill_name: 'upload-health',skill_version: 3,- confidence: 0.85,severity: 'P1',hypothesis: 'The 2.4.0 release raised the client-side chunk size above the 413 limit on the upload endpoint.',evidence: [diff --git a/products/signals/frontend/inbox/components/signalCards/SignalsScoutSignalCard.test.tsx b/products/signals/frontend/inbox/components/signalCards/SignalsScoutSignalCard.test.tsxnew file mode 100644index 000000000000..a00d4035c35c--- /dev/null+++ b/products/signals/frontend/inbox/components/signalCards/SignalsScoutSignalCard.test.tsx@@ -0,0 +1,52 @@+import '@testing-library/jest-dom'++import { cleanup, render, screen } from '@testing-library/react'++import type { SignalNode } from 'scenes/debug/signals/types'++import { isSignalsScoutExtra, SignalsScoutSignalCard } from './SignalsScoutSignalCard'++jest.mock('lib/components/TZLabel', () => ({+ TZLabel: ({ time }: { time: string }) => <span>{time}</span>,+}))++function makeSignal(extra: Record<string, unknown>): SignalNode {+ return {+ signal_id: 'signal-1',+ content: 'Checkout 500s spike after the payment flag rollout',+ source_product: 'signals_scout',+ source_type: 'cross_source_issue',+ source_id: 'run:run-1:finding:finding-1',+ weight: 1,+ timestamp: '2026-07-13T00:00:00Z',+ extra: {+ scout_run_id: 'run-1',+ task_run_id: 'task-run-1',+ finding_id: 'finding-1',+ skill_name: 'signals-scout-error-tracking',+ skill_version: 3,+ evidence: [{ source_product: 'error_tracking', summary: '500s on /checkout quadrupled', entity_id: 'abc' }],+ ...extra,+ },+ }+}++describe('SignalsScoutSignalCard', () => {+ afterEach(cleanup)++ // `confidence` was retired from the emit contract, so a finding emitted without it must still+ // route to this card rather than falling back to the generic one.+ it.each([+ ['without a confidence', {}],+ ['with a legacy confidence', { confidence: 0.9 }],+ ])('recognises and renders a scout finding %s', (_name, extra) => {+ const signal = makeSignal(extra)++ expect(isSignalsScoutExtra(signal.extra)).toBe(true)++ const { container } = render(<SignalsScoutSignalCard signal={signal} />)++ expect(screen.getByText('500s on /checkout quadrupled')).toBeInTheDocument()+ expect(container).not.toHaveTextContent('Confidence')+ })+})diff --git a/products/signals/frontend/inbox/components/signalCards/SignalsScoutSignalCard.tsx b/products/signals/frontend/inbox/components/signalCards/SignalsScoutSignalCard.tsxindex 65995aecce22..df8f568ec5b0 100644--- a/products/signals/frontend/inbox/components/signalCards/SignalsScoutSignalCard.tsx+++ b/products/signals/frontend/inbox/components/signalCards/SignalsScoutSignalCard.tsx@@ -5,7 +5,6 @@ import { IconExternal, IconList } from '@posthog/icons'import { LemonButton, Link } from '@posthog/lemon-ui'import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'-import { LemonProgress } from 'lib/lemon-ui/LemonProgress/LemonProgress'import { humanFriendlyDetailedTime } from 'lib/utils/datetime'import { identifierToHuman } from 'lib/utils/strings'import { urls } from 'scenes/urls'@@ -29,7 +28,7 @@ export function isSignalsScoutExtra(value: unknown): value is Record<string, unkreturn false}const extra = value as Record<string, unknown>- return Array.isArray(extra.evidence) && typeof extra.skill_name === 'string' && typeof extra.confidence === 'number'+ return Array.isArray(extra.evidence) && typeof extra.skill_name === 'string'}/** A single evidence row: source icon + eyebrow, the summary, and an optional deep link. */@@ -76,13 +75,12 @@ function MonoId({ label, value, to }: { label: string; value: string; to?: strin)}-/** Richest inbox card: a cross-source scout finding with confidence, hypothesis, evidence, and run metadata. */+/** Richest inbox card: a cross-source scout finding with hypothesis, evidence, and run metadata. */export function SignalsScoutSignalCard({ signal }: SignalCardProps): JSX.Element {const [showAllEvidence, setShowAllEvidence] = useState(false)const extra = signal.extra as Record<string, unknown> & SignalsScoutSignalExtraApi- const confidencePercent = Math.round(extra.confidence * 100)const hypothesis = extra.hypothesis?.trim() || signal.contentconst evidence = extra.evidence ?? []@@ -107,15 +105,6 @@ export function SignalsScoutSignalCard({ signal }: SignalCardProps): JSX.Element</Link>}>- {/* Confidence meter. */}- <div className="mb-2">- <div className="flex items-center justify-between text-xs text-tertiary mb-0.5">- <span>Confidence</span>- <span className="tabular-nums">{confidencePercent}%</span>- </div>- <LemonProgress percent={confidencePercent} />- </div>-{/* Hypothesis — the prominent narrative of the finding. */}{hypothesis && (<LemonMarkdown className="text-sm text-primary mb-2" disableImages>diff --git a/products/signals/frontend/inbox/logics/findingsLogic.ts b/products/signals/frontend/inbox/logics/findingsLogic.tsindex 4add8c96d5b5..04af2b0ac9ea 100644--- a/products/signals/frontend/inbox/logics/findingsLogic.ts+++ b/products/signals/frontend/inbox/logics/findingsLogic.ts@@ -44,7 +44,7 @@ export interface FleetScoutReportRow {skillNames: string[]}-export type FindingsSortKey = 'newest' | 'oldest' | 'severity' | 'confidence'+export type FindingsSortKey = 'newest' | 'oldest' | 'severity'export const FINDINGS_SCOUT_FILTER_ALL = 'all'export const FINDINGS_SEVERITY_FILTER_ALL = 'all'@@ -591,9 +591,8 @@ export const findingsLogic = kea<findingsLogicType>([},],// Visible report set: same search / scout / severity filters and sort control as the findings- // (severity matches the report's priority). The shared sort applies where it has meaning —- // newest/oldest by report update time, severity by priority; the finding-only "confidence"- // key falls back to newest so one control never leaves the two lists contradicting each other.+ // (severity matches the report's priority): newest/oldest by report update time, severity by+ // priority.filteredReportRows: [(s) => [s.reportRows, s.searchText, s.scoutFilter, s.severityFilter, s.sortKey],(@@ -732,10 +731,6 @@ export const findingsLogic = kea<findingsLogicType>([const diff = severityRank(a.emission.severity) - severityRank(b.emission.severity)return diff !== 0 ? diff : byNewest(a, b)}- if (sortKey === 'confidence') {- const diff = (b.emission.confidence ?? 0) - (a.emission.confidence ?? 0)- return diff !== 0 ? diff : byNewest(a, b)- }return byNewest(a, b)})},diff --git a/products/signals/frontend/inbox/types.ts b/products/signals/frontend/inbox/types.tsindex 188a2563e7d8..7025d577eda0 100644--- a/products/signals/frontend/inbox/types.ts+++ b/products/signals/frontend/inbox/types.ts@@ -468,7 +468,8 @@ export interface SignalScoutEmission {run_id: stringfinding_id: stringdescription: string- confidence: number+ /** Deprecated: no longer set on new findings. Null on anything emitted since it was retired. */+ confidence?: number | nullseverity: SignalReportPriority | null/** Slug tags the scout attached to this finding (lowercase kebab-case, e.g. `cost-spike`). */tags: string[]diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 68bade48c003..98e28f9f0275 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -33441,11 +33441,12 @@ export namespace Schemas {*/description: string;/**- * Agent's confidence the finding is real in [0, 1]. Persisted in `extra`.+ * Deprecated and ignored. Nothing reads it; omit it. Still range-checked when supplied.* @minimum 0* @maximum 1+ * @nullable*/- confidence: number;+ confidence?: number | null;/*** Citations supporting the finding. Capped at 20 entries.* @maxItems 20@@ -82521,7 +82522,7 @@ export namespace Schemas {finding_id: string;skill_name: string;skill_version: number;- confidence: number;+ confidence?: number | null;severity?: ReportPriority | null;hypothesis?: string | null;evidence: SignalsScoutEvidenceEntry[];@@ -85986,11 +85987,12 @@ export namespace Schemas {/** The emitted finding prose — the signal's `description` as surfaced to the inbox. */description: string;/**- * Agent's confidence the finding is real in [0, 1].+ * Deprecated and no longer set on new findings. Null unless the run supplied one.* @minimum 0* @maximum 1+ * @nullable*/- confidence: number;+ confidence: number | null;/** Optional severity tag — one of P0, P1, P2, P3, P4 — or null if the run didn't set one.** * `P0` - P0diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex 4125fb2a6a0c..4c00e188c120 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -1956,7 +1956,7 @@ export const SignalsScoutEditReportBody = () => zod)/**- * Return the findings a `SignalScoutRun` emitted to the inbox, newest first — one row per emit with its `description` (the finding text as surfaced), `confidence`, `severity`, and the deterministic `source_id` that joins back to the underlying signal. Lets a team and its agents see *what* a run surfaced without parsing `emitted_finding_ids` or scanning the signal store. Strictly team-scoped — a run UUID belonging to another team returns 404.+ * Return the findings a `SignalScoutRun` emitted to the inbox, newest first — one row per emit with its `description` (the finding text as surfaced), `severity`, and the deterministic `source_id` that joins back to the underlying signal. Lets a team and its agents see *what* a run surfaced without parsing `emitted_finding_ids` or scanning the signal store. Strictly team-scoped — a run UUID belonging to another team returns 404.* @summary List a run's emitted findings*/export const SignalsScoutRunsEmissionsParams = () => zod.object({@@ -2342,7 +2342,8 @@ export const SignalsScoutEmitSignalBody = () => zod.number().min(signalsScoutEmitSignalBodyConfidenceMin).max(signalsScoutEmitSignalBodyConfidenceMax)- .describe("Agent's confidence the finding is real in [0, 1]. Persisted in `extra`."),+ .nullish()+ .describe('Deprecated and ignored. Nothing reads it; omit it. Still range-checked when supplied.'),evidence: zod.array(zod