Skip to content

feat(automations): run outcomes, calendar triggers and jitter, fan-in handoffs (#752, #753, #754) - #781

Merged
olibaron merged 5 commits into
mainfrom
feat/bot-run-outcomes
Nov 23, 2026
Merged

olibaron merged 5 commits into
mainfrom
feat/bot-run-outcomes

Conversation

@olibaron

Copy link
Copy Markdown
Contributor

Closes #752, closes #753, closes #754. #740 stays open for the channel event sources (WhatsApp, Telegram, Slack, Discord).

#752 — run outcomes

  • Every run conversation gets bot_no_update, bot_report_failure (reason) and bot_pause; the run notice names them.
  • A completed turn after bot_report_failure settles failed with the reason; carried handoffs fail with it and a wait reply carries the reason.
  • bot_no_update makes a succeeded run quiet unless it changed a file (diff card or edit/delete/move presentation) or hit a refused/cancelled/unavailable approval. lastRun skips quiet runs; /bots folds consecutive quiet runs of one bot into one row.
  • bot_pause pauses the bot only when the run succeeds and stores pausedBy; the pill reads "Paused by its 08:00 run". The owner's pause/resume clears it.
  • The product has no unread marker, so the issue's "not unread" item has nothing to change.

#753 — calendar triggers and jitter

  • { kind: 'calendar', calendar?, filter: { title, attendee, hasExternalAttendee, accepted }, offsetMinutes }.
  • Automations owns CalendarSource / registerCalendarSource; account integrations registers a source that reads Google Calendar (primary) and Graph calendarView over REST with each connector's token — no MCP process, no model turn. Read every calendarPollSeconds (300); the scheduler timer fires each event at its instant.
  • Occurrence identity is bot + trigger + event id (start excluded), so a moved event fires at its new time and never twice.
  • jitterMinutes (1–30) on every recurring kind: deterministic delay from sha256(botId, instant), so all Hosts agree on the run.

#754 — joins and chains

  • bot trigger from is a list (≤ 8) with join: all | any and joinTimeoutMinutes (60); a stored single from still reads.
  • Every handoff carries chain. Senders that settle without handing work on, or that time out, become failed inputs; the joined run is admitted once per chain with every input named; all-failed joins record one skipped run.
  • Stopping a run refuses its chain's open handoffs and stops the chain's runs this Host knows. The board card shows the latest chain.

Agent Note: .agents/notes/implemented/architecture/2026-11-23-bot-run-outcomes-calendar-joins.md.

Checks (local, clean tree)

  • AVN_GATE_FAIL_FAST=1 pnpm run check:ci: 56 passed, 0 failed
  • pnpm run test: 1440 files passed, 10 skipped
  • pnpm run typecheck: passed

No new specs were added. Not yet verified live on web or desktop.

🤖 Generated with Claude Code

olibaron and others added 5 commits November 23, 2026 22:46
…es its own bot (#752)

Every run conversation gets bot_no_update, bot_report_failure and
bot_pause. A reported failure settles a completed turn as failed with
the run's reason; a no-update run settles quiet unless it changed a file
or hit a refused approval; a pause applies when the run succeeds and is
recorded as pausedBy on the definition. /bots folds consecutive quiet
runs and names the run that paused a bot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…753)

A calendar trigger fires offsetMinutes from each matching event of the
owner's Google or Outlook calendar; account integrations registers a
calendar source that reads events over REST with the connector's own
token, no MCP process and no model turn. Recurring schedules take
jitterMinutes; the delay derives from the bot id and the occurrence, so
every Host fires, names and deduplicates the same run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…op as a chain (#754)

A bot trigger names up to eight senders with join all or any. Every
handoff records the run that started its chain; a sender that settles
without handing work on, or that the join times out waiting for, is a
failed input. The joined run is admitted once per chain, reads every
input, and a join whose inputs all failed is one skipped run. Stopping
a run refuses its chain's open handoffs and stops the chain's runs. The
board card shows the latest chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… joins

Agent Note for #752, #753 and #754, the facts they change in the bot
triggers note, re-recorded translation pairs, and the spec harness's
calendarPollSeconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@olibaron olibaron added area/web Browser and Electron graphical interfaces kind/feature Adds or intentionally changes behavior. skip-ci Merge without starting the CI lanes area/tools labels Nov 23, 2026
@olibaron olibaron closed this Nov 23, 2026
@olibaron olibaron reopened this Nov 23, 2026
@olibaron
olibaron merged commit 1cbb595 into main Nov 23, 2026
6 of 10 checks passed
@olibaron
olibaron deleted the feat/bot-run-outcomes branch November 23, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tools area/web Browser and Electron graphical interfaces kind/feature Adds or intentionally changes behavior. skip-ci Merge without starting the CI lanes

Projects

None yet

1 participant