• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

orion-ecs / keen-eye / 20822145205

08 Jan 2026 03:30PM UTC coverage: 87.146% (-0.2%) from 87.309%
20822145205

push

github

tyevco
feat(logging): Add comprehensive logging integration across Editor, TestBridge, and MCP

This commit implements a complete logging integration that enables:
- MCP Resources/Tools for AI agents to browse and query logs
- Debug session log capture
- Editor Console with unified query interface
- Ring buffer bounded storage for all use cases

- Add ILogQueryable interface for queryable log providers
- Add LogEntry, LogQuery, and LogStats records
- Add RingBufferLogProvider with bounded storage and query support
- Enhance TestLogProvider with ILogQueryable

- Add ILogController interface and LogControllerImpl
- Add LogEntrySnapshot, LogStatsSnapshot, LogQueryDto for IPC transport
- Add LogCommandHandler for IPC log operations (getCount, query, getStats, getRecent, clear)
- Add RemoteLogController for client-side log access
- Include LogStats in WorldStats for MCP visibility
- Add LogQueryable option to TestBridgeOptions

- Add LogResources: stats, recent, by-level, by-category
- Add LogTools: log_get_stats, log_get_count, log_get_recent, log_get_errors,
  log_get_by_level, log_get_by_category, log_search, log_query, log_clear

- Add LogCapture for capturing logs during debug sessions
- Wire LogCapture into DebugPlugin with configurable options

- Update EditorLogProvider to implement ILogQueryable
- Add Query() and GetStats() methods
- Add LogEntryExtensions for convenience methods
- Wire EditorLogProvider to editor's TestBridge for MCP access
- Delete duplicate LogEntry class (use shared KeenEyes.Logging.LogEntry)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

9196 of 12362 branches covered (74.39%)

Branch coverage included in aggregate %.

556 of 944 new or added lines in 27 files covered. (58.9%)

3 existing lines in 2 files now uncovered.

159050 of 180700 relevant lines covered (88.02%)

1.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

1.89
/src/KeenEyes.TestBridge.Client/RemoteLogController.cs
1
using KeenEyes.TestBridge.Logging;
2

3
namespace KeenEyes.TestBridge.Client;
4

5
/// <summary>
6
/// Remote implementation of <see cref="ILogController"/> that communicates over IPC.
7
/// </summary>
8
internal sealed class RemoteLogController(TestBridgeClient client) : ILogController
1✔
9
{
10
    /// <inheritdoc />
11
    public async Task<int> GetCountAsync()
12
    {
NEW
13
        return await client.SendRequestAsync<int>("log.getCount", null, CancellationToken.None);
×
NEW
14
    }
×
15

16
    /// <inheritdoc />
17
    public async Task<IReadOnlyList<LogEntrySnapshot>> GetRecentAsync(int count = 100)
18
    {
NEW
19
        var result = await client.SendRequestAsync<LogEntrySnapshot[]>(
×
NEW
20
            "log.getRecent",
×
NEW
21
            new { count },
×
NEW
22
            CancellationToken.None);
×
NEW
23
        return result ?? [];
×
NEW
24
    }
×
25

26
    /// <inheritdoc />
27
    public async Task<IReadOnlyList<LogEntrySnapshot>> QueryAsync(LogQueryDto query)
28
    {
NEW
29
        var result = await client.SendRequestAsync<LogEntrySnapshot[]>("log.query", query, CancellationToken.None);
×
NEW
30
        return result ?? [];
×
NEW
31
    }
×
32

33
    /// <inheritdoc />
34
    public async Task<LogStatsSnapshot> GetStatsAsync()
35
    {
NEW
36
        var result = await client.SendRequestAsync<LogStatsSnapshot>("log.getStats", null, CancellationToken.None);
×
NEW
37
        return result ?? new LogStatsSnapshot
×
NEW
38
        {
×
NEW
39
            TotalCount = 0,
×
NEW
40
            TraceCount = 0,
×
NEW
41
            DebugCount = 0,
×
NEW
42
            InfoCount = 0,
×
NEW
43
            WarningCount = 0,
×
NEW
44
            ErrorCount = 0,
×
NEW
45
            FatalCount = 0,
×
NEW
46
            OldestTimestamp = null,
×
NEW
47
            NewestTimestamp = null,
×
NEW
48
            Capacity = null
×
NEW
49
        };
×
NEW
50
    }
×
51

52
    /// <inheritdoc />
53
    public async Task ClearAsync()
54
    {
NEW
55
        await client.SendRequestAsync<object?>("log.clear", null, CancellationToken.None);
×
NEW
56
    }
×
57

58
    /// <inheritdoc />
59
    public async Task<IReadOnlyList<LogEntrySnapshot>> GetByLevelAsync(int level, int maxResults = 1000)
60
    {
NEW
61
        var result = await client.SendRequestAsync<LogEntrySnapshot[]>(
×
NEW
62
            "log.getByLevel",
×
NEW
63
            new { level, maxResults },
×
NEW
64
            CancellationToken.None);
×
NEW
65
        return result ?? [];
×
NEW
66
    }
×
67

68
    /// <inheritdoc />
69
    public async Task<IReadOnlyList<LogEntrySnapshot>> GetByCategoryAsync(string categoryPattern, int maxResults = 1000)
70
    {
NEW
71
        var result = await client.SendRequestAsync<LogEntrySnapshot[]>(
×
NEW
72
            "log.getByCategory",
×
NEW
73
            new { categoryPattern, maxResults },
×
NEW
74
            CancellationToken.None);
×
NEW
75
        return result ?? [];
×
NEW
76
    }
×
77

78
    /// <inheritdoc />
79
    public async Task<IReadOnlyList<LogEntrySnapshot>> SearchAsync(string searchText, int maxResults = 1000)
80
    {
NEW
81
        var result = await client.SendRequestAsync<LogEntrySnapshot[]>(
×
NEW
82
            "log.search",
×
NEW
83
            new { searchText, maxResults },
×
NEW
84
            CancellationToken.None);
×
NEW
85
        return result ?? [];
×
NEW
86
    }
×
87
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc