Uh oh!
There was an error while loading. Please reload this page.
fix: schedule index / API / RBAC - #486
Conversation
🦋 Changeset detectedLatest commit: edc3dee The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 67d0be4. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.

Summary
How was this tested?
unit tests added
Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Adds authorization checks and a DB unique index migration that can fail if duplicate schedule names already exist; otherwise read-only listing plus stricter access on existing schedule endpoints.
Overview
Adds GET
/api/v1/schedules/{schedule_id}/runsto return a schedule’s runs ordered by newestscheduled_for, with wire typesScheduleRun/ListScheduleRunsResponseand SDKclient.schedules.listRuns.Schedule access now matches sessions-style scoping: non-admins only see and mutate schedules they created (
listfilters bycreated_by; get/update/delete/list-runs return 403 for other users’ schedules). Admins bypass the creator check. Missing schedules still return 404 (no existence leak).Names are unique per agent via a new
schedule_name_uqindex on(tenant_id, agent_name, name)(Postgres + SQLite migrations). Duplicate create/rename surfaces 409 throughScheduleNameConflictError; OpenAPI 409 text also mentions name collisions alongside concurrent-modify conflicts.Store layer gains
listRuns;ScheduleRunStatusmoves into the public schedule schema; create/update paths map unique violations to the new error class.Reviewed by Cursor Bugbot for commit edc3dee. Bugbot is set up for automated code reviews on this repo. Configure here.