refactor: restructure project layout and scheduler setup - #659
Merged
Conversation
Remove duplicate reflection job creation from index.js. The file now only calls Cron.sync() which reads all JSON files from the schedules directory and reconciles them with the system crontab. The reflection job is created by autoSchedule.js during first-time onboarding, which is the correct responsibility boundary.
Move index.js and config.yaml from src/ to the project root to align with earlier versions and Dockerfile expectations. Update all references in package.json, Dockerfile, autoSchedule.js, tests, and docs.
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.
Description
Moves
index.jsandconfig.yamlback to the project root, removes the duplicate reflection job creation fromindex.js(delegating toCron.sync()), and removes thetimeout 300wrapper from the reflection job command. Updates all relative imports inindex.jsto use./src/prefix and expands lint/fix scripts to cover all test directories.Type of Change
Testing
N/A — structural refactor with no behavioral changes. Lint and formatting checks pass clean.
Coverage
Checklist
npm run lintpassesDetails
Commit(s):
refactor: delegate crontab sync to Cron.sync() in index.js,refactor: move index.js and config.yaml to project root,refactor: remove timeout 300 from reflection job command,fix: update imports to ./src/ after moving index.js to project root,fix: format index.js with oxfmt,fix: expand lint/fix to cover all test directories (integration, tui)Changed files:
index.js,config.yaml,package.json,Dockerfile,src/config/loader.js,src/scheduler/autoSchedule.js,tests/integration/full-flow.test.js,tests/unit/autoSchedule.test.js,AGENTS.md,CONTRIBUTING.mdRule 5.4: PR template at
.github/PULL_REQUEST_TEMPLATE.mdwas used. All sections filled.