Skip to content

Conversation

@emyller
Copy link
Contributor

@emyller emyller commented Oct 30, 2025

Contributes to #111.

Context: #109 (comment)

@emyller emyller requested a review from a team as a code owner October 30, 2025 22:45
@emyller emyller requested review from khvn26 and removed request for a team October 30, 2025 22:45
@emyller emyller self-assigned this Oct 30, 2025
@emyller
Copy link
Contributor Author

emyller commented Oct 30, 2025

  1. In src/Utils/Mappers.php, consider removing feature ID from overridesKey key.

Attempted in bd26178. @gagantrivedi What's the benefit you see from this? Or please let me know if I didn't follow correctly.

  1. Consider renaming flagsmith_id segment and feature metadata fields to id.

Done in 31280ca. However, the rationale that supports flagsmith_id is based on the engine being, at least to an inspirational level, agnostic to the vendor. So metadata isn't assumed to be Flagsmith metadata, hence flagsmith_id was chosen by the Flagsmith client — I believe a bit of namespacing looks nicer indeed. @gagantrivedi Unless you have a good argument here (I'm very open), I'd like to revert this commit, and suggest some team thought towards making it consistent across SDKs. cc @khvn26 @Zaimwa9 Please weigh in if you'd like.

@gagantrivedi
Copy link
Member

  1. In src/Utils/Mappers.php, consider removing feature ID from overridesKey key.

Attempted in bd26178. @gagantrivedi What's the benefit you see from this? Or please let me know if I didn't follow correctly.

Sorry, I don’t see much value in this anymore. I think my point was that it’s used to generate a unique combination, but a unique combination can be generated without the feature ID. To sum it all up, feel free to ignore this comment.

@gagantrivedi
Copy link
Member

Done in 31280ca. However, the rationale that supports flagsmith_id is based on the engine being, at least to an inspirational level, agnostic to the vendor. So metadata isn't assumed to be Flagsmith metadata, hence flagsmith_id was chosen by the Flagsmith client — I believe a bit of namespacing looks nicer indeed. @gagantrivedi Unless you have a good argument here (I'm very open), I'd like to revert this commit, and suggest some team thought towards making it consistent across SDKs. cc @khvn26 @Zaimwa9 Please weigh in if you'd like.

My only concern is that this added some cognitive overhead during the review—I had to look up its origin and usage to understand it's just the feature ID

@emyller
Copy link
Contributor Author

emyller commented Oct 31, 2025

Sorry, I don’t see much value in this anymore. I think my point was that it’s used to generate a unique combination, but a unique combination can be generated without the feature ID. To sum it all up, feel free to ignore this comment.

I agree there's no much value in the code change per se, but I do think it's still a valid point to make, especially because it makes it clearer that feature names are indeed unique (per project). I've seen several places in the code where this isn't assumed (sorry I don't have any examples ready), perhaps because it's not clear anywhere in the data model. Therefore, I vouch to keep this change.

@emyller
Copy link
Contributor Author

emyller commented Oct 31, 2025

My only concern is that this added some cognitive overhead during the review—I had to look up its origin and usage to understand it's just the feature ID

I see. That's a good point. I think this is yet another consequence of our own rushing through this SDK work without a clear roadmap. I also think we should agree on the field naming, for the sake of consistency across code bases and team alignment.

Given my argument above, which is admittedly based on my own assumption, I'd vote towards flagsmith_id.

@emyller
Copy link
Contributor Author

emyller commented Oct 31, 2025

I also think we should agree on the field naming, for the sake of consistency across code bases and team alignment.

We soft-decided on id, based on a vote between the available engineers involved with this topic. In that case, this patch is ready to go.

Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@emyller emyller merged commit 1eaa8e4 into main Oct 31, 2025
5 checks passed
@emyller emyller deleted the refactor/nits-from-context-work-review branch October 31, 2025 19:11
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.

4 participants