Repository navigation
feat(aio): publish tagged offline eval results to posthog - #119849
Conversation
|
😎 Merged successfully - details. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
🤖 CI report
|
| First copy | Second copy | Lines | Tokens |
|---|---|---|---|
products/posthog_ai/evals/product_analytics/eval_sql_shaped_routing.py:11 |
products/posthog_ai/evals/product_analytics/eval_typed_runner_lock_in.py:27 |
11 | 82 |
✅ Duplication (TypeScript) — clean
New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 6717d45: 1 Must fix, 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.
|
Risk: No findings Since the last review, the only change is a single test-only line in Sentinel reviewed |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
👀 Auto-assigned reviewersThese soft owners were skipped because they only have minor changes here. Nothing blocks merge, so self-assign if you'd like a look:
Soft owners come from each directory's |
There was a problem hiding this comment.
- Key scopes in the docs. The key table (
docs/internal/ai-offline-evaluation-reporting.md:52) and the README setup line (products/posthog_ai/eval_harness/README.md:403) still sayoffline_evaluation_ingestion:writeis enough. Since tagging needsevaluation:write(doc line 98), anyone following them gets a tag warning on every run and no tags. Worth listing both scopes there. - Broken anchor.
products/posthog_ai/eval_harness/README.md:406still links#sql-offline-experiment-pilot, which went away with the heading rename. It should now be#configured-offline-experiment-suites. - writing-evals skill.
.agents/skills/writing-evals/SKILL.md:51still saysSandboxedPrivateEvaluploads to neither service and that PostHog uploads followno_send_logs. Both stop being true withsend_to_posthog=True. It also has nooffline_suite(...)step, so a new suite written from it won't publish, while the doc now says all public suites do.
| suite | ||
| for suite in discover_suites() | ||
| if suite.fn.__module__.startswith(("products.posthog_ai.evals.", "products.slack_app.evals.")) | ||
| and hasattr(importlib.import_module(suite.fn.__module__), "offline_suite") |
There was a problem hiding this comment.
P2 · Enroll the remaining public product analytics suites
When running eval_chart_not_table, eval_typed_runner_misses, or eval_justified_sql_controls, results still publish only to Braintrust because those public suites lack offline_suite. This filter silently excludes their modules from enrollment validation, leaving the reporting gap undetected. Enroll these suites and validate coverage without requiring an existing catalog import.
Problem
Developers cannot compare most PostHog AI and Slack offline eval results in PostHog, and existing runs lack consistent team and component tags.
Changes
posthoganalyticsto 7.73.0 for the tag methods added in PostHog/posthog-python#1085.Note
Uploading and tagging require a personal key with
offline_evaluation_ingestion:writeandevaluation:write.How did you test this code?
Test rationale: Existing publishing and enrollment tests now cover independent destinations and complete scorer mappings. HTTP-boundary tests cover tag failures and interrupted updates.
Automated reporting tests use the released SDK. Harness discovery and repository-wide type checking cover the updated dependency.
Full live agent eval runs were not executed.
Release status
Docs update
Updated the existing offline evaluation reporting guide and harness README with tags, required scopes, and PostHog-only reporting.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Codex, GPT-6
/writing-evals,/writing-tests,/writing-dataclasses,/writing-code-comments,/establishing-code-ownership,/posthog-efficient-validation,/running-ci-preflight,/writing-pr-descriptions,create-pr,github-efficient-operations,llma-git-workflow,posthog:posthog,posthog:analyzing-offline-evaluations.