feat(logging): complete runtime trace diagnostics

Complete byte-level diagnostics for network, upload, runtime lifecycle, authenticated write, and background operation paths.

Preserve streaming behavior, file-storage boundaries, and default log volume while making failures, retries, cancellation, and final outcomes independently diagnosable.

Add focused regression coverage for correlation, partial data, resource context ownership, and terminal-state accuracy.
This commit is contained in:
DrSmoothl committed 2026-07-31 11:21:12 +08:00
1 parent 0ed85e7745
commit a67614fa09
27 files changed
+4029 -352

No files matched your search

+3 -3
View File
@@ -1,4 +1,4 @@
import { createLogger } from '@snowluma/common/logger';
import { createLogger, runWithoutRequestContext } from '@snowluma/common/logger';
import type { BridgeInterface } from '@snowluma/core/bridge-interface';
import type { BridgeManager } from '@snowluma/core/manager';
import { loadOneBotConfig } from './config';
@@ -107,7 +107,7 @@ export class OneBotManager {
bind(bridgeManager: BridgeManager): void {
bridgeManager.addSessionStartedListener((uin, bridge) => {
this.onSessionStarted(uin, bridge);
runWithoutRequestContext(() => this.onSessionStarted(uin, bridge));
});
bridgeManager.addSessionClosedListener((uin) => {
@@ -155,7 +155,7 @@ export class OneBotManager {
const instance = this.instances.get(uin);
if (!instance) return { online: false, applied: false, errors: [], adapters: [] };
const result = await instance.reloadConfig(config);
const result = await runWithoutRequestContext(() => instance.reloadConfig(config));
if (result.applied) {
log.info('configuration applied: UIN=%s adapters=%d', uin, result.statuses.length);
} else {