Description
Two related improvements to types.py for better state tracking and configuration management.
1. Replace Defaults with Unset (types.py:54)
Replace most default values with Unset to better track user-set vs default values.
Current Problem
- Can't distinguish between user-set values and defaults
- Telemetry and configuration merging is ambiguous
Implementation Challenges
- Need to ensure Unset isn't passed to places that don't accept it
- Consider modifying Pydantic serialization to convert Unset → None/missing
- Keep Unset for telemetry serialization
2. Add Hot Reload with Mid-Request Handling (types.py:170)
Implement hot reload for configuration changes with proper mid-request state management.
Requirements
- Detect configuration changes
- Handle ongoing requests gracefully
- Avoid disrupting active operations
- Queue or defer config application
Considerations
- Thread safety for concurrent requests
- Rollback mechanism for bad configs
- Logging and observability
Source
- Files:
types.py:54, types.py:170
- Branch:
003-our-aim-to
Description
Two related improvements to types.py for better state tracking and configuration management.
1. Replace Defaults with Unset (types.py:54)
Replace most default values with
Unsetto better track user-set vs default values.Current Problem
Implementation Challenges
2. Add Hot Reload with Mid-Request Handling (types.py:170)
Implement hot reload for configuration changes with proper mid-request state management.
Requirements
Considerations
Source
types.py:54,types.py:170003-our-aim-to