Skip to content

Expose search and excerpt JSON recovery metadata - #3574

Merged
Widthdom merged 17 commits into
mainfrom
fix-issue3556-3557-3558-3561-3562
Jun 12, 2026
Merged

Expose search and excerpt JSON recovery metadata#3574
Widthdom merged 17 commits into
mainfrom
fix-issue3556-3557-3558-3561-3562

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Exposes search JSON effective options, focus/drop navigation, visible highlight ranges, and MCP search metadata.
  • Adds find JSON match-span/truncation metadata.
  • Adds excerpt/body requested/effective range, truncation reason, and replay recovery command metadata, including read-only DB URI preservation.
  • Updates developer docs, golden snapshots, tests, and changelog fragments for the handled issues.

Scope

No target issue was skipped for an existing work-start comment.

AGENT.md, CLAUDE.md, and AGENT_GUIDE.md were not modified.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~RunSearch_JsonOutput_MatchesGolden" -p:UseSharedCompilation=false -m:1 /nodeReuse:false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~GitHelperTests.GetChangedFilesFromCommit_FailsWhenGitCommandTimesOut" -p:UseSharedCompilation=false -m:1 /nodeReuse:false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~SearchSnippetFormatterTests|FullyQualifiedName~RunSearch_ExactSubstringJsonOutputsLiteralHighlightMetadata|FullyQualifiedName~RunSearch_ExactSubstringWithRawFtsReportsEffectiveLiteralHighlightMode_Issue3558|FullyQualifiedName~RunSearch_RawFtsJsonReportsLiteralHighlightGapMetadata_Issue3558|FullyQualifiedName~ToolsCall_Search_RawQuerySupportsFtsSyntax|FullyQualifiedName~ToolsCall_Search_ExactWithRawQueryReportsEffectiveLiteralHighlightMode_Issue3558|FullyQualifiedName~RunFind_JsonClampsLongSingleLineSnippet|FullyQualifiedName~RunFind_WithJsonOutputsLineColumnAndSnippet|FullyQualifiedName~RunFind_WithJsonReportsSpanMetadataForMultipleMatchesInOneFile_Issue3561|FullyQualifiedName~RunExcerpt_JsonClampsLongSingleLineContentAroundFocus|FullyQualifiedName~ToolsCall_Excerpt_ClampsLongSingleLineContent|FullyQualifiedName~RunDefinition_JsonBodyIncludesTruncationMetadata_Issue3131|FullyQualifiedName~RunDefinition_JsonBodyReportsByteCapRecovery_Issue3562|FullyQualifiedName~RunSearch_JsonOutput_MatchesGolden" -p:UseSharedCompilation=false -m:1 /nodeReuse:false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~RunInspect_JsonBodyRecoveryCommandIncludesActiveDb_Issue3562|FullyQualifiedName~RunSearch_RecipeJsonWithRawFtsReportsEffectiveSanitizedMode_Issue3558" -p:UseSharedCompilation=false -m:1 /nodeReuse:false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~RunSearch_RecipeJsonRunsBuiltInQueries_Issue3144|FullyQualifiedName~RunSearch_RecipeJsonWithRawFtsReportsEffectiveSanitizedMode_Issue3558|FullyQualifiedName~RunSearch_ExactSubstringWithRawFtsReportsEffectiveLiteralHighlightMode_Issue3558|FullyQualifiedName~ToolsCall_Search_ExactWithRawQueryReportsEffectiveLiteralHighlightMode_Issue3558|FullyQualifiedName~RunInspect_JsonBodyRecoveryCommandIncludesActiveDb_Issue3562|FullyQualifiedName~RunDefinition_JsonBodyReportsByteCapRecovery_Issue3562|FullyQualifiedName~RunExcerpt_JsonClampsLongSingleLineContentAroundFocus|FullyQualifiedName~ToolsCall_Excerpt_ClampsLongSingleLineContent|FullyQualifiedName~ToolsCall_AnalyzeSymbol" -p:UseSharedCompilation=false -m:1 /nodeReuse:false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "ToolsCall_SearchRecipe_AppliesResultOutputMetadata_Issue3558|ToolsCall_Search_RawQuerySupportsFtsSyntax|ToolsCall_Search_ExactWithRawQueryReportsEffectiveLiteralHighlightMode_Issue3558|RunSearch_ExactSubstringWithRawFtsReportsEffectiveLiteralHighlightMode_Issue3558|RunSearch_RecipeJsonWithRawFtsReportsEffectiveSanitizedMode_Issue3558|RunInspect_JsonBodyRecoveryCommandIncludesActiveDb_Issue3562|RunDefinition_JsonBodyReportsByteCapRecovery_Issue3562" -p:UseSharedCompilation=false -m:1 /nodeReuse:false
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet build -p:UseSharedCompilation=false -m:1 /nodeReuse:false
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll index . --commits HEAD --json
  • Full dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -p:UseSharedCompilation=false -m:1 /nodeReuse:false was attempted; the only failure was QueryCommandRunnerTests.RunPublishedTrimmedCli_SerializesQueryJsonAndErrorJson, caused by missing local runtime Microsoft.NETCore.App 10.0.8-servicing.26229.119 for ILLink 10.0.8.

Adversarial Review

  • Initial codex adversarial-review: No blocking/actionable issues found.
  • Conflict-resolution codex adversarial-review: found and fixed MCP recipe result metadata defaulting.
  • Final codex adversarial-review: No blocking/actionable issues found.

Fixes #3556
Fixes #3557
Fixes #3558
Fixes #3561
Fixes #3562

@Widthdom
Widthdom merged commit a76cc68 into main Jun 12, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3556-3557-3558-3561-3562 branch June 12, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment