fix(FN-2090): log and cover engine warning fallbacks

- Add structured warning logs for plugin-runner fallback paths instead of silent catches
- Add warning telemetry in agent-tools for agent-memory directory, QMD search, and index refresh failures
- Log cron-runner session disposal failures and update agent-logger persistence warnings to use logger output
- Expand engine tests to cover warning behavior across plugin-runner, agent-tools, cron-runner, and agent-logger
This commit is contained in:
Fusion
2026-04-18 22:18:55 -07:00
committed by gsxdsm
parent fce07dacbc
commit d1c097e825
8 changed files with 388 additions and 137 deletions

View File

@@ -285,8 +285,8 @@ export class PluginRunner {
try {
executorLog.log(`Stopping unregistered plugin: ${plugin.id}`);
await this.options.pluginLoader.stopPlugin(plugin.id);
} catch {
// Ignore - plugin might not be loaded
} catch (err) {
this.log.warn(`Failed to stop unregistered plugin ${plugin.id}: ${err instanceof Error ? err.message : String(err)}`);
}
}
@@ -452,7 +452,8 @@ export class PluginRunner {
try {
const plugin = await this.options.pluginStore.getPlugin(pluginId);
return plugin.settings;
} catch {
} catch (err) {
this.log.warn(`Failed to get settings for plugin ${pluginId}: ${err instanceof Error ? err.message : String(err)}`);
return {};
}
}
@@ -551,8 +552,8 @@ export class PluginRunner {
this.hookTimeoutMs,
`Hook ${hookName} timed out`,
);
} catch {
// Error already logged by invokeHook
} catch (err) {
this.log.warn(`Hook ${hookName} failed: ${err instanceof Error ? err.message : String(err)}`);
}
}