Repository navigation
Conversation
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
This reverts commit 43642ce. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
The earlier changes corrected the reported type errors, documented the metadata tables, classified live reads, and regenerated the SDK and settings snapshots. The focused checks passed. Fresh source review and required hosted checks are pending; setup, stored copy writes and native retirement remain disabled. |
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
The full CI run for
The base commit's CI run already failed seven of the same unit and isolation job categories. That comparison does not clear any required check. The changes above still need a new exact-head run and an independent whole-diff review. This draft remains limited to the protected live read path; it does not enable a deployment, stored copies, or the refresh worker. |
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
Independent review of
The exact head passed hosted lint and type checks. Both PostgreSQL storage jobs are still running, so the local revision is not published yet. A new independent review and exact-head hosted run are required after the next push. No activation is proposed by this draft. |
|
Hosted workflow New head |
|
Independent review of The exact-head HTTP schema job failed in |
|
Exact head
The overall required workflow failed; separate unit and isolation jobs are red, and the separate HTTP contract workflow still records the input generation health check failure noted above. The independent review requests verification. This head cannot merge. The storage result covers the live-read control and its fence; it does not qualify scheduled refresh, stored document copies, or a real upstream provider. |
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Resolve the current enrollment, account realm, and worker approval before checking selection for a team reader. Keep unselected owner requests out of the approval lookup. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
The formatter failed on PR job: https://github.com/ClickHouse/loom/actions/runs/45862140452/job/140055809389 |
End the worker read timeout before retaining the protected result. The retention path still validates session and source authority under its bounded delivery deadline. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
On The formatter job reports A fresh independent review approved this exact head with no findings. It passed 37 focused tests and five subtests and exercised the lease polling code with a fake store. A waiting reader acquired the lease after release; a reader that timed out could neither enter the protected block nor release the other reader’s lease. The reviewer also verified the four generated settings and the tunable constants ratchet. GitHub approvals are still required. |
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
Independent review approved |
|
The full hosted feature inventory passes at |
…control Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
Refreshed on main after the formatter and IndexNow fixes merged. Main also passed the TypeScript timing shard that failed on the preceding head. The preceding integration run separately hit a ClickHouse trace log flush timeout in the SCIM physical work fixture. This change does not edit either test or its bounds. The new head keeps the worker behavior, tests and storage job coverage. The local checks passed lint, formatting, function length, settings type checks, generated settings and SDK output, and 65 focused settings, worker and inventory tests. The operation manifest retains the base hook entries. Full hosted checks and a fresh independent review will verify this head. |
|
Independent review approved |
Split large encoded bodies into bounded chunks and reacquire the publication fence before sending each one. Keep the response length, stream termination, and existing publication deadlines. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Recheck the source and worker under the publication locks. Avoid repeating those lookups before taking the locks, and bound each body chunk to 512 KiB so delivery fits more readily within the existing deadline. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4784da9. Configure here.
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Reject unencodable request IDs and ignored names before live delivery. Return ignored names to the caller without retaining them in diagnostics. Check the document size after the read phase and keep the fixed publication byte allowances. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
Independent source review found no remaining findings on |
|
Integration shard 1 failed on The exact test passed on this head against fresh ClickHouse 26.10.4.207 databases with one and three web workers. These runs do not reproduce the whole shard. The cause of the missing passage is still open; the hosted failure remains a merge blocker. |
|
The missing finance passage reproduces on both The example starts searching immediately after creating the fixtures and can read a process whose collection view has yet to refresh. A separate fix should wait for the recipient to see both expected collections before the first search, with a deadline and the existing private, shared, and revocation assertions intact. The controlled runs reproduce the symptom; the hosted check on this PR is still red. |

Related: #1189
Related: #1190
Related: #1298
Changelog category
Changelog entry
Add an experimental operation for reading a selected document through a provisioned source worker. The read keeps no body and does not change stored document search.
Why
Live reads need the exact caller's upstream connection, but Loom does not need the credential. The worker resolves an opaque connection under a signed request. Loom checks the caller's collection grant, approved worker, selected resource and current account before it contacts the worker and again before it delivers the result.
Scope and risk
knowledge.source.liveis an experimental read operation on the existing HTTP and MCP transports. It requires the protected publication barrier and Postgres knowledge authority. Loom holds the source update lease and locks the exact approval, account and team link rows during each bounded response handoff. A response may wait for another source operation within its frame deadline. Loom checks authority after taking the lease, so a retirement or revocation that has already committed stops that frame. The worker read ends before the separate deadline for retention, accounting and delivery. A team reader needs a separate enrolled connection for the same verified resource realm. Loom checks current team enrollment, both connections and approval before testing whether the requested identifier is selected. Selected and unselected identifiers get the same response when a team reader lacks current authority. The live read caps the document and its escaped MCP text copy at 16 MiB before it retains the publication fence. Larger results returnunsupportedwithout a document. Both transports reject unknown argument names that are too large or cannot be encoded as UTF-8. They return valid ignored names to the caller without logging or caching them. MCP applies a separate bound and the same encoding check to the JSON-RPC request ID. This operation admits no answer tokens and does not fall back to a stored copy. The ledger keeps request accounting without arguments, result bodies or exception text. The operation disables body capture regardless of namespace consent.This is the live read prerequisite. Account setup, selected imports, refresh and stored access remain separate work. The dashboard has no protected live view. No provider or native source is removed. See Document source worker boundary.
Compatibility, rollout and rollback
knowledge.source.liveand explicit read status, body, source link and fetch time. Existing operations and defaults are unchanged.LOOM_KNOWLEDGE_SOURCE_WORKER_ROUTES_FILEdefaults to empty. A configured route requires explicit trust, a client certificate and a separate request signing key. Worker settings can shorten the read, publication and frame deadlines and reduce concurrent setup checks. The defaults keep the existing bounds. Keep registrations and copy writes disabled until the worker, account setup, erasure and mixed versions qualify together.Tests
Focused tests cover worker authority, enrollment, approvals, route configuration, privacy, and the SDK and settings contracts. Configuration tests cover valid overrides and refusal of out-of-range worker limits. A selection test proves the lowest parallelism setting still checks every selected resource. Regression tests cover concurrent delivery, retirement during delivery, equal responses for selected and unselected identifiers during approval outages, retention and delivery after the read deadline, and the exact worker metadata erasure statements. Ruff, function length and strict mypy for the changed authority modules pass. The Python, TypeScript, Ruby and Rust contracts describe the protected live read. Large fenced response bodies use bounded chunks. Each chunk checks current source and worker authority under the publication locks without repeating those lookups outside the fence. The response keeps its byte length, stream terminator, and existing deadlines. Focused request-tail and worker tests cover a 16 MiB transport body under simulated datastore latency and revocation between chunks. Worker protocol fixtures also exercise the real HTTP and MCP encoders: escape-heavy content within the budget arrives intact, while oversized content returns a complete refusal without retaining the publication fence. Transport tests cover refusal of escaped lone surrogates, valid Unicode, and ignored names appearing only in the caller’s response. Hosted checks cover the real Postgres lock and mixed version paths.
AI assistance in the code
AI-generated with Codex. The tests and diff were checked against the current authority and publication code.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
Note
High Risk
Introduces auth-bound live reads over external workers, new Postgres authority tables, and stricter publication fencing on HTTP responses—security- and access-control sensitive.
Overview
Adds an experimental
knowledge.source.liveread path so a caller can fetch one selected resource through an operator-provisioned source worker (HTTPS + mTLS + signed grants), without indexing the body or falling back to stored copies.The change wires Postgres-backed worker metadata (enrollment challenges, accounts, approvals, team reader links), three migrations, erasure/census coverage, a routes file and new timeout/parallelism settings, plus server modules for authority checks, enrollment, worker HTTP I/O, protected session gates, and process runtime startup when Postgres and routes are enabled.
HTTP response publication now supports optional publication fences: authority is re-checked under locks before each response frame, with chunked bodies for large payloads.
knowledge.source.liveis excluded from narrowed read tokens, rate-limited as knowledge read, and omits arguments/results from the ledger via operation privacy.SDKs (Python/TS/Ruby/Rust), settings schema, example config, architecture doc, and generated ops references are updated; CI gains
test_mcp_worker_pg_fence.pyin the storage profile.Reviewed by Cursor Bugbot for commit 7f436d4. Bugbot is set up for automated code reviews on this repo. Configure here.