Skip to content

fix: report token stdout delivery failures without exposing credentials - #68

Merged
cppla merged 1 commit into
mainfrom
codex/token-output-errors
Oct 8, 2026
Merged

cppla merged 1 commit into
mainfrom
codex/token-output-errors

Conversation

@cppla

@cppla cppla commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Return an error (exit code 1) if autocar token cannot write its complete credential to stdout.
  • Use a fixed diagnostic rather than propagating a writer error that might contain the generated token. Do not retry partial output.
  • Preserve URL-safe base64/newline output and --bytes; --out permissions, no-overwrite behavior, and silent file mode are unchanged.
  • Introduce an internal writer-injected helper to test the output path without mutating process-global stdout.

Evidence and validation

  • Before the fix, a real closed stdout file reproduced runToken(nil) == nil despite failure to deliver the token.
  • Regressions cover a closed file, an error that embeds the token, a short write without an error, successful 16/32/128-byte encodings, and file output never touching stdout. Error cases verify command exit code 1 and a fixed secret-free diagnostic.
  • Go 1.26.8: targeted regressions and all cmd/autocar tests passed with -race; go vet ./cmd/autocar and git diff --check passed.
  • Independent review found no blocking issues. Full GitHub checks must pass before merge.

No transport, protocol, configuration, dependency, Docker deployment, release publication, or comparative experiment changes.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 07:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cppla
cppla merged commit 5e7c350 into main Oct 8, 2026
14 checks passed
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.

2 participants