Skip to content

Return structured JSON for bounded cursor validation errors - #5424

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue5412
Sep 22, 2026
Merged

Widthdom merged 2 commits into
mainfrom
fix-issue5412

Conversation

@Widthdom

@Widthdom Widthdom commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Bounded find cursor failures previously wrote human diagnostics to stderr even when JSON was explicitly selected. The shared bounded-response validator now emits versioned stdout errors with command identity, typed cursor categories and recovery hints. Human diagnostics and standalone count continuation retain their existing behavior.

Validation errors honor UTF-8 byte limits, including the final newline. If the complete error cannot fit, E028_RESPONSE_BUDGET_TOO_SMALL reports the measured minimum and preserves the original validation_error. Shared-wrapper regression assertions, including symbols NDJSON cursor validation, require structured machine output for malformed, mismatched and stale cursors with empty stderr.

Fixes #5412

Validation

  • Repository build succeeded without warnings or errors.
  • Release cursor, bounded-response, envelope, find, response-budget and related MCP regression tests: net8.0 510 passed; net9.0 501 passed, 9 skipped; no failures.
  • The issue's CLI reproduction now returns exit 1 and structured stdout.
  • A batch smoke check preserves the structured cursor error and emits no stderr.
  • Modified C# whitespace verification and git diff --check passed.
  • dotnet run --project tools/CodeIndex.Changelog -- check passed.
  • Post-commit rebuild and root/workspace index checks passed.
  • Codex adversarial review of origin/main..HEAD, including a follow-up review of the CI test correction: No blocking/actionable issues found.

Documentation and changelog

  • Updated both language sections in docs/find-scan-controls.md and TESTING_GUIDE.md.
  • Added changelog.d/unreleased/5412.fixed.md; CHANGELOG.md is unchanged.
  • Agent instruction files are unchanged.

Follow-ups

Tracked separately: #5423.

@Widthdom
Widthdom merged commit f1d8b63 into main Sep 22, 2026
11 checks passed
@Widthdom
Widthdom deleted the fix-issue5412 branch September 22, 2026 21:26
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 structured JSON for bounded find cursor validation errors

1 participant