fix: update beta flags tests to expect combined hardcoded + tool flags #23

Merged
code-server merged 1 commits from fix/beta-flags-tests into main 2026-03-05 14:04:05 +01:00
Collaborator

Summary

The AnthropicOAuthProvider always includes hardcoded beta flags (claude-code-20250219, oauth-2025-04-20, context-management-2025-06-27). Tool-specific beta flags are then merged with these and sorted alphabetically. Tests were only checking for tool flags, not the combined result.

Changes

  • Updated test_oauth_utils.py to expect all hardcoded flags
  • Updated test_beta_flags_collected_from_tools to expect combined flags
  • Updated test_multiple_beta_flags_joined to expect combined flags

How Beta Flags Work

  1. OAuth headers start with hardcoded flags: claude-code-20250219,oauth-2025-04-20,context-management-2025-06-27
  2. Tool-specific flags (e.g., computer-use-2025-11-24) are collected
  3. Flags are merged (deduplicated) and sorted alphabetically
  4. Result is a comma-separated string in the anthropic-beta header

Test Results

All 3 beta flags tests now pass

Type

  • Test fixes (beta flag expectations)

🤖 Generated with Claude Code

## Summary The `AnthropicOAuthProvider` always includes hardcoded beta flags (`claude-code-20250219`, `oauth-2025-04-20`, `context-management-2025-06-27`). Tool-specific beta flags are then merged with these and sorted alphabetically. Tests were only checking for tool flags, not the combined result. ## Changes - ✅ Updated `test_oauth_utils.py` to expect all hardcoded flags - ✅ Updated `test_beta_flags_collected_from_tools` to expect combined flags - ✅ Updated `test_multiple_beta_flags_joined` to expect combined flags ## How Beta Flags Work 1. OAuth headers start with hardcoded flags: `claude-code-20250219,oauth-2025-04-20,context-management-2025-06-27` 2. Tool-specific flags (e.g., `computer-use-2025-11-24`) are collected 3. Flags are merged (deduplicated) and sorted alphabetically 4. Result is a comma-separated string in the `anthropic-beta` header ## Test Results ✅ All 3 beta flags tests now pass ## Type - [x] Test fixes (beta flag expectations) 🤖 Generated with Claude Code
code-server added 1 commit 2026-03-05 10:45:08 +01:00
fix: update beta flags tests to expect combined hardcoded + tool flags
Build Nanobot OAuth / cleanup (pull_request) Has been skipped
Build Nanobot OAuth / build (pull_request) Successful in 6m13s
8f8fc81135
The AnthropicOAuthProvider always includes hardcoded beta flags:
- claude-code-20250219
- oauth-2025-04-20
- context-management-2025-06-27

Tool-specific beta flags are then merged with these and sorted
alphabetically. Tests were only checking for tool flags, not the
combined result.

Changes:
-  Updated test_oauth_utils.py to expect all hardcoded flags
-  Updated test_beta_flags_collected_from_tools to expect combined flags
-  Updated test_multiple_beta_flags_joined to expect combined flags

All 3 beta flags tests now pass.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
code-server merged commit 3c681f1639 into main 2026-03-05 14:04:05 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wylab/nanobot#23