Skip to content

Fix time provider and suggestion timestamps - #2725

Merged
Widthdom merged 13 commits into
mainfrom
codex/fix-issue1617-1618-2034
May 31, 2026
Merged

Fix time provider and suggestion timestamps#2725
Widthdom merged 13 commits into
mainfrom
codex/fix-issue1617-1618-2034

Conversation

@Widthdom

@Widthdom Widthdom commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added injectable TimeProvider seams for time-sensitive CLI/MCP paths, including status age calculations, query trace/log naming, MCP ping timestamps, and suggestion-store submission timing.
  • Moved suggestion CreatedAt stamping into the locked persistence path so the stored timestamp reflects when the record enters the local store.
  • Replaced brittle hardcoded test datetime fixtures with a shared manual test clock where the affected tests depend on relative freshness.
  • Stabilized diagnostic stderr writes for closed/disposed CI writers and preserved the public SuggestionStore constructor.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~SuggestionStoreTests|FullyQualifiedName~ConsoleUiTests.TryWriteErrorLine|FullyQualifiedName~McpServerTests.RunAsync_InitializeEmitsInitializedNotificationAfterResponseOnlyOnce|FullyQualifiedName~McpServerTests.RunAsync_StdioCancellationNotification_CancelsActiveRequest|FullyQualifiedName~McpServerTests.RunAsync_StdioEofDrainsInFlightRequestBeforeReturning|FullyQualifiedName~McpServerTests.RunAsync_ShutdownNotification_DrainsAndExits|FullyQualifiedName~ConcurrencyTests|FullyQualifiedName~LegacySchemaMigrationTests|FullyQualifiedName~McpServerTests.ToolsCall_Ping_ReturnsVersionAndTimestamp" (net8.0/net9.0: 94 passed each)
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check origin/main..HEAD
  • Adversarial review: No blocking/actionable issues found.

Notes

Changelog

  • changelog.d/unreleased/1617.fixed.md
  • changelog.d/unreleased/1618.fixed.md
  • changelog.d/unreleased/2034.fixed.md

Fixes

Fixes #1617
Fixes #1618
Fixes #2034

@Widthdom
Widthdom marked this pull request as ready for review May 31, 2026 05:10
@Widthdom
Widthdom merged commit 3e69a02 into main May 31, 2026
10 checks passed
@Widthdom
Widthdom deleted the codex/fix-issue1617-1618-2034 branch May 31, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant