Skip to content

Fix search log flag query parsing - #2974

Merged
Widthdom merged 7 commits into
mainfrom
fix-issue2955
Jun 2, 2026
Merged

Fix search log flag query parsing#2974
Widthdom merged 7 commits into
mainfrom
fix-issue2955

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Preserve search query literals that look like global log flags, including --log-max-size-mb, --log-format=json, and similar inline forms.
  • Keep valid global log options working before and after the search query.
  • Track separated global/search value options before a log-looking query so their values are not mistaken for the search query.

Root Cause

ProgramRunner stripped global log flags before dispatching to the search parser. When the query itself started with a global log option name, the pre-parser consumed it as a global option and validated the following search option as the log value.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter Issue2955 -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-build --filter "FullyQualifiedName~ProgramRunnerTests"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Manual CLI repros for separated and inline log-looking query literals, valid log options before/after the query, and value-bearing global flags before the query.

A full dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -p:UseSharedCompilation=false run was attempted, but it is currently blocked by the known unrelated ReferenceExtractor full-suite failure tracked in #2947.

Documentation / Changelog

  • Added changelog fragment: changelog.d/unreleased/2955.fixed.md

Follow-up Candidates

Fixes #2955

@Widthdom
Widthdom marked this pull request as ready for review June 2, 2026 21:40
@Widthdom
Widthdom merged commit 4510365 into main Jun 2, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2955 branch June 3, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search queries that look like global log flags are parsed as options

1 participant