Skip to content

Scope audit query hints to the active recipe - #4958

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue4862
Jul 28, 2026
Merged

Scope audit query hints to the active recipe#4958
Widthdom merged 3 commits into
mainfrom
fix-issue4862

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Scope unknown child-query suggestions to canonical names and current/deprecated aliases from the active recipe.
  • Preserve direct/include/exclude selector semantics, unresolved repeated selectors, raw FTS mode, normalized filters, and shell-safe quoting in replay hints.
  • Reject ambiguous external aliases with bounded diagnostics, document the contract in English and Japanese, and add a bilingual changelog fragment.

Root cause and impact

The unknown-query error path used a hard-coded unrelated recipe/query and searched across recipe groups. Copying that hint could run the wrong audit. The corrected path derives candidates from the selected recipe, canonicalizes aliases, and suppresses replay commands when no close match exists or when correcting only the recipe name would drop child selectors and broaden the search.

Validation

  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore -m:1 — passed with 0 warnings and 0 errors.
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue4862' — net8.0: 4 passed; net9.0: 4 passed.
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CodeIndex.Tests.QueryCommandRunnerTests.RunSearch_' — net8.0: 251 passed; net9.0: 251 passed.
  • dotnet format CodeIndex.sln --no-restore --verify-no-changes — passed.
  • dotnet run --project tools/CodeIndex.Changelog -- check — validated 32 fragments.
  • Full Release suite: affected tests passed. The suite also reproduced the unrelated watcher timing failure already tracked by Stabilize net8 subproject watcher reconciliation for ancestor .gitignore changes #4955 on net8.0/net9.0; an unrelated MCP timing failure passed in isolation on both TFMs.
  • Codex adversarial review: two rounds completed; all six P2 findings were addressed, followed by the Release build and targeted regression runs above.

Documentation and changelog

  • Updated USER_GUIDE.md and TESTING_GUIDE.md in both English and Japanese.
  • Added changelog.d/unreleased/4862.fixed.md.

Fixes #4862

@Widthdom
Widthdom marked this pull request as ready for review July 28, 2026 17:20
@Widthdom
Widthdom merged commit caaec1c into main Jul 28, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4862 branch July 28, 2026 17:20
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.

Generate unknown audit-query hints from the active recipe

1 participant