diff --git a/src/cli.ts b/src/cli.ts index 154f449b1..a23881671 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -2289,7 +2289,7 @@ IMPORT/EXPORT import
] Restore missing supabase-only files [--type T] [--slug-prefix S] With optional filters diff --git a/test/cli-help-discoverability.test.ts b/test/cli-help-discoverability.test.ts index 451c5821b..3a00b39d6 100644 --- a/test/cli-help-discoverability.test.ts +++ b/test/cli-help-discoverability.test.ts @@ -98,6 +98,33 @@ describe('WARN-6 — main `gbrain --help` lists capture/brainstorm/lsd', () => { }); }); +describe('#2795 — `sync --install-cron` help line no longer promises an unbuilt feature', () => { + test('main `gbrain --help` does not advertise install-cron', () => { + // Pre-fix: `sync --install-cron Install persistent sync daemon` was + // listed in the top-level help with no flag parsing or handler behind + // it anywhere in src/commands/sync.ts — `gbrain sync --install-cron` + // silently ran an ordinary sync instead of installing anything. + const { stdout, status } = runCli(['--help']); + expect(status).toBe(0); + expect(stdout).not.toContain('install-cron'); + expect(stdout).not.toContain('Install persistent sync daemon'); + }); + + test('main `gbrain --help` points sync users at the real continuous-daemon command', () => { + const { stdout } = runCli(['--help']); + // autopilot --install already runs sync+extract+embed on a schedule + // (docs/architecture/KEY_FILES.md); point discoverability there instead + // of promising a separate sync-only cron installer that never existed. + expect(stdout).toMatch(/sync --watch \[--interval N\][^\n]*\n\s*See also: autopilot --install/); + }); + + test('`gbrain sync --help` never listed install-cron either', () => { + const { stdout, status } = runCli(['sync', '--help']); + expect(status).toBe(0); + expect(stdout).not.toContain('install-cron'); + }); +}); + describe('#1175 — main `gbrain --help` SOURCES block matches the real subcommand set', () => { test('archive and its lifecycle siblings are listed', () => { const { stdout, status } = runCli(['--help']);