Let's walk through resolving a version given a theoretical channel.
Overview:
Get the project and channel records. Check for a renamed project, verify that the channel and the project match
Verify the version identified by
channel.version. This is a candidate, not yet the selected update.Check the candidate's bulletin. Apply its adoption policy and surface its advisories before selecting the update.
For a selected update, resolve
version.manifestand verify its CID and project. Verify the records against the publisher's signed repository before relying on them.Only then fetch resources according to the manifest
- For blobs, treat their CID as a checksum and validate that they match
- For URL resources, check them against a checksum (that should be provided with their link)
- Apply any other verification practices as mandated by the consumer
Your assets are verifiably what they are claimed to be by the entity making the claim!
Assumptions
For this exercise, we'll refer to a project owned by user @graham.systems with the name trawler. Let's assume that this is a self-updating desktop application.
The client has already been shipped with three pieces of information:
The DID of the project owner; in this case,
did:plc:57od6g2ic3e3b3kauctjmo3k.The name of the project; in this case,
trawler.The default channel for the application to track. We'll use
latestin this example.
1: Resolve the project and channel records
Given the pre-provided components, we can construct fully-formed AT URIs for both the project and the tracked channel. Those look like these:
# Our project URI
at://did:plc:57od6g2ic3e3b3kauctjmo3k/software.release.project/trawler
# Our channel URI
at://did:plc:57od6g2ic3e3b3kauctjmo3k/software.release.channel/trawler:latestYour application will want to resolve these in parallel. Why? The project record could contain rename information—in that case, we'll need to repeat this step given the project URI specified in that record. If no rename has occurred, then we can proceed as planned with the resolved channel.
2: Check whether the channel target can be selected
Suppose latest points to trawler:v1.2.0. Fetch the software.release.version at channel.version.uri, verify that it belongs to this project, and check its record CID against channel.version.cid. To look up its bulletin, take the version URI, keep the DID and rkey, and change only the collection:
at://did:plc:57od6g2ic3e3b3kauctjmo3k/software.release.version/trawler:v1.2.0
at://did:plc:57od6g2ic3e3b3kauctjmo3k/software.release.bulletin/trawler:v1.2.0Suppose the updater saw a withdrawn bulletin yesterday, but today's index lookup returns nothing. That miss does not clear the withdrawal: report yesterday's warning as last known and pause the update. If the publisher's current repository confirms the key is absent at a newer revision, the default now applies: eligible, with no notices or advisories. If the lookup times out instead, current policy is indeterminate; retry rather than installing.
If a bulletin is present, verify it and compare both bulletin.version.uri and bulletin.version.cid with channel.version. On a mismatch, report the integrity problem and stop. An advisory may mention another release, but it does not redirect latest; the updater uses channel.version. Apply the target version's own status:
eligible: The updater may select the candidate. If the bulletin lists advisories, resolve eachsoftware.release.bulletin.eventby its URI and CID, verify that it has the publisher's DID and the same version strong reference, and show the warnings first. For example,v1.2.0can remain eligible while carrying a compatibility warning. If the compatibility advisory cannot be verified or the updater reaches its fetch budget before checking it, report incomplete warnings and pause the update. The verified status is stilleligible. Notices are informational and should not pause adoption.discouraged: Pause the update. After verifying the bulletin and showing any advisories, ask: “The publisher discourages installingtrawlerv1.2.0. Install this version anyway?” Install the verified target only if the user explicitly agrees. If the prompt is dismissed or the updater is unattended, leave the installed version unchanged.- Unknown status: Do not update automatically. Report the unrecognized status; do not describe the release as withdrawn.
withdrawn: The verified status alone tells the updater thatlatestcurrently offers no eligible update. Report the withdrawal immediately; there is no need to fetch advisories to decline the update. Do not offer the consent prompt, download the target, or guess an older version. The channel's strong reference identifies the candidate; it is not a user request for that exact version. A separate historical lookup for the exactv1.2.0URI and CID must prominently report the verified withdrawal. If the pinned bytes are unavailable, say so rather than returning whateverlatestpoints to now.