Skip to content

Rename local max output env var to SMITH prefix#41

Open
BrentGTR wants to merge 2 commits into
faustodavid:mainfrom
BrentGTR:feat/rename-max-output-env-var
Open

Rename local max output env var to SMITH prefix#41
BrentGTR wants to merge 2 commits into
faustodavid:mainfrom
BrentGTR:feat/rename-max-output-env-var

Conversation

@BrentGTR
Copy link
Copy Markdown

@BrentGTR BrentGTR commented May 20, 2026

Summary

  • Rename the canonical output truncation env var from THANOS_LOCAL_MAX_OUTPUT_CHARS to SMITH_LOCAL_MAX_OUTPUT_CHARS.
  • Keep backward compatibility by falling back to THANOS_LOCAL_MAX_OUTPUT_CHARS when the new variable is unset.
  • Add migration-focused tests for precedence and fallback, including the invalid-new-var edge case.
  • Update .env.example to document the new canonical variable.

Closes #27.

Test plan

  • pytest tests/unit/test_config.py
  • pytest tests/unit

BrentGTR and others added 2 commits May 20, 2026 11:33
Prefer SMITH_LOCAL_MAX_OUTPUT_CHARS while keeping THANOS_LOCAL_MAX_OUTPUT_CHARS as a backwards-compatible fallback, and update docs/tests to reflect the new canonical variable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover the invalid new env-var scenario to ensure runtime config falls back to the legacy THANOS variable during the compatibility window.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/smith/config.py
default=max_output_chars or 10240,
"SMITH_LOCAL_MAX_OUTPUT_CHARS",
default=parse_int_env(
"THANOS_LOCAL_MAX_OUTPUT_CHARS",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Because the CLI is on alpha I think is ok to bring breaking changes, otherwise we should log a warning message that THANOS_LOCAL_MAX_OUTPUT_CHARS is deprecated.

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.

[Suggestion] local max output chars name change

2 participants