-
Notifications
You must be signed in to change notification settings - Fork 1
revert: agent/user profile Creatives (Subsystem A) and creator-admin share #1438
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
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
39 changes: 0 additions & 39 deletions
39
engines/collavre/app/models/concerns/collavre/has_profile_creative.rb
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an inbox Creative is updated through
update_metadatawith a payload that omitskind(for example a stale/API payload, or a user removing it from the metadata editor), this list no longer preserves the existingdata["kind"]. The save then makes the row stop matchingCreative.inboxes/inbox?, so laterCreative.inbox_for(user)won't find the existing inbox and will create a duplicate, breaking inbox-specific notification/topic behavior for that user.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified — the mechanism is real, and fixed in
18e05b5e. One correction on framing: this is a pre-existing bug, not a regression this revert introduces.data["kind"] == "inbox"and theCreative.inboxesscope both predate #1412, andkindwas not inBUILTIN_RESERVED_METADATA_KEYSbefore it (25184c9f^line 12:%w[markdown_source content_type editor]). #1412 addedkindthere as an independent fix that happened to ride along with the profile-creative work. So the revert restores the pre-#1412 state faithfully — including this bug.But the chain you describe is real and live on
maintoday:update_metadatareplacesdatawholesale and only carries over reserved keys, so a payload omittingkinddrops the row out ofCreative.inboxes→inbox_forno longer finds it → duplicate inbox → that user's inbox notifications and Main-topic behavior split across two rows.Since the reservation is orthogonal to the design being rolled back, I kept it rather than re-introducing the bug: once the profile/skill discriminators are reverted,
kindonly ever takes the value"inbox", so reserving it is exactly the inbox-preserving semantic and carries none of the reverted design. This is a deliberate one-word deviation from a pure revert, called out in the commit message.Regression test (
update_metadata preserves the inbox kind so the inbox stays discoverable): creates the user's inbox, PATCHes metadata with a payload omittingkind, asserts the row still matchesinbox?, that unrelated keys still save, and thatinbox_forreturns the same id with no new inbox row. RED without the reservation (inbox creative lost data["kind"] on a metadata save), GREEN with it. Engine models + controllers: 831 runs, 0 failures; rubocop clean.