Skip to content

refactor: restructure project layout and scheduler setup - #659

Merged
avoidwork merged 8 commits into
mainfrom
refactor/scheduler-cron-sync
Aug 1, 2026
Merged

refactor: restructure project layout and scheduler setup#659
avoidwork merged 8 commits into
mainfrom
refactor/scheduler-cron-sync

Conversation

@avoidwork

@avoidwork avoidwork commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Description

Moves index.js and config.yaml back to the project root, removes the duplicate reflection job creation from index.js (delegating to Cron.sync()), and removes the timeout 300 wrapper from the reflection job command. Updates all relative imports in index.js to use ./src/ prefix and expands lint/fix scripts to cover all test directories.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature which would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

N/A — structural refactor with no behavioral changes. Lint and formatting checks pass clean.

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Details

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.md

Rule 5.4: PR template at .github/PULL_REQUEST_TEMPLATE.md was used. All sections filled.

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.
@avoidwork avoidwork self-assigned this Aug 1, 2026
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.
@avoidwork avoidwork changed the title refactor: delegate crontab sync to Cron.sync() in index.js refactor: restructure project layout and scheduler setup Aug 1, 2026
@avoidwork
avoidwork merged commit 6b14844 into main Aug 1, 2026
2 checks passed
@avoidwork
avoidwork deleted the refactor/scheduler-cron-sync branch August 1, 2026 13:23
@avoidwork avoidwork mentioned this pull request Aug 1, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant