Auto-Fix: Deal Staleness Escalation Cron Resilience (v1.0.146)
Auto-Fix: Deal Staleness Escalation Cron Resilience
Release: v1.0.146 · Date: 2026-03-11 · Type: Automated Pipeline Fix
What Happened
The SaaS Factory pipeline's testing agent detected repeated CI failures in the deal staleness escalation subsystem. After 3 consecutive failed runs, the platform's self-healing pipeline automatically diagnosed the issue, applied a fix, and shipped this release — without any human intervention.
The Bug
The dealStalenessEscalationCron Inngest background job is responsible for scanning the deal pipeline for stale deals and dispatching escalation notifications. A correctness issue meant that if sending a notification for one deal threw an error, the cron job would fail to continue processing the remaining deals in that run.
This was caught by the following test case:
dealStalenessEscalationCron
> continues processing remaining deals if notification throws
The expected behaviour — processing all deals in the batch regardless of individual notification failures — was not being met.
The Fix
The implementation was corrected to ensure per-deal error isolation. A notification failure for any single deal is now caught and handled locally, allowing the cron loop to continue iterating over all remaining deals in the batch. This makes the escalation job resilient to transient notification errors (e.g. a downstream email/Slack service being temporarily unavailable).
Impact
- Deal coverage: All stale deals in a cron run are now reliably evaluated, even if one or more notifications fail.
- Reduced deal slippage: Previously, a single notification error could silently skip escalations for all subsequent deals in the same batch.
- No user action required: This fix is deployed automatically and requires no configuration changes.
How the Pipeline Self-Healed
- The testing agent observed that CI failed on the
deal-staleness-escalation-crontest suite. - After 3 retry attempts confirmed the failure was not transient, the agent classified it as a correctness issue.
- The auto-fix pipeline was invoked (Pipeline Run:
70a33aaa-4393-455a-a342-87f5134636c9). - A corrected implementation was generated, tested, and shipped as v1.0.146.
This is the SaaS Factory platform operating as designed — catching and fixing bugs autonomously, keeping the product reliable around the clock.