feat(FN-2327): standardize dashboard runtime logging pipeline

- Add a shared runtime logger contract and dashboard runtime logger implementation for structured diagnostics
- Route dashboard CLI/runtime logs through the TUI sink and replace ad-hoc console diagnostics in server paths
- Update CLI and dashboard tests to assert structured runtime logging behavior across sync and error flows
- Document the structured logging architecture updates and include a changeset for @runfusion/fusion
This commit is contained in:
Fusion
2026-04-23 13:48:45 -07:00
committed by gsxdsm
parent 18b2c827a0
commit c01892dbd2
14 changed files with 436 additions and 113 deletions

View File

@@ -551,12 +551,13 @@ describe("Terminal stale-session eviction", () => {
expect(consoleErrorSpy).toHaveBeenCalled();
const failureCall = consoleErrorSpy.mock.calls.find(
(call) => typeof call[0] === "string" && call[0].includes("[terminal] Stale session eviction failed:"),
(call) => typeof call[0] === "string" && call[0].includes("[terminal] Stale session eviction failed"),
);
expect(failureCall).toBeDefined();
expect(failureCall?.[0]).toEqual(expect.stringContaining("[terminal] Stale session eviction failed:"));
expect(failureCall?.[1]).toBeInstanceOf(Error);
expect((failureCall?.[1] as Error).message).toContain("simulated eviction failure");
expect(failureCall?.[0]).toEqual(expect.stringContaining("[terminal] Stale session eviction failed"));
expect(failureCall?.[1]).toEqual(
expect.objectContaining({ error: "simulated eviction failure" }),
);
vi.advanceTimersByTime(60_000);
expect(mockTerminalService.evictStaleSessions).toHaveBeenCalledTimes(2);