fix(signals): verify replay vision output fields before scout aggregates - #111232
posthog[bot] wants to merge 5 commits into
Conversation
Each scanner type writes different scanner_output_* fields, and HogQL reads an absent property as NULL. The scout now checks the event schema and per-window field coverage before a monitor, scorer, classifier, or summarizer aggregate, and falls back to the stored-result stats tool when a field is absent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 3428bd44-ed1c-420c-8aa7-ea4a7d68cae1
🦔 PostHog Review reviewed this pull requestFound 0 must fix, 1 should fix, 1 consider. Published 2 findings (view the review). Resolved comments: 2 fixed, 1 already settled |
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 3428bd44-ed1c-420c-8aa7-ea4a7d68cae1
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (5)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe skill adds a procedure to verify scanner output properties and their coverage in current and prior windows. It specifies stats and observations-list fallbacks for absent or partial fields, and directs the scout to skip aggregates when no fallback exists. Aggregate, classifier, and summarizer guidance now limits field use to schema-verified fields. Priority: ⬇️ Low Merge Risk: 🔵 Low · up to On unusually large teams, some scanner comparisons may fall back or be skipped because the coverage query can omit selected scanners. The impact is bounded, so merging carries low risk. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🤖 CI report
|
HostHog preview —
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
24448b5a-18ac-4199-a834-331e441fa76b
📒 Files selected for processing (1)
products/signals/skills/signals-scout-replay-vision/SKILL.md
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 5 remain after this review.
|
PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏 |
…rately An OR across two fields reports full coverage when one field is absent from every row. Each field now has its own coverage column, and label coverage is measured before the scorer fallback uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 3428bd44-ed1c-420c-8aa7-ea4a7d68cae1
A new stamphog review started for this PR — the fresh verdict replaces this approval.
…roster execute-sql returns 100 rows when a query has no LIMIT. The coverage query returns up to two rows per scanner, so it covered at most 50 scanners while the roster holds up to 100. LIMIT 500 is the execute-sql maximum and fits both windows for the full roster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: cb3fb405-966b-4c16-8ba8-9cd3057405e8
A new stamphog review started for this PR — the fresh verdict replaces this approval.
read-data-schema lists properties from the newest events only, so it can miss the output field of a less frequent scanner type. The coverage query now keeps every field column, and its coverage, not the sample, decides which fields a scanner writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: cb3fb405-966b-4c16-8ba8-9cd3057405e8
A new stamphog review started for this PR — the fresh verdict replaces this approval.
There was a problem hiding this comment.
Approved.
Prompt-only edit to one scout skill markdown file, outside risky territory and easy to reverse. The referenced stats tool exists, and I found no suppression markers or unaddressed substantive review concerns.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 0L, 0F substantive, 57L/1F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T0 auto-approve: T0-deterministic (57L, 1F, single-area, fix) |
| stamphog 2.3.1 | .stamphog/policy.yml @ 59b215a · reviewed head 59b215a |
Problem
scanner_output_*fields: a monitor writesverdict, a scorerscore, a classifiertags, and a summarizertitle/summary. Older observations lack newer fields.NULLwithout an error. So ayes_ratetemplate returns0and amean_scorereturnsNULLor a partial average. Both look like a real shift.read-data-schema, but it did not require that check before each scanner-specific aggregate.Origin
Changes
read-data-schemaon$recording_observed.vision-scanners-observations-statswithdate_from/date_to, which reads the stored scanner result, not the event. Summarizers fall back tosummary_linefrom the list tool.pattern:entry and does not report a shift.How did you test this code?
execute-sqlon a project with live scanners. It parsed and returned per-type coverage of1.0for the expected field and0.0for the others, for each scanner type.oxfmt.Test rationale: No automated test reads scout skill prose. The query check above is the closest verification.
Release status
Automatic notifications
Docs update
None. The skill file is the documentation for this scout.
🤖 Agent context
Autonomy: Fully autonomous
Agent: PostHog Desktop (Claude Code), claude-opus-5-5
/writing-simplified-technical-english.products/replay_vision/backend/temporal/scanners/.Created with PostHog Desktop from this inbox report.
🤖 Generated with Claude Code