the-human-colossus-foundation / oca-spec

Overlay Capture Architecture Specification
European Union Public License 1.2
8 stars 7 forks source link

entry codes in v1 #73

Closed carlyh-micb closed 1 month ago

carlyh-micb commented 1 month ago

For a schema generated using Excel Template with entry codes there is a duplicated entry code in the list (farm in this example). This was user inputted but entry codes should not be duplicated.

Also note that entry codes are not alphabetized like attributes are. If attributes were lexicographically ordered instead of insertion ordered, why should entry codes be different?

{"capture_base":"Ef8dCcIQ9eW3_xAeE7ge_Ufyw4CR0MZuTpL4ghguS37E","digest":"El_WbjdpBMO7zvgMtAO81PFMWSjlg-8AXzop1JHQPg7M","type":"spec/overlays/entry_code/1.0","attribute_entry_codes":{"farm":["A","B","C","D","C"],"samplers":["Aedan","Makhi","Isabella","Nathan","Lila","Zara"]}}

In my testing I created two entry labels for farm C, the parser generated the following, lexicographically ordered this time and it kept the last label (deleting the first instance).

{"capture_base":"Ef8dCcIQ9eW3_xAeE7ge_Ufyw4CR0MZuTpL4ghguS37E","digest":"EGdT6KjFRKZ7Vw87NGHq8fVVg1v8SkBE_DA5URUE3U58","type":"spec/overlays/entry/1.0","language":"en","attribute_entries":{"farm":{"A":"Hensall farm","B":"Guelph farm north","C":"no name farm","D":"Lakeridge farm"},"samplers":{"Aedan":"Aedan","Isabella":"Isabella","Lila":"Lila","Makhi":"Makhi","Nathan":"Nathan","Zara":"Zara"}}}

Entry codes are in an array in the object entry_code. Presumably this is why they remain insertion ordered and no duplicates removed while following https://www.rfc-editor.org/rfc/rfc8785#section-3.2.3.

I propose that we should not allow duplicates of entry codes in the entry code list. I also don't think entry codes should remain as an insertion ordered list. Or if reasons for entry code lists insertion ordering is strong, then attribute ordering should also be insertion ordered because the same reasons should apply.

blelump commented 1 month ago

Ordering is already a topic of discussion: https://github.com/the-human-colossus-foundation/oca-spec/discussions/69 .

Duplicates should be removed.