Move cron config into workspace/config/cron (with legacy fallback) (4/13) - #207
Open
alex-clickhouse wants to merge 1 commit into
Open
Move cron config into workspace/config/cron (with legacy fallback) (4/13)#207alex-clickhouse wants to merge 1 commit into
alex-clickhouse wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Moves cron configuration (jobs/system/gates) into the git-syncable workspace subtree at <workspace>/config/cron/, while preserving backward compatibility by falling back to the legacy ~/.nerve/cron/ when the workspace location has no job files. Adds guards to prevent docs/prompt text from drifting back to the legacy path without clearly marking it as legacy.
Changes:
- Implement workspace-aware cron dir resolution (
workspace/config/cronpreferred; legacy fallback when only legacy has job files). - Update bootstrap/init to write cron config into the workspace subtree and migrate legacy
jobs.yamlforward on re-init. - Add tests + doc/prompt guards to prevent unqualified legacy-path references and validate the new resolver behavior end-to-end.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
nerve/config.py |
Adds cron-dir resolution logic and threads resolved workspace into CronConfig.from_dict. |
nerve/bootstrap.py |
Writes cron config under <workspace>/config/cron, creates gates/, and migrates legacy jobs.yaml on init. |
nerve/cron/gate_plugins.py |
Updates gate plugin docs to reflect new default location with legacy fallback mention. |
nerve/agent/engine.py |
Updates worker onboarding text to point at <workspace>/config/cron/jobs.yaml with legacy note. |
tests/test_cron_paths.py |
New unit/integration tests for cron dir resolution and init migration behavior. |
tests/test_docs_cron_paths.py |
New guard tests scanning docs/package text for unqualified legacy cron path references. |
tests/test_bootstrap.py |
Updates bootstrap expectations and Docker tools-section assertions to the new cron location. |
README.md |
Updates config layering summary to include tracked <workspace>/config/settings.yaml. |
docs/cron.md |
Updates cron docs to new location, explains migration/fallback, and adjusts examples. |
docs/config.md |
Updates cron config defaults (including cron.gate_plugins_dir) to workspace location with fallback notes. |
docs/migration.md |
Updates migration instructions to create/use $NERVE_WS/config/cron and documents fallback behavior. |
docs/setup.md |
Updates init overwrite/preserve lists for new cron and settings locations. |
docs/worker-guide.md |
Updates onboarding steps and nerve doctor example output related to cron/config. |
docs/workflow-runs.md |
Updates cron jobs.yaml example path. |
docs/plans.md |
Updates task-planner cron reference path. |
docs/sources.md |
Updates config edit instructions to <workspace>/config/settings.yaml. |
docs/memory.md |
Updates referenced config file path and memory model key names in examples. |
docs/codex-sync.md |
Updates config example file path to <workspace>/config/settings.yaml. |
config.example.yaml |
Removes pinned cron paths (now auto-resolved) and updates memory key naming in the example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
1707
to
1709
| click.echo(" Setting up ~/.nerve/...", nl=False) | ||
| nerve_dir = paths.nerve_home() | ||
| nerve_dir.mkdir(parents=True, exist_ok=True) |
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 28, 2026 12:11
214fa51 to
0d097e3
Compare
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 28, 2026 12:36
0d097e3 to
a23022e
Compare
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 28, 2026 13:14
a23022e to
2585c99
Compare
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 28, 2026 14:23
2585c99 to
c7150a4
Compare
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 28, 2026 14:54
c7150a4 to
15c24fb
Compare
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 28, 2026 15:33
15c24fb to
0dfbb03
Compare
alex-clickhouse
marked this pull request as ready for review
July 28, 2026 15:37
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 29, 2026 10:31
0dfbb03 to
eb302fd
Compare
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 30, 2026 08:01
eb302fd to
d691988
Compare
Cron jobs, system jobs and gate plugins resolve under <workspace>/config/cron/
so they can be reviewed and synced with the rest of the shared config. An
install with only the legacy ~/.nerve/cron keeps working: resolution is
file-aware and falls back when the workspace location holds no jobs, so a
partially migrated tree does not lose its schedule.
Re-running init preserves existing legacy jobs rather than regenerating over
them, and cron is written where the loader will look even when the workspace
path is itself an ${ENV_VAR}.
Co-Authored-By: Claude <noreply@anthropic.com>
alex-clickhouse
force-pushed
the
config-refactor/04-cron-move
branch
from
July 30, 2026 10:06
d691988 to
4be7284
Compare
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.
What
Cron jobs, system jobs and gate plugins move from
~/.nerve/cron/into<workspace>/config/cron/. An install with only the legacy directory still loads its jobs, so nothing breaks before migration runs.Includes a docs guard that fails when any document sends a reader to the pre-move location without marking it as the old one. It has already caught one such reference.
Why
Cron is where most of the interesting configuration lives — schedules, prompts, gates — and it was the one part that could not travel with the workspace. Leaving it under
~/.nervemeant a synced workspace repo carried skills and identity files but not the jobs that use them, so a second machine reproduced the agent without reproducing its behaviour.Paths resolve through
paths.cron_dir()rather than a literal~/.nerve. A hardcoded home ignoresNERVE_HOME, which sends a relocated instance looking in the default state directory while the daemon reads from the relocated one.The legacy fallback is a read path only, and a blank
jobs.yamlin the new location must not shadow a populated legacy one — otherwise upgrading looks successful and silently drops every custom job.🤖 Generated with Claude Code