Skip to content

feat(api): bulk apply reconciles Schedule documents - #1805

Merged
jhgaylor merged 1 commit into
mainfrom
stack/1636-schedule-kind
Sep 10, 2026
Merged

feat(api): bulk apply reconciles Schedule documents#1805
jhgaylor merged 1 commit into
mainfrom
stack/1636-schedule-kind

Conversation

@jhgaylor

Copy link
Copy Markdown
Collaborator

A Schedule document declares a cron that runs a teammate with a prompt. It
is keyed by the document name under its teammate, and carries the
TeamScheduleCreateRequest fields, so it goes through
Fountain.Team.Schedules and an invalid cron fails with the create route's
own changeset error.

The one thing that needed a decision: a teammate's name is its conversation's
title, or its agent's name, and neither is unique. A name two of the tenant's
teammates answer to resolves to :ambiguous and fails the Schedule row that
used it, rather than binding to whichever the roster listed last. A name this
manifest reconciled is unique among the documents and wins over the tenant's.

The roster read is skipped entirely when the manifest holds no schedules,
because listing the team is several queries.

Seventh of eight PRs toward #1636. #1675 is the combined branch and stays open
as the reference until the stack is in.

Validation: mix precommit, go test ./... in cli/, the SDK contract check
and the TypeScript verifier.


The stack (each PR is based on the one above it; review and merge top down):

  1. stack/1680-unchanged-verdict — a save that changes nothing records nothing (Bulk apply reports updated for a document that changed nothing, so a client cannot tell a no-op from a write #1680)
  2. stack/1636-apply-isolation — a raise in one apply document fails that row
  3. stack/1636-cotenant-identity — a co-tenant follows a replacement only if it declared the same identity
  4. stack/1636-update-teammate — Team.update_teammate/4
  5. stack/1636-cli-group-by-kind — CLI: group apply documents by kind
  6. stack/1636-teammate-kind — apply reconciles Teammate documents
  7. stack/1636-schedule-kind — apply reconciles Schedule documents ← this one
  8. stack/1636-webhook-kind — apply reconciles Webhook documents (Bulk apply: accept Teammate, Schedule and Webhook documents so one manifest reconciles the whole estate #1636)

🤖 Generated with Claude Code

https://claude.ai/code/session_01WQyc3wWWDAeZJE1Vr6etQa

@jhgaylor jhgaylor added the sdk-no-release Changes the SDK's published surface deliberately without cutting a release label Sep 10, 2026
@jhgaylor

Copy link
Copy Markdown
Collaborator Author

Labelled sdk-no-release. This PR regenerates sdk/contract/contract.json and the TypeScript types but leaves the version alone on purpose: the whole stack publishes once, from #1806, as 1.24.0. Four intermediate releases for one feature would each describe a half-finished apply vocabulary, and latest would move three times on the way there.

@jhgaylor
jhgaylor force-pushed the stack/1636-teammate-kind branch from f2ba1b8 to dde1862 Compare September 10, 2026 11:10
@jhgaylor
jhgaylor force-pushed the stack/1636-schedule-kind branch from 343ad31 to 0384556 Compare September 10, 2026 11:10
@jhgaylor
jhgaylor force-pushed the stack/1636-teammate-kind branch from dde1862 to ed777ee Compare September 10, 2026 11:26
@jhgaylor
jhgaylor force-pushed the stack/1636-schedule-kind branch from 0384556 to 7875dd3 Compare September 10, 2026 11:26
@jhgaylor
jhgaylor force-pushed the stack/1636-teammate-kind branch from ed777ee to 8b6d1cf Compare September 10, 2026 11:35
A `Schedule` document declares a cron that runs a teammate with a prompt. It is
keyed by the document name under its `teammate`, and carries the
`TeamScheduleCreateRequest` fields, so it goes through
`Fountain.Team.Schedules` and an invalid cron fails with the create route's own
changeset error.

The one thing that needed a decision: a teammate's name is its conversation's
title, or its agent's name, and neither is unique. A name two of the tenant's
teammates answer to resolves to `:ambiguous` and fails the Schedule row that
used it, rather than binding to whichever the roster listed last. A name this
manifest reconciled is unique among the documents (`unclaimed/3`) and wins over
the tenant's.

The roster read is skipped entirely when the manifest holds no schedules,
because listing the team is several queries.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WQyc3wWWDAeZJE1Vr6etQa
@jhgaylor
jhgaylor force-pushed the stack/1636-schedule-kind branch from 7875dd3 to ae7b3aa Compare September 10, 2026 11:35
@jhgaylor
jhgaylor changed the base branch from stack/1636-teammate-kind to main September 10, 2026 11:35
@jhgaylor
jhgaylor merged commit 5740877 into main Sep 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-no-release Changes the SDK's published surface deliberately without cutting a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant