Skip to content

ci(THU-884): collect Nightly DB diagnostics with alerts paused - #1303

Merged
ital0 merged 26 commits into
mainfrom
italomenezes/thu-884-notify-on-failure-job-for-scheduled-workflows-and-the
Sep 25, 2026
Merged

ital0 merged 26 commits into
mainfrom
italomenezes/thu-884-notify-on-failure-job-for-scheduled-workflows-and-the

Conversation

@ital0

@ital0 ital0 commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep the full scheduled Linux and macOS Nightly suites, existing projects, retries, and failure reports. Capture fixed database readiness and first-query labels in a small JSON file for each WebKit test attempt, including passing tests and retries.
  • Pause only the Nightly Linear/email/recovery notifier during the investigation. Its BetterStack heartbeat still runs after both test jobs complete, whether they pass or fail.
  • Remove the superseded one-case diagnostic job and config. The ordinary PR E2E workflow and other alert workflows are unchanged.

Reason

The original WebKit first-query rejection has not been reproduced. The installed PowerSync query path already awaits readiness, so this PR collects evidence without a speculative database fix. Uploaded diagnostic JSON contains only allowlisted outcomes, categories, error names, test status, and retry number; it contains no raw error text, stack, URL, or credentials.

Validation

  • bun run test passed; the second phase included the two new parser tests (318 pass, 0 fail).
  • bun run type-check, bun run e2e:check-collected (22 specs), actionlint, Prettier, the global Oxlint hook, and git diff --check passed.
  • A local WebKit request-only case passed and retained explicit missing labels. A local WebKit UI case produced readiness/query ready labels on failure and retry; it timed out later at the sign-in Continue click. No full CI Nightly run was dispatched from this PR.

Follow-up

Merge this PR to affect scheduled runs. After reviewing the diagnostic artifacts, restore the Nightly notifier and its heartbeat dependency manually, and remove the temporary instrumentation. There is no automatic cutoff in code.

- keep one Linear incident per workflow and report failed jobs
- email first failures and recoveries from trusted main runs
- run Linux and macOS browser projects against isolated test services
- keep Safari OPFS available with per-test persistent profiles
- sanitize failure reports before artifact upload
- isolate one credential-free diagnostic from Nightly alerts
- record safe readiness and first-query categories for the runner failure
- provide the gitignored browser worker asset before the isolated startup case
- keep the one startup case while starting the original server set
@github-actions

Copy link
Copy Markdown

Semgrep Security Scan

No security issues found.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Preview environment destroyed 🧹

Stack preview-pr-1303 and its Cloudflare subdomain have been cleaned up.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

PR Metrics

Metric Value
Lines changed (prod code) +159 / -56
JS bundle size (gzipped) 🟢 645.3 KB → 645.1 KB (-143 B, -0.0%)
Test coverage 🟢 82.33% → 82.35% (+0.0%)
Performance (preview) Preview not ready — Render deploy may have timed out
Accessibility —
Best Practices —
SEO —

Updated Fri, 25 Sep 2026 15:27:19 GMT · run #3129

@ital0
ital0 marked this pull request as ready for review September 25, 2026 13:29
@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds database diagnostics collection to nightly test runs.

The PR appears safe to merge, though the testing guide should be restored before relying on it for reproduction or incident recovery.

Findings

  1. P2 Linux Nightly setup is incomplete ▶
  2. P2 Active alert runbook removed ▶

Summary

The PR retains scheduled cross-browser coverage while adding allowlisted database diagnostics for WebKit attempts and temporarily pausing the Nightly notifier. It also relocates the parser tests into e2e/ and shortens the testing guide. The guide should retain reproducible Linux setup and operational alert-recovery guidance.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  N[Nightly run] --> L[Linux Chromium and Firefox]
  N --> W[macOS WebKit]
  W --> D[Per-attempt database diagnostic JSON]
  L --> H[Heartbeat after both jobs]
  W --> H
Loading

Reviews (6) · Last reviewed commit: "docs: keep nightly testing guide focused..."

Comment thread src/hooks/use-app-initialization.ts Outdated
Comment thread scripts/db-diagnostic.test.ts Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔭 thunder-deep-review (advisory)

Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: c2383316b558 · mode: single · deferred 0 item(s) already reported by other bots (best-effort dedup)

Comment thread .github/workflows/nightly.yml
- Keep the test matrix accurate as the suite grows
- Align local startup checks with CI readiness
- Keep diagnostic branching out of the initialization sequence
- Preserve finite labels and background readiness observation
Comment thread src/hooks/db-diagnostic.test.ts Fixed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔭 thunder-deep-review (advisory)

Reviewed the diff — no issues to report. ✅ Never approves, never requests changes, never gates merge.
head: c2a9858f1019 · mode: single · deferred 0 item(s) already reported by other bots (best-effort dedup)

Comment thread src/hooks/db-diagnostic.test.ts Fixed
Comment thread docs/development/testing.md
Comment thread docs/development/testing.md

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔭 thunder-deep-review (advisory)

Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: 7cd119b6b37c · mode: single · deferred 0 item(s) already reported by other bots (best-effort dedup)

Additional notes (couldn't anchor to a diff line)

  • .github/workflows/nightly.yml:191 — 🚫 Blocking — Dropping the notify job removes all failure alerting from Nightly
  • vite.config.ts:191 — 📐 Convention — forwardConsole doesn't appear to be a real Vite server option
  • e2e/db-diagnostic.ts — 📐 Convention — Label grammar is defined twice with nothing keeping the two copies in sync

@ital0
ital0 merged commit eca5363 into main Sep 25, 2026
36 checks passed
@ital0
ital0 deleted the italomenezes/thu-884-notify-on-failure-job-for-scheduled-workflows-and-the branch September 25, 2026 15:56
darkbanjo added a commit that referenced this pull request Sep 25, 2026
…resh

Main's THU-884 nightly fixes (#1302, #1303) rewrote and deleted parts of
the testing doc our branch had moved to docs/internals/. Mirrored main's
version at the new path rather than preserving the older port:

- keep the deletion of the old docs/development/testing.md path
- take main's note on the separate `bun test --cwd=e2e` step, its
  shorter Nightly E2E section, and its nightly-WebKit OPFS wording
- drop the "CI failure and recovery alerts" section, which main removed
  now that alerts are paused
- name e2e/db-diagnostic.test.ts in AGENTS.md's test-scope sentence,
  which main's new e2e step made stale

This branch was successfully deployed

1 active deployment
preview — 7cd119b6 Deployed Sep 25, 2026 by ital0 via deploy / deploy #3191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant