Repository navigation
feat(alerts): word platform insight firings with their investigation - #127907
Conversation
The insight describer, Slack renderer and legacy-event emitter read the evaluation's InsightAlertInvestigation row and the platform's delivery hold, so a platform-owned firing states the verdict, summary, notebook link or safety-net line that the insight stack sends. The verdict-change follow-up is worded for the verdict_changed kind. Legacy's verdict and safety-net lines move to one shared module so both stacks send the same text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
😎 Merged successfully - details. |
🤖 CI report
|
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 96df83e: 1 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
|
Risk: No findings This delta adds incident opened/closed internal events for platform-owned insight alerts on the HogFunction delivery path, plus the routing and destination-eligibility plumbing that decides when those events are emitted (the rest arrived via a master merge and is upstream). I traced every new read and write: all queries are team-scoped, the incident enum is exhaustive, and event UUIDs are deterministic so retries dedup — no new vulnerability. Sentinel reviewed |
…stigation-describer-d2156f # Conflicts: # products/alerts/backend/platform_alert_legacy_events.py
A new stamphog review started for this PR — the fresh verdict replaces this approval.
There was a problem hiding this comment.
Approved.
The disclosed risky behavior has current-head independent assurance, and the author belongs to an owning team. No concrete unresolved review concern or policy refusal ground is present.
- Author wrote 5% of the modified lines and has 38 merged PRs in these paths (familiarity MODERATE).
- PostHog Review (Standard) reviewed the current head: no findings.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 440L, 13F substantive, 686L/14F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (686L, 14F, two-areas, feat) |
| stamphog 2.7.0 | .stamphog/policy.yml @ 6a29620 · reviewed head 6a29620 |
|
/trunk merge |
Problem
Changes
$insight_alert_firingevent for HogFunction destinations.InsightAlertInvestigationrow by(configuration_id, evaluation_key), and the platform delivery hold'sreleased_by.verdictsafety_netclaim_refused, no row,skippedverdict_changedis worded as legacy's follow-up. That kind does not exist yet: the platform half (F1) is built separately, so this branch is inert until it lands.posthog/tasks/alerts/investigation_wording.py, so both stacks send the same text. That move is mechanical.AnnouncedTransitiongainsconfiguration_id, because evaluation keys repeat across configurations.SourceDescribercontract now allows a point read of the source's own state.How did you test this code?
Test rationale:
test_platform_investigation_message.pycovers each row of the table above through the emitter and the describer, the follow-up wording and Slack button, and the episode boundary of the previous verdict. No existing test read investigation state on the platform path. Existing legacy agent and safety-net tests cover the moved wording unchanged.Not checked: a real delivery on a running stack, and native email rendering. Native email shows the summary teaser where legacy email rendered the full Markdown.
Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5 (
claude-opus-5-5)Skills:
/writing-code-comments,/writing-tests,/simplify,/code-review,/reviewing-with-coderabbit,/writing-pr-descriptionsMore context for AI agents
#verdictfrom its evaluation key;verdict_change_evaluation_keyis the producer for the agent PR to use.VERDICT_CHANGED_KINDfor the platform enum member once F1 merges.products/alerts/backend/platform_investigation_message.py.🤖 Generated with Claude Code