Add HistoricalOwnership foundation for tracking gem ownership history - #6699
Open
nevinera wants to merge 7 commits into
Open
Add HistoricalOwnership foundation for tracking gem ownership history#6699nevinera wants to merge 7 commits into
nevinera wants to merge 7 commits into
Conversation
nevinera
force-pushed
the
nev/6534/historical-ownership-foundation
branch
from
July 16, 2026 20:38
c19e19b to
d810c95
Compare
Author
|
(see draft PRs at nevinera#1 and nevinera#2 for usage intent and screenshots) |
jenshenny
self-requested a review
July 27, 2026 21:52
colby-swandale
self-requested a review
August 7, 2026 02:04
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.
Purpose
Create, maintain, and backfill a
HistoricalOwnershipmodel, tracking that user X has ever owned/maintained gem Y.Approach
historical_ownershipstable and matching model that represents the fact that a user at some point owned a particular gem.HistoricalOwnership.roles_below(role)method for clarity. (Those roles actually have numerically increasing ordering - if that's intended and part of the semantic contract, I can drop this and just rely on that ordering)It's worth noting that, while the PRs should be considered and reviewed together, this PR needs to land (and its backfill finish) before the other two are merge-safe.
Decisions
Still pending are the updates to the user profile and gems#show/index to reflect the historical stats rather than the current ones, and expose historical owners and historically owned gems as appropriate. I don't think "alumni" is a term of art for this concept/context - I'd propose "Prior Owner Of", and "Prior Owners", but I have reservations about displaying an actual second list on the same page (mostly about behavioral confusion, since we don't appear to have implemented pagination here on the existing lists)
(Slice 1 of ~3 for #6534)