Repository navigation
A recording source syncs a meeting's transcript as timestamped sections - #248
Merged
Merged
Conversation
zlareb1
force-pushed
the
feat/knowledge-source-transcripts
branch
4 times, most recently
from
November 4, 2026 03:07
e429c3e to
d59e0cd
Compare
The `recording` kind reads a meeting store's transcripts, never its audio or video: `provider: meet` lists a space's ended conference records and reads each one's transcript entries once every transcript's file is generated; `provider: zoom` lists a meeting's ended instances of the last 30 days and downloads each one's WebVTT transcript file from the store's own hosts. A transcript becomes one `# mm:ss–mm:ss: <first words>` section per five minutes with one `<speaker>: <text>` paragraph per turn, so a chunk and its citation name the minute. A recording with no transcript yet is counted under `no_transcript` and checked again on each listing, at none of the pass bound, until a day after the meeting, when it is given up on its revision. A transcript link off the store's hosts is given up as `transcript_off_host`. A recording the store stops listing is never retired: both stores expire recordings on their own schedule. Both token exchanges refuse a credential whose scope holds more than reads. The kind's turn is its own module (source_sync_recording), chosen by source_sync's kind dispatch and built on its shared item helpers. A space or meeting the account may not read (a 404 or a 403 on it) fails the turn and retires nothing while the other ids are written; only the token exchange or a 401 marks the credential invalid. 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]>
zlareb1
force-pushed
the
feat/knowledge-source-transcripts
branch
from
November 4, 2026 03:34
d59e0cd to
70d137e
Compare
…rors name it - A meet record's transcripts share one size bound: each entries read gets what the earlier transcripts left. - A records-listing error names its space, so a turn's error and a probe's refusal say which space failed. - Tests: a 401 on a space read after a good token exchange, and on a transcript's entries, end the turn credential_invalid with nothing written; a record's two transcripts merge in order under one bound. - Docs and the credential description say what add, rotate and check answer. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The records listing labels its errors with the space id the source was configured with, keeping the canonical name for the filter only, and a record's transcripts are read in the order the store lists them (the sections are put in time order anyway). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A space's id and its meeting code resolve to one space; the listing keeps the first copy of each recording, so none is fetched or written twice. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
This was referenced Nov 4, 2026
Merged
8 of 9 tasks
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.
Related: #215
Related: #235
Related: #245
Related: #247
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):
A repository's maintainers can register a
recordingdocument source (provider: meetwith meeting space ids, orprovider: zoomwith meeting ids): the sync worker writes each recording's transcript into the repository's documents as one# mm:ss–mm:ss: <first words>section per five minutes, with each speaker turn as<speaker>: <text>. A recording whose transcript is not finished yet is counted underno_transcript, checked again on each pass for a day after the meeting and then on each periodic full listing, and written once the store has it; Loom transcribes nothing, and a credential whose token carries any scope beyond reads is refused.Why
Meeting recordings are where many design decisions are explained; a deck whose decision slides are pictures often has its reasons only in the meeting that presented it. The knowledge plane pulls shared folders (#235) and a project tracker's documents (#245) but not a meeting store. This adds the
recordingkind on the same registry, probe and sync contracts, reading only the store's own transcript.Clients (
server/clients/recording.py), checked against the vendors' public API references:meet: the credential is an OAuthauthorized_userJSON file (client_id,client_secret,refresh_token). The store's REST API takes user authentication only, so a plain service account key cannot read it. The refresh token is exchanged with therefresh_tokengrant. A turn reads each space (spaces.get, which gives the canonicalspaces/<id>used in the filter) and lists its conference records (conferenceRecords.list,filter=space.name = "spaces/<id>", plusAND end_time >= "<stamp less a day>"on an incremental turn). Records still running have noendTimeand are left out. For a record not stored yet it lists the transcripts, the participants (for display names) and each transcript's entries (transcripts.entries.list). A record's transcripts are merged into one document, its sections in time order, andLOOM_KNOWLEDGE_SOURCE_SYNC_MAX_FILE_BYTESbounds their text together.meetrecord is read only once every one of its transcripts isFILE_GENERATED. The reference definesENDEDas "the transcript session has ended, but the transcript file hasn't been generated yet" and says nothing about whether the entries are complete then; the entries page only warns that they "might not match the transcription found in the Google Docs transcript file". SoENDEDis not trusted. A record's revision does not change once it is written, so a record is not written while any of its transcripts is unfinished.zoom: the credential is a server-to-server app's JSON (account_id,client_id,client_secret), exchanged with theaccount_credentialsgrant at the token endpoint with Basic auth. A turn lists a meeting's ended instances (past_meetings/{id}/instances). For an instance not stored yet it reads the recording (meetings/{uuid}/recordings, the uuid encoded twice when it starts with/or holds//, as the reference asks) and downloads theTRANSCRIPTfile (WebVTT) ofrecording_files. The media files are never fetched.scopeand refuse the credential (CredentialRefused) when it holds anything beyond reads: formeetanything butmeetings.space.readonly, forzoomany scope that is not<resource>:read…. An answer that names no scope is refused too (fail closed):addandrotateanswerCREDENTIAL_REFUSED,checkanswersreachable: falsewith that summary, and a turn endscredential_invalid, so a stored credential can never change the store.httpsonzoom.usor a subdomain of it. Ids are checked against the stores' alphabets before they go into a path or a filter. Errors carry the HTTP status, never a response body, which names meetings and people. Nothing retries.gdrive.rate_limited, now public), so the Google endpoints recognise the same quota reasons and the OAuth error string. Folding the meeting and folder clients' error classes and request helpers into one shared module is left for a follow-up; this PR only stops the rate-limit rules from drifting.Conversion (
server/knowledge/domain/transcripts.py, pure):<v Name>, or from a leadingName:only when most of the file's cues start that way, soNote: …in a file without speakers stays text.# mm:ss–mm:ss: <first eight words>section per five minutes, and inside a section one paragraph per speaker turn.#,>,|,<, a fence, a Setext underline) is escaped, so a speaker's words cannot cut a section.Sync turn (
server/knowledge/app/source_sync_recording.py). The kind has its own turn module, chosen bysource_sync._turn_oflikelinear's, and built on the public helpers #245 made shared:start_waits,full_due,capped,sync_item,give_up,wait,require_current,write_document,client_error. The folder and tracker turns are unchanged and their tests pass untouched;source_sync.pygains only the dispatch branch. The helpers apply as for the other kinds: revision skip, pass bound, waits for a failure that may pass, give-up for a refusal or a size overLOOM_KNOWLEDGE_SOURCE_SYNC_MAX_FILE_BYTES, another writer's address skipped, and turn-level failures for the token exchange, the listing, a401and a rate limit.meet) or the instance's start (zoom), so a stored transcript is never fetched again. Neither listing says whether a recording has a transcript (records and instances carry no artifacts), so a recording not stored yet costs one check; the APIs offer no cheaper test.unconvertedunderno_transcript, not as an error.SETTLE_S) after its revision it has no wait entry and is checked again whenever listed. The check is given back to the pass bound (it fetched no document), so recent unrecorded meetings never hold back a recorded one behind them.transcript_off_host.zoomfull listings. Azoomfull listing, and its probe, read the instances that started in the last 30 days (ZOOM_LISTING_DAYS). Without a window, every unrecorded instance of a long recurring meeting (the instances list reaches 15 months back) would cost a check on each full listing's retry. It is a constant, not a setting: it matchesmeet, which deletes conference records 30 days after the meeting, so both providers read the same window, and nothing on a deployment would tune it. Documents already written from older instances stay.404or a403on its listing) ends the turnfailedwithspace <id>: http_403(orhttp_404, ormeeting <id>: …), keeps the stamp and retires nothing, while the other ids' recordings are written. Only the token exchange or a401marks the credential invalid. A probe of such an id fails:addandrotateanswerSOURCE_UNREACHABLEnaming it, andcheckanswersreachable: falsewith that summary. Every error of a space's listing names the space id the source was configured with (space <id>: http_<status>); the canonicalspaces/<id>name is used only in the filter.remove(delete_documents=true)orknowledge.delete.https://meet.googleapis.com/v2/conferenceRecords/<id>,https://api.zoom.us/v2/meetings/<uuid>/recordings). It is unique, stable and known at listing time, so the skip needs no fetch.Meeting <start>(meet) orMeeting <meeting id> <start>(zoom).ingested_format: transcript.source-kind:design_doc,repo:<id>,source:<name>, so decision extraction treats a transcript like a design document.worker:knowledge-source-sync,source_class=imported,user_id/agent/session_id-.Probe: the credential exchange (with the scope check), each id read, and the recordings listed (counted, the first 1000; up to five titles).
Speaker names and the knowledge plane's rules. Speaker names are transcript text like any other and get no new handling. What applies, checked against the tree:
loom.documents/loom.chunks, already in the erasure census (server/erasure/store/census.py).user_id='-', so a namespace erasure removes them and an erasure scoped to one user does not.knowledge.upsert.knowledge.delete), and at the store, or the next full listing writes them again.loom decisions extract, and the per-sync mining in the open A changed document is mined for decisions on the next sync pass #239, can mine a transcript into decision records that quote a speaker. Deleting the transcript leaves them;memory.deleteof each decision's row (which retires its record), or the namespace's erasure, removes them.docs/features/knowledge.mdsays all of this.Departures from the design this follows, each a call made on the code:
no_transcriptas a turnstatus. It is anunconverted_reasonsentry instead, as the per-file reasons already are: a turn whose other recordings were written isok, and a status would hide a real failure of the same turn.Scope and risk
parse_configand the probe table for the kind, and the_turn_ofbranch.gdrive._rate_limitedmade public asrate_limited.frontend/src/lib/knowledgeSources.ts, from The repository card shows and manages its document sources #247): a recording source reads "meeting transcripts", with a credential label for rotate. The card's add form still servesgdriveonly; arecordingsource is added withknowledge.source.add, as alinearone is.docs/features/knowledge.md"A recording source",security.md, androlling-upgrades.mdrule 28.(org, namespace), as before.Authorizationon a cross-origin redirect.Compatibility, rollout and rollback
knowledge.source.addacceptskind: recordingwithconfig: {provider: meet | zoom, ids: [1-20]}. The descriptions ofkind,configandcredentialonaddandrotateare updated (SDK and reference regenerated). No field added or removed.LOOM_KNOWLEDGE_SOURCE_SYNC_ENABLEDis on.docs/architecture/rolling-upgrades.mdrule 28): no schema change.BAD_KIND) and still lists and inspects one.checkandrotateof one answer a server error, since it has no probe for the kind._turn_ofdefault), finds no service account key, and endscredential_invalidbefore any request, retiring nothing. N's next turn writes the real status.Tests
No live vendor credentials exist: every store response in the tests and in the end-to-end run is written by hand (httpx
MockTransport), never a recording of real content. The request and response shapes were checked against the vendors' public API references: records list, transcripts, entries, participants and spaces; the server-to-server token request; the past-instances list; the recordings read and itsrecording_files.tests/unit/test_knowledge_source_recordings.py(new; 28 test functions, 37 cases with their parameters), on the in-memory world oftest_knowledge_source_sync.py:<included, and minutes past 59.Note:line not taken as a speaker.#read as one line.zoomtoken request's grant and Basic header, and uuid encoding.403read as a rate limit.meetturn: a timestamped document with display names and normalised text. A recent record with no transcript is counted underno_transcriptwith no wait entry. The next turn's filter reaches a day back, skips the stored record by revision and writes the one whose transcript arrived.meettranscripts:ENDED,STARTED, a mix, and none are not read.documents_per_pass=2with three unrecorded instances ahead of a recorded one, recent and settled: the recorded one is written and the turn completes.zoomturn: an instance's VTT transcript written. An unrecorded instance is given up asno_transcriptand an off-host link astranscript_off_host. The token goes only to the store's hosts and the media is never fetched.zoomfull listing reads the last 30 days and keeps an older instance's document.404) and a forbidden space (403) fail the turn, retire nothing and still write the other space. The probe answersSOURCE_UNREACHABLEnaming the forbidden space.test_a_401_on_a_space_after_the_token_exchange_is_the_turn_s_credential:credential_invalidwithspace <id>: http_401, nothing written.test_a_401_on_a_transcript_s_entries_stops_the_turn:credential_invalidwith an error naming the transcript, the later record never read, the stamp kept.test_a_record_s_transcripts_are_merged_under_one_size_bound: twoFILE_GENERATEDtranscripts merged in order; a bound each fits alone and both together do not raisesTooLarge.test_two_ids_naming_one_space_list_each_record_once: a meeting code and a space id resolving to one space; the record is checked and written once and counted once.test_a_space_s_listing_error_names_the_configured_id: a records-listing500readsspace <configured id>: http_500, not the canonical name.test_knowledge_source_sync.py,test_gdrive_probe.py,test_knowledge_sources.pyand thelineartests pass untouched.tests/integration/test_knowledge_sources.pyagainst a server from this branch with its own ClickHouse (auth off): 3 passed, 6 skipped (the cases that need a configured code repository). The new case checks thataddreads a recording config (BAD_CONFIG) before the namespace (NOT_A_CODE_NAMESPACE).meetsource with two records, one without a transcript.changed 1, unconverted 1 (no_transcript), statusok.knowledge.source.inspectlists the document.knowledge.search"why not sort-merge join" returns the record's chunks with section paths02:00–02:20: …,09:00–09:20: …,31:00–31:20: …and contentDana Park: ….changed 1, unconverted 0, the first record skipped.worker:knowledge-source-sync,source_class=imported,user_id/agent/session_id-,ingested_format=transcript.make format-check lint typecheckand the generators (sdk_py_gen,sdk_py_client_gen,sdk_ts_gen,docs_reference,op_reach_census).test_public_copy.py,test_doc_links.py,test_package_contracts.py.npm --prefix frontend run test(1,796 passed) andrun build.9868f670f; the final head9c2f5fc93adds an error label, drops a sort and dedups the listing; its touched tests pass (the recording, folder, tracker and source tests: 273).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. Checked: both API shapes against the vendors' public references, the turn against the sync contracts of Loom syncs a shared folder's docs, slides, decks and PDFs into a repository's documents #235 and A project's documents sync from the tracker's document store #245, the end-to-end run on a private ClickHouse.
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.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code