Skip to content

Improve configuration state tracking (Unset values) and hot reload #94

@bashandbone

Description

@bashandbone

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions