Repository navigation
feat(pipeline): scheduled runs — once or on a cron, from Home - #226
Merged
Merged
Conversation
Competitor parity item 3 (docs/plans/competitive-parity.md). Admins can schedule a story from Home (Schedule…): once, every day, weekdays, every week, or a custom 5-field cron — UTC, labelled as such, at most every 15 minutes (each run spends real tokens). A Scheduled panel lists them with next/last run and Pause / Resume / Delete. - pipeline.scheduled_runs (EF migration; tenant query filter + Postgres RLS, added to RowLevelSecurity.Tables); in-memory store for the stateless standalone Web. - ScheduledRunWorker (30 s tick) claims due occurrences atomically (optimistic single-row UPDATE), so the Api and the Web — or several replicas — never double-run; it runs each through IOrchestratorAgent under the owner's identity, i.e. the same path as POST /pipeline (budget gate, run admission, persistence, metrics). Budget / run-limit refusals are recorded as skipped; missed occurrences run once (no catch-up storm); a fired one-off disables itself. - Every create / pause / resume / delete is audited (Activity log), max 20 per tenant. - Cronos 0.13.0 (latest) for cron parsing. - Btn passes extra attributes through (aria-label, data-*); the no-key message points at Settings → AI → Model keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Parity item 3. Home → Schedule… (admin): once / daily / weekdays / weekly / custom cron — UTC, ≥ 15-min cadence. Scheduled panel with Pause / Resume / Delete.
pipeline.scheduled_runs+ migration, tenant filter + RLS; in-memory fallback.ScheduledRunWorker: atomic per-occurrence claim (no double runs across Api + Web / replicas), runs viaIOrchestratorAgentunder the owner's identity → budget gate, run admission, persistence, metrics unchanged. Skips recorded; no catch-up storm; one-offs finish.Btnattribute passthrough.Test plan
ScheduledRunsTests(cadence guard, presets, isolation, cap, pause/resume, single claim, missed-occurrence, budget/limit skips) + RLS table guard.ScheduledRunsTests(refuse every-minute, create weekdays, pause, delete).agentos_tenantpolicy; create/delete audited; test rows removed (no residue).🤖 Generated with Claude Code
https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB