-
Notifications
You must be signed in to change notification settings - Fork 40
Description
I was looking into the differ logic and realized we're coupled to the generated openapi types for our long-term storage.
Right now, the state blobs rely directly on the generated enums. If we regenerate the backend client and any enum values change (or the order shifts), we risk corrupting existing data in storage. We need to cut that dependency so our storage format is stable.
I'm going to split this work into a few PRs:
-
Define explicit storage types: Create dedicated structs for the serialized blobs (Snapshots and Diffs) that own their own enum definitions, completely separate from the generated backend code.
-
Isolate in-memory types: Move the internal structs we use for diffing logic into a new package lib/workertypes/comparables (naming it comparables to avoid clashing with the standard library interface).
-
Add adapters: Wire up converters to map between the Live API -> Internal Comparable -> Serialized Blob.
This ensures that even if the API schema changes or we regenerate the client, our stored history remains valid.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status