Skip to content

McpAuditLog request-id truncation regression test writes no audit event #3304

Description

@Widthdom

Summary

After merging current origin/main into fix-issue3045, the existing regression test McpAuditLogTests.ToolsCall_TruncatesAuditRequestId_Issue3237 fails deterministically because the audit log file contains no event records.

Reproduction

dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter FullyQualifiedName~McpAuditLogTests.ToolsCall_TruncatesAuditRequestId_Issue3237

Observed

Both net8.0 and net9.0 fail with:

Assert.Single() Failure: The collection was empty
at CodeIndex.Tests.McpAuditLogTests.ReadOnlyRecord() ... McpAuditLogTests.cs:line 626
at CodeIndex.Tests.McpAuditLogTests.ToolsCall_TruncatesAuditRequestId_Issue3237() ... McpAuditLogTests.cs:line 486

Expected

The test should write one audit event with a truncated request_id field, then assert the truncation metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions