fix(observabilidade): stub watcher sai limpo com exit 0 para Task 9 systemd

This commit is contained in:
2026-04-23 01:01:42 +01:00
parent cdadc89cb0
commit 7a13d21caa
2 changed files with 9 additions and 6 deletions
+5 -2
View File
@@ -24,8 +24,11 @@ async function main(): Promise<void> {
console.log(`[indexer] modo=${mode} db=${dbPath}`) console.log(`[indexer] modo=${mode} db=${dbPath}`)
if (mode === '--watch') { if (mode === '--watch') {
startWatcher() console.log(`[indexer] watch mode em ${dbPath}`)
return await indexAll({ dbPath })
await startWatcher(dbPath)
console.log('[indexer] watcher ainda não implementado (ver Task 8) — saída limpa')
process.exit(0)
} }
const start = Date.now() const start = Date.now()
+4 -4
View File
@@ -1,7 +1,7 @@
/** /**
* Watcher incremental via chokidar — stub. * Stub — implementação real chega em Task 8 (chokidar).
* Implementação completa na Task 8 (Pipeline: incremental watch + resiliência). * Devolve imediatamente; o CLI imprime aviso e termina com exit 0.
*/ */
export function startWatcher(): never { export async function startWatcher(_dbPath: string): Promise<void> {
throw new Error('watcher não implementado — ver Task 8') return
} }