[DEV-81] Add recurring scheduled automations to the devintern worker - #36
Merged
Conversation
- cap long scheduler timers and serialize ticks with lifecycle-aware shutdown cleanup - send automation invocation payloads over stdin instead of command-line arguments - validate default projects against the selected tracker - acquire repository run locks before clone, fetch, and worktree preparation - add regression coverage for long schedules, shutdown cleanup, large prompts, tracker defaults, and busy repositories Iteration 2: address additional review feedback Iteration 3: address additional review feedback Iteration 4: address additional review feedback Iteration 5: address additional review feedback
Treat each automation occurrence's prompt as the task itself instead of maintaining separate headless/create_ticket execution paths: - materialize the prompt as a local markdown task file and spawn the normal CLI pipeline (plan -> implement -> --create-pr -> review), reusing workerTaskArgs so automations behave like polled tasks - attribute scheduled runs via DEVINTERN_RUN_ORIGIN/DEVINTERN_AUTOMATION_ID env markers read by beginRun, keeping dashboard filtering intact - drop the action field, tracker_project, scheduled-executor.ts, the __automation-run internal command, and the PM engine dependency; automations are now fully independent of any task tracker
Write occurrence task files into the nearest .devintern-code found by walking up from the run cwd (same resolution as queue.db), so a worker launched from a subfolder reuses the project config directory instead of creating a stray nested one. Falls back to <cwd>/.devintern-code for disposable worktrees with no parent config.
…ace home - worker.md: occurrence walkthrough (task file location, manual rerun), prompt-writing guidance, WORKER_TASK_ARGS tuning, troubleshooting table - workspaces.md: dedicated subsection on how fleet automations execute; fix task-file location claim - dashboard.md: scheduled runs show PR links now that create_ticket is gone Code: add AutomationRunContext.taskFileDir so workspace automations write occurrence markdown tasks under <workspace-home>/automations/<id>/ instead of inside repo worktrees, where config-dir traversal would stop at .git
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.
Task: DEV-81
Summary: Add recurring scheduled automations to the devintern worker
Implementation Details
Implemented DEV-81 end to end.
Key additions:
[[automations]]configuration for workspace and single-repo mode.cron-parserand15m/6h/1dintervals.headlessandcreate_ticketexecution.scheduledrun origin,automation_id, and created-ticket metadata migrations.Verification completed:
git diff --checkpassed.This PR was automatically created by @devintern/code