Skip to content

fix(errors): settle fix verifications once, unblock the verification tick, purge issue children - #2439

Merged
Makisuo merged 12 commits into
perf/audit-query-layerfrom
fix/audit-issue-lifecycle
Nov 10, 2026
Merged

Makisuo merged 12 commits into
perf/audit-query-layerfrom
fix/audit-issue-lifecycle

Merge branch 'perf/audit-query-layer' into fix/audit-issue-lifecycle

66e90e8
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 10, 2026 in 3m 22s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. Per-link guard, tick deferral and the new retention deletes are each pinned by PGlite tests; no defect found in any hunk.
no findings · tests covered · risk high · 3/3 new units observable

Stops a settled fix verification from reopening on later events for a merged PR, unstarves and self-heals the verification tick, fixes propose_fix on an already-merged PR, and purges an issue's child rows with it. Behavior-asserting tests cover each fix.

  • openForLink refuses when any verification exists for the pull request link
  • dueVerifications reads least recently touched first; subjectless rows settle abandoned
  • proposeFix walks the transition route from the row as it is after linking
  • Retention deletes verifications, PR links and escalations; prunes old deliveries

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
packages/backend/src/services/errors/ErrorsService.ts 31k Database.execute 13k/day, 0.0% err
Database.execute 12k/day, 0.0% err
Database.execute 5.9k/day, 0.0% err
packages/backend/src/services/errors/FixVerificationTickService.ts 4.6k FixVerificationTick.runTick 4.6k/day, 0.0% err
packages/backend/src/services/errors/IssueFixVerificationService.ts 20 IssueFixVerificationService.applyVerdict 20/day, 0.0% err
What was checked
  • Per-link guard still filters OrgId and keeps the open-verification unique index satisfied (IssueFixVerificationService.ts:775)
  • Delivery prune matches only terminal statuses; a retry re-queues before exhaustion (ErrorsService.ts:989, 1609)
  • Both new child deletes are served by (orgId, issueId) indexes (errors.ts:466, escalations.ts:67)
Observability coverage: 3 of 3 changes observable
Change Kind Observable Evidence
Abandon/defer writes for due verifications background work yes Effect.fn spans plus maple.verification.abandoned on the tick span (FixVerificationTickService.ts:423-431)
Per-link dedupe read in openForLink database query yes Runs through dbExecute, which emits Database.execute spans in this service
Retention child deletes and delivery prune background work yes Each statement is a dbExecute call inside ErrorsService retention; maple.errors.* counters on the tick span

66e90e8 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.