Skip to content

Fix run JSON auth output contamination#365

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-run-json-auth-log-stderr
Open

Fix run JSON auth output contamination#365
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-run-json-auth-log-stderr

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • send non-TUI tracing logs to stderr instead of stdout
  • keep cortex run --format json stdout parseable when auth setup emits warnings
  • fix a stale test import so cortex-cli tests compile on current main

Fixes PlatformNetwork/bounty-challenge#53157

Verification

  • cargo fmt --package cortex-cli --check
  • cargo check --package cortex-cli --lib
  • cargo test --package cortex-cli cli::args::tests::test_log_level_as_filter_str -- --nocapture
  • git diff --check
  • cargo build --package cortex-cli --bin Cortex
  • clean-home target/debug/Cortex run --format json hello with stdout parsed by jq, no auth WARN in stdout, and auth WARN present on stderr

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] [v0.0.7] cortex run --format json contaminates stdout with an auth warning before the JSON error

1 participant