Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
zlareb1
left a comment
There was a problem hiding this comment.
The server rejects add and rotate before probing or storing credentials, and the list preserves the other source actions. Please cover the new contract in the existing HTTP integration suite, including the SELF_SERVICE_OFF response and the list’s self_service field.
zlareb1
left a comment
There was a problem hiding this comment.
The add and rotate dialogs now use the shared refusal label and keep the server’s explanation. The new HTTP cases cover both refusals, the false capability in the list, and a source that stays readable with the setting off. The platform-admin override uses the existing live-settings path.
Please update the rollback note before merging. A value set through admin/settings.set persists in the runtime override store and applies if the setting is introduced again.
|
@VanshajPoonia please sign CLA |
|
The rename integration test fails at the same assertion on clean |
zlareb1
left a comment
There was a problem hiding this comment.
GitHub reports a merge conflict with main. Please resolve it so CI can run against the merged tree.
zlareb1
left a comment
There was a problem hiding this comment.
The upstream merge preserves the request guards, source list behavior, and HTTP coverage. The regenerated Rust model also keeps the default on for older server responses.
zlareb1
left a comment
There was a problem hiding this comment.
The format job reports the same adoption page assignment as clean main. The pinned formatter passes with the tracked repair. PR job · Repair #1706
|
Thank you for the review. df7dc02 makes the switch a live setting, since both handlers read it at call time. 496593c adds two cases to |
zlareb1
left a comment
There was a problem hiding this comment.
GitHub reports a merge conflict with main in sdk/rust/src/wire_models.rs. Please resolve the conflict and regenerate the Rust wire models so CI can validate the combined tree.
zlareb1
left a comment
There was a problem hiding this comment.
The source handlers refuse add and rotate when self-service is off. The operator guidance needs to describe where that control applies. The refreshed head also resolves the Rust wire model conflict.
zlareb1
left a comment
There was a problem hiding this comment.
ClickHouse expires the adoption directory test’s fixed snapshot rows before the view reads them. Clean main reproduces the failure. The test passes with UTC-relative fixture dates. Failed unit job · Repair #1740
zlareb1
left a comment
There was a problem hiding this comment.
The operator guidance now covers the OAuth scope. The new integration fixture can leave a deployment-wide override in place and affect other tests.
|
The tunable-constant check reports the same duplicate coverage row limit on this head and on clean main. The coverage repair keeps the store's existing bounds and removes the duplicate. PR unit job · Main unit job · Repair #1722 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 02bcf61. Configure here.
zlareb1
left a comment
There was a problem hiding this comment.
The fixture leaves deployment-wide settings alone. The spawned-server auth finding still affects local runs: the fixture only overrides self-service, the child inherits pytest's environment, and its requests carry no token. CI exports auth-off to pytest. A local pytest process without that setting starts the child with auth required. Set auth mode explicitly for the child or authenticate the requests.
zlareb1
left a comment
There was a problem hiding this comment.
The sender census reports the same stale plugin client fingerprints on this CI merge and on clean main. The test passes locally with both fingerprint repairs. PR job · Main job · Plugin repair #1773 · SDK repair #1706
The extraction classification test also fails on main because changed_files has no content classification. PR job · Repair #1747
zlareb1
left a comment
There was a problem hiding this comment.
The isolated test server sets its own auth mode, so the unauthenticated requests reach the self-service guard regardless of the parent environment. All 234 focused unit tests pass. The new integration case still needs a hosted run.
zlareb1
left a comment
There was a problem hiding this comment.
The integration fixture is fixed. The rollback note finding still applies, and this supersedes my approval. I verified that a stored false override survives while the build ignores the missing setting and takes effect when the field returns. Update the rollback note to say the override persists and can be cleared.
|
Thank you for checking the stored override. The rollback note now says a value set with |
zlareb1
left a comment
There was a problem hiding this comment.
The rollback note now explains that a stored override survives a revert and how to clear it on either build. The add and rotate guards still run before credential probes or writes, and the dashboard and Rust SDK preserve the older response default.
zlareb1
left a comment
There was a problem hiding this comment.
The conflict resolver test expects an unattested successor to retire an attested row. The same assertion fails on this CI merge and on clean main with ClickHouse 26.11.5.8. The repair keeps the original ordering assertion at equal standing and checks the lower-standing conflict separately. Both cases pass locally. PR job · Main job · Repair #1781
|
@VanshajPoonia Please rebase |
LOOM_KNOWLEDGE_SOURCE_SELF_SERVICE_ENABLED (default true) is the switch the code and tracker self-service paths already have. When it is off, knowledge.source.add (shared and connected) and knowledge.source.rotate answer SELF_SERVICE_OFF before any probe or write, so no member's credential reaches the pods. List, inspect, parse_links, check, update, sync and remove keep answering. knowledge.source.list reports the switch as self_service. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
With self_service false the Sources list hides Add a source and the Rotate credential item and says adding is turned off. Check, Sync now, push notifications and Retire stay. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Both handlers read knowledge_source_self_service_enabled at call time, so it is a live setting: an admin turns it off with admin/settings.set and no restart. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
knowledge.source.list reports self_service true by default. With the switch off through a runtime override, add and rotate answer 422 SELF_SERVICE_OFF, the list reports false and still lists the source, and inspect still answers. The override is cleared after the case. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
The dashboard's lead-in for the code said repositories, so a refused document source add or rotation read as "Adding repositories is turned off". The lead-in is now neutral and the server's message names the action. The add and rotate dialogs each cover a refusal. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
… are governed by their provider's client id Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
…eployment-wide override Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
…d requests need Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
e731e61 to
786503b
Compare
|
Rebased onto main 1e3d412, so the branch is now 9 commits with no merge commits. Main's |
zlareb1
left a comment
There was a problem hiding this comment.
The rebased head preserves the add and rotate guards, the older-server default, and the rollback instructions for stored overrides. The 234 focused unit tests passed and the generated Go contracts are current.

Closes: #869
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):
LOOM_KNOWLEDGE_SOURCE_SELF_SERVICE_ENABLED=falserefusesknowledge.source.addandknowledge.source.rotatewithSELF_SERVICE_OFFbefore any probe or write. The other document source operations keep working, and the dashboard offers neither add nor rotate. Connected-account OAuth is outside the switch: it runs for each provider whose client id is set (LOOM_CONNECT_<PROVIDER>_CLIENT_ID).Why
Repositories and tracker sources each have a self-service switch (
LOOM_CODE_SELF_SERVICE_ENABLED,LOOM_TRACKER_SELF_SERVICE_ENABLED). Document sources had none. A shared deployment could keep the sync worker off, butaddandrotatestill took, probed and stored the credential.Scope and risk
knowledge_source_self_service_enabledin the settings catalog, defaulttrue, so no deployment changes. It is a live setting because both handlers read it at call time, soadmin/settings.setturns it off without a restart._require_self_service()runs first inhandle_knowledge_source_addandhandle_knowledge_source_rotate, before name checks, probes and writes. It also covers a connected add, because that registers a member's credential on the pods too. It raisesSELF_SERVICE_OFF, the code the repository and tracker switches use.knowledge.source.updatehas no credential input (it probes with the stored one), so it stays open. So do list, inspect, parse_links, check, sync_now, remove and the push ops.SELF_SERVICE_OFFsaid repositories, though tracker and document sources share the code. It is now "The operator turned this off:" and the server's message names the refused action.knowledge.source.listreports the switch asself_service. The Sources list hides "Add a source" and "Rotate credential" when it is false and says "Adding document sources is turned off on this deployment." Check, Sync now, Push notifications and Retire stay. An empty Library section hides, as it does for a place that takes no source.Compatibility, rollout and rollback
knowledge.source.listgainsself_service(bool, default true).knowledge.source.addandknowledge.source.rotatecan answerSELF_SERVICE_OFF. No default changes.LOOM_KNOWLEDGE_SOURCE_SELF_SERVICE_ENABLED=false, or setknowledge_source_self_service_enabledto false withadmin/settings.set.LOOM_KNOWLEDGE_SOURCE_SELF_SERVICE_ENABLEDstores nothing. A value set withadmin/settings.setis kept inloom.runtime_overridesand outlives the revert. Build N-1 ignores it, and it applies again if the setting comes back.loom settings reset knowledge_source_self_service_enabledclears it on either build. A build N-1 server omitsself_service, and the dashboard reads a missing field as on.Tests
pytest tests/unit/test_knowledge_sources.py: 4 new cases. Add is refused in shared and connected mode with no probe and no row. Rotate is refused and the stored credential stays the same. With the switch off, list (sources still listed,self_servicefalse,accepts_sourcestrue), inspect and parse_links still answer. All 4 fail with the handler change reverted.vitest run src/views/Documents.sources.test.tsx: 26 pass. The new case checks the note, that there is no Add button and that the menu is Check, Sync now, Push notifications, Retire. It fails with theSourcesListchange reverted.-n 2): 1847 passed. 6 failed locally and none touch these files: 4 worker registry cases neednumpy, which this environment lacks, and 2 intest_code_workspace_registry.py.RepositoryCard.test.tsxhas one failing branch-table case here with or without this change.tests/integration/test_knowledge_sources.py: 2 new cases. The list reportsself_service: trueby default. With the switch off on a server of its own, started withLOOM_KNOWLEDGE_SOURCE_SELF_SERVICE_ENABLED=false, add and rotate answer 422SELF_SERVICE_OFF, the list reportsself_service: falseand still lists the source, and inspect answers. The case writes no runtime override, so the shared server's other tests never see the switch off. These need a running server and ClickHouse, so CI is their first run.vitest run src/flows/KnowledgeSourceDialog.test.tsx: 2 new cases, a refused add and a refused rotation. Each checks the alert reads "The operator turned this off" with the server's words and never mentions repositories. Both fail with the old lead-in.test_settings_defaults.pyandtest_live_settings.pysnapshots updated withLOOM_UPDATE_SNAPSHOT=1.--checkinmake lint, ruff, the function-length gate, Biome on the changed files,npm --prefix frontend run build,npm --prefix frontend run budgetand Prettier 3.9.9 on the Markdown and YAML pass.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 wrote the diff and ran the checks above.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.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).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.git commit -s), as CONTRIBUTING.md asks.Note
Low Risk
Operator-gated feature, default on; only blocks add/rotate and UI affordances, with tests and no auth/data-path changes.
Overview
Deployments can now disable member-driven document source registration via
LOOM_KNOWLEDGE_SOURCE_SELF_SERVICE_ENABLED(defaulttrue, live). When off,knowledge.source.addandknowledge.source.rotatefail early withSELF_SERVICE_OFF—before probes or credential writes—while list, inspect, check, sync, and connected-account OAuth stay available.knowledge.source.listexposesself_serviceso the dashboard hides Add / Rotate credential, shows an operator-off notice, and trims row actions.SELF_SERVICE_OFFUI copy is generalized (“The operator turned this off”) so document sources aren’t mislabeled as repositories.Docs, settings schema, SDK typings, and unit/integration tests cover the switch.
Reviewed by Cursor Bugbot for commit 786503b. Bugbot is set up for automated code reviews on this repo. Configure here.