Repository navigation
Conversation
The scheduler synced only active projects but claimed every due schedule, so archiving a project kept waking its workspaces and spending budget on each cron occurrence. Filter due schedules by project status, as GitHub triggers already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What changes
The scheduler only picks up due schedules whose project is active. Schedules of an archived project stay in the table untouched (
next_run_atdoesn't move), so they would resume if the project became active again.Why
Fixes #463. Archived projects kept running their scheduled agents, which woke workspaces and spent budget. GitHub triggers already skip archived projects. This makes schedules behave the same way.
Verification
Added
does not run due schedules of an archived projecttoagent-automation.integration.test.ts. Onmainit fails withscheduled: 1. With the fix it passes, and the schedule row is left unclaimed.pnpm --filter @facility/api testpasses against the local Postgres fromdocker-compose.dev.yml.pnpm verifypasses locallyBehaviour verified beyond the test suite: the test fails on
mainand passes with the fixDocumentation updated, or no user-facing change (no doc describes archive vs. schedules)
🤖 Generated with Claude Code