ontology: register AI Weed Library field & observation schemas (v2) - #1132
Open
stelsp wants to merge 1 commit into
Open
ontology: register AI Weed Library field & observation schemas (v2)#1132stelsp wants to merge 1 commit into
stelsp wants to merge 1 commit into
Conversation
Nine draft-07 JSON Schemas written by the AI Weed Library platform (Dutch crop-field map viewer): LogicalField, FieldBoundary, FieldClaim, FieldLink, Observation, ObservationRelation, MediaAsset, plus two app-profile types, ObservationAttributes (per-observation agronomic attributes and access policy sidecar) and FieldAccessGrant (field-share mechanics, v2 keyed on logicalFieldRef). Files are the artifacts emitted from the platform's contracts, added verbatim under services/ontology/schemas/ following the existing one-file-per-schema convention. The schemaIds are already in use by a running deployment and must not be renumbered.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
Registers the nine JSON Schemas written by the AI Weed Library platform (a map viewer for Dutch crop fields: farmers claim fields, upload field photos as observations, and share fields with other eNames; the user's eVault is the source of truth, the platform keeps only derived caches). The platform has been writing these types under the schemaIds below since its v2 data model went live; nothing else on the network can resolve them until they are registered here.
Seven are canonical W3DS agriculture entities implementing the ontology spec articles W-A-15 … W-A-23; two are app-profile types and are labelled as such.
owner/tenant/manager) on a LogicalField, with method + provenance.sourceCrs.type,phenomenonTime(instant or interval),observedBy/uploadedBy, optionalfootprint/pinPoint. No field reference and no files inside it.about/covers/intersects); an observation is valid with zero relations.fileRefto the blob envelope,capturedAt, optional EXIF-derived Point geometry, pixel size.accessLevel+allowedEnames). W-A-19 keeps these out of the Observation payload and there is no canonical home for them yet, so they live in one sidecar envelope per observation.viewer/contributor/manager), canonical-in-owner-vault + reference-in-grantee-vault (isReference,canonicalOwnerEName,canonicalEnvelopeId). Version 2 of the platform's grant, keyed onlogicalFieldRef. Access mechanics, deliberately outside the canonical ontology.schemaId ↔ file
a1abfd8e-4f0a-4c1d-98de-f351586c03e8services/ontology/schemas/logicalField.json207a6b1a-19b4-468d-9641-68ba661c2291services/ontology/schemas/fieldBoundary.jsonf577eb36-8230-494d-866b-45af25e83f16services/ontology/schemas/fieldClaim.json339723ce-4771-48d6-a7e1-a0fdf736d584services/ontology/schemas/fieldLink.jsona9723f8c-9aa1-48ff-9698-9447353736c3services/ontology/schemas/observation.json772ea2b3-82e7-4ce3-9a4d-a4445c57bd6cservices/ontology/schemas/observationRelation.jsonbef1033f-ecbd-4ffd-a36a-e30fe521f2efservices/ontology/schemas/observationAttributes.json65586839-24ad-4875-921e-578e3c284a0fservices/ontology/schemas/mediaAsset.json63d0e376-2522-4799-b82d-990267965dd9services/ontology/schemas/fieldAccessGrant.jsonThese ids are already in use by a running deployment — envelopes carrying them exist in eVaults and the platform's AaaS subscriptions route on them — so please do not renumber them. They were generated as random UUIDv4s and collide with nothing in
schemas/(checked: 64 unique ids, 64 unique titles after this change).Design rules followed
additionalProperties: falseeverywhere, every field a consumer can rely on listed inrequired.w3ds://<ename>/<envelopeId>strings (logicalFieldRef,boundaryRef,observationRef,fileRef,supersedes); eNames are plain strings.schemaVersion,recordedAt, optionalsupersedes(same-type only; retraction = a superseding record) and optionaldeletedtombstone flag.methodenum (user-confirmed/source-provided/geometry-derived) on claims, links and relations, withconfidence+algorithm+algorithmVersionfor the derived case.dependencies(geometry→geometryProvenance,footprint→footprintType,sourceGeometry→sourceCrs).Two recorded deviations from the spec text
logicalFieldRef) so claims and bindings survive the yearly boundary rollover; FieldBoundary stays the versioned source geometry joined through FieldLink. Everything written carriessupersedeschains, so a canon that lands differently remains survivable.uploadFileoperation already creates aw3ds-file-v1blob envelope per upload (filename, contentType, size, publicUrl, uploadedAt) and dispatches an awareness packet for it, soMediaAsset.fileRefpoints at that blob envelope directly. Writing a File record next to it would duplicate the same data under a second id. This also means the existingFileschema in this registry (a1b2c3d4-…) is not whatfileReftargets.Could an existing schema have carried this?
a1b2c3d4-…) — see deviation 2; MediaAsset is the per-observation link + capture metadata, not a file record.15d24c04-…) — a generic resource/permission grant. FieldAccessGrant is scoped to one LogicalField with a fixed three-role vocabulary and the owner-canonical / grantee-reference envelope pair the platform relies on; forcing it into AccessGrant would lose the role semantics and thelogicalFieldRefjoin. Kept separate and labelled app-profile.Notes for reviewers
domainis set on these files, same as the CallSession, Meshenger and docusigner registrations. If you would like"domain": "agriculture"added, say so and I will add it in this PR.descriptions are not present because the files are machine-emitted artifacts; field semantics are in the spec articles referenced above. Happy to add them if required.Issue Number
n/a
Type of change
How the change has been tested
services/ontologyfrom this branch:Loaded 64 schemas,Loaded 20 domains, zero "missing schemaId" warnings.GET /schemaslists all nine with the titles above;GET /schemas/<id>returns 200 and the exact file content for each of the nine;GET /schema/<id>(viewer) renders; an unknown id still 404s.schemaIdortitleacross the 64 files.To reproduce after merge/redeploy:
curl https://ontology.w3ds.metastate.foundation/schemas/a1abfd8e-4f0a-4c1d-98de-f351586c03e8(and the other eight ids above).Change checklist