Repository navigation
feat(cymbal): apply severity rules on issue creation - #86270
Conversation
🤖 CI report
|
| File | Patch | Uncovered changed lines |
|---|---|---|
products/error_tracking/backend/presentation/views/severity_rules.py |
50.0% | 136 |
🤖 Agents: add a test covering the lines above, or note why under "How did you test this code?". Machine-readable gap list: the patch-coverage artifact on this run (gh run download 32718824274 -n patch-coverage), or the coverage-data block at the end of this comment.
Per-product line coverage (touched products)
| Product | Coverage | Lines |
|---|---|---|
demo |
███████████░░░░░░░░░ 56.9% |
1,516 / 2,666 |
tasks |
██████████████░░░░░░ 70.9% |
44,003 / 62,103 |
signals |
█████████████████░░░ 83.3% |
29,345 / 35,216 |
actions |
█████████████████░░░ 86.6% |
717 / 828 |
data_modeling |
█████████████████░░░ 86.9% |
9,644 / 11,092 |
notebooks |
█████████████████░░░ 87.2% |
8,553 / 9,812 |
cdp |
█████████████████░░░ 87.4% |
4,522 / 5,174 |
cohorts |
█████████████████░░░ 87.5% |
6,550 / 7,486 |
product_tours |
██████████████████░░ 87.9% |
1,303 / 1,482 |
data_warehouse |
██████████████████░░ 89.1% |
12,631 / 14,177 |
dashboards |
██████████████████░░ 89.2% |
6,392 / 7,165 |
exports |
██████████████████░░ 89.3% |
7,701 / 8,626 |
engineering_analytics |
██████████████████░░ 89.5% |
6,828 / 7,632 |
alerts |
██████████████████░░ 90.4% |
4,707 / 5,209 |
mcp_analytics |
██████████████████░░ 90.5% |
4,001 / 4,421 |
streamlit_apps |
██████████████████░░ 90.7% |
2,630 / 2,901 |
managed_warehouse |
██████████████████░░ 90.7% |
8,555 / 9,427 |
conversations |
██████████████████░░ 90.8% |
20,468 / 22,531 |
error_tracking |
██████████████████░░ 91.3% |
11,991 / 13,127 |
stamphog |
██████████████████░░ 91.6% |
5,399 / 5,892 |
canvas |
██████████████████░░ 92.5% |
4,469 / 4,833 |
early_access_features |
███████████████████░ 92.5% |
1,323 / 1,430 |
slack_app |
███████████████████░ 92.5% |
12,113 / 13,090 |
context_layer |
███████████████████░ 92.7% |
2,285 / 2,464 |
web_analytics |
███████████████████░ 92.8% |
17,033 / 18,360 |
surveys |
███████████████████░ 93.3% |
5,943 / 6,373 |
marketing_analytics |
███████████████████░ 93.4% |
16,881 / 18,081 |
reminders |
███████████████████░ 93.4% |
468 / 501 |
posthog_ai |
███████████████████░ 93.5% |
1,371 / 1,467 |
approvals |
███████████████████░ 93.5% |
3,491 / 3,734 |
ai_observability |
███████████████████░ 93.5% |
17,411 / 18,618 |
product_analytics |
███████████████████░ 93.7% |
7,331 / 7,827 |
billing_alerts |
███████████████████░ 93.9% |
2,047 / 2,181 |
workflows |
███████████████████░ 94.2% |
9,590 / 10,184 |
endpoints |
███████████████████░ 94.3% |
8,814 / 9,349 |
review_hog |
███████████████████░ 94.3% |
9,969 / 10,570 |
annotations |
███████████████████░ 95.1% |
734 / 772 |
skills |
███████████████████░ 95.2% |
4,698 / 4,935 |
customer_analytics |
███████████████████░ 95.4% |
15,213 / 15,940 |
experiments |
███████████████████░ 95.5% |
29,169 / 30,539 |
logs |
███████████████████░ 95.7% |
13,002 / 13,581 |
replay_vision |
███████████████████░ 95.8% |
22,750 / 23,750 |
feature_flags |
███████████████████░ 96.1% |
19,113 / 19,895 |
revenue_analytics |
███████████████████░ 96.3% |
1,841 / 1,911 |
user_interviews |
███████████████████░ 96.5% |
2,639 / 2,735 |
data_quality |
███████████████████░ 96.5% |
2,692 / 2,789 |
warehouse_sources |
████████████████████ 97.6% |
425,719 / 436,109 |
data_catalog |
████████████████████ 98.2% |
3,181 / 3,240 |
pulse |
████████████████████ 98.4% |
2,017 / 2,049 |
Report-only. Patch coverage = changed backend lines covered vs origin/master. Sorted lowest first.
Known gaps: lines covered only by Temporal tests show as uncovered; core line numbers may drift if master changed the same file.
06cfaae to
6ac019e
Compare
ae6a732 to
58b1eb1
Compare
6ac019e to
18c7e3a
Compare
58b1eb1 to
8387b53
Compare
18c7e3a to
c381c72
Compare
8387b53 to
1983f2c
Compare
c381c72 to
8b099dd
Compare
1983f2c to
a2c9391
Compare
|
Reviews (1): Last reviewed commit: "feat(cymbal): apply severity rules on is..." | Re-trigger Greptile |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
|
😎 Merged successfully - details. |
Limit severity rules and bytecode at the API boundary and cap the rules and HogVM steps evaluated for each new issue. This prevents unbounded work from large per-project rule sets while preserving ordered first-match behavior. Generated-By: PostHog Desktop Task-Id: 275f3b86-1ef7-43be-821a-e05e2db0a86d
Problem
Configured severity rules must affect only the event that wins new issue creation. Existing, reopened, and manually triaged issues must remain unchanged.
Changes
Before
flowchart LR A[Exception event] --> B[Link or create issue] B --> C[Infer severity] C --> D[Persist issue] style A fill:#1D4AFF,color:#fff style D fill:#F9BD2B,color:#000After
flowchart LR A[Exception event] --> B{Wins issue creation?} B -- No --> C[Keep existing severity] B -- Yes --> D[Infer fallback severity] D --> E[Evaluate ordered rules] E --> F[Persist final severity] F --> G[Publish state and notification] style A fill:#1D4AFF,color:#fff style C fill:#F9BD2B,color:#000 style G fill:#F9BD2B,color:#000PR stack
Merge in this order:
Depends on: #86268
Followed by: #86271
This PR is based on
hp/error-tracking-severity-rules-02-evaluator; review only changes relative to that branch. After its parent is squash-merged, replay only this PR's unique commit onto the rewritten parent and force-push with lease before retargeting.How did you test this code?
cargo fmt --checkcargo test -p cymbal --test event severity_rule_cargo check -p cymbalThe event tests cover rule override, inference fallback, and preservation of later manual severity changes. The state/notification payload test passed during full-tree validation; its post-rebase rerun was blocked by an unavailable local SQLx setup database.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Automatic notifications
Docs update
None in this runtime integration layer.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented with pi coding agent. Repo guidance and the OpenSpec apply, Rust testing, and stacked PR skills shaped the implementation and split. Applying the rule after fingerprint ownership avoids races and prevents retroactive severity changes.