fix(monitoring): report observed research and paper readiness (O02)

This commit is contained in:
Boki 2026-10-28 12:58:38 -04:00
parent 70d173a908
commit 8c858b9d5c
23 changed files with 1340 additions and 319 deletions

View file

@ -9,3 +9,6 @@ export { Logger, getLogger, shutdownLoggers, setLoggerConfig } from './logger';
// Type definitions
export type { LogLevel, LogContext, LogMetadata, LoggerConfig, LoggerLike } from './types';
// Shared redaction for durable user-visible diagnostics as well as logs.
export { redactLogValue } from './redact';

View file

@ -569,7 +569,7 @@ export class Queue {
/**
* Get count of active workers from BullMQ
*/
async getActiveWorkerCount(): Promise<number> {
async getActiveWorkerCount(): Promise<number | undefined> {
try {
const workers = await this.bullQueue.getWorkers();
return workers.length;
@ -578,7 +578,9 @@ export class Queue {
queueName: this.queueName,
error,
});
return 0;
// The optional QueueStats.workers capability distinguishes an unavailable
// observation from a successful query that found zero workers.
return undefined;
}
}