refactor(mirrors): drop denormalized ProductMirror.storage_type - #454
Closed
alukach wants to merge 1 commit into
Closed
refactor(mirrors): drop denormalized ProductMirror.storage_type#454alukach wants to merge 1 commit into
alukach wants to merge 1 commit into
Conversation
Nothing branched on `storage_type`: the data proxy keys off the connection's `details.provider`, and the only source.coop consumer was a display label. It was a denormalized copy of the provider, bridged by a cast. Remove the field and derive the label from the connection instead. - Drop `storage_type` from ProductMirrorSchema; stop writing it in createProduct / addProductMirror (removes both provider→storage_type casts and the DataProvider ⊆ storage_type invariant test they needed). - Mirror "Type" label now reads the provider from connectionInfo (sourced from the connection's details.provider on the edit page). - No migration: ProductMirrorSchema is a plain z.object, so existing records that still carry storage_type parse fine (unknown key stripped). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Claude finished @alukach's task in 1m 29s —— View job Reviewing PR #454
✅ No blocking issues — safe to merge.
One minor (non-blocking) behavior note for awareness, not a regression introduced by sloppy code:
|
Contributor
Author
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
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.
Stacked on #453 (base is
fix/gcs-provider-alignment) — review/merge that first; GitHub will retarget this tomainonce it lands.Why
Nothing branched on
storage_type: the data proxy keys off the connection'sdetails.provider, and the only source.coop consumer was a display label. It was a denormalized copy of the provider, bridged by a cast. This removes the field entirely — dissolving the "two vocabularies" problem rather than just aligning it.Changes
storage_typefromProductMirrorSchema; stop writing it increateProduct/addProductMirror(removes both provider→storage_type casts and the invariant test they needed).connectionInfo(sourced from the connection'sdetails.provideron the edit page).ProductMirrorSchemais a plainz.object, so existing records still carryingstorage_typeparse fine (unknown key stripped).Verification
tscclean ·jestaffected suites 116/116 · lint clean on changed files.🤖 Generated with Claude Code