Skip to content

Preserve JSON envelope option values - #5029

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue4976
Aug 1, 2026
Merged

Preserve JSON envelope option values#5029
Widthdom merged 4 commits into
mainfrom
fix-issue4976

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • classify global JSON-envelope tokens by their actual CLI role
  • preserve --json-envelope as separated, inline, and positional query data across normal and bounded preprocessing
  • preserve structured envelope errors when a missing option value precedes the genuine envelope flag
  • add bilingual test guidance, a changelog fragment, and regression coverage

Root cause and impact

Raw token equality removed --json-envelope even when it was command data, shifting later arguments. Bounded preprocessing had the same behavior. A schema-only first pass also over-consumed the flag after missing option values; token classification now matches parser acceptance.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-restore -p:UseSharedCompilation=false --filter FullyQualifiedName~JsonEnvelopeWrapperTests (25/25 on net8.0 and 25/25 on net9.0)
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false (0 warnings, 0 errors)
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet run --project tools/CodeIndex.Changelog -- check (101 valid fragments)
  • git diff --check
  • cdidx index update and strict workspace/fold/graph status checks
  • two Codex adversarial-review rounds completed; both actionable findings were addressed

Fixes #4976

Follow-up candidates: None.

@Widthdom
Widthdom marked this pull request as ready for review August 1, 2026 21:11
@Widthdom
Widthdom merged commit 757b3b5 into main Aug 1, 2026
11 checks passed
@Widthdom
Widthdom deleted the fix-issue4976 branch August 1, 2026 21:12
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.

Do not consume json-envelope when it is an option value

1 participant