Adopt location registry durable contract

This commit is contained in:
2026-08-05 19:05:42 +00:00
parent 2f61118e78
commit c006b163d5
41 changed files with 196 additions and 196 deletions

View File

@@ -155,16 +155,16 @@ func TestResolverReusesEquivalentCanonicalRegistries(t *testing.T) {
}
}
func registryFixture() dnd.LocationList {
func registryFixture() dnd.LocationRegistry {
firstRefs := []source.SourceRef{{SourceID: "session-alpha", StartUnitID: 1, EndUnitID: 1}}
secondRefs := []source.SourceRef{{SourceID: "session-alpha", StartUnitID: 2, EndUnitID: 2}}
return dnd.LocationList{Locations: []dnd.Location{
return dnd.LocationRegistry{Locations: []dnd.Location{
{ID: identity.DeriveID("The Tavern", firstRefs), Name: "The Tavern", SourceRefs: firstRefs},
{ID: identity.DeriveID("The Tavern", secondRefs), Name: "The Tavern", SourceRefs: secondRefs},
}}
}
func resolveList(t *testing.T, list dnd.LocationList) *Registry {
func resolveList(t *testing.T, list dnd.LocationRegistry) *Registry {
t.Helper()
registry, err := Resolve(referenceSet(item(encodeList(t, list))))
if err != nil {
@@ -173,7 +173,7 @@ func resolveList(t *testing.T, list dnd.LocationList) *Registry {
return registry
}
func encodeList(t *testing.T, list dnd.LocationList) []byte {
func encodeList(t *testing.T, list dnd.LocationRegistry) []byte {
t.Helper()
content, err := locationcodec.New().Encode(list)
if err != nil {