-
Notifications
You must be signed in to change notification settings - Fork 40
feat(lib): implement diff reconciler for feature moves and splits #2112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+597
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jcscottiii
added a commit
that referenced
this pull request
Dec 22, 2025
Architecturally refactors the event producer's diffing component. The new `FeatureDiffer` is now a generic orchestrator that is decoupled from any specific diff version via a set of interfaces: - `StateCompareWorkflow`: Encapsulates the business logic of diffing. - `StateAdapter`: Handles loading/saving versioned state snapshots. - `DiffSerializer`: Handles serializing the final diff result. This new design is more testable, maintainable, and makes it much easier to introduce new diff versions in the future. It also includes updates to the worker types to support the new event summary generation. Also deletes the old, now-redundant comparator and reconciler logic. (will now use the updated versions in #2111 and #2112)
jcscottiii
added a commit
that referenced
this pull request
Dec 23, 2025
Architecturally refactors the event producer's diffing component. The new `FeatureDiffer` is now a generic orchestrator that is decoupled from any specific diff version via a set of interfaces: - `StateCompareWorkflow`: Encapsulates the business logic of diffing. - `StateAdapter`: Handles loading/saving versioned state snapshots. - `DiffSerializer`: Handles serializing the final diff result. This new design is more testable, maintainable, and makes it much easier to introduce new diff versions in the future. It also includes updates to the worker types to support the new event summary generation. Also deletes the old, now-redundant comparator and reconciler logic. (will now use the updated versions in #2111 and #2112)
jrobbins
approved these changes
Dec 26, 2025
98479b0 to
37f68dc
Compare
Moves the reconciliation logic from the old `event_producer` into the new `lib/blobtypes/featurelistdiff/v1` package. The `ReconcileHistory` function enriches a simple diff by detecting when a "removed" feature was actually moved or split into other features. It does this by querying the database for the history of the removed feature ID. This makes the final diff notifications much more semantic and user-friendly. This logic already exists in https://github.com/GoogleChrome/webstatus.dev/blob/29de49913acfeefef7ce28ae95d3801ccb605253/workers/event_producer/pkg/differ/reconciler.go. But to prevent too many changes at once, it will be removed in the future. Part of #2107 Split up of #2106
5a4fe62 to
4e635e3
Compare
jcscottiii
added a commit
that referenced
this pull request
Dec 28, 2025
Architecturally refactors the event producer's diffing component. The new `FeatureDiffer` is now a generic orchestrator that is decoupled from any specific diff version via a set of interfaces: - `StateCompareWorkflow`: Encapsulates the business logic of diffing. - `StateAdapter`: Handles loading/saving versioned state snapshots. - `DiffSerializer`: Handles serializing the final diff result. This new design is more testable, maintainable, and makes it much easier to introduce new diff versions in the future. It also includes updates to the worker types to support the new event summary generation. Also deletes the old, now-redundant comparator and reconciler logic. (will now use the updated versions in #2111 and #2112)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 28, 2025
) Architecturally refactors the event producer's diffing component. The new `FeatureDiffer` is now a generic orchestrator that is decoupled from any specific diff version via a set of interfaces: - `StateCompareWorkflow`: Encapsulates the business logic of diffing. - `StateAdapter`: Handles loading/saving versioned state snapshots. - `DiffSerializer`: Handles serializing the final diff result. This new design is more testable, maintainable, and makes it much easier to introduce new diff versions in the future. It also includes updates to the worker types to support the new event summary generation. Also deletes the old, now-redundant comparator and reconciler logic. (will now use the updated versions in #2111 and #2112)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moves the reconciliation logic from the old
event_producerinto the newlib/blobtypes/featurelistdiff/v1package.The
ReconcileHistoryfunction enriches a simple diff by detecting when a "removed" feature was actually moved or split into other features. It does this by querying the database for the history of the removed feature ID. This makes the final diff notifications much more semantic and user-friendly.This logic already exists in https://github.com/GoogleChrome/webstatus.dev/blob/29de49913acfeefef7ce28ae95d3801ccb605253/workers/event_producer/pkg/differ/reconciler.go. But to prevent too many changes at once, it will be removed in the future. (And if we do a simple move, things would not compile)
Part of #2107
Split up of #2106