HydraIssues

No Perforce typemap on any server: Unreal binary assets are stored by content auto-detect, not policy
open bug Priority: high Project: hydraperforceprovision Reporter: cederik 31 Aug 2026 21:19

Description

Found during hydragon reconnaissance (#615) on 2026-08-31. This affects every Unreal depot we run, not only hydragon.

The problem

There is no Perforce typemap on any of our servers.

  • The old shared server carries only the stock Helix sample typemap. It has no entry for .uasset, .umap, .uexp or .ubulk.
  • hydraperforceprovision ensure-server never sets a typemap, so every scale it creates starts with p4d's empty default.

Without a typemap, p4d guesses the file type from content. Unreal binary assets land as whatever auto-detect decides, not as policy. Observed on the old server: .uasset files stored as binary+x, with no +l exclusive lock.

Why it matters

  1. Corruption. A binary asset that auto-detects as text gets line-ending translation applied. The asset is then silently broken. There is no warning at submit time.
  2. Merge conflicts. Unreal binary assets cannot be merged. Without +l exclusive locking, two people can edit the same asset and one loses the work with no way to reconcile.
  3. Unbounded depot growth. Without a +S rule scoped to build output, packaged builds keep every revision forever. On a shared storage pool that is a live risk, not a tidiness problem.

This is latent today because the existing depots hold mostly finished packages. It becomes real the moment anyone submits Unreal project source, which hydragon Phase 1 (#623) does.

What to do

  1. Author one typemap for Unreal, covering every binary extension, with exclusive locking where Unreal needs it and a +S cap scoped to the build output subtree only. Never a bare +S on .uexp: that purges history for the paired .uasset payload and cannot be undone.
  2. Apply it to the existing scales: galloromeinsmuseum, p4scale-visitflanders, and the old shared server.
  3. Make ensure-server apply it to every new scale, so this cannot recur.
  4. Audit the existing depots for assets already stored with the wrong type.

The typemap applies at p4 add time only. Files already in a depot keep the type they were added with, so step 4 is real work and not optional.

Related: #615 hydragon, #623 Phase 1, #543 ensure-server hardening.