Unable to access work items after project rename and group move
Project namespace parent_id and traversal_ids not updated after project transfer
Summary
After gitlab-org/theseus was transferred into a newly created gitlab-org/theseus group (and renamed back to theseus, giving gitlab-org/theseus/theseus), the project's work items became inaccessible via the work item list. The issues themselves are not lost, but the project namespace record was left in an inconsistent state: parent_id and traversal_ids on the namespaces row still point at the old parent.
Steps taken that led to this
On 2026-08-06 19:34 UTC:
gitlab-org/theseus(project) renamed totheseus_tmp- New group
gitlab-org/theseuscreated - Project transferred into the new group
- Project renamed back to
theseus, givinggitlab-org/theseus/theseus
Current state
project(fullPath: "gitlab-org/theseus/theseus") returns issues as expected. namespace(fullPath: "gitlab-org/theseus/theseus") returns null, which is what the work item list uses, so the work items list renders empty.
The namespaces data looks like this:
id |
parent_id |
traversal_ids |
path |
type |
|---|---|---|---|---|
9970 |
{9970} |
gitlab-org |
Group | |
132612787 |
9970 |
{9970,132612787} |
theseus |
Project |
139145892 |
9970 |
{9970,139145892} |
theseus |
Group |
The project namespace (132612787) should have parent_id = 139145892 and traversal_ids = {9970,139145892,132612787}. Instead it still sits directly under gitlab-org.
Hypothesis
The transfer updated projects.namespace_id and the routes record, but the project namespace's parent_id / traversal_ids were never synced. That sync is application-level (Project#ensure_project_namespace_in_sync), so whatever performed the transfer either bypassed or failed that step.
Open questions:
- Is this a race condition between the rename and the transfer? Both happened within minutes of each other, and we have been moving these operations to async workers recently.
- Did the group and project sharing the same path (
theseus) contribute? Renaming the project totheseus-docsand back did not resolve it, so a plain rename does not re-trigger the sync. traversal_idsare repopulated by a separate worker. TheWorkItems::TraversalIdsHealingCronWorker(FFwork_items_traversal_ids_healing_service,default_enabled: true) has not healed this, which suggests the root cause is upstream ofissues.namespace_traversal_ids— ie. the namespace hierarchy itself is wrong, not just the denormalised column on issues.
Proposed next steps
- Get
rails-roaccess on production via Teleport and confirm the state of thenamespacesandroutesrecords forgitlab-org/theseus/theseus. - Confirm whether
Namespace.find_by_full_path('gitlab-org/theseus/theseus')resolves at all, and if not, whether theroutesrecord is also affected. - Correct the data for this project so the customer's work items are visible again.
- Identify the code path that skipped
ensure_project_namespace_in_syncand determine whether other projects are affected. If so, quantify the blast radius with a query for project namespaces whoseparent_iddoes not match their project'snamespace_id. - Fix the underlying transfer path and add regression coverage.
Impact
Work items are invisible in the UI for any affected project. We do not yet know whether gitlab-org/theseus/theseus is the only one.