Skip to content

Fix CLI JSON and terminal output controls - #2661

Merged
Widthdom merged 4 commits into
mainfrom
codex/fix-issue1956-1953-1833-1834
May 25, 2026
Merged

Fix CLI JSON and terminal output controls#2661
Widthdom merged 4 commits into
mainfrom
codex/fix-issue1956-1953-1833-1834

Conversation

@Widthdom

@Widthdom Widthdom commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Suppress ANSI styling for JSON-producing CLI modes, including --json-envelope, even when color is forced.
  • Enforce UTF-8 no-BOM stdout for real redirected CLI output while preserving test/captured writers.
  • Tighten interactive terminal detection for TERM=dumb, CI, missing Unix terminal hints, redirected output, and captured output.
  • Fix the macOS/net9.0 CI failure by moving ready-bit updates to provider-managed immediate SQLite transactions (SetReadyBit concurrent writers can start nested SQLite transaction #2676).
  • Document the CLI output contract and add issue-specific changelog fragments.

Validation

  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -p:UseSharedCompilation=false --filter "FullyQualifiedName~ConsoleUiTests"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -p:UseSharedCompilation=false --filter "FullyQualifiedName~ProgramRunnerTests|FullyQualifiedName~ConsoleUiTests"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net9.0 --no-restore --filter "FullyQualifiedName~ConcurrencyTests.SetReadyBit_ConcurrentWriters_DoNotLoseFlags"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net9.0 --no-build --filter "FullyQualifiedName~ConcurrencyTests"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Codex adversarial review: first pass found a --json-envelope ANSI-suppression gap; fixed in Handle JSON envelope console output (#1956). Second pass reported No blocking/actionable issues found.
  • Codex adversarial review for SetReadyBit concurrent writers can start nested SQLite transaction #2676 CI fix: No blocking/actionable issues found.

Documentation and changelog

  • Updated README.md output controls in English and Japanese.
  • Updated DEVELOPER_GUIDE.md with CLI JSON encoding and terminal-control implementation rules.
  • Added changelog fragments:
    • changelog.d/unreleased/1833.fixed.md
    • changelog.d/unreleased/1834.fixed.md
    • changelog.d/unreleased/1953.fixed.md
    • changelog.d/unreleased/1956.fixed.md
    • changelog.d/unreleased/2676.fixed.md

Issues

Fixes #1956
Fixes #1953
Fixes #1833
Fixes #1834
Fixes #2676

Follow-up candidates

  • None.

@Widthdom
Widthdom marked this pull request as ready for review May 25, 2026 00:21
@Widthdom
Widthdom merged commit 93d608f into main May 25, 2026
11 checks passed
@Widthdom
Widthdom deleted the codex/fix-issue1956-1953-1833-1834 branch May 25, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant