MCPcopy
hub / github.com/OpenCoworkAI/open-codesign / recordAndReport

Function recordAndReport

apps/desktop/src/main/diagnostics-ipc.test.ts:568–592  ·  view source on GitHub ↗
(overrides: Record<string, unknown>)

Source from the content-addressed store, hash-verified

566 }
567
568 async function recordAndReport(overrides: Record<string, unknown>): Promise<{ mainLog: string }> {
569 const db = initInMemoryDb();
570 registerDiagnosticsIpc(db);
571 await invoke('diagnostics:v1:reportEvent', {
572 schemaVersion: 1,
573 error: {
574 localId: 'local-bundle',
575 code: 'BUNDLE_TEST',
576 scope: 'renderer:app',
577 fingerprint: 'fp-bundle',
578 message: 'bundle check',
579 ts: Date.now(),
580 },
581 includePromptText: false,
582 includePaths: false,
583 includeUrls: false,
584 includeTimeline: true,
585 notes: '',
586 timeline: [],
587 ...overrides,
588 });
589 const mainLog = capturedFiles.get('main.log');
590 if (mainLog === undefined) throw new Error('main.log not captured');
591 return { mainLog };
592 }
593
594 it('bundle main.log is scrubbed for paths when includePaths=false', async () => {
595 await writeTestLog(

Callers 1

Calls 3

initInMemoryDbFunction · 0.90
registerDiagnosticsIpcFunction · 0.90
invokeFunction · 0.85

Tested by

no test coverage detected