Skip to content

[codex] Report source detector rejection reasons - #3853

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue3830
Jun 20, 2026
Merged

[codex] Report source detector rejection reasons#3853
Widthdom merged 2 commits into
mainfrom
fix-issue3830

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Added SourceCodeDetector.Detect(...) with stable source-code guard reason codes while keeping ContainsSourceCode(...) as the compatibility boolean wrapper.
  • Added tilde Markdown fence and indented fence coverage, plus bounded MCP source_code_rejection diagnostics that do not echo rejected text.
  • Updated user/developer docs and added the bilingual changelog fragment.

Validation

  • dotnet format CodeIndex.sln --verify-no-changes
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Debug -p:UseSharedCompilation=false --filter "FullyQualifiedName~SourceCodeDetectorTests|FullyQualifiedName~McpServerTests.SuggestImprovement_SourceCode"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet build CodeIndex.sln -c Debug -p:UseSharedCompilation=false
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • codex exec review --dangerously-bypass-approvals-and-sandbox --base origin/main

Review

Scope Notes

  • No additional related issues were included.
  • No new GitHub issues were created.
  • AGENT.md, AGENTS.md, CLAUDE.md, and AGENT_GUIDE.md were not modified.

Fixes #3830

@Widthdom
Widthdom marked this pull request as ready for review June 20, 2026 15:55
@Widthdom
Widthdom merged commit e957271 into main Jun 20, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3830 branch June 20, 2026 15:55
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.

Return source-code detector reasons and cover Markdown fence variants

1 participant