References
A feed does not hold bytes. A reference points to them. It names a resource and the place of the bytes inside it. A feed can have several references, such as the same file in a bucket and in an export of that bucket.
| Role | What it points to |
|---|---|
original |
the file or record itself, wherever it was synced from or placed |
preview |
the hi-res JPEG that a thumbnail opens and the vision model reads |
thumbnail |
the small JPEG the catalog shows |
frame |
a frame taken from an animation or a video for the vision model |
Analysis renders the derived roles into the internal derived store. Their sizes are
settings. Everything that counts a feed’s places, such as search and
forgetFeed, counts originals only. Serving a thumbnail passes the same grant check as any other
bytes.
Locators
Section titled “Locators”A reference’s locator is whatever the resource needs to find the bytes again, such as a bucket and
a key, a path, or a mailbox uid. Its locator_key is the path a person would recognize, and it is
unique within a resource. So one object in one place has exactly one reference, and syncing it again
finds that reference.
Noticing change
Section titled “Noticing change”A reference’s version is what the resource gives for this revision of the bytes, such as an ETag,
a git commit, a Notion edit time, or the digest of a web capture. When a sync reports a different
version, xixo marks the reference changed and analyzes the feed again. Every cached analysis step
that finished before the change runs again, so an analysis never describes old bytes.
In a folder a machine shares, the version is the file’s size and its modification time to the nanosecond. xixo link also names each file by its device and inode. When a file’s version changes:
- xixo asks xixo link for the file’s SHA-256 before it analyzes anything. When the bytes are the ones xixo analyzed, as after a copy that kept the bytes or a touch, the analysis stands.
- Only new bytes are analyzed again.
A renamed file keeps its feed and its analysis. It has the same device, inode, size, and time, so xixo moves the reference to the new path and gives the feed the new name. A second hard link to a file joins the same feed without a new analysis.
When an export copies a feed into another resource, the copy records the version of the original it came from. The next export copies the file again only when the original has changed.
Noticing what is gone
Section titled “Noticing what is gone”Every object a sync walks past is marked seen. When a full sync finishes, each original in that
resource that was not seen is marked gone. Nothing is deleted then. The feed, its analysis, and its
notes stay, and the item page says where the file is no longer found. A later sync or keep that
finds the file again clears the mark.
A sync marks nothing gone when:
- it was cancelled, ran past its deadline, was gated, or was a dry run;
- it walked only what changed, unless the source reports deletions itself, as git commits and a OneDrive or Google Drive change list do;
- a filesystem walk could not read a directory;
- the resource is RSS, where an entry that scrolls out of the feed has not been removed;
- it found nothing at all, as when a disk is not mounted. The resource’s card says so instead.
A reference that was only kept by hand, and never seen by a sync, is never marked gone.
Every day at 4:50 a.m., xixo forgets each file whose originals have all been gone for more than 30 days, and records each one in the audit log. A file is kept when it has:
- a note, which a person or an agent wrote;
- an expiry, which it follows instead;
- an edge a person or an agent made, such as a tag, or a question’s answer that drew on it;
- an analysis still open;
- a parent, which it goes with.
A kept file stays in the catalog with its places marked gone.
Joining the same bytes
Section titled “Joining the same bytes”Every original gets a SHA-256 digest. An analysis computes it before it reads anything, an upload carries the one it arrived with, and xixo link reports it for a file in a folder a machine shares, so the bytes never cross to xixo for it.
Two originals with the same digest share a feed. A tenant’s shared resources join each other, and a person’s own resources join only that person’s, so a feed never lists a personal place beside a shared one. Empty files, gone originals, originals on archived resources, and extracted children never join.
When two feeds join, the oldest one stays. It takes the other’s connections and note, and the later of the two expiries. The other feed’s analyses, renders, and extracted children are destroyed, because they describe the same bytes. Each join is recorded in the audit log.
When a sync reports a new version for an original on a feed with other originals, that original moves to a feed of its own before it is analyzed. A file saved again with the same bytes joins its old feed, and a file whose bytes changed stays on its own. In a folder a machine shares, the original moves only once its new SHA-256 shows new bytes.
Keeping apart
Section titled “Keeping apart”On the item page, Storage lists each original. One whose digest matches another original of the
same feed says the same bytes as another place. On a feed with more than one original, Keep
apart moves one to a feed of its own, which calls the splitReference mutation. The new feed
keeps the title, expiry, connections, and note. A kept-apart original never joins, until a new
version clears the mark.
What xixo deletes
Section titled “What xixo deletes”Forgetting a feed destroys the feed, its references, analyses, schedule, edges, and extracted children. It does not touch the resources its originals live in, so the files stay where they are.
The exception is bytes that xixo made. A render or an extracted child in an internal store deletes its bytes when it is destroyed, and a file that was uploaded and never placed is deleted with its feed.
Deleting a resource removes every reference into it. A file left with no originals is then forgotten at once, by the same rules as a file that is gone, except that an open analysis does not keep it. See archiving and deleting.