Skip to content

Fix inconsistent handling of empty list vs empty string in token normalization#1681

Closed
Copilot wants to merge 2 commits intomulti-token-supportfrom
copilot/sub-pr-1672
Closed

Fix inconsistent handling of empty list vs empty string in token normalization#1681
Copilot wants to merge 2 commits intomulti-token-supportfrom
copilot/sub-pr-1672

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

The token normalization logic treated empty string '' and empty list [] inconsistently. Empty string loaded from param_manager (env var/config file), while empty list filtered to None directly without checking param_manager.

Changes

  • Refactored token normalization to use extract_list_of_str consistently, treating None, '', and [] identically - all load from param_manager
  • Added test coverage for empty list and empty string loading from environment variables
  • Fixed test naming for pytest discovery

Behavior

Before:

configure(token='')   # Loads from LOGFIRE_TOKEN env var ✓
configure(token=[])   # Returns None, ignores env var ✗

After:

configure(token='')   # Loads from LOGFIRE_TOKEN env var ✓
configure(token=[])   # Loads from LOGFIRE_TOKEN env var ✓

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…pty string

Co-authored-by: alexmojaki <3627481+alexmojaki@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 2, 2026

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: fe14352
Status: ✅  Deploy successful!
Preview URL: https://caf6e833.logfire-docs.pages.dev
Branch Preview URL: https://copilot-sub-pr-1672.logfire-docs.pages.dev

View logs

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 2, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED bash --no�� --noprofile (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update to address review feedback on multi-token support Fix inconsistent handling of empty list vs empty string in token normalization Feb 2, 2026
Copilot AI requested a review from alexmojaki February 2, 2026 12:31
@adriangb adriangb closed this Feb 2, 2026
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.

3 participants