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.
tdprajwal
force-pushed
the
feat/71-registry-federation-fields
branch
from
October 9, 2026 09:10
4b3f191 to
eeb65f5
Compare
This was referenced Oct 12, 2026
#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.
tdprajwal
force-pushed
the
feat/71-registry-federation-fields
branch
from
October 15, 2026 10:36
7f91a05 to
27e97ee
Compare
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.
tdprajwal
added a commit
that referenced
this pull request
Oct 21, 2026
…nAgriNet/network-adapter#74] setup.py registers one Participant for BECKN_NETWORK_ID, role [consumer, network, provider], with one keypair the three adapters share. The entry's osid is the adapters' key id. Takes the Participant schema from helmcharts #74, so BECKN_NETWORK_ID must be a DNS name; .env.example follows.
Member
|
@tdprajwal - Please simplify the PR description. I can't read it. |
Author
|
I will be raising this partcular #74 PR on a new PR |
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
Extends the registry's
Participantschema with the fields federation needs,lets
rolehold a list, records peer admission per direction, and fixesPublicKeyso node records can be updated.Four commits, rebase-merge friendly:
feat—roleaccepts a single value or a list; new optional fieldsfederationRole,revision,schemaPacks(https URLs) andprojectionTtl(seconds, 0 = live query only).fix—PublicKeydeclares the five system fields Sunbird RC stamps onevery stored key (
osid,osCreatedAt,osCreatedBy,osUpdatedAt,osUpdatedBy), keepingadditionalProperties: false.osOwneris left out:the registry never sets it on a key.
fix— dropsselffromfederationRole: a network recognises its ownentry from its configuration, so a stored value is redundant.
feat—federationRolebecomes a per-direction admission record: anobject with optional
sourceandrequesterhalves, replacing thesource/requester/bothstring (both halves present = both). Each halfcarries its own
schemaPacks(moved from the top level),descriptorRevision,admittedAtandupdatedAt.federationRoleisremoved from
indexFields, as it is no longer a scalar.Resulting shape, on Network A's entry for Network B:
Why
Our Network Descriptor (#82, for OpenAgriNet/network-adapter#74) is built
from our own registry entry, and admitting a peer
(OpenAgriNet/network-adapter#75) writes one; the schema had nowhere to store
either.
The architecture doc stores admission independently for each direction:
"An A-to-B interaction requires Network A to admit Network B as a source and
Network B to admit Network A as a requester", and the admission record
"retains the peer networkId, Descriptor revision and digest, ... time". A
single string could not hold a different pack list, revision or time per
direction.
descriptorRevisionis the revision a direction was admitted against,distinct from the top-level
revision(the latest verified). A Descriptorupdate "does not silently grant or widen admission", so a top-level
revisionabovedescriptorRevisionmarks a peer due for review.admittedAtis the admission time kept as evidence; each direction may beadmitted at a different time.
updatedAtis when the admission decision last changed, set by us on thedecision, unlike
osUpdatedAt, which the registry stamps on any write.Separately, every update of a
noderecord was failing: on a PUT, Sunbird RCre-validates the stored keys, which carry its own system fields the schema did
not allow. That would have made refreshing an admitted peer, or rotating a
key, impossible. The same applies to the nested
federationRoleobjects, sothey declare the same system fields.
federationRoleas a string never shipped onmain, so replacing it needs nodata migration. Any dev deployment that ran an earlier commit of this branch
and stored a string
federationRolemust clear that field before updatingthe record.
Testing
entries).
schema → restart), first three commits:
roleread and update; root and keyosidunchanged
role, http schema pack, negativeprojectionTtl,revision0validUnitl, unknown key fields, unknownalg,and a client-supplied
osOwnerare refusedrolesearch withcontainsmatches both shapesfederationRole:sourceonly, halves carrying registryos*fields
"both", an empty{}, an unknown half(
sourse), an unknown field inside a half, a half withoutadmittedAt,descriptorRevision0federationRole,22/22:
osidand theos*audit fields onfederationRoleand on each halfrevisionis accepted; the halvesand their
osidare unchangedsourcehalf (descriptorRevision,updatedAt)is accepted
source-only peer, and a non-federated peer with a single-valuerole, create and update"both", an empty{}, an unknown half, anunknown field in a half, a half missing
admittedAtordescriptorRevision,descriptorRevision0, a non-dateadmittedAtorupdatedAt, an http schema packrolesearch withcontainsreturns only the matching peersNotes for rollout
sunbird-registry-serviceto load the schema.rolewithcontains, noteq, which misses a list.halves'
osidrecreates them: newosid, resetosCreatedAt, and a halfleft out of the body is dropped.
admittedAtsurvives this, which is whyit is ours and not the registry's
osCreatedAt.schemaPacksis still accepted and stored, becauseParticipantallows additional properties; nothing reads it. Clientswritten against the earlier commit must move it into a half.
quick-start/config/registry/needsgit add -u: theregistry/rule in.gitignorematches the folder, thoughthe files are tracked.
Follow-ups (not in this PR)
sunbirdRegistryplugin readsroleas a singlestring; it must accept a list before Admit a peer network network-adapter#75 writes
one.
charts/registry/files/schemas/Participant.json,is out of date; tracked in Helmcharts and automation changes for network of network #73.
status(Candidate/PendingReview/Active/Suspended/Rejected/Retired) so onedirection can be suspended alone; a top-level
descriptorDigestto refusesame-revision-different-content; the peer's governance trust anchor; and
moving
projectionTtlintosource, the only direction it applies to.Closes #71