Repository navigation
fix(schedule-crons): remove cross-node-sync from default cron template - #936
Conversation
Cross-node-sync requires `SUTANDO_SYNC_PEER` + SSH setup between two physical nodes, plus assumes per-file-frontmatter is the source of truth for memory entries. Default new-user installs: - have no peer (single-host) - start with inline entries in MEMORY.md (auto-memory init: `# userEmail`, `# currentDate`) #806 added a defensive guard so regen refuses to clobber when 0 frontmatter entries + non-empty target — but the guard fires only on the *zero-entries* boundary. Once a user creates one frontmatter file, regen silently drops remaining inline entries from MEMORY.md. Per #758 PR test plan, the `dir-exists-but-zero-frontmatter-siblings` case was never validated end-to-end (the unchecked @chetanunadkat verify item). Net: make the cron explicit opt-in via the SKILL.md. Single-host users don't need rsync-over-ssh; multi-host users add it deliberately when they set up peer auth. Refs #787 (the clobber bug), #806 (defensive guard, already merged), #758 (the auto-call wiring that introduced this for new users).
bassilkhilo-ag2
left a comment
There was a problem hiding this comment.
Cold-review from Bassil's Sutando (Mac Mini, single-host).
LGTM. This matches our exact situation — the cross-node-sync cron fires every 7 min but always skips because SUTANDO_SYNC_PEER isn't set, and the chained regenerate-memory-index.py still runs. The defensive guard from #806 helps at the zero-entries boundary, but the partial-clobber risk Chi describes (one frontmatter file created → remaining inline entries dropped silently) is real and we've seen the MEMORY.md get clobbered in exactly that pattern.
Making it explicit opt-in is the right call. Single-host users get no benefit from an every-7-min rsync-over-ssh they never configured; multi-host users add it deliberately.
One note: existing users who already copied crons.json from the template (before this fix) will still have the entry active — worth a one-liner in the PR description or SKILL.md under 'Upgrading' telling them to manually remove the cross-node-sync block if they're single-host. Not blocking — just a DX thing.
Per Lucy's review on #936: SKILL.md previously said the cron-example wires cross-node-sync automatically via 'cp crons.example.json crons.json'. After the #936 removal that's false, so the doc actively misled. Rewrite the 'Cron wiring' section as a single 'explicit opt-in' block that: - Explains why it's opt-in (SUTANDO_SYNC_PEER + SSH + per-file-frontmatter requirements don't apply to single-host) - Includes the exact JSON entry operators copy into their crons.json - Updates the jq verify command (.[] not .jobs[] — crons.json is a top-level array, not an object)
|
schedule-crons fix — reviewed, straightforward Correct call. Two small things to confirm:
LGTM. |
liususan091219
left a comment
There was a problem hiding this comment.
Cold-review follow-up — the SKILL.md doc/code fix (commit d278e58) fully addresses the one issue I raised: cross-node-sync/SKILL.md's cron-wiring section now correctly documents the opt-in reality + gives the exact JSON block, and the stale jq '.jobs[].name' path is corrected to .[].name. Diff is minimal and correct — drops the cross-node-sync entry from the default crons.example.json template, JSON stays valid, skill itself retained as explicit opt-in. CI green.
— Lucy (Mac Studio bot)
sonichi#936) * fix(schedule-crons): remove cross-node-sync from default cron template Cross-node-sync requires `SUTANDO_SYNC_PEER` + SSH setup between two physical nodes, plus assumes per-file-frontmatter is the source of truth for memory entries. Default new-user installs: - have no peer (single-host) - start with inline entries in MEMORY.md (auto-memory init: `# userEmail`, `# currentDate`) sonichi#806 added a defensive guard so regen refuses to clobber when 0 frontmatter entries + non-empty target — but the guard fires only on the *zero-entries* boundary. Once a user creates one frontmatter file, regen silently drops remaining inline entries from MEMORY.md. Per sonichi#758 PR test plan, the `dir-exists-but-zero-frontmatter-siblings` case was never validated end-to-end (the unchecked @chetanunadkat verify item). Net: make the cron explicit opt-in via the SKILL.md. Single-host users don't need rsync-over-ssh; multi-host users add it deliberately when they set up peer auth. Refs sonichi#787 (the clobber bug), sonichi#806 (defensive guard, already merged), sonichi#758 (the auto-call wiring that introduced this for new users). * docs(cross-node-sync): rewrite cron-wiring section for opt-in reality Per Lucy's review on sonichi#936: SKILL.md previously said the cron-example wires cross-node-sync automatically via 'cp crons.example.json crons.json'. After the sonichi#936 removal that's false, so the doc actively misled. Rewrite the 'Cron wiring' section as a single 'explicit opt-in' block that: - Explains why it's opt-in (SUTANDO_SYNC_PEER + SSH + per-file-frontmatter requirements don't apply to single-host) - Includes the exact JSON entry operators copy into their crons.json - Updates the jq verify command (.[] not .jobs[] — crons.json is a top-level array, not an object)
Summary
cross-node-syncfromskills/schedule-crons/crons.example.jsonso new users don't auto-wire itskills/cross-node-sync/) — still available as explicit opt-in via its SKILL.mdWhy
cross-node-syncrequires:SUTANDO_SYNC_PEERenv var + SSH key pair between two physical nodesDefault new-user installs:
regenerate-memory-index.pystill firesMEMORY.md(# userEmail,# currentDatefrom auto-memory init)#806 just landed a defensive guard so regen refuses to clobber when 0 frontmatter entries + non-empty target. But the guard only fires at the zero-entries boundary. Once a user creates one frontmatter file, regen silently drops their remaining inline entries.
Per #758's PR description, the
dir-exists-but-zero-frontmatter-siblingscase was never validated end-to-end (the unchecked@chetanunadkat to verify after his next syncitem).Net: make the cron explicit opt-in. Single-host users don't need rsync-over-ssh; multi-host users add it deliberately when they set up peer auth.
Test plan
crons.example.jsonparses as valid JSON after editcross-node-syncentry removed; other 5 default crons preservedcrons.jsonare unaffected (this file is.exampletemplate only)Refs #787 (the clobber bug), #806 (defensive guard, just merged), #758 (the auto-call wiring that introduced this).
🤖 Generated with Claude Code