Repository navigation
Description
Summary
Tale's syncs succeed while at least one of their sources succeeds. A source that fails on every run, such as one repository whose token was revoked, therefore never reaches a schedule's failure accounting or its failure notices. The only trace is that source's receipt in each run's output. A first consumer, the Ops fleet's intake, needs "one failed source fails the run" and will build it with a condition node on the receipt. Should Tale offer this, and how?
What the repo says today (main at 9179c16)
Three rules make the same choice:
- Issue sync:
services/platform/backend/domains/tasks/spec.md:727(TASK-R54): "An issue sync fails only when every one of its sources failed". While some sources succeed, the step succeeds and the failed sources' errors stay in their receipts. The reason is stated atservices/platform/lib/connectors/natives/issue-sync.ts:18-20: "so a schedule's failure streak and its notifications speak for a sync that is broken, not for one tracker that is down". - Mail sync:
services/platform/backend/domains/conversations/spec.md:201(CONV-R21): one failing mailbox does not stop the others; only when every mailbox fails does the run fail, "so the automation's failure notices go out". - Loops:
services/platform/backend/domains/automations/spec.md:724(AUTO-R70): withonItemError: continue, a step fails only if every item failed.
What the step answers (issue-sync.ts:388-396): sources (one receipt per source, with ok, error, message, status, …), failed (sources whose batch failed), rateLimited, created, refreshed.
The platform already counts a source's consecutive failures for another purpose. Per TASK-R59 (tasks/spec.md:782), a position whose batch the tracker refuses three times in a row starts its pass over. No rule surfaces that count to a person.
What was observed
- No incident: the gap was found while designing the Ops fleet's intake (one sync over Tale's GitHub repositories and GlitchTip projects). One dead source among three would never fail a run, so the schedule's failure accounting would never see it.
- Workaround available today without a Tale change: a condition step after the sync that fails the run when
failed > 0. The Ops intake will do this.
Not examined: whether the automation's Problems view or a run's list row shows "succeeded, 1 source failed" anywhere today. Also not examined: how often a single source fails for long in practice.
Constraints
- A tracker that is down for an hour should not page anyone. That was the reason for TASK-R54 and CONV-R21.
- A rate-limited source has not failed (TASK-R56), and any change must keep that.
- Installed automations rely on today's behaviour, so a change of default changes their failure notices.
Options
- A step option, for example
failWhen: any | allontask.sync_issues(and the mail sync), defaulting toall. Explicit, per automation, and the template can choose. - A degraded outcome: the run succeeds "with problems". Failure accounting stays as it is, but a separate notice goes out when a source has failed N runs in a row, reusing the position's failure count from TASK-R59.
- Document the recipe: keep the rules and show the condition step on
failedin the templates and docs (works today). - Health per source: show each source's consecutive failures on the automation (Problems or overview), without changing any run's outcome.
Questions
- Should a single dead source page someone, and after how many runs?
- Should one choice hold for issue sync, mail sync and
onItemError: continuealike?
Related
- feat(platform): one template catalog, general syncs, no default automations #4988 (introduced
task.sync_issues, CONV-R21 and AUTO-R70)
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Rule: A sync run still fails only when every one of its sources failed, as TASK-R54 and CONV-R21 say today. A source that keeps failing is reported through its own health record, not through the run's outcome:
automation_source_failing, in the automation alerts preference) goes to the organization's owners and admins. Each automation installation gets one card, listing every failing source with its error. A streak notifies once. The card is marked read when every source it lists has recovered or been removed.failOn: anystays ontask.sync_issues(TASK-R77) as a strict opt-in, andconversation.sync_mailboxgets the same option.onItemError: continueloops (AUTO-R70) are unchanged.Answers
failOnoption, the error classes and source health. Loops: no. Their items have no identity across runs, so a streak means nothing for them. AUTO-R70 stays.Rationale
Flipping the default would change installed automations' failure accounting and would page during short outages.
failOn: anyon its own has a hazard: five failed runs pause the whole schedule, so one revoked token would stop the healthy sources too. Keeping health per source, apart from the run's outcome, makes a dead source visible within a bounded number of runs without hurting anything else. That only works if both syncs can tell an outage from a lasting fault. Mail sync currently files every mailbox failure as a plain failure, so it is classified first. The TASK-R59 position count cannot do this job: it resets after three refusals and counts batches, not runs.Implementation units (all on
main)failOn: all|anyon the mail sync step: a new CONV rule, docs in en/de/fr, tests (S).failOn: anyversus source health, including the schedule-pause warning (S; needs 1 and 4).Cross-issue amendments (decisions taken together with #4946):