Skip to content

feat(always-on): add maxPlansPerCycle config to cap plans per work cycle#115

Open
Gucc111 wants to merge 1 commit into
mainfrom
feat/max-plans-per-cycle
Open

feat(always-on): add maxPlansPerCycle config to cap plans per work cycle#115
Gucc111 wants to merge 1 commit into
mainfrom
feat/max-plans-per-cycle

Conversation

@Gucc111
Copy link
Copy Markdown
Collaborator

@Gucc111 Gucc111 commented Jun 2, 2026

Summary

  • Add maxPlansPerCycle to AlwaysOnWorkspaceConfig (default: 3) to limit how many plans can execute in a single work cycle
  • When the active cycle reaches the limit, new discovery fires are blocked until the user applies or archives the cycle
  • The check runs in DiscoveryScheduler.tick() after standard gates pass, keeping evaluateAlwaysOnDiscoveryGates() as a pure function

Test plan

  • Set alwaysOn.workspace.maxPlansPerCycle to 1 and verify that after one plan executes, subsequent ticks log cycle_full and do not fire
  • Verify that after applying or archiving the cycle, the next tick proceeds normally and creates a new workspace
  • Verify default value (3) works when no explicit config is provided
  • Verify that invalid values (0, negative, non-integer) fall back to the default with a diagnostic warning

Made with Cursor

Block new discovery fires when the active cycle reaches the configured
plan limit (default 3). The system resumes automatically after the user
applies or archives the cycle.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant