Uh oh!
There was an error while loading. Please reload this page.
Address open review feedback from PR #8263 (TRX streaming store) - #8285
Conversation
- Fix doc comment in TrxTestResultExtractor: the serializer per-record cap is 64 MiB, not 16 MiB. - Apply the null-forgiving operator consistently on the bare `lastError` rethrows in `TrxResultStreamingStore.WriteRecordWithRetryAsync` so the nullable-flow analysis stays satisfied across all rethrow paths. - Switch the TRX streaming-store writer task from `Task.Run` to `ITask.RunLongRunning` so the `BlockingCollection<T>.TryTake` poll loop no longer blocks a shared threadpool thread. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Follow-up to PR #8263 that tightens documentation/nullable consistency in the TRX streaming store, and attempts to move the streaming-writer loop off the shared threadpool to reduce contention during idle waits.
Changes:
- Corrected
TrxTestResultExtractorcomment to reflect the serializer’s 64 MiB per-record cap. - Made
ExceptionDispatchInfo.Capture(lastError)rethrows nullable-consistent vialastError!. - Switched the streaming-store writer startup from
ITask.RuntoITask.RunLongRunning.
Show a summary per file
| File | Description |
|---|---|
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Streaming/TrxTestResultExtractor.cs | Updates rationale comment to reference the correct serializer record-size cap (64 MiB). |
| src/Platform/Microsoft.Testing.Extensions.TrxReport/Streaming/TrxResultStreamingStore.cs | Starts the writer via RunLongRunning and aligns nullable usage in retry rethrow paths. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Uh oh!
There was an error while loading. Please reload this page.
Amaury Levé (Evangelink)
left a comment
There was a problem hiding this comment.
✅ 21/21 dimensions clean — no findings.
All three changes are correct:
RunLongRunning: The API exists onITask/SystemTaskand correctly spawns a dedicated background thread, keeping the blockingBlockingCollection.TryTakeoff the shared threadpool. Rationale in the comment is accurate.lastError!: Both null-forgiving operators are safe. The catch sites are only reachable after at least one loop iteration that unconditionally assignslastError; null is impossible there.- Comment
16 MiB→64 MiB: Matches the actualMaxRecordLengthBytes = 64 * 1024 * 1024constant inTrxTestResultSerializer.cs; theMaxCapturedFieldChars = 1 MiBtruncation cap is still well below 64 MiB.
Generated by Expert Code Review (on open) for issue #8285 · ● 8.6M
Amaury Levé (Evangelink)
commented
May 16, 2026
Copilot address review comments |
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Addressed in 6fbd731. The TRX streaming writer loop is now await-free/synchronous while running on the long-running background thread, so the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Amaury Levé (Evangelink)
commented
May 17, 2026
Copilot address review comments |
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Wrap writer-thread log calls in try/catch so a faulting logger (e.g. FileLogger semaphore/I/O timeouts) cannot escape WriteLoopAsync and crash the dedicated long-running thread via SystemTask.RunLongRunning. Adds TryLogDebug / TryLogWarning helpers mirroring TryLogError, and routes: - WriteLoopAsync shutdown LogDebug - TryDelete error LogDebug - LogDrop debug log - CompleteAsync timeout LogWarningAsync (converted to sync TryLogWarning since CompleteAsync no longer needs to await it) Addresses Copilot review feedback on PR #8285. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Follow-up to #8263 addressing the open review threads on the merged PR.
Changes
64 MiB(TrxTestResultSerializer.MaxRecordLengthBytes), not16 MiBas the comment stated. Updated so the rationale forMaxCapturedFieldCharscites the correct number. (Copilot review threads x2)TrxResultStreamingStore.WriteRecordWithRetryAsyncnullable consistency — the two bareExceptionDispatchInfo.Capture(lastError).Throw()rethrows now use the null-forgiving operator, matching the finalCapture(lastError!).Throw()at the end of the method. (Copilot review thread)ITask.RuntoITask.RunLongRunningso theBlockingCollection<T>.TryTakepoll loop (which blocks for up to_flushIntervalMswhile idle) runs on its own dedicated background thread instead of starving the threadpool. (Youssef Fahmy (@Youssef1313) review thread)cc Youssef Fahmy (@Youssef1313)