feat(autopilot): continuous mode, hourly cron, and cycle controls#2
Merged
Conversation
- Daily vs continuous autopilot_mode on PROJECT; cycle_* + next_check_at fields - Continuous: timed cycles, auto-approve plans, next_check_hours pacing, failure circuit breaker, human-only pause, Discord webhook (DISCORD_WEBHOOK_URL on EC2) - Plan SK: PLAN#YYYY-MM-DDTHH:MM:SS UTC (legacy date SK still works) - Lambda hourly; daily projects only dispatched at 07 UTC (Lambda + EC2 guard) - API: /plans/:planId/*, POST .../cycle/start|stop|review - run_task.py: --plan-suffix for regenerate; SSM passes optional suffix - UI: Off/Daily/Continuous, cycle controls, plan timeline (continuous) Made-with: Cursor
- Daily mode no longer blocks regenerate requests outside 07:00 UTC - Remove duplicate Regenerate button in continuous proposed view - Eliminate unnecessary DynamoDB re-read in auto-approve path - Remove dead _dynamo_items_to_normalized wrapper - Lambda skips SSM trigger for continuous projects without active cycle - Clear cycle state when switching away from continuous mode - Add mode validation to cycle/stop endpoint - Remove redundant not-regenerate guard in stranded plan recovery Made-with: Cursor
Owner
Author
|
Automated PR Review The workspace is empty so I need to clone the repo to review the full diff.Let me review the full diff across all the critical files.Let me check a few more critical areas — the full SSM command construction for shell injection risk, and the full autopilot.py for the mode gating logic.Now let me check the NEEDS_WORK:
Minor / non-blocking:
|
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
Adds continuous autopilot alongside existing daily mode: timed cycles, hourly plan proposals (with agent-driven
next_check_hoursdeferral), auto-approve, pause reasons (time window, blocked on human tasks, failure streak, manual), optional Discord notifications (DISCORD_WEBHOOK_URLon EC2), and human cycle feedback injected into the planner.Key changes
autopilot_mode,cycle_*,next_check_at,cycle_feedbackPLAN#YYYY-MM-DDTHH:MM:SS(UTC); legacyPLAN#YYYY-MM-DDunchanged/plans/:planId/*(encode colons as%3A),POST .../cycle/start|stop|reviewrun_task.py --propose-plan ... [--regenerate] [--plan-suffix ID]Review notes (minor / follow-ups)
POST /cycle/stopdoes not validateautopilot_mode(harmless for daily projects).sst deployso the new cron applies; ensure EC2 hasDISCORD_WEBHOOK_URLif you want pause alerts.Tests
pytest tests/test_autopilot.py tests/test_api.pypnpm run typecheck(frontend)ruff checkon touched Python filesMade with Cursor