feat(research): short, human-readable experiment ids (EXP-XXXXXXXX)#694
Merged
Merged
Conversation
Experiment ids were sanitize(name)[:50] + "_" + UUID, e.g. Echo_on_Jun_14,_2026_9:36_PM_96aa3cbd-..., which mashed the name and a uuid into the primary key and the portal URL. Generate a short, URL-safe, collision-checked code instead (e.g. EXP-7QK2F9MX) via AiravataUtils.getReadableId, keeping the name as the separate experiment_name field. Only new experiments are affected; the id stays a varchar PK so existing ids and all FK references keep working. The portal already routes by experiment_id, so URLs become /workspace/experiments/EXP-7QK2F9MX/ with no portal change. The two tests that asserted the id embeds the normalized name now assert the new contract: a short EXP- code, with the experiment name preserved verbatim.
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.
Summary
Experiment ids were generated as
sanitize(name)[:50] + "_" + UUID— e.g.Echo_on_Jun_14,_2026_9:36_PM_96aa3cbd-6ff9-4664-970e-30a803e03a6c— mashing the experiment name and a uuid into the primary key, which is also the portal's URL identifier.This generates a short, URL-safe, collision-checked code instead (e.g.
EXP-7QK2F9MX) and keeps the human name in the separateexperiment_namefield.Changes
AiravataUtils.getReadableId(prefix)—<prefix>-XXXXXXXXfrom an unambiguous Crockford-style alphabet (no0/1/I/L/O).ExperimentRepository.addExperiment()— mintEXP-…and regenerate on the (vanishingly rare) collision via the existingisExperimentExist().experiment_nameis untouched.experiment_idstays avarchar(255)PK, so existing ids and all FK references (PROCESS/EXPERIMENT_STATUS/EXPERIMENT_ERROR) keep working. Only new experiments are affected.EXP-code, with the experiment name preserved verbatim (it was previously mangled into the id).AiravataUtils.getId()is unchanged (projects/applications/tasks/processes still use it; they aren't URL-facing).Why it's safe
A cross-repo sweep found no code that parses the name/uuid out of
experiment_id. The Django portal needs no change — it already routes byexperiment_id([^/]+), andEXP-7QK2F9MXis URL-safe.Test plan
/workspace/experiments/EXP-7TF68CM7/, with the name preserved as "Echo on Jun 15, 2026 12:18 AM", status LAUNCHED.🤖 Generated with Claude Code