Skip to content

A gdrive source syncs the .docx files of a folder whose include names them - #314

Merged
zlareb1 merged 17 commits into
mainfrom
fix/gdrive-docx-files
Nov 7, 2026
Merged

zlareb1 merged 17 commits into
mainfrom
fix/gdrive-docx-files

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

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 gdrive source can sync the .docx files in its folders: name docx in its include (or tick .docx documents in the dashboard's form), and each .docx file goes to the extractor like a PDF or a .pptx deck, its original kept for download. The default include stays the four kinds it was.

Why

A shared folder of design documents holds .docx files beside native documents, decks and PDFs. The source listed only docs, slides, pdf and pptx, so a .docx in a synced folder was never listed, never counted and never searchable, with nothing in the source's state saying so. The extractor already reads DOCX (headings, tables, lists), and the ingest path already routes it; only the source's file kinds left it out.

Checked on a private set of real folder contents: both .docx files in it were invisible to the sync, and the reference extractor reads both completely (coverage complete, every paragraph).

Scope and risk

  • include accepts docx, off by default; the listing query asks for its media type when it is named; the file goes through the same path as a PDF or .pptx (size bound, extractor capability check, unconverted when no extractor declares the format, original kept).
  • The dashboard's add-source form offers the new kind, unticked; its default include is named once (DEFAULT_INCLUDE, the server's GDRIVE_DEFAULT_INCLUDE).
  • Nothing else changes: native documents, decks, PDFs and the other source kinds are untouched.

Compatibility, rollout and rollback

  • Wire: knowledge.source.add accepts docx in a gdrive config's include. The default (include omitted) is unchanged: docs, slides, pdf, pptx.
  • Rolling upgrade (docs/architecture/rolling-upgrades.md, rule 31): this build accepts docx and writes it only when a caller names it. That departs from rule 3 (a new value is read by one release and written only by the next) the way rule 28 does for a new source kind: holding add back a release would hold back every folder of .docx files, while the cost below falls only on sources a maintainer opts in, ends with the rollout, and loses nothing; rule 31 records it. An older replica has no docx in its file-kind table: it refuses to add a config naming it (BAD_CONFIG), answers a server error to check and rotate of such a source, and fails such a source's turn before any request (status failed, error KeyError, nothing retired; the next turn by this build syncs it). Only sources whose config names docx pay this, and only while an older replica serves.
  • Operator steps: none to upgrade. To take the .docx files of a folder an existing source already syncs, add a second source on the same folders with include: ["docx"]: it writes only the .docx files, whose addresses no source holds, and leaves the first source's documents alone (a sync never writes or retires a document another source holds). A deployment with no extractor for docx counts each such file unconverted (no_extractor), as for PDF.
  • Rollback: a source whose config names docx stops syncing on the older build (every turn failed, all its file kinds) until it is removed; a docx-only second source as above confines that to the .docx files. Its synced documents stay. Sources without docx are unaffected.

Tests

  • tests/unit on this branch (-n 8): 27,602 passed; the 4 failures are test_the_delimiter_is_sniffed_in_bounded_time cases, a timing bound that fails the same way on main on a loaded host.
  • tests/unit/test_knowledge_source_sync.py: a .docx file goes to the extractor with its bytes kept, parametrised with the .pptx case; tests/unit/test_knowledge_sources.py: a config naming docx is stored in the table's order and probed with it; the existing add test pins the default include to the four kinds.
  • tests/unit/test_knowledge_source_sync.py: a second source with only docx beside a default source on the same folder writes only the .docx files and leaves the first source's documents alone (the fake listing now filters by media type, as the store does).
  • frontend/src/lib/knowledgeSources.test.ts expectations for the default include; npm --prefix frontend run test, build and budget.
  • make format lint typecheck, the generators (op reference, TypeScript op table), the doc-link and public-copy tests.

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: every place that lists the gdrive file kinds (config validation, listing query, extractor routing, form, docs, op reference).

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/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).
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

@zlareb1 zlareb1 changed the title A gdrive source syncs the .docx files in its folders through the extractor A gdrive source syncs the .docx files of a folder whose include names them Nov 6, 2026
zlareb1 and others added 17 commits November 7, 2026 08:14
… formats; the listing asks for Word documents

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… source; the docx test lists through its own include

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…er replica's check does; rewraps

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…lback leaves default sources syncing

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…nsitive include test

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ocx is unticked

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…onfined to it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…; the form names Word documents; a two-source test

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ing rewrapped

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…enamed to what it checks

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… back; rule 31 says the gate does not check it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 force-pushed the fix/gdrive-docx-files branch from 66c8d50 to 403026b Compare November 7, 2026 08:24
@zlareb1
zlareb1 merged commit f903020 into main Nov 7, 2026
2 checks passed
@zlareb1
zlareb1 deleted the fix/gdrive-docx-files branch November 7, 2026 08:25
@zlareb1 zlareb1 mentioned this pull request Nov 12, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant