How SiftPulse works end-to-end

Four automated loops drive every SiftPulse decision: continuous PR review, new-issue triage, a daily stale-PR nudge cron, and a weekly digest email. Here is what each one does and how it shows up in your dashboard.

Loop 1 · Continuous

PR review on every open and synchronize

Every time a pull request opens, reopens, or pushes a new commit, your code-hosting platform (GitHub, GitLab, or Bitbucket) sends a signed webhook to SiftPulse. We verify the HMAC signature, fetch the unified diff and PR metadata, and strip content matching known secret patterns — private keys, .env assignments, credential regexes — before assembling the review prompt.

  1. Webhook arrives at routes/github.js (or the GitLab / Bitbucket equivalent). Signature verified, installation resolved.
  2. Diff fetched via the installation API and capped at 60k tokens. Per-repo repo_custom_prompts merged into the review prompt.
  3. Secrets stripped by the redaction layer before the prompt leaves our infra.
  4. AI review via the Polsia-managed proxy at POLSIA_AI_BASE_URL (zero-retention model terms; see /security).
  5. TL;DR sticky comment posted (or idempotently edited) at the top of the PR — a plain-English bullet summary, risk areas, files-touched rollup, and up to two suggested reviewers.
  6. One-click suggestion blocks for mechanical findings (style, null checks, typos, unused vars) when .siftpulse.yml has suggestions: true.
  7. Review row persisted in pr_review_events with verdict, blocker/suggestion/nit counts, summary excerpt, and the comment ID for re-review reconciliation.

Every consecutive push triggers an incremental re-review that diffs against the last reviewed SHA via pr_review_state so the agent only reports new blockers rather than re-spamming earlier findings.

Loop 2 · On every new issue

Issue triage with duplicate verdicts and related PR surfacing

When a new issue opens on a watched repo, routes/triage.js dispatches the title, body, and a recent-issue embedding lookup to the triage agent. The agent returns a structured verdict that the webhook handler writes back to GitHub / GitLab / Bitbucket.

  1. Webhook arrives on issues / issue-open events.
  2. Embedding lookup against recent open issues for duplicate verdict via the same AI proxy used by PR review.
  3. Priority + label set applied via the platform API (e.g. priority/p1, type/bug — opt-outs in .siftpulse.yml triage_labels_disabled).
  4. Triage comment posted with a one-paragraph reasoning summary; high-priority verdicts also fire a Slack Block Kit ping if Slack is connected.
  5. Related PR surfacing runs in parallel via services/issue-pr-routing.js and estimates which open PRs are most likely to resolve the issue — logged to issue_pr_routing_events.

Every triage run is logged in triage_events with repo, issue number, priority, labels, duplicate verdict, and the comment ID so the dashboard "Issues" tab can replay the exact reasoning.

Loop 3 · Daily cron

Stale-PR auto-nudge with 72-hour email sign-off

SiftPulse keeps PRs alive. A daily cron job (declared under polsia.toml [[crons]] and running as an isolated node process in jobs/) scans every watched repo for open PRs that have been idle past their configured threshold, drafts a short nudge summary, and stages it for human sign-off.

  1. Daily scan by jobs/nudge-stale-prs.js — single node invocation, fresh checkout, must exit cleanly.
  2. Nudge draft built per PR and persisted to pr_nudge_events with idle hours, draft summary, and target PR.
  3. Pending sign-off row written to pending_nudge_signoffs with a 72-hour TTL token; a one-tap email is dropped to the installer.
  4. One-click approve or skip via routes/signoff.js (token-based, no auth) — outcomes are logged to nudge_signoff_events for later ROI tracking.
  5. Auto-close artifact: a PR whose nudge is approved scans for an > unstuck commit and, if found, logs a pr_unstuck_events row so the dashboard can plot "% of nudged PRs that moved within 7 days."

Installations can opt out per-installation via the digest_unsubscribed column — but nudge cron control lives on the dashboard "Cron settings" page, not in the digest flag.

Loop 4 · Weekly email

Weekly digest sent once per installation, per week

Once a week, a cron emits a digest to every installation. The mailer reads the previous seven days of pr_review_events and suggestion_events, computes the headline numbers (PRs reviewed, suggestion-block accept rate, merge-to-deploy median when Render is connected), groups by repo, and sends one transactional email via the POLSIA_EMAIL_PROXY_URL.

  1. Weekly cron scheduled in polsia.toml [[crons]]; per-installation iteration.
  2. Idempotency check against digest_sends on the (installation_id, week_start) unique key — prevents accidental double-sends on a cron retry.
  3. Body assembled from aggregated review / suggestion events; "Top finding categories" rendered as pills, per-repo PR counts as a sortable list.
  4. Email sent through the Postmark proxy; message ID + findings_count persisted on digest_sends for aggregate ROI tracking.
  5. Activity feed surface at /activity mirrors the same data publicly so anonymous visitors can compare against their own weekly totals.

Installations can opt out via the digest_unsubscribed column on github_installations (the same flag governs the in-app digest panel). Sign-off and digest emails both support /unsubscribe one-tap links.

Ready to see it in your own repo?
SiftPulse is free to install. Open your first reviewed PR in under a minute, then come back here to compare what shipped against the loops above.