2.5 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ordinal |
|---|---|---|---|---|---|---|---|---|---|
| TASK-25 | Harden website enrichment against Convex action runtime aborts | Done | 2026-06-05 06:59 | 2026-06-10 19:27 | high | 27000 |
Description
Website enrichment actions can be killed by Convex with a transient invalid environment error before the JS catch block runs, leaving runs without normal failure finalization or PageSpeed queueing. Add an internal action runtime budget so long browser/bootstrap/crawl work fails inside the action before the platform aborts it.
Acceptance Criteria
- #1 Website enrichment has an action-level runtime budget below the Convex runtime abort window
- #2 Long Chromium bootstrap, browser launch, crawl, link checks, and screenshots are bounded by remaining action time
- #3 When the runtime budget is exceeded, the existing catch path finalizes the enrichment run and queues PageSpeed for the lead
- #4 Regression tests cover the runtime budget guard and full verification passes
Implementation Plan
- Add RED source regression for action runtime budget and bounded browser/crawl steps
- Implement minimal runtime budget helper in websiteEnrichmentAction
- Run tests/type/lint and deploy Convex dev
- Record findings and leave task open pending manual retest
Implementation Notes
2026-06-05: Investigation found latest website_enrichment run was manually set to failed, but Convex logs show the underlying action ended with "Transient error while executing action" and environment "invalid" before app-level catch/finalization ran. This explains missing finishedAt/errorSummary/PageSpeed follow-up.
2026-06-05: Implemented action-level budget guard (default 120s, TASK8_ACTION_BUDGET_MS override) around Playwright import, Chromium executable resolution, AL2023 library preparation, browser launch/context creation, page crawls, internal link checks, and desktop/mobile screenshots so long work rejects inside the action catch path before Convex invalidates the runtime. Verified with targeted website-enrichment action tests, full pnpm test, TypeScript, lint, and Convex dev typecheck/deploy.
Final Summary
Closed per explicit user request while switching project tracking to pitchfast.