Skip to content

Emit one stable error for invalid outline projections - #4971

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue4876
Jul 29, 2026
Merged

Emit one stable error for invalid outline projections#4971
Widthdom merged 2 commits into
mainfrom
fix-issue4876

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • collect unknown --outline-fields values and emit one terminal usage error with the invalid names and valid candidates
  • stop empty-selection and all/specific-field validation after that terminal projection error
  • preserve deliberate empty CSV behavior plus alias canonicalization and duplicate elimination
  • add focused parser and JSON error-envelope coverage

Root cause

ParseOutlineProjectionFields appended an unsupported-field error while parsing and then continued into downstream empty-selection validation. Invalid-only input therefore produced two top-level diagnostics. The parser now records invalid fields and returns immediately after emitting the single consolidated projection error.

Validation

  • dotnet build CodeIndex.sln -p:UseSharedCompilation=false — passed, 0 warnings / 0 errors
  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false — passed, 0 warnings / 0 errors
  • focused Issue Emit one stable error for invalid outline projections #4876 tests on net8.0 and net9.0 — passed
  • all net8.0 RunOutline tests — 48 passed
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore — passed
  • dotnet run --project tools/CodeIndex.Changelog -- check — 46 fragments validated
  • CLI smoke tests for one/multiple unknowns, deliberate empty CSV, and valid aliases/duplicates — passed
  • post-commit CodeIndex refresh with index . --commits HEAD followed by status --check --jsonindex_matches_workspace: true

Full-suite note:

No changes for #4592 are included because this PR is scoped to #4876.

Documentation and changelog

  • updated the English and Japanese sections of DEVELOPER_GUIDE.md and TESTING_GUIDE.md
  • added bilingual fragment changelog.d/unreleased/4876.fixed.md
  • did not edit CHANGELOG.md

Adversarial review

Codex reviewed origin/main..HEAD: No blocking/actionable issues found.

Fixes #4876

@Widthdom
Widthdom marked this pull request as ready for review July 29, 2026 05:34
@Widthdom
Widthdom merged commit 2a1313b into main Jul 29, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4876 branch July 29, 2026 05:35
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.

Emit one stable error for invalid outline projections

1 participant