Repository navigation
Document sources: the design for sources on any namespace, many links, connected accounts and mirrored access - #539
Merged
Merged
Conversation
7 tasks done
…, connected accounts and mirrored access Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…t rows for N-1, owned tracker feed Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…cess rows, owner rule for connected only, issues as their own design Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… per account, owner-only item changes, auth-off and erasure-race rules Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…y by their own listings, newest evidence wins, mirrors kept Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…gs, no token reads a mirror, crawl erasure and group bounds Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… refuses mirror scopes, pseudonymous crawl exclusions Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…lists written on change, listing ahead of content, crawl erasure rows Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…atched to their own source's listing, shared listings, listing share of the pass Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…stopped sources' rows by the holds trigger, a listings cursor, owner check stops Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…pped crawl accounts, the pass split against today's bounds, pseudonymous audit subjects Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…on erasure, positive-evidence expansion drops, keyed audit hashes, the pass split stated Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…keeps its start bound, cleanup from inactive registry rows Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…-up rule, why some pseudonyms are unkeyed Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ed holds Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…n reads live rows sequentially and re-checks under the lease Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…n reads live rows sequentially and re-checks under the lease Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…kes pending_delete, re-checks before it opens one Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…e, a new hold re-reads its document, every row write checks the registration Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…irement keeps a holder's readers rows, access rows follow holds Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ers and access rows back, deletions keep the replaced version Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…t retires only with no hold left, row versions defined Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…e access-row version case, first-listing defined Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…al from holds, the drop-before-read order Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…holds, retirements read dropped holds so a cut run finishes Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…te's write path and its version check Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…olds block retirement Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ith holds, kept holds settle with their document Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… and keep every org-wide read, an acl- saga and a reused name from naming a mirror Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…the sync and erasure write under a mirror, capture hooks skip mirrored turns, and an erased name gets a new mirror Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ate-read failures drop mirrored results without a marker, capture hooks stop for a session that saw a mirrored answer, and an erasure refuses a new source Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…s, a domain only through the identity provider's claim, reads_as_creator only from a session, and mirrored config is empty Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ion, old plugins are refused only where a mirror exists, and a crawled person reads only files they own or are named on Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…er-only list its own shape, and let a mirror leg answer only a client that honours the flag Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…g is left to the sync, capture ops refuse a hook that ignores the flag, and the dashboard and assistant declare it Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…nt honours the flag, the assistant's answer token reads as its caller, and a removal's retirement has its own bound Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…t ops stop for a session that saw the flag, the switch also shuts the legs, and N reports an N-1 heartbeat beside a mirror Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…t each while any mirror exists, name the maintenance workers, and state the N-1 residual Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…er's org and list it as a break, and fold or mask marked spend in the export and SQL views Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…e registry by who picks the content, end an empty mirror, and group the unit tests by the part they pin Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…est the classes against what the hooks send, fail the refusal closed, and end a mirror only by erasure Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…rted from it inherits the flag, and the refusal's lifetime is worded one way Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… insights.query included; recall credit follows the mark; the flag also lives in the session's state; the refusal's latch is a named row Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… erase refuses while it is on, the mask covers every field an admitted item can shape, and a marked request writes no recall credit Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… included, bound exception 1 to admitted items, give the latch its own table, and erase it last Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ccept the differencing residual, list the hook-sent reads, and split the long bullets Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…to stored rows, match a connected owner by subject, and let the namespace copy win Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…s; a child's flag reaches its parent; a namespace copy carries only its own chunks; the probe rules split by case Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…obe names no item to a non-owner, the reader's own lookups are per-request reads, and the declaration is the transport's Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…s it on every mirrored namespace, its answer token's reading is fixed by the bridge, and spend waits for the check Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…tted, the assistant's chat route is marked and flagged like assistant.ask, and the answer token's reads-as claim is one mechanism Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…he accepted cost names every hook stopping, and the front end's token record is an operator-only spend row Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…the hook cost says reads included, knowledge.reads and ui.vitals tests cover flagged answers with nothing admitted, and two paragraphs are rewrapped Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ive mirrored source, with a test for one listed but inactive, and the cost.summary cost names marked reads Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
This was referenced Nov 12, 2026
A document source reads up to 300 items given as links or ids, and update adds and removes them
#562
Merged
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
...
Why
Document sources live only on a repository's trunk code namespace, so a team's meeting notes and documents have no place to go. A source holds 20 ids at most, and no op can change them. One shared credential reads everything, so a person cannot bring in their own drive, and every reader of the namespace reads everything synced.
docs/architecture/document-sources.mdis the contract the implementing pull requests build on.Design
NOT_A_CODE_NAMESPACErefusal goes. A source ends with its namespace: delete, collection delete, erasure and repository removal all retire it. Sync state stays inloom.code_index_state.knowledge.source.parse_linksturns pasted links into items and names each link it cannot read.knowledge.source.updateadds and removes items.skippedand writes it once the owner's document is retired.shared: as today.connected: a person's own OAuth account. Itsstateis bound to the subject and it accepts read scopes only. Only its owner changes its items. It stops on disconnect, on SCIM deactivation and on the owner check at each turn.crawl: domain-wide delegation over listed people or a group's members. Registering one needs an org-wide role, and the probe requires the store to refuse write scopes.connectedandcrawlsource ismirrored.mirroreddocument lives in a randomacl-<hex>companion namespace. No token opens it through the gate, and only a platform admin'serasure.requestcan name it.kindempty. On a trunk namespace N-1'scheckanswerscredential_invalid(off a trunk, itscheckandrotateanswerNOT_A_CODE_NAMESPACE), itsrotatefails before writing, and its turn ends before any request.recordingkeepszoomonly (a break).LOOM_TRACKER_ORG, and private rows.Refinements to the brief, with reasons
loom.principal_groupsholds a service's end users (user:<id>), not people's emails.drive.filewith the picker is not offered, because it cannot read a folder's later files or the recordings folder.skippedand writes it once the owner's document is retired: at its next complete listing when mirrored, at its next full listing for anamespacesource. No source reads whether another is live; an address is free when no document is there. A per-address record of every source needed its own states, retirement ordering and crash recovery, and each review found a new race in them. The cost is a document missing between the owner's retirement and the other source's next listing of the file. In a mirror, ownership goes by asource-id:<id>tag on each document (only N writes mirrors), so a later source of the same name owns none of an earlier one's documents, and a stopped mirrored source's cleanup retires by that tag.Scope and risk
Documentation only. The page describes ops, tables, settings and routes that the implementing pull requests add.
Compatibility, rollout and rollback
Tests
tests/unit/test_doc_links.pyandtests/unit/test_public_copy.pypass.scripts/codegen/docs_reference.py --checkpasses.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code