Repository navigation
fix(web): crashes on Automation settings, /alerts and repeated Connect clicks - #2086
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Nov 1, 2026 in 32s
Confidence 8/10 · No issues found
🟢 Confidence 8/10 · likely safe to merge. Held at 8 because a fix has not been re-checked against the whole diff yet.
no findings · tests covered · risk high −1 · 1 fix not yet re-checked against the whole diff
The head strips hazel-oauth ids from every thresholds_json tier as well as the rule columns, and pins the whole migration with a PGlite fixture over mixed, hazel-only, untouched and malformed rows. Both earlier findings are addressed; safe to merge.
- Second
alert_rulesUPDATE removes retired ids from each severity tier'sdestinationIds, keeping tier order migrations.test.tsseeds four rules, two policies and delivery rows and asserts the surviving jsonb
Before merge
- Migration · Check it is safe on production data and with the code still deployed ·
packages/db/drizzle/20261101232654_drop_hazel_oauth_destinations/migration.sql - Manual · Confirm no org still needs a
hazel-oauthdestination: the migration applies in the prd alchemy deploy and deletes those rows with nothing to restore them.
Fixed since the last review
- ✅
F1 · Migration cleansdestination_ids_jsonbut leaves the ids inthresholds_jsontiers - ✅
F2 · The new data migration has no PGlite test
Production impact
Production traffic of the changed files (last 7 days)
| File | Calls/day | Busiest operations |
|---|---|---|
apps/web/src/page/alerts/editor/derive-rows.ts |
28 | preview 28/day, 11.3% err |
What was checked
- Tier rewrite keeps tiers without a
destinationIdsarray untouched and orders output byWITH ORDINALITYposition (migration.sql:30) - The only FK into
alert_destinationsisalert_linear_issues,onDelete: "cascade"(tables/alerts.ts:304), so the final delete needs no extra cleanup - Escalation rewrite is skipped entirely when any rule's
destinationIdsis not an array (migration.sql:92)
e00f6da · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading