Skip to content

Conversation

@jcscottiii
Copy link
Collaborator

@jcscottiii jcscottiii commented Dec 22, 2025

Introduces the version 1 data contracts for two new blob types:

  • FeatureList: Represents the full state of a feature search result at a point in time.

  • FeatureListDiff: Represents the delta between two feature list snapshots, capturing added, removed, modified, moved, and split features. Additonally, added some helpers that will be useful in the future.

Note: Some of these changes already exist in

// Sort orders all slices deterministically by Name (primary) and ID (secondary).
// This ensures stable JSON output and organized UI/Email lists.
func (d *FeatureDiff) Sort() {
sort.Slice(d.Added, func(i, j int) bool {
if d.Added[i].Name != d.Added[j].Name {
return d.Added[i].Name < d.Added[j].Name
}
return d.Added[i].ID < d.Added[j].ID
})
sort.Slice(d.Removed, func(i, j int) bool {
if d.Removed[i].Name != d.Removed[j].Name {
return d.Removed[i].Name < d.Removed[j].Name
}
return d.Removed[i].ID < d.Removed[j].ID
})
sort.Slice(d.Modified, func(i, j int) bool {
if d.Modified[i].Name != d.Modified[j].Name {
return d.Modified[i].Name < d.Modified[j].Name
}
return d.Modified[i].ID < d.Modified[j].ID
})
sort.Slice(d.Moves, func(i, j int) bool {
if d.Moves[i].FromName != d.Moves[j].FromName {
return d.Moves[i].FromName < d.Moves[j].FromName
}
return d.Moves[i].FromID < d.Moves[j].FromID
})
sort.Slice(d.Splits, func(i, j int) bool {
if d.Splits[i].FromName != d.Splits[j].FromName {
return d.Splits[i].FromName < d.Splits[j].FromName
}
return d.Splits[i].FromID < d.Splits[j].FromID
})
// Also sort the targets within a Split
for k := range d.Splits {
to := d.Splits[k].To
sort.Slice(to, func(i, j int) bool {
if to[i].Name != to[j].Name {
return to[i].Name < to[j].Name
}
return to[i].ID < to[j].ID
})
}
}
. But to prevent too many changes at once, they will be removed in the future.

These types define the schema for data that will be persisted in blob storage.

Part of #2107

Split up of #2106

@jcscottiii jcscottiii force-pushed the jcscottiii/canonical-diff-types branch from 68b48ea to a13eeb7 Compare December 28, 2025 13:53
Base automatically changed from jcscottiii/canonical-diff-types to main December 28, 2025 14:49
Introduces the version 1 data contracts for two new blob types:

- `FeatureList`: Represents the full state of a feature search
  result at a point in time.

- `FeatureListDiff`: Represents the delta between two feature list
  snapshots, capturing added, removed, modified, moved, and split
  features. Additonally, added some helpers that will be useful in the future.

These types define the schema for data that will be persisted in blob
storage.

Part of #2107

Split up of #2106
@jcscottiii jcscottiii enabled auto-merge December 28, 2025 14:52
@jcscottiii jcscottiii added this pull request to the merge queue Dec 28, 2025
Merged via the queue into main with commit a2d4e32 Dec 28, 2025
8 of 9 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/v1-types branch December 28, 2025 16:06
@jcscottiii jcscottiii linked an issue Jan 5, 2026 that may be closed by this pull request
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.

[ENHANCEMENT] Decouple storage types from generated backend enums

2 participants