Repository navigation
fix: keep structured gh output free of terminal color - #115
Merged
Merged
Conversation
Contributor
Author
|
Luna review r1 of 476adee: REQUEST CHANGES
The environment helper itself is sound: it copies the parent environment (retaining PATH, GH_TOKEN, GH_HOST, and proxy variables), overrides terminal color flags and removes GH_FORCE_TTY only for the child. Both structured callers use it; the PR leaves VERSION, manifests and CHANGELOG untouched. The subprocess tests cover both forcing cases and verify parent environment/content preservation. |
lukemaj
force-pushed
the
fix/93-gh-structured-color
branch
from
October 18, 2026 23:07
476adee to
f82c419
Compare
Contributor
Author
|
Luna review r2 of f82c419: APPROVE No actionable findings.
|
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Structured GitHub CLI calls keep JSON free of terminal color, and dispatch now reports actionable errors for empty or malformed stdout.
Why: Forced color/TTY settings contaminated JSON; dispatch also returned null for empty output or leaked a bare JSONDecodeError for malformed output.
So what: The coordinator owns the next independent review of this exact head and any merge decision; this is an implementation handoff.
Closes #93
Objective contribution: reliable structured GitHub output preserves trustworthy task evidence.
Changes:
(no stderr)) when successful gh returns empty, whitespace-only or non-JSON stdout. Malformed JSON retains JSONDecodeError as its explicit cause. Environment tokens are not included in the diagnostic.Candidate:
f57824ea180194c317753f99469e9722213840eb(includes fix: report when trace results are truncated #109-fix(claude): recognize native request-replay metadata #113).f82c419969b23e5aecd7231b4b222e4136a058fconfix/93-gh-structured-color.476adee3feda4bae154729199107279981ece518; remote and PR head verified afterward.Proof on the exact committed head:
python3 -m unittest -v tests.test_gh_environment.StructuredGhEnvironmentTests.test_dispatch_invalid_stdout_names_command_and_stderron the rebased pre-fix code produced 2 failures (empty output returned null) and 4 errors (bare JSONDecodeError). The same test passes after the fix.python3 -m unittest -v tests.test_gh_environment tests.test_publish_gh tests.test_dispatch tests.test_publish: 41 passed.python3 -m unittest discover -s tests: 810 passed in 71.944s, Python 3.14.7.python3 -m compileall -q agent_observer tests scripts: passed.bin/agent-observer --version: 1.2.6;git diff --check: passed; worktree clean.Luna r1 full-suite discrepancy:
f57824ea180194c317753f99469e9722213840eb, in an isolated checkout with Git history: 806 passed in 63.568s, same host/Python. None of the four reported failure areas reproduced on main or the candidate.tests.test_placement,tests.test_tool_arguments,tests.test_writer_lock: all 40 tests also passed in 4.777s with BOTH dispatch/publish structured_env entry points patched to raise if invoked. No invocation occurred.Limits:
nothing to publish: no sessions in scope. No new publish attempt was made.Requirements and who asked: User, #93 and Luna r1 require plain structured output, actionable command/stderr errors, failing-first proof, parent/content preservation, current-main rebase and investigation of four reported suite failures.
Deleted: ANSI stripping, shared parser refactoring, unrelated flaky-test fixes without causal evidence, live publication proof and release-file changes.
Bottleneck: Invalid gh stdout lacked actionable dispatch diagnostics; exact-head and baseline proof now distinguish that defect from the unconfirmed suite discrepancy.
Checked myself: Read #93, #115 and Luna r1; inspected both structured callers and full diff; observed failing-first diagnostics, 41 focused passes, 810 candidate passes, 806 main passes, 40 helper-exclusion passes, compileall, CI and remote identity.
Implemented with Codex (gpt-6.1-sol, medium reasoning) through T3 Code.