Skip to content

Add the experimental knowledge.source.live read; source worker setup ships separately - #1302

Open
zlareb1 wants to merge 126 commits into
mainfrom
feat/mcp-worker-live-control
Open

zlareb1 wants to merge 126 commits into
mainfrom
feat/mcp-worker-live-control

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Related: #1189
Related: #1190
Related: #1298

Changelog category

  • New Feature

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. This build has no operation that registers a worker source, approval or account, so the operation answers denied or unavailable until source setup ships.

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.live is an experimental read operation on the existing HTTP and MCP transports. It requires the protected publication barrier and Postgres knowledge authority. Each response frame holds the namespace's Postgres source lock shared, rereads the source row with sequential consistency and refuses the frame if the row changed at all since the frame's authority check, and locks the exact approval, account and team link rows. Every source write holds that lock exclusively for the length of its source lease, so a retirement, update or erasure that commits first withholds the frame; live reads of one collection share it, and a write waits only for frames already running. A build without the lock writes under the lease alone, so during a rolling upgrade a retirement from such a replica can let through the one frame already past its reread. A frame holds one pooled Postgres connection; a source write holds its lock on a connection of its own, outside the pool, for its lease. 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. An account belongs to one collection: the owner's and each team reader's accounts must be enrolled in the source's collection, an account in another collection does not serve the read, and enrollment keys the account on the approval's collection. One connection ID cannot be enrolled in a second collection, so a worker issues a separate connection for each collection. 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 limits document text to 4,000,000 UTF-8 bytes and the encoded document with its escaped MCP text copy to 16 MiB before it retains the publication fence. A document over either limit, or an empty one, returns unsupported without a document; a digest mismatch stays denied, and a publication window that runs out of time returns timeout. 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 argument-name and request-ID bounds, the capture and ledger handling the no-store header and MCP's refusal of the op inside a batch or as a notification (both follow from the per-frame fence) all read one Operation field, retains_no_payload; narrowed tokens are refused through the read-scope module's NARROW_REFUSED_OPS. HTTP marks such an op's responses no-store, and every MCP response carries no-store because MCP cannot tell which tool a response answers when it sets headers. 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 Postgres store writers for approvals, accounts and readers (replace_on, set_on, revoke_on, issue_challenge, consume_challenge, revoke_account) ship here with no caller in server/ yet. They stay because the live fence's correctness is defined against their lock protocol: the fence takes the approval, account and link rows FOR SHARE NOWAIT under the source lock, and tests/integration/test_mcp_worker_pg_fence.py races these writers against a frame on real Postgres. Everything above the stores that only setup would call moved out to the change that adds the setup ops: the approval, enrollment and enrollment-flow modules, the routes' enrollment route and verifier key, WorkerReadChannel.request_enrollment and the worker access-check call, the selection proof, the stored-copy permission check and setup planning, with the selection setting. A Postgres outage in the live read's lookups before the response, or in a source write's lock, answers 503, and one during a frame's handoff withholds the response; and the lock's session uses short TCP keepalives so a vanished holder's lock is released within about a minute. A large body can be cut off after the status line when its chunks cannot be fenced and received within the publication deadline; the boundary page states this. Each 512 KiB chunk repeats the authority resolution and the fenced reread, so the largest body that arrives intact depends on datastore latency and has not been measured against real stores. That measurement belongs to the hosted scale qualification before large live reads are enabled. The worker challenge, account and team reader tables key the canonical sign-in owner in their own subject column, and their identity-tuple user_id is always -, so a user-scope erasure never matches them; an approval belongs to its collection and names its approving administrator only as actor. Namespace erasure removes every worker row of the namespace. SCIM deletion of a user removes the worker rows of every owner the user's spellings name or a verified alias ties to them, after the connected accounts are stopped and their provider revocations have run, so its failure cannot keep a credential live; SCIM revokes the user's service accounts even when it fails, and a retry finds the same owners. As for connected accounts, a worker row written at or after the owner's revocation cutoff is kept (the reader links gain an updated_at for this). A live read refuses a registration whose mode is not live. The dashboard has no protected live view. No provider or native source is removed. See Document source worker boundary.

Compatibility, rollout and rollback

  • Wire: adds knowledge.source.live and explicit read status, body, source link and fetch time. Existing operations and defaults are unchanged. Over MCP, a knowledge.source.live entry in a JSON-RPC batch with other entries is answered INVALID_REQUEST (-32600, "Send this request individually") before any worker read, and the other entries answer normally: the read's publication fence is held only briefly after the read, and two fenced reads in one batch would each hold the source lock while waiting on the other. A single request or a one-entry batch is unchanged, and the tool description says to send it alone. The MCP refusal of a bad request ID on this op reads "Request ID is invalid or too large for this operation" (INVALID_REQUEST, unchanged code). Its ledger rows, marked ones included, record the closed outcome status as out_status and nothing else from the result.
  • Operator steps: under the Postgres authority each document source lease held keeps one connection outside the pool for its source lock, so size max_connections for it. LOOM_KNOWLEDGE_SOURCE_WORKER_ROUTES_FILE defaults 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. The defaults are the caps: 8 s for the read, 2 s for publication and 1 s per frame. Keep registrations and copy writes disabled until the worker, account setup, erasure and mixed versions qualify together.
  • Internal breaks: none.
  • Rollback: Postgres migrations add metadata tables. The worker source codec uses the existing ClickHouse source configuration and item columns. An old reader cannot serve the mirrored worker row. This change leaves writes to these registrations disabled.

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. 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 resolves current source and worker authority, then takes the publication locks, rereads the source row and locks the approval, account and link rows before it is sent. 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 tests/integration/test_mcp_worker_pg_erasure.py seeds all four worker tables through the store writers and checks that a user-scope erasure removes none of them, that owner deletion through stop_subjects removes the subject's rows in every namespace and keeps other subjects' rows and the approvals, that a cutoff erases only rows written before it, and that namespace erasure removes every row of the namespace. Unit tests cover owner deletion reaching an owner only through a verified alias, a failed worker erasure still stopping and revoking every account and the user's service accounts, rows kept or erased by the revocation cutoff (an outright revocation with a cutoff included), and erase_subject restarting so it takes its namespace locks in sorted order. Hosted tests/integration/test_mcp_worker_pg_fence.py covers the real Postgres lock order, a busy authority row withholding the frame, and an account lookup matching only its own collection; mixed-build qualification of this op is not yet run.

AI assistance in the code

  • AI-generated with Codex and Claude Code. Each push was reviewed by an independent agent session against the whole diff, and the focused unit tests, generators, Ruff and mypy were read before the next push.

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

Checklist

  • Local format, lint, type checks and focused tests pass. The full suites are reported by CI.
  • Applicable SDK, settings and reference outputs were regenerated.
  • Postgres migrations are additive and follow the base migrations.
  • Mixed builds and live transport qualification pass on hosted CI.
  • Commits are signed off.

Note

High Risk
Touches authz, Postgres locking, and publication fencing for live upstream reads; incorrect fence or erasure behavior could leak content or serve stale frames after revocation.

Overview
Introduces experimental knowledge.source.live, a read-only path to fetch one selected upstream document through an operator-provisioned MCP source worker without indexing or persisting the body. The op is marked retains_no_payload (ledger stores only closed status, HTTP/MCP no-store, narrow tokens refused) and is wired through all SDKs, settings, and operation reference docs.

Storage and lifecycle: Three Postgres migrations add worker enrollment challenges, accounts, collection approvals, and team reader links (canonical subject, no credentials). Architecture docs describe the worker boundary, source lock + shared frame fence, and erasure rules; namespace delete and pg_knowledge.delete now clear worker metadata, and census/erasure classify these tables as namespace-only or subject-owned.

Runtime behavior: A new namespace source advisory lock coordinates exclusive source writes with shared locks during live frame handoff. request_tail gains publication fences and 512 KiB chunked body delivery so large responses re-check authority between chunks. New env caps (LOOM_KNOWLEDGE_SOURCE_WORKER_*) configure routes file and read/publication/frame deadlines; Postgres sizing docs note extra connections per held source lease.

CI and fixes: Storage CI runs integration tests for worker PG fence races and erasure; SCIM token stop now always revokes service accounts in a finally even if connection stop fails.

Setup ops that register workers/accounts are intentionally not in this PR—live reads will return denied/unavailable until that ships, though store writers exist for fence tests.

Reviewed by Cursor Bugbot for commit 8d2e344. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Dec 3, 2026 12:03pm UTC
loom-telemetry Ready Ready Preview Dec 3, 2026 12:03pm UTC

Request Review

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>
@zlareb1

zlareb1 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

85528c3a60bc02898d295d90b71cd8941c771389 adds a real Postgres test to the ordinary 16 and 18 storage jobs. The test observes the database blocking a team unlink, account revoke or approval revoke while a response frame is held. The revocation must commit after handoff, and a later handoff must be denied. Local checks covered the test syntax, lint and workflow selection; the database cases have yet to pass on hosted CI.

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>
@zlareb1

zlareb1 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

The full CI run for 85528c3a60bc02898d295d90b71cd8941c771389 failed. Run

  • Both PostgreSQL storage jobs reached the new live delivery fence test. The approval revocation case failed because PostgreSQL inferred conflicting types for the mode parameter in the update. The owner and reader cases did not appear in the failure summary. The local fix binds that parameter as the column's smallint type.
  • Ruff, format, generated contract checks, SDK mypy, and the server mypy gate passed in the combined job. The function length check rejected the ledger and MCP call functions. The local fix moves the payload suppression and capture decision into small helpers; the capture test checks that live reads skip namespace consent, while regular calls still honor it.
  • The route provisioning test expected an active worker directory under the default unit settings. The local fix tests both storage authority modes explicitly, including the fail-closed case.

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>
@zlareb1

zlareb1 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent review of 15ac4a2e3757edf91e1d6474ef650068e93571f9 requests changes. It covers the full changed-path set against a87e613a7faa2ebe72ac63d19e14b39c4027ff50. Unchanged role revocation internals remain outside review coverage; the review does not claim atomic ordering with them or with a future source mutation.

  • The shared admission rule treated every knowledge.* read like a namespace-owned row. A live upstream request cannot apply a user or session row filter. The local fix excludes this exact operation and enforces the same token restriction at the protected entry point. Focused tests passed for HTTP and MCP admission and the protected context.
  • The architecture page used present tense for storage, indexing, and refresh paths that do not run. It now states them as requirements and identifies the registered live prerequisite.

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.

@zlareb1

zlareb1 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Hosted workflow 45390047966 for 15ac4a2e3757edf91e1d6474ef650068e93571f9 passed both PostgreSQL storage jobs (16 and 18). Both job logs show the new live source fence fixture ran. The approval revocation failure from the preceding head did not recur. The workflow remains red: seven unit and isolation jobs failed, in the same categories previously observed on the base. This is not a merge waiver.

New head 851772554cea3cd50ed127ae84d810d45c294458 rejects narrowed read credentials for the live operation before HTTP and MCP policy consumption, and documents the released scope of this draft. The relevant focused checks passed (8 tests). Fresh whole-source review and normal exact-head hosted qualification are pending. This draft does not enable live reads in production.

@zlareb1

zlareb1 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent review of 851772554cea3cd50ed127ae84d810d45c294458 covered the 72 changed paths and confirmed the narrowed-token refusal and the corrected live/stored documentation. It recommends keeping the draft unmerged until hosted checks and the activation boundaries are qualified.

The exact-head HTTP schema job failed in test_generated_payloads_obey_the_actual_success_schema: Hypothesis reported HealthCheck.too_slow during input generation, before the test's request assertions. Recent main runs of that workflow passed. This is unresolved; there is no unchanged rerun or relaxed gate. The normal workflow is still running on this head.

@zlareb1

zlareb1 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Exact head 851772554cea3cd50ed127ae84d810d45c294458: the required Postgres 16 and 18 storage jobs passed, each with 922 passing tests in the authority matrix. Both logs confirm execution of the worker fence fixture. Their standby durability and reconcile steps also passed.

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>
@zlareb1
zlareb1 marked this pull request as ready for review November 26, 2026 16:28

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

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>
@zlareb1

zlareb1 commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

The formatter failed on docs/pages/agent-memory-selector.astro in the merge with main. This PR does not change that page. The same Biome error occurs on main at 0e3555645029.

PR job: https://github.com/ClickHouse/loom/actions/runs/45862140452/job/140055809389
Main job: https://github.com/ClickHouse/loom/actions/runs/45861195869/job/140052411285

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>
zlareb1 and others added 10 commits December 2, 2026 19:39
…rasure docstrings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…e; drop unreachable checks

- _alias_tied reads each owner's verified spellings once for both registries.
- WorkerReadChannel and open_worker_routes no longer recheck bounds the routes file and
  module constants already fix.
- Revert an unrelated docstring rewrap in steps_pg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…cross both scans

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…typed fields make dead

- pg_worker_row_lock.fetchrow_for_share reads FOR SHARE NOWAIT and raises WorkerRowBusy,
  so the directory no longer imports the driver.
- WorkerProfile and WorkerRoute stop re-checking types the routes file already fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…e strict model's shapes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…lock; TLS checked by the channel

- pg_worker_row_lock.require_authority_transaction replaces four differently worded copies.
- WorkerRoute no longer repeats the channel's TLS verification check.
- Tests: the busy-row fake states its transaction; the routes file refuses wrong-shape
  profiles the dataclass now trusts it for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…one guard per write

- test_owner_deletion_keeps_worker_rows_written_after_the_cutoff passes every spelling,
  as callers do (hosted unit part 5).
- Route-file errors name a profile's org as [org].
- issue_challenge relies on lock_account's guard; the guard's pg-disabled refusal is tested;
  enrollment tests assert statement order without the guard's own check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…control

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

# Conflicts:
#	server/transport/mcp.py
…time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

await _revoke(account, credential=credential, deadline=deadline)
if erase_owner:
async with asyncio.timeout(settings.knowledge_connected_stop_timeout_s):
await _erase_worker_owners(subjects, org, found, spellings)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repair timeout starves worker erasure

Medium Severity

stop_subjects now runs _erase_worker_owners under a second full knowledge_connected_stop_timeout_s window after the account-stop loop. SCIM DELETE's error tail wraps the whole stop_connections call in one timeout of that same duration, so time spent stopping accounts leaves none for worker erasure, and the repair swallows the timeout. A failed delete can therefore leave mcp_worker_* rows in place until a later retry.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fee9f7b. Configure here.

zlareb1 and others added 2 commits December 2, 2026 21:29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…ot starve it

- pg_source_lock.exclusive uses pg.dedicated(); a write whose body needs pooled
  connections, or nests a second lease, no longer waits on a pool its locks fill.
- Tests: the lock fakes take no pooled connection; dead pg.enabled patches dropped; the
  user-scope residue check passes the saga's user_id scope type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ 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 8ce53ba. Configure here.

zlareb1 and others added 16 commits December 2, 2026 21:52
…for it

- pg_source_lock.exclusive opens its connection within the pool acquire bound and answers
  POSTGRES_UNAVAILABLE past it.
- storage-authority states that each source write in flight holds one connection outside
  the pool; pg.dedicated's docstring names that use; stale comment, helper name and wrap
  fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
… the rule generally

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…r lease and process

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…ound; rewrap two paragraphs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…med as one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…for the text check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
A 5xx the status table does not name comes from the worker or its proxy
failing, so the caller may retry; any other unnamed status still fails
closed as denied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The test now covers every named worker status, the table drops 503,
which the server-error default already answers, and the boundary page
says unavailable also covers a worker that failed to answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
401 and 403 already fall back to denied, and the boundary page says a
timeout also covers the worker's own read timing out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
main retired the hand-kept llms.txt; the Go and Rust wire models are regenerated from the merged sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The publication size check derives the escaped copy's length from the
ASCII JSON it already built, and the retains_no_payload comment names
the MCP batch and notification rules that read it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The MCP endpoint passes its verified token to the batch dispatcher, so
the refusal row carries the caller's org and subject whatever the live
entry's position, rather than whatever an earlier entry left in the
auth context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The refusal comes from the request's framing before any dispatch, as a
single live notification or bad request id does, and those write no
row; the batch now follows the same rule, so no row can carry another
entry's auth, run or consumer. The auth argument added for that row is
gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

This branch has not been deployed

No deployments
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