Repository navigation
Conversation
Federation needs the registry to record peer networks: our own entry builds the Network Descriptor (#74) and admitting a peer writes one (#75). - role accepts a list as well as a single value, so one participant can serve several layers; a single string stays valid for existing rows - federationRole (self/source/requester/both): our admission decision, never read from a peer's Descriptor; added to indexFields - revision: the Descriptor revision accepted; only increases - schemaPacks: the peer's declared schema pack URLs, https only - projectionTtl: seconds we may retain a peer's data; 0 means live query All fields are optional and no existing rule is tightened, so stored records keep their osid and stay editable.
…ields [#71] On a PUT, Sunbird RC merges osid and the os* audit fields into each stored key before re-validating. PublicKey did not declare them, so every update of a node failed, including the revision bump that refreshes an admitted peer. Declare those five fields and keep additionalProperties false, so typos and unknown key fields are still refused. osOwner is left out: the registry never sets it on a key.
#71] A network recognises its own entry from its configuration, so a stored self value is redundant. federationRole now only records our decision about a peer: source, requester or both.
federationRole is now an object with optional source and requester halves instead of a source/requester/both string; both halves present replaces "both". Each half carries its own schemaPacks (moved from the top level), descriptorRevision, admittedAt and updatedAt, since the design doc stores admission independently for each direction. federationRole drops out of indexFields, as it is no longer a scalar.
An agreement that names no packs covers nothing, yet the registry accepted one, so the mistake only showed up later as refused calls. Both directions now need a schemaPacks list with at least one entry.
tdprajwal
force-pushed
the
feat/71-registry-federation-fields
branch
from
October 24, 2026 08:18
b7611b5 to
b8a408c
Compare
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.
What
Adds federation fields to the
Participantregistry schema:roleaccepts a single value or a list.revision,projectionTtlandfederationRole, which holds asourceand/orrequesteradmission record for each direction. Each direction must name at least one schema pack.PublicKeydeclares the Sunbird RC system fields (osid,os*), so updating a node no longer fails validation.Why
descriptorRevisionis the revision a direction was admitted against. A Descriptor update doesn't widen admission, so a top-levelrevisionhigher thandescriptorRevisionmarks the peer for review.updatedAtrecords when we changed the admission decision, unlikeosUpdatedAt, which the registry sets on any write.A string
federationRolenever reached main, so no migration is needed. A dev deployment that stored one from an earlier commit of this branch must clear the field before updating the record.Testing
Tested on a local registry:
http://schema pack URLs are rejected.schemaPacks, or an empty list, is rejected, on create and on update.Closes #71