Repository navigation
Conversation
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
This reverts commit 43642ce. Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
|
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 <[email protected]>
|
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 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
|
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 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
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 <[email protected]>
|
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 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
|
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 <[email protected]>
|
Independent review approved |
|
The full hosted feature inventory passes at |
…control Signed-off-by: zlareb1 <[email protected]>
|
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 <[email protected]>
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 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
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.
| read.document.text, | ||
| read.document.mime_type, | ||
| ) | ||
| _check_publication_size(document) |
There was a problem hiding this comment.
Size check races the read deadline
Medium Severity
_check_publication_size runs inside the live-read timeout_at after the worker returns. The worker channel already uses the same 8s bound, so a completed large read can expire that window during the two json.dumps calls. The outer handler then maps TimeoutError to timeout, so a document that should be ok or unsupported is withheld as a timeout instead.
Reviewed by Cursor Bugbot for commit 4784da9. Configure here.
Signed-off-by: zlareb1 <[email protected]>


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 cap the unknown argument names they echo. MCP also bounds 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. 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
Touches authentication gates, Postgres authority locks, external worker trust, and live document delivery with strict publication fencing—security-sensitive live read surface.
Overview
Adds an experimental
knowledge.source.livepath (HTTP/MCP and all SDKs) that fetches one selected resource through an operator-provisioned source worker, returns link and body to the caller, and does not index or persist the content.Worker integration is gated by
LOOM_KNOWLEDGE_SOURCE_WORKER_ROUTES_FILEand new timeout/parallelism settings. Loom validates collection scope, worker approval, enrolled connections, and team reader links in Postgres (newmcp_worker_*migrations), signs short-lived Ed25519 grants, and talks to workers over mTLS with bounded responses (including 16 MiB publication cap →unsupported).Publication safety extends
request_tail: optional fences hold source/approval/account locks through delivery, including chunked large bodies with authority re-checks between chunks. Live reads are excluded from narrowed tokens, rate-limited as knowledge reads, and omit bodies from diagnostics/ledger viaoperation_privacy. Erasure and storage docs register the new tables.CI adds
test_mcp_worker_pg_fence.pyto the Postgres storage matrix.Reviewed by Cursor Bugbot for commit a3d7cbc. Bugbot is set up for automated code reviews on this repo. Configure here.