The exposureId value in visitInfo is not a visit-exposure level identifier, but rather a ccd-exposure level identifier (see docstring for obs.base.CameraMapper._computeCcdExposureId() for the only place where this seems to be specified). Thus, it should not be included in visitInfo, which is only things that are common across the visit.
We do need a visit-exposure level identifier to be included in visitInfo, so that we can link exposures within visits without using the butler (e.g. without dataRef.dataId['visit']). This RFC likely requires that makeRawVisitInfo() adds the butler visitId to the new visitInfo.visitId, unless there is some other way to access the visitId value besides the above butler call.
- Move exposureId from VisitInfo into ExposureInfo.
- Add visitId to VisitInfo, and include it as part of makeRawVisitInfo.
- Document the meaning of exposureId to be clear that it is per-ccd.
- Document whether visitId can be derived from exposureId, or whether those are decoupled.
- Document the meaning of visitId to be clear that it is per-visit.
See this discussion that generated this RFC: