remove twoCharacterId from codebase#3195
Open
bcb37 wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the twoCharacterId field from the Upgrade experiment domain across frontend + backend, including data models/DTOs, service logic, and test fixtures, and introduces a DB migration to drop the column from persisted tables.
Changes:
- Removed
twoCharacterIdfrom frontend experiment models and related unit-test mock data. - Removed
twoCharacterIdfrom backend entities/DTO validators and deleted the backend logic/repository methods that generated/queried unique 2-character identifiers. - Added a TypeORM migration to drop
twoCharacterIdfromdecision_pointandexperiment_condition.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/frontend/projects/upgrade/src/testing/test.mock.data.ts | Removes twoCharacterId from frontend test mock experiment payloads. |
| packages/frontend/projects/upgrade/src/app/core/experiments/store/experiments.selector.spec.ts | Updates selector tests to no longer include twoCharacterId in mocked conditions. |
| packages/frontend/projects/upgrade/src/app/core/experiments/store/experiments.model.ts | Removes twoCharacterId from frontend experiment condition/decision point interfaces/DTOs. |
| packages/frontend/projects/upgrade/src/app/core/experiments/condition-helper.service.spec.ts | Updates condition factory used by tests to stop generating twoCharacterId. |
| packages/backend/test/unit/services/ExperimentService.test.ts | Updates service unit tests by removing mocks tied to identifier generation. |
| packages/backend/test/unit/repositories/ExperimentConditionRepository.test.ts | Removes repository tests that exercised getAllUniqueIdentifier() and test setup using twoCharacterId. |
| packages/backend/test/unit/repositories/DecisionPointRepository.test.ts | Removes repository tests that exercised getAllUniqueIdentifier(). |
| packages/backend/test/unit/mockdata/raw.ts | Removes twoCharacterId from backend unit-test mock experiment payloads. |
| packages/backend/test/integration/PreviewExperiment/DeletePreviewAssignmentsWithExperimentUpdate.ts | Updates integration test data to omit twoCharacterId. |
| packages/backend/test/integration/mockData/experiment/raw.ts | Removes twoCharacterId from integration mock experiment payloads. |
| packages/backend/test/integration/mockData/experiment/index.ts | Removes twoCharacterId from integration mock experiment variations. |
| packages/backend/test/integration/Experiment/update/UpdateExperiment.ts | Updates integration test to stop sending/asserting twoCharacterId for conditions/partitions. |
| packages/backend/test/integration/Experiment/onlyExperimentPoint/NoPartitionPoint.ts | Updates integration test payloads to omit twoCharacterId. |
| packages/backend/test/integration/Experiment/createWithDecimal/DecimalAssigmentWeight.ts | Updates integration test payloads to omit twoCharacterId. |
| packages/backend/test/integration/Experiment/conditionAndPartition/Partition.ts | Updates assertions to stop expecting twoCharacterId on partitions. |
| packages/backend/test/integration/Experiment/conditionAndPartition/Condition.ts | Updates assertions to stop expecting twoCharacterId on conditions. |
| packages/backend/src/database/migrations/1782416524885-remove-twoCharacterId.ts | Adds migration that drops twoCharacterId columns from DB tables. |
| packages/backend/src/api/services/ExperimentService.ts | Removes twoCharacterId generation/deduplication logic during import/create/update flows. |
| packages/backend/src/api/repositories/ExperimentConditionRepository.ts | Removes getAllUniqueIdentifier() repository helper. |
| packages/backend/src/api/repositories/DecisionPointRepository.ts | Removes getAllUniqueIdentifier() repository helper. |
| packages/backend/src/api/models/ExperimentCondition.ts | Removes persisted/validated twoCharacterId column from the entity. |
| packages/backend/src/api/models/DecisionPoint.ts | Removes persisted/validated twoCharacterId column from the entity. |
| packages/backend/src/api/DTO/ExperimentDTO.ts | Removes twoCharacterId from validators and related validation imports. |
| packages/backend/src/api/controllers/ExperimentController.ts | Updates OpenAPI docs to stop documenting twoCharacterId for import/list schemas. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This was
linked to
issues
Jun 25, 2026
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.
No description provided.