Skip to content

Prepare release 1.3.0 from current main - #845

Merged
zlareb1 merged 43 commits into
release/prepare-1.3.0from
prep/release-1.3.0
Nov 18, 2026
Merged

zlareb1 merged 43 commits into
release/prepare-1.3.0from
prep/release-1.3.0

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Why

Reconcile the existing release preparation with the merged source through the preparation branch's required pull-request workflow. The resulting tree retains main's source, generated clients and documentation together with the release version pins and two test-isolation repairs.

Scope and risk

This forward merge includes main through #839. Relative to that main snapshot, 22 version paths set the release pins: the server, SDKs, frontend, root packages and skills use 1.3.0; the chart uses 0.3.0 with appVersion 1.3.0; the paired coding-agent plugins use 1.2.30 and require server 1.3.0. Two existing test files also isolate their clock and marked request context. The clock fixture replaces only the gateway module dependency, and the mirror-failure test restores its prior request-work context through the existing binding helper. Production freshness and required-tail refusals remain unchanged. Every other file and mode matches that main snapshot.

The existing preparation branch and its history are retained. The release pull request into main follows after this protected update lands. A release candidate, its soak and final publication remain separate steps.

Compatibility, rollout and rollback

  • Wire and operator changes inherited from the included features are listed in the release notes below. The version reconciliation adds no wire operation, schema migration, feature activation or default setting.
  • Keep mirrored-source creation, query history, gap drafting and independent source push disabled unless their documented activation requirements are met. Native analyst provisioning and ordinary-event compatibility require their supported runtime proof.
  • Final composition, generated notes, plugin versions and every required check must be reconciled again before the release pull request merges. Version collisions must be resolved against the versions actually merged on main.
  • Rolling upgrades and rollback retain the data, accounting, erasure and protection requirements in the release notes. No tag or publication is performed by this update.

Tests

  • prepare.py check 1.3.0, prepare.py check-chart 1.3.0 and scripts.codegen.agent_plugin_sync --check pass.
  • The included version checkpoint passed 108 focused release-version and release-preparation checks and all eight Node plugin server-version checks. Full local suites were not run.
  • The combined focused regression passes all 44 checks, including mirror serialization followed by consumer-event emission, the bearer-cache module and both model-policy denial controls. The two source repairs also retain their diagnosed failing reproductions.
  • Fresh generated notes use this complete source and history. The generated wire appendix is retained verbatim in the curated notes.
  • Full unit, integration, coverage, schema, SDK, frontend, plugin and security checks run in remote CI and must pass on this head and its tested merge composition.
  • Internal independent whole-source and public-content review runs alongside CI.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex reconciled the merge, checked source provenance, incorporated the published test-isolation repairs and prepared the version pins and release notes.

  • I can explain every authored change and its interaction with the included source.

Checklist

  • Commits are signed off.
  • Version and chart checks pass; both plugins and their minimum server version agree.
  • Non-version content matches the included main snapshot except the two published, focused-tested isolation repairs.
  • Fresh independent whole-source and complete public-body review reports no findings or nits.
  • Every applicable remote CI check passes for the exact tested composition.
  • The protected branch's actual merge requirements are satisfied.
  • Concurrent plugin versions and current main are reconciled before the final release merge.

Release notes for v1.3.0

New features

Improvements and fixes

Compatibility and deployment

  • A Postgres-backed process reads cell state before serving. A process without LOOM_CELL refuses an enforced or partial cell; a failed initial Postgres read fails boot, except while migrations are pending, when the process remains unready. (A server process with LOOM_CELL unset is gated by its deployment's cell state #586)

  • An enforced cell checks tenancy on writes, including the tenancy row itself. LOOM_PG_DSN must connect directly to Postgres. Older pods on an already prepared later cell must be rolled in one step once migrating boot installs the triggers. loom doctor detects missing, altered or disabled triggers and lost session markers. (A cell's Postgres refuses an unheld org's row from a session that ran no tenancy check #599, A cell refuses a tenancy row from a session that ran no tenancy check #676)

  • CLI writes check the deployment and require the grants in upgrade step 15. Without LOOM_CELL, they refuse a cell past recording. Commands configured for a cell refuse another cell's stores; revocations that cannot restore access retain their documented outage behavior. New org names are bounded at 2048 UTF-8 bytes. (An org-declaring CLI with LOOM_CELL unset is refused on a cell past recording #668, A cell records and the router places no org name longer than 2048 bytes #671, An org-free CLI command says whether it reads, writes or revokes, and a write on another cell's stores refuses #673)

  • memory.promote for a definition requires approved_sha256 and promotes the namespace-wide row by the token's actor. Sensitive values, empty terms, conflicting terms or aliases and the shared-definition cap refuse promotion. (A definition is promoted from its namespace-wide row with the hash an admin approves, under a name no other shared definition holds #667)

  • Native HTTPS uses LOOM_TLS_CERT_FILE and LOOM_TLS_KEY_FILE, with certificate reload in each web process. The chart's tls.secretName configures the certificate mount and HTTPS probes. The image launcher refuses UVICORN_* variables; remove those variables before upgrading and use the documented Loom settings. (The web port serves HTTPS from a certificate and key it reloads when they change #756)

  • Each metric retains up to otel_metrics_cardinality_limit series per process, default 20,000; additional attribute sets accumulate in an overflow series. (OpenTelemetry 1.45.2: each metric keeps up to otel_metrics_cardinality_limit series, 20000 by default #648)

  • Query-history and gap drafting introduce private definition candidates. Before downgrading to an older reader, use a maintenance window: disable both drafting features, quiesce drafting/review/registration/worker traffic, drain queued/model work, settle uncertain sends and retained leases, remove all versions of private candidate kinds and all registrations, and verify zero on every readable storage replica. Keep private producers disabled throughout the downgrade. Published definitions retain their existing lifecycle. (Draft definitions from query history and search gaps #768)

  • memory.search and memory.search_trace accept at most 64 raw entity_filter entries, including repeated names. Canonical alias expansion is bounded at 256 names. Entity-summary retrieval separately bounds the case-insensitive distinct union of the canonical filter, query handles and known vocabulary tokens at 256 names. Overflow of either 256-name bound returns 422 VECTOR_INPUT_TOO_LARGE through retries, memory.ask widening and composed search, without a partial ranking. Narrow the query or filter before retrying. (Entity filters refuse oversized alias expansion #800, Entity summary reads reject oversized seed sets without partial fallback #808)

  • POST /v1/me/personal_tokens.create issues the explicit personal-agent token kind only from the person's own primary sign-in session. The optional signed reads_as_creator claim defaults to false and ordinary delegation does not copy it. No operation-transport RPC is added by this route. (Checked document reads enforce current source permissions #799)

  • Source membership and listing evidence must be present and current for checked reads. LOOM_KNOWLEDGE_SOURCE_ACL_STALE_SECONDS defaults to 3600; no backfill infers domain membership from an email address. Before rolling back after mirrored writes, stop those writers, settle outstanding work and follow the documented mirror erasure and telemetry sweep. Keep mirrored creation disabled on an incomplete fleet. (Checked document reads enforce current source permissions #799)

  • Ordinary event inserts and signed, namespace-scoped analysis remain available across serving builds. agent_events retains ordinary columns and values; a permanent ordinary_events_only CHECK rejects marked events and reserved mirror namespaces. Marked requests and mirror workers write the separate agent_events_private store, which has no analyst grant or analyst-visible physical metadata. (Ordinary event analysis remains available across serving builds #825)

  • The signed analysis_agent_events catalog view unions ordinary and private events and masks protected fields before caller predicates and grouping. Ordinary agent_events reads retain their signed namespace scope; the analyst cannot read the private table. Trusted cost, budget and history-policy reads cover both stores, and user erasure scrubs both through agent_events.scrub. Private events use the ordinary ledger's retention and tiering policy. (Marked document requests keep accounting behind their privacy boundary #803, Ordinary event analysis remains available across serving builds #825)

  • Analyst administration uses loom ch-setup --apply-analyst-sql with explicitly configured existing access-management credentials. It applies only the analyst boundary under the live proof and lease, without rebuilding reader credentials. --print-analyst-sql refuses with a nonzero result and prints no SQL or secrets. General --print-sql remains available for database and reader preparation; print and apply modes are mutually exclusive. (Ordinary event analysis remains available across serving builds #825)

  • Session-content operations require exactly one X-Loom-Session-Protection: v1 header once deployment protection is set. Missing, repeated or unknown declarations grant no promise. The gate includes dual-use memory.set, memory.bulk_set, memory.search and code/context operations used by automatic clients. Missing protection or unverifiable deployment state returns nonretryable 409 SESSION_PROTECTION_REQUIRED. HTTP checks before reading the body; MCP checks before content validation, identity defaults, replay or implicit session runs. (Session-content admission uses durable deployment protection #819)

  • The optional LOOM_KNOWLEDGE_MIRRORED_SOURCES_ENABLED setting now exists, defaults false and requires restart. Setting it true persists a deployment-wide latch before startup admits clients or workers; the heartbeat repairs that protection. Setting it false does not clear the latch. With the switch false, an undeclared client still needs a fresh service-principal Keeper absence proof; a declared client does not exercise that default path. This setting does not make public mirrored-source creation available. (Session-content admission uses durable deployment protection #819)

  • Named-user budget status withholds exact spend and its percentage except for a verified platform admin without namespace-role restrictions. Admission and routing still count all spend, including marked requests. User warnings always withhold exact spend, including webhooks and operator-triggered delivery. Namespace and org totals retain their existing numeric form. (Named users have daily cost caps and inbox warnings #777)

  • Before a downgrade after budget warnings were produced, stop request/background budget-check producers and status polling, drain scheduled deliveries, settle uncertain writes and writer leases, then remove only budget.warning events and verify completion and zero warnings on every storage replica. Save the global and namespace policies first: older namespace writes reset the new cap/inbox fields. Keep the feature disabled on older builds and reapply saved policy only after the full fleet supports it again. (Named users have daily cost caps and inbox warnings #777)

  • Tracker feeds support a single self-hosted server or shared storage with ReplacingMergeTree or SharedReplacingMergeTree; self-hosted replicated tables are refused. Feed connections retain the deployment's storage-authority, organization and cell checks. The dedicated writer must have verified limited direct and effective grants and remain separate from the serving reader. (A native GitHub feed supplies team-owned tracker records #786)

  • Assistant mirror admission uses a separate strict server-issued answer_mirrors Boolean. Missing admission is false, and mirror discovery also requires the caller's separate session_protection promise. An older verifier accepting the signed claim does not enforce it. Keep mirrored-source creation disabled until every serving build and consumer enforces the documented privacy protocol. No migration or backfill is added by this protocol change. (Assistant answers bind mirror admission and private accounting #835)

Operator steps

  1. Follow the upgrade checklist and apply the additive migrations through the normal migrating boot. This release's cell and shared-memory changes have additional steps below.

  2. After every older replica is gone, follow upgrade step 14 to identify promoted rows left by earlier namespace erasures. Use the ledger's census cutoff and namespace when applying the documented tombstone or purge mutation, including hidden versions. Only a namespace-list erasure authorizes a purge. Erasures beyond the ledger's retention cannot be identified by that query. (A namespace erasure tombstones the namespace's promoted rows in loom.shared #572)

  3. Run loom secrets reseal with this build so document-source secrets and any existing source-push registry secrets are covered. No synthetic push setup is needed for an empty registry. (A document source reads up to 300 items given as links or ids, and update adds and removes them #562, Provider notifications request document source syncs #784)

  4. Before migrating reserved mirror namespaces, resolve any migration refusal with the preceding build: erase the affected namespace contents, remove its code repository and delete the namespace, then retry. (No token reaches a namespace named acl- and 24 hex digits, and no org-wide read lists one #665)

  5. Apply upgrade step 15's CLI grants, including ClickHouse SELECT on loom.storage_authority, the Postgres cell-state grants, connection limit and bucket settings. Complete step 16 before first-cell attach. (An org-declaring CLI with LOOM_CELL unset is refused on a cell past recording #668, An org-free CLI command says whether it reads, writes or revokes, and a write on another cell's stores refuses #673)

  6. Upgrade every router replica before attaching cells or upgrading cell processes. The cell processes read router state on each heartbeat; older routers do not have the required per-replica cache. Validate readiness and session tenancy markers after rollout. (The router serves the first cell's attach and removes an unattached cell's row #681, A cell's heartbeat reports serves, marked and the router's answer beside its fingerprint #693)

  7. Keep the document-source limit at or below 50,000 while any older replica serves. After rollout, the live setting may be raised. (A document source's document bound is a setting for every kind, and its stored copies are read in pages #662)

  8. After all older replicas are gone, have an admin promote each existing shared definition again so its approved hash and token-stamped actor are recorded. The new live cap memory_shared_definitions_max defaults to 500. (A definition is promoted from its namespace-wide row with the hash an admin approves, under a name no other shared definition holds #667)

  9. For local assistant models, configure the model and endpoint, mount the assistant secret and add explicit network-policy egress to the model server's port. (LOOM_LLM_PROVIDER=local runs Loom's model jobs and the assistant on a model server on the machine, with no API key, and the installer offers a running Ollama #634)

  10. Before enabling TLS, mount a certificate/key pair and change the upstream proxy to HTTPS in the same deployment window. Deployments using launcher-level UVICORN_* variables must remove them even when TLS remains off. (The web port serves HTTPS from a certificate and key it reloads when they change #756)

  11. A desktop-launched coding client must find Node on its startup PATH; configure the client's environment when Node is installed only through a version manager. Upgrade Loom to 1.3.0 before relying on plugin 1.2.30's new server calls. (The Claude Code plugin's hooks and header helper run a script file by a literal plugin path #573, Code answers carry the team's memories about the files they return #638)

  12. Install an SDK extra or optional peer for each framework integration used. Separate plugin/community packages require their own installation and publication prerequisites; the release does not imply catalog approval. (Google ADK memory services use Loom in both SDKs #696, The Python SDK ships a Pipecat memory service #750, The n8n package provides Loom memory and search tools #754, Dify workflows use native Loom memory and knowledge tools #763, Haystack pipelines store and retrieve Loom documents #765, Agno user memories use Loom through its native database interface #766)

  13. Before analyst provisioning, use a ClickHouse release that supplies system.constraints, as the pinned database release does. Missing CHECK metadata refuses the cutover. The operator must verify this on the actual database before the candidate starts. (Ordinary event analysis remains available across serving builds #825)

  14. Apply the additive query-history registration migration and upgrade every server and worker before registering a source or creating private candidates. knowledge_query_history_enabled defaults off; gap drafting also requires knowledge_gaps_enabled. Review the bounded read/pass/source/group/draft settings before enabling either feature. (Draft definitions from query history and search gaps #768)

  15. For the private cell probe, configure Postgres and authentication, choose cellProbe.port and finish both web and worker rollouts before preparation. Use the Service origin for the probe URL. Configure this port only through the chart value, not env, extraEnv, settingsFile or secrets.extra. Set zero to disable it. (Expose a private cell probe through the Helm chart #806)

  16. Apply the additive source-ACL schema before serving checked reads. Keep public mirrored creation disabled until the documented fleet, request, session and enablement protections are complete. (Checked document reads enforce current source permissions #799)

  17. Apply migrations 103–106 in order for checked reads and marked accounting. Migration 106 pauses and waits for the three local refresh schedulers, changes their definitions and resumes them; complete the cutover on every refresh-owning replica. Existing ordinary aggregate types are preserved and prior input is not replayed. Keep mirrored creation disabled. (Checked document reads enforce current source permissions #799, Marked document requests keep accounting behind their privacy boundary #803)

  18. Apply migration 107 before configuring named-user budgets. While any serving build is older or unknown, keep LOOM_DEFAULT_DAILY_USER_COST_CAP_USD=0, every namespace's daily_user_cost_cap_usd=0 and budget_alert_inbox=''. The last value disables warning configuration; it does not require emptying an inbox and does not drain existing sends. The global user cap and LOOM_COST_BUDGET_ALERT_SHARE are live; the share defaults to 0.8. Do not rely on user caps during overlap. (Named users have daily cost caps and inbox warnings #777)

  19. Apply migration 108 and preserve its deployment protection state. Keep the mirrored-source switch and both private-drafting switches off on every server and worker through the mixed fleet. Verify ordinary undeclared client calls through the supported route, including the required Keeper proof. Missing metadata, backend identity changes or uncertain proof writes refuse admission; adding a promise header is not a repair. Only the documented complete mirror cleanup can clear protection, last; tenant erasure and a local switch change cannot. (Session-content admission uses durable deployment protection #819)

  20. Apply migration 109. Keep LOOM_KNOWLEDGE_SOURCE_PUSH_ENABLED=false unless opting into source push; this switch is separate from mirrored-source protection. Later setup needs a fleet supporting the registry's erasure, an explicit HTTPS LOOM_PUBLIC_BASE_URL origin and provider-specific confirmation. Source credential/item changes retire setup. Before rollback after use, disable push and complete the documented fenced registry cleanup, including historical versions, while preserving unrelated namespace data. (Provider notifications request document source syncs #784)

  21. Documentation publication uses the existing site workflow. Automatic translation generation requires the documented restricted runner, initialized budget ledger and explicit cumulative allowance, which defaults to zero. This release does not configure that allowance or authorize generation. (Documentation publishes and maintains five translation locales #764)

  22. Apply migration 110 after migration 109. It creates private event storage, adds the ordinary-table CHECK and updates union readers without moving, erasing or replaying existing rows or aggregate history. Complete its pause/wait/update/resume of both refresh definitions on every refresh-owning replica. Before grants, analyst provisioning verifies exact CHECK/table identities on every writer, freezes and drains the finite set of prepared INSERTs, then requires a zero contamination census. Existing contaminated rows remain untouched for explicit operator resolution. ALTER completion or client disconnection alone does not settle a prepared write. (Ordinary event analysis remains available across serving builds #825)

  23. LOOM_CH_ANALYSIS_OBSERVER_URLS is a restart-only list of additional trusted writer HTTP origins, default []. The configured service origin is included and the existing service credentials are reused. Every writer UUID needs exactly one attested route. Complete native policy-catalog visibility, principal/role identity and non-replaying POST semantics are required; missing/duplicate writers, hidden metadata, redirects, HTTPS downgrade, identity drift or incomplete replies refuse provisioning. Intermediaries must preserve those semantics. Use the guarded analyst apply command for administrative setup. (Ordinary event analysis remains available across serving builds #825)

  24. Before an older build returns after mirrored enablement, settle outstanding writes and complete the documented mirror cleanup, including agent_events_private, marked receipts/audit figures and the cost rollup, before clearing deployment protection. Disabling a feature or downgrading schema alone does not establish privacy. Keep mirrored creation disabled until the separate fleet, client, restore and final erasure requirements are complete. (Marked document requests keep accounting behind their privacy boundary #803, Session-content admission uses durable deployment protection #819, Ordinary event analysis remains available across serving builds #825)

  25. To opt into tracker feeds, create the dedicated record with separate writer/reader credentials, set the tracker organization, initialize the record and register its read-only contract views, then configure and schedule each allowlisted repository. Attest the supplied token's read-only permissions: a successful API read does not certify its grants. Renew installation tokens externally and configure each replacement before expiry. (A native GitHub feed supplies team-owned tracker records #786)

  26. Tracker visibility observations expire after 15 minutes and are not an instant permission mirror. Turns are bounded to 120 seconds, 100 items per page and 2–100 pages per stream. Incremental polling does not detect deletions. Stop every writer before erasing raw rows, comments and checkpoints or retiring a repository. Namespace deletion removes Loom's derived state and grants, not the external record or its backups. Rollback stops the scheduled writer; observation expiry hides serving rows without erasing the record. (A native GitHub feed supplies team-owned tracker records #786)

Release artifacts

Release assets include the installer, stack bundle, SDK packages, coding-agent plugin archives and agent setup contract. Each carries a <file>.sigstore.json bundle for cosign verify-blob; verify the certificate identity for this release's release.yml tag and the workflow OIDC issuer. Older assets without a bundle cannot pass this file-signature check. Both container images also carry signatures. (#689)

Maintenance checks

Translation validation indexes protected ranges and table rows to avoid repeated scans on large reference pages. Request boundaries, labels and source offsets are preserved. (#834)

Original-unit reconciliation permits correction of a faulty completed whole-page translation when the prepared English input is unchanged. Existing request bounds and changed-input replacement restrictions remain. (#839)

Tracker reply parsing gains regression coverage, and CI action dependencies are updated. Additional tests cover budget bounds, memory-history diffs, audit privacy identifiers and port allocation. (#675, #705, #674, #700, #821, #812)

What changed for clients since v1.2.0

373 operations served (was 361); ops +12 −0; request fields +22 −0; response fields +25 −0.

New operations

  • knowledge.gaps.draft — role ADMIN, budget 30000 ms, MCP extended; request fields: gap_id, namespace, org
  • knowledge.gaps.list — role ADMIN, budget 300 ms, MCP extended; request fields: limit, namespace, org
  • knowledge.move — role WRITER, budget 8000 ms, MCP extended; request fields: namespace, org, source_uris, to_namespace
  • knowledge.query_history.add — role ADMIN, budget 30000 ms, MCP extended; request fields: cluster, databases, host, name, namespace, org, password, port, secure, user
  • knowledge.query_history.list — role ADMIN, budget 250 ms, MCP extended; request fields: fields, limit, namespace, org
  • knowledge.query_history.remove — role ADMIN, budget 1000 ms, MCP extended; request fields: name, namespace, org
  • knowledge.source.parse_links — role VIEWER, budget 50 ms, MCP extended; request fields: links, namespace, org
  • knowledge.source.push_configure — role ADMIN, budget 60000 ms, MCP extended; request fields: agent, enabled, name, namespace, org, session_id, user_id
  • knowledge.source.push_confirm — role ADMIN, budget 1000 ms, MCP extended; request fields: challenge_fingerprint, generation, name, namespace, org, signing_secret
  • knowledge.source.push_status — role ADMIN, budget 1000 ms, MCP extended; request fields: name, namespace, org, reveal_challenge
  • knowledge.source.update — role ADMIN, budget 60000 ms, MCP extended; request fields: add_items, add_links, include, name, namespace, org, remove_items, remove_links
  • memory.definitions.list — role ADMIN, budget 400 ms, MCP extended; request fields: namespace, org

Changed operations

  • assistant.ask: response +mirrored
  • code.callees: request +include_lessons, lesson_namespaces; response +lessons, lessons_left_out
  • code.callers: request +include_lessons, lesson_namespaces; response +lessons, lessons_left_out
  • code.context_pack: request +include_lessons, lesson_namespaces; response +lessons, lessons_left_out
  • code.impact: request +include_lessons, lesson_namespaces; response +lessons, lessons_left_out
  • code.outline: request +include_lessons, lesson_namespaces; response +lessons, lessons_left_out
  • code.search: request +include_lessons, lesson_namespaces; response +lessons, lessons_left_out
  • collection.list: request +include_document_counts
  • cost.budget_status: request +user_id; response +namespace_over_cap, user_id
  • knowledge.list: request +namespaces
  • knowledge.source.add: request +include, items, links; response +include, items; budget_p99_ms 30000 → 60000
  • knowledge.source.check: response +checked, sampled
  • knowledge.source.inspect: response +include, items
  • knowledge.synthesize: request +user_id
  • memory.promote: request +approved_sha256; response +ignored_args
  • memory.search: response +term_leg
  • namespace.get: response +budget_alert_inbox, daily_user_cost_cap_usd
  • namespace.register: request +budget_alert_inbox, daily_user_cost_cap_usd

Other client changes

  • General search's optional tracker response section can carry mode="search", namespaces, namespace_limit and cited results. Existing duplicate verdicts keep their shape. (General search includes readable tracker issues and pull requests #773)

  • memory.search hits include agent, identifying the writer when row identity is available; otherwise it is empty. (Google ADK memory services use Loom in both SDKs #696)

  • collection.list entries include nullable document_count. It is null unless include_document_counts is requested and counts documents directly in the collection. (Library collections show document counts and refresh states #771)

  • Learning entries include source_resource_id, defaulting to an empty string. learnings.review promotes private definition candidates only to memory. (Draft definitions from query history and search gaps #768)

  • cost.budget_status user mode requires a namespace. spent_24h_usd is nullable, and pct_of_cap is null when user spend is withheld. cap_source adds namespace_user and global_user; nullable namespace_over_cap reports the independent namespace ceiling. Namespace get/list entries expose daily_user_cost_cap_usd and budget_alert_inbox. A positive namespace user cap overrides the global default; zero inherits, and zero at both tiers disables it. (Named users have daily cost caps and inbox warnings #777)

  • knowledge.synthesize accepts user_id, default '-'; the Python convenience method forwards its optional user id. Transport user pins take precedence. Named-user caps cover supported synthesis and query expansion; unattributed work remains namespace-only. (Named users have daily cost caps and inbox warnings #777)

  • Budget warnings arrive asynchronously on a later point check or status poll after the configured share is reached; there is no discovery scan. Repeated observations deduplicate within a UTC day for the same scope, inbox, cap and share. User warning payloads set spent_24h_usd to null for every recipient. Polling and watch streams filter warning user/session scope before pagination; ordinary task events retain inbox visibility. (Named users have daily cost caps and inbox warnings #777)

  • Assistant answer tokens carry their caller's strict Boolean session_protection claim. Descendant answers cannot override it with a transport header, and ordinary delegation does not inherit it. Clients promising protection must stop automatic session-content capture after a mirrored read and preserve that state across child/resumed sessions. (Session-content admission uses durable deployment protection #819)

  • Multi-entry MCP batches replace every response-bearing marked entry, including denied or empty entries, with INVALID_REQUEST and Send this request individually. Notifications remain silent. Single calls and one-entry arrays retain checked reads. (Marked document requests keep accounting behind their privacy boundary #803)

  • Protected history makes enforcing policy rules evaluate potentially matching marked participation as unknown before success/argument filters, unresolved references or negation; it can refuse reads as well as writes. policy.check reports protected history unavailable with null protected leaf values. Shadow policies remain non-enforcing. (Marked document requests keep accounting behind their privacy boundary #803)

  • Marked cost is disclosed only to a verified unrestricted platform admin or authorized namespace/whole-day totals without fine-grained filters. Fine-grained marked cost is withheld; marked-only latency has no ordinary samples and returns zero latency values. This does not disable internal budget checks. (Marked document requests keep accounting behind their privacy boundary #803)

  • Source-push setup operations are experimental, namespace-admin only and non-idempotent, including status. push_status reveals a pending verification token only with reveal_challenge=true; ordinary inspection, audit and idempotency replay omit it. The response's enabled reports the global switch, while status reports source setup state. (Provider notifications request document source syncs #784)

  • Provider notifications use the separate non-RPC POST /hooks/knowledge/{namespace}/{source_id}/{generation}?org=<encoded-org> route with provider proof, rather than an RPC bearer token. Bodies are bounded at 65,536 bytes. A 200 acknowledgement can represent an early synchronization notification and does not prove that work was requested or content ingested. Drive uses channel-token verification rather than signed delivery; other supported providers require their documented HMAC and identity checks. (Provider notifications request document source syncs #784)

  • assistant.ask adds optional response field mirrored, default false. Marked chat output begins with mirrored: true; marked SSE begins with data: {"mirrored":true} before answer text. HTTP/MCP success and error output retains the mark after serialization and protocol unwrapping; MCP structured and JSON text results preserve it, and a marked search summary follows a first JSON marker block. (Assistant answers bind mirror admission and private accounting #835)

  • The server fixes answer_mirrors before spend or model work from active mirrored registrations in the authorized namespace. Active registrations keep the answer marked even when ACL checks exclude every private row. Caller fields, headers, token-mint endpoints and CLI flags cannot supply admission. An initially ordinary answer cannot gain a mirror leg after source activation. Ordinary delegated children omit both answer_mirrors and session_protection; descendants cannot widen either claim with a header. Current document authorization still applies. (Assistant answers bind mirror admission and private accounting #835)

  • Incremental assistant text is provisional. A marked response retains required accounting after headers, joins producer cleanup through repeated cancellation and confirms its required private cost row before terminal completion. Failed required capture or delivery cannot complete successfully. Whole responses and checked source frames retain accounting before publication. (Assistant answers bind mirror admission and private accounting #835)

  • Python and TypeScript assistant streams require [DONE] before returning a completed answer. Incomplete EOF fails; text after [DONE] is ignored while later transport errors still propagate. Stream completion does not qualify durable automatic capture or privacy state across child/resumed sessions; clients promising protection must satisfy the separate session contract. (Assistant answers bind mirror admission and private accounting #835)

* Draft metric definitions from query history and search gaps

Keep generated drafts private until an administrator publishes their content. Register opt-in read-only query-history sources and bound generation by privacy thresholds and namespace caps.

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

* Allow an isolated name for mixed-version checks

Use the requested container name for both creation and cleanup. A failed creation leaves any existing container untouched.

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

* Pin query-history setting defaults

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

* Query-history settings distinguish cadence from deadlines

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

* Describe definition draft operations and review reads

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

* Document retained definition heads during draft recovery

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

* Show complete definition drafts before publication

Reviewers can inspect the full body and evidence before promoting a definition. Describe private draft destinations and authenticated approval attribution.

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

* Keep definition support counts in memory lineage

Private definition drafts retain a supporting-account count without storing identities. Both exact lineage paths use that count while ordinary and assistant-rule candidates keep their existing accounting.

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

* Fence private definition decisions against erasure

Private queue writes retain their proposal time and share a bounded writer lease with namespace deletion. Check erasure under that lease and retain uncertain sends so a delayed decision or model completion cannot restore erased evidence.

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

* Fence private publication and source registry erasure

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

* Expect retained writer fences in namespace erasure traces

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

* Allocate query-history migration after mirrored erasure

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

* Require private draft cleanup before older readers serve

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

* Keep gap input out of stored draft evidence

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

* Regenerate statement shapes on the composed schema

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

* Keep definition review tests within their type contracts

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

* Complete definition drafting contracts and Library composition

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

* Curation rollout names the existing absence precondition

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Entity filters refuse oversized alias expansion

Bound raw inputs and distinct canonical aliases before constructing the search filter. Preserve supported filter order and propagate size refusals through optional paths.

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

* The SDK error inventory includes oversized vector input

The new server refusal uses the existing SDK validation error. Include its code in the exhaustive inventory so the registry assertion continues to cover every server error.

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

* The alias ceiling states its fixed input contract

The effective entity-filter ceiling is a documented input boundary rather than an operator resource setting. Explain that distinction beside the constant without changing the value or the settings checks.

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

* Analyzer corpus tracks the bounded distinct entity query

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Personal-agent tokens name their reader through an explicit signed claim

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

* Resolve mirrored readers from verified account evidence

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

* Stage source-bound permission checks for mirror reads

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

* Keep mirror candidates out of shared lexical statistics

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

* Fill mirrored candidate pools after current permission checks

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

* Hydrate only exact chunks that retain current mirrored access

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

* Rank complete admitted source copies before projecting public addresses

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

* Refresh all mirrored search passes before selecting a route

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

* Collect ordinary search legs separately from fusion

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

* Use checked source pools in knowledge search

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

* Read source documents at exact admitted identities

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

* Check source access on document gets and keep mining ordinary

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

* Read admitted document chunks including embedding stubs

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

* Read checked source sections in document outlines

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

* Refresh source and reader evidence before checked reads

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

* Read checked source originals through guarded streams

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

* Read checked list fields and counts from one admitted copy

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

* Group list metadata before admission and public pagination

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

* List admitted document families before filtering and pagination

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

* Get and download the newest admitted mirror copy

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

* Invalidate synthesis proofs after a document identity or permission change

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

* Assemble synthesis from checked whole document copies

Keep ordinary chunks and document precedence. Pin one mirrored copy per address and discard all mirrored chunks when a checked read fails.

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

* Recheck document access around synthesis calls

Validate every mirrored copy before and after each model call and before returning an answer. Discard generated output after permission loss, drain concurrent calls, and report only documents the synthesis read.

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

* Read admitted source titles without document diagnostics

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

* Include checked source titles in document inspections

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

* Retain metadata proofs for live search chunks

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

* Renew checked search proofs across provider work

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

* Retain permission deadlines for composed document reads

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

* Renew composed document reads before rendering their results

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

* Keep checked repository listings out of shared caches

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

* Renew repository search permissions after both search legs

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

* Renew document access before unified search assembly

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

* Keep checked stack knowledge through final assembly

Prepare mirror access before stack reads and retain the checked selection through
rendering. Rebuild the complete ordinary suffix when its evidence expires.

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

* Prepare checked reads before context-pack providers

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

* Prepare checked ask requests before provider work

Retain source proofs through answer assembly and rebuild the ordinary result after permission loss. Drain owned provider work before publishing the replacement answer.

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

* The analyzer corpus covers checked source reads

Drive metadata discovery, admitted chunk and document reads through the existing statement recorder, and regenerate group-membership erasure shapes.

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

* Run checked source regressions under their required CI profiles

Keep signed HTTP cases in authenticated steps under both storage authorities, include the native Postgres cases, and close partial native acquisitions on every exit.

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

* Preserve checked-read contracts across query and provider boundaries

Keep materialized views in place, analyze explicitly formatted SQL without appending another format, and retain the caller stage around checked providers. Align delegation, context-pack and auth-data controls with their actual paths.

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

* Keep checked-read migrations after query-history storage

Preserve the merged query-history schema, erasure fences and generated references while assigning the unmerged reader-evidence migrations their own numbers.

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

* Keep the generated checked-read schema and journal controls current

Regenerate the schema from an empty database in the composed migration order. Remove the RENAME regression with its unused parser now that the views change query in place.

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>
A new write answers at its commit. Wait for the initial vectors before deleting a source so the downgrade can copy them and settle its document within the delete.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Draft metric definitions from query history and search gaps

Keep generated drafts private until an administrator publishes their content. Register opt-in read-only query-history sources and bound generation by privacy thresholds and namespace caps.

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

* Allow an isolated name for mixed-version checks

Use the requested container name for both creation and cleanup. A failed creation leaves any existing container untouched.

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

* Pin query-history setting defaults

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

* Query-history settings distinguish cadence from deadlines

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

* Describe definition draft operations and review reads

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

* Document retained definition heads during draft recovery

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

* Show complete definition drafts before publication

Reviewers can inspect the full body and evidence before promoting a definition. Describe private draft destinations and authenticated approval attribution.

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

* Keep definition support counts in memory lineage

Private definition drafts retain a supporting-account count without storing identities. Both exact lineage paths use that count while ordinary and assistant-rule candidates keep their existing accounting.

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

* Fence private definition decisions against erasure

Private queue writes retain their proposal time and share a bounded writer lease with namespace deletion. Check erasure under that lease and retain uncertain sends so a delayed decision or model completion cannot restore erased evidence.

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

* Fence private publication and source registry erasure

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

* Expect retained writer fences in namespace erasure traces

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

* Allocate query-history migration after mirrored erasure

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

* Require private draft cleanup before older readers serve

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

* Keep gap input out of stored draft evidence

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

* Regenerate statement shapes on the composed schema

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

* Keep definition review tests within their type contracts

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

* Complete definition drafting contracts and Library composition

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

* Search readable issues and pull requests with loom_search

Resolve authorized tracker targets before narrowing capture consent and searching the other planes. Keep duplicate verdicts for scoped defect reports and leave memory and knowledge ranking unchanged for general tracker matches.

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

* Unified search descriptions include readable issues and pull requests

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

* Refresh persisted tracker links before discovery

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

* Describe tracker search results and tag scope

Empty duplicate verdicts remain useful evidence, while tag filters apply to memory and knowledge rather than tracker matches.

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

* Curation rollout names the existing absence precondition

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

* Format the unified search argument table

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

* Keep tracker search regression fixtures on the planned call path

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

* Use the configured test target for tracker ASGI requests

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The deterministic fake client can synthesize facts. Match the development guide to that behavior.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
### Changelog category (leave one):

- Documentation (changelog entry is not required)

### 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):

Not required.

### Why

The fake LLM can synthesize facts and return deterministic answer text for development and tests. The quickstart and first-agent guide distinguish that output from meaningful extraction and grounded answers, which need a configured real LLM. The troubleshooting row explains that an empty extraction can also be valid when there is nothing memorable to retain.

### Scope and risk

The two guides describe existing provider behavior consistently in their introductions, provider table, session and ask explanations, and extraction troubleshooting. The quickstart table also receives formatter padding. Setup commands, conversation logging, expiry and permission guidance remain unchanged. The risk is confusing test output with meaningful results; both guides distinguish them.

### Compatibility, rollout and rollback

- Wire: none.
- Operator steps: none.
- Rollback: reverting restores the inaccurate fake-output descriptions; no stored data or generated files are involved.

### Tests

- Prettier 3.9.9 checks both changed Markdown files.
- The prose checker passes for both files and this description.
- A focused source comparison confirms the six related passages and table padding are the complete diff; headings, first sentences and links remain unchanged.
- `git diff --check` passes.
- Runtime tests were not run because this changes prose only. Full GitHub PR CI passes for this head.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated (an agent wrote most of the diff): Codex; checked against the fake extraction helper, client selection, SDK session flush and answer synthesis paths.

- [x] I can explain every line of this diff and how it interacts with the rest of Loom.

### Checklist

- [x] `make format-check`, `make lint`, `make typecheck` and `make test-unit` pass in GitHub CI; the integration suite also passes. Only the focused checks above ran locally.
- [ ] 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`). Not applicable: no generated source changed.
- [ ] A new migration is additive and numbered after the latest on `main`; no merged migration is edited. Not applicable.
- [ ] 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. Not applicable.
- [ ] The frontend builds (`npm --prefix frontend run build`) and its tests pass, if `frontend/` changed. Not applicable.
- [x] Docs under `docs/` describe the system as it now is, and this description names any operator steps and wire changes.
- [x] 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`).
- [x] Commits are signed off (`git commit -s`), as CONTRIBUTING.md asks.
#803)

* Preserve marked request protections for dependency composition

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

* Run marked event controls under both storage authorities

Keep private database cleanup tied to an explicit UUID even when creation loses its reply. Classify the fixed required-publication cleanup ceiling without changing its bound.

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

* Check marked durable folds and scoped SQL reads

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

* Keep marked event migration after checked source reads

Retain the query-history migration and its dependent schema while assigning the unmerged marked-event cutover a distinct journal number.

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

* Regenerate marked-reader query shapes after dependency composition

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

* Retain selected source proofs through response publication

Renew the exact selected content after required accounting and awaited sends. Discard abandoned branches and unopened downloads, preserve derived metadata dependencies, and keep cancellation accounting. Probe the physical memory relation when its analysis policy is removed.

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

* Type selected publication proofs explicitly

The strict type checker needs the element type before extending the retained proof list. Runtime behavior is unchanged.

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

* Keep marked event projections within the privacy boundary

Retain permitted numeric work without copying document identifiers or error prose. Supply expired scope settings only while provisioning the signed analyst view, and keep existing regression controls aligned with their producers.

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

* Format the event storage reference

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

* Keep source proofs through metadata and outline publication

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

* Keep response completion independent of expired publication proofs

Renew access before headers and every byte-bearing body frame. Empty completion frames must finish after a Content-Length client has consumed the response.

Give each integration test ownership of its offline client signer so in-process snapshots cannot stale the next test issuer. Preserve production key freshness and restore the exact prior snapshot on every exit.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
…ack (#808)

* Bound entity summary seeds and preserve typed refusals

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

* Optional read docstrings distinguish typed input refusals

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

* Wrap the composed search failure contract

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

* Document the fixed summary seed input bound

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

* Tracker integration restores the test client's keyring view

The in-process server lifespan loads a timestamped keyring snapshot. Restore the original client snapshot at fixture teardown so later tests do not inherit a stale server view. Production freshness checks remain unchanged.

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

* Search cleanup preserves cancellation inside handled caller exceptions

Pass the search body exception through the owned async context rather than reading ambient exception state. A successful search awaited from an exception handler still propagates cancellation after joining its children.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Memory-linked code guide shows an indexed change

Show how a saved lesson reads before and after a committed expression change and link the existing regression for the state transitions.

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

* Change walkthrough uses trunk and checks capped lesson cards

The link worker maintains trunk commits, while symbol cards can omit a changed lesson. Name trunk and point to the saved memory links when the card leaves it out.

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>
An approval refresh can withhold a parked hit within its bounded wait.
Keep empty no-match pages in the existing preparation deadline so the
case reaches its edit or demotion only after proving the governed hit.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Selecting both ports before either listener starts can assign the same
unreserved port twice. Keep the identity provider listening while choosing
Loom's port so the allocator excludes it.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
### Changelog category (leave one):

- Improvement

### Changelog entry

The documentation site publishes available machine translations in Simplified Chinese, Japanese, Korean, Brazilian Portuguese and Spanish alongside canonical English. Translation maintenance discovers tracked documentation changes and prepares bounded, validated updates after English changes merge.

### Why

Generated translations need published routes and a maintenance path that follows additions, edits, renames and deletions. The site and updater share route mapping, preserve English fallbacks, and expose stale translations without treating pending coverage as current.

### Scope and risk

This change combines localized site rendering, the translation lifecycle workflow and 34 reviewed generated updates. Language links, canonical URLs, alternate-language metadata, sitemaps, Markdown copies and indexing submissions use the available pages. Translation batches preserve verified pending output and repair surviving links before removing obsolete generated pages.

The role-bearing runner executes trusted main code. Hosted validation checks the exact generated branch before merge. The cumulative reservation ledger and batch limits constrain provider calls; a missing allowance defers generation. No server operations, storage schema or tenant authorization changes are included.

### Compatibility, rollout and rollback

- Wire: none. English remains canonical and the default. All five translation locales are selected by default.
- Operator steps: site publication uses the existing Pages workflow. Automatic generation requires restricted runner labels, an initialized budget ledger and an explicitly approved cumulative allowance, as documented in `CONTRIBUTING.md`. No AWS credential is stored in the repository. The allowance defaults to zero.
- Coverage: the existing translated documentation pages are published. Missing pages and retained stale documentation translations remain pending; this change does not include a full translation backfill.
- Rollback: reverting restores the English site and earlier updater. No database migration or running-service change is required.

### Tests

- `make format`, `make format-check`, `make lint` and `make typecheck`: pass.
- Combined translation lifecycle and localized-site tests: 669 passed; the workflow branch-filter correction adds eight passing focused checks.
- README finalization regression: ten passed after reproducing three failures; eleven existing security and lifecycle checks also passed.
- Documentation links, public copy and agent instructions: 451 passed.
- Strict documentation build and rendered checks across all five locales: pass.
- Heavy local browser and full-suite runs are omitted; full suites run in CI.
- Full unit suite, offline tests and required integration checks: required in CI.
- No provider calls were made for integration or validation. The generated updates retain their original machine output and review evidence.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated: Codex integrated the reviewed components and checked their combined diff and validation results.

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

### Checklist

- [ ] Local formatting, lint, types and focused tests pass; the full unit suite, offline tests and all other required checks pass in CI.
- [x] Generated files are regenerated rather than edited by hand; the translation bytes match their reviewed source outputs.
- [x] No migration, server wire field, plugin payload or frontend change is included.
- [x] Documentation describes the configured workflow and its remaining coverage and operator requirements.
- [x] Commits are signed off.

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

### Changelog category (leave one):

- CI Fix or Improvement

### Why

Postgres projection tests depend on initial memory rows and vectors being published before they replace or delete authority heads. A new-key `memory.set` can answer at its Postgres commit, before publication. If a later change overtakes the first publication, the tests can time out on an obsolete delivery or assert against rows that never reached ClickHouse.

The vector-retirement, history-retention, reconciliation, summary-retirement, live-claim redaction and cleared-payload tests wait for initial publication before changing those heads. The vector-retirement test also asserts that a live vector exists. The reconciliation, summary-retirement, live-claim redaction and cleared-payload tests retain their divergence counts and text-free vector tombstone assertions.

### Scope and risk

Six integration tests, including the four existing vector-retirement write variants and both live/parked lease cases. The existing publication helper establishes each fixture's initial state. Final publication waits, vector retirement, zero targets, history horizons and redaction assertions remain intact. No timeout, retry, skip, worker setting or production behavior changes.

### Compatibility, rollout and rollback

- Wire: none.
- Operator steps: none.
- Rollback: reverting removes the explicit initial publication preconditions.

### Tests

- `ruff check tests/integration/test_pg_authority.py`: pass.
- `ruff format --check tests/integration/test_pg_authority.py`: pass.
- Python AST parsing of the changed file and `git diff --check`: pass.
- Integration tests were not run locally. Full CI, including both Postgres authority jobs, must pass before merge.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated: Codex traced publication timing and added the publication preconditions and live-vector assertion.

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

### Checklist

- [x] Focused formatting, lint and syntax checks pass.
- [ ] Full CI and both Postgres authority jobs pass.
- [x] All six tests retain their existing timeouts and final assertions.
- [x] No generated file, schema, migration, wire field, plugin or frontend change is included.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Ignore HUP before forking the asynchronous Linux opener and restore the parent handler afterwards. The opener cannot establish its own signal handling before it is scheduled. Exercise inherited handling with a self-HUP before the existing exact-once URL assertion.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Draft metric definitions from query history and search gaps

Keep generated drafts private until an administrator publishes their content. Register opt-in read-only query-history sources and bound generation by privacy thresholds and namespace caps.

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

* Allow an isolated name for mixed-version checks

Use the requested container name for both creation and cleanup. A failed creation leaves any existing container untouched.

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

* Pin query-history setting defaults

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

* Query-history settings distinguish cadence from deadlines

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

* Describe definition draft operations and review reads

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

* Document retained definition heads during draft recovery

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

* Show complete definition drafts before publication

Reviewers can inspect the full body and evidence before promoting a definition. Describe private draft destinations and authenticated approval attribution.

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

* Keep definition support counts in memory lineage

Private definition drafts retain a supporting-account count without storing identities. Both exact lineage paths use that count while ordinary and assistant-rule candidates keep their existing accounting.

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

* Fence private definition decisions against erasure

Private queue writes retain their proposal time and share a bounded writer lease with namespace deletion. Check erasure under that lease and retain uncertain sends so a delayed decision or model completion cannot restore erased evidence.

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

* Fence private publication and source registry erasure

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

* Expect retained writer fences in namespace erasure traces

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

* Allocate query-history migration after mirrored erasure

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

* Require private draft cleanup before older readers serve

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

* Keep gap input out of stored draft evidence

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

* Regenerate statement shapes on the composed schema

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

* Keep definition review tests within their type contracts

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

* Complete definition drafting contracts and Library composition

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

* Search readable issues and pull requests with loom_search

Resolve authorized tracker targets before narrowing capture consent and searching the other planes. Keep duplicate verdicts for scoped defect reports and leave memory and knowledge ranking unchanged for general tracker matches.

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

* Unified search descriptions include readable issues and pull requests

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

* Refresh persisted tracker links before discovery

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

* Describe tracker search results and tag scope

Empty duplicate verdicts remain useful evidence, while tag filters apply to memory and knowledge rather than tracker matches.

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

* Add named-user cost caps and inbox budget warnings

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

* Include the user budget migration in the schema journal inventory

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

* User budgets cover synthesis and scoped warning streams

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

* Name budget source entry points and invariants

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

* Define user-budget activation and rollback boundaries

Older replicas neither preserve user policy nor protect private warnings. Activate after the fleet upgrade and settle and remove warning events before a maintenance rollback, then restore saved policy on upgrade.

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

* Allocate user budgets after query-history registrations

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

* Reuse the shared writer fence for budget warnings

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

* Number the budget upgrade rule after mirror erasure

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

* Curation rollout names the existing absence precondition

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

* Format the unified search argument table

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

* Keep tracker search regression fixtures on the planned call path

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

* Use the configured test target for tracker ASGI requests

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

* Regenerate schema for user cost budgets

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

* Align user budget contracts with checked synthesis

Carry warning identity columns through task event reads and register the warning pipeline. Preserve named-user budget assertions while updating checked-search fixtures and their explicit keyword contracts, and regenerate the SDK surface and statement catalog.

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

* Regenerate schema and statement catalog for user budgets

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

* Test marked namespace spend through the shared budget snapshot

The native marked-spend check uses the same rolling spend read as budget
status and admission, including when the namespace has no cost cap.

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

* Bound leased sends by the received server clock

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

* Withhold exact user spend from budget status and warnings

Named-user cap verdicts and warning thresholds count all ledger spend.
Status reveals exact user spend only to a platform admin without namespace
role restrictions; user warnings always redact the amount for recipients.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Related: #792
Related: #764

### Changelog category (leave one):

- Bug Fix (user-visible misbehavior in a release)

### Changelog entry

Machine translation bounds documentation requests, preserves source-attested names and technical values, and verifies the assembled page before writing it.

### Why

Splitting long pages only at second-level headings leaves some sections larger than one translation reply can hold. A truncated reply stops generation. The request planner now caps each source slice at 16 KiB while retaining paragraph, list-item, code, HTML and table-row boundaries.

The cost estimate uses the same slices that translation sends. The assembled page is checked again for content invariants and table layout before it is written. An indivisible oversized unit is refused before a provider call. Indented code remains whole, including tables that site extensions render differently; an oversized ambiguous block is refused.

Correct names and filenames can otherwise be rejected as untranslated English, while translated return-value strings can pass. Source context distinguishes protected spellings from ordinary descriptions. It checks preserved values in their original structural positions and keeps adjacent explanatory prose subject to translation checks.

### Scope and risk

Shared Markdown tokens move into the request-splitting module so the verifier and planner use one lexer. Maintained Markdown token ranges identify list items and table rows; the assembled table check parses both the site dialect and CommonMark tables. Code source ranges mask literal tags before HTML analysis. Site cell text is measured after serialization and raw HTML restoration. An indentation scan also covers the site extension’s two-space ordered-list continuations, which differ from CommonMark’s marker-width indentation. Their container rules differ. This avoids a partial table grammar that missed quoted tables and raw HTML contexts. Parser versions and runtime requirements are pinned; provider packages retain their versions. The architecture page describes the planning and validation boundaries. Source bytes, page-wide anchors and order survive reconstruction. The workflow installs its isolated, hash-locked runtime before checking freshness. Provider, model, output-token limit, retry, concurrency, budget, runner and permission settings retain their values.

Source-context checks use the same English page and source identity throughout retry, assembly and stored-page validation. Table context survives slices that begin after the header. Protection applies to attested name spans, repository file labels and declared technical values; capitalization, quotation marks and table position alone do not exempt English prose. The verifier rejects removed or changed protected spellings. A documented model default is tied to its source page, setting and default-value cell. Tracker contract type families are tied to their source page, ordered field group and Family cell, with tests against the implemented schema. Their literal spellings are preserved while ordinary headings, qualifiers and descriptions still require translation. Stored-page lifecycle validation uses the same source identity and both table parsers before staging, importing or activating output. The existing all-document inventory, README/subset safeguards, proof checks and HTML-tag counter remain in place. These checks do not certify semantic fidelity or current-source publication eligibility.

A source-byte bound reduces oversized requests; it does not guarantee that every model response fits. Existing truncated-reply refusal remains in place. A Markdown unit larger than the bound needs an English-source edit before translation can proceed.

### Compatibility, rollout and rollback

- Wire: none.
- Operator steps: none. This source change does not alter running generation jobs.
- Rollback: reverting restores the previous request planner and label checks. Generated output and budget history remain unchanged.

### Tests

- Nine regression cases fail before the change, covering oversized sections, multibyte input, protected Markdown units, provider admission, usage accounting and assembled table validation.
- Focused regressions cover two-space ordered-list continuations in plain text, quotes and admonitions, tab-indented lists, optional outer pipes, row loss, delimiters, single-column tables, nested containers, raw HTML and HTML elements spanning headings. Header and body cells cannot lose all text in CommonMark-only tables, including when empty inline markup remains in either dialect. Literal HTML in indented and nested fenced code stays protected. Translated cell text and valid pipe reflow are accepted in plain text, quotes, lists and admonitions. Existing section/assembly checks also pass.
- Focused HTML token controls cover the shared lexer. A parsed workflow comparison checks that runtime installation precedes the first CLI call; generation remains conditional on stale work and all other workflow settings retain their values.
- Three affected English inputs reconstruct exactly, with every source request at most 16 KiB. No provider was called for validation.
- Focused source-context cases cover exact names and file labels, ordinary residual descriptions, escaped pipes, literal-value changes, headerless table slices, retry feedback, assembled-page refusal and stored-page checks. Model-default regressions reject wrong settings, columns, paths, mutations and moves, and preserve full table context for headerless slices. Existing cached responses are examined without provider calls; remaining genuine differences stay reported.
- The related main composition passes 84 focused cases across lifecycle, README/subset/proof controls, stored metadata, bounded staging, tracker types and CI input guards. Stored-page regressions first reproduce eight source-context/table-layout failures; the corrected lifecycle rejects missing rows, extra cells and changed protected names. Existing cached tracker output passes the corrected type-family check without another provider call; the earlier untranslated phrase still rejects.
- Full suites must pass in CI on this final head. The tokenizer and all-document lifecycle changes are merged.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated: Codex traced the oversized requests, implemented Markdown slicing and source-context checks, and checked focused regressions.

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

### Checklist

- [x] Focused formatting, lint and regression checks pass.
- [ ] Full CI passes on the final main-based head.
- [ ] Fresh technical and content reviews have no findings.
- [x] Provider settings, financial guards and active generation inputs are preserved.
- [x] Commits are signed off.

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

### Changelog category (leave one):

- Documentation

### Why

Readers can choose an available language from every documentation page. When that page has no translation, the language link names an existing translated landing page. Native READMEs link to their available documentation.

Translated pages keep available sidebar and footer destinations in the reader’s language. Missing translations carry an explicit English label. Language controls, search labels and translation-status notices use the page’s language. Videos use their translated fallback text for accessible labels.

### Scope and risk

The site projects navigation per page without changing shared navigation objects. Equivalent-page metadata remains separate from landing-page choices. The README generator maintains its existing owned regions and reuses the configured site base and landing priority. Quickstart and other available owned pages provide native website links when translated indexes are absent. Shared interface copy participates in site indexing and README maintenance inputs. Video labels are derived during rendering while preserving media URLs, controls and other attributes. Retained obsolete landing pages keep their README links until the selected locale retires them; retirement repairs that locale's generated navigation in the same batch.

The change covers English and the five configured translation languages. Translation coverage and search-tokenizer quality require separate validation.

### Compatibility, rollout and rollback

- Wire: none.
- Operator steps: none.
- Rollback: reverting restores the prior navigation and generated README regions.

### Tests

- Nine focused checks for navigation ownership, language choices, native stale notices and generated README destinations pass.
- The supplied strict Material fixture covers 13 pages across all six languages, with native search labels, active navigation, English fallbacks, Markdown notices, metadata and sitemap checks.
- Thirteen focused video-label and page-language checks pass, including English preservation, escaping and multiple-video cases.
- Nine focused lifecycle cases pass, including landing removal, preferred-landing fallback, subset ownership, selected-page progress, deferred README activation, stale/conflicted output and proof preservation. Two new cases reproduce the failure before the fix and verify the site still serves an unselected retained landing.
- Eight focused fallback and retirement cases pass, including quickstart-only and other-page landings, retained locale ownership, selected-page progress, the last native landing and unchanged site/indexing behavior. The two missing-link cases fail before the fallback change.
- Nine focused README and retirement checks pass. Quoted filenames and Unicode paths fail before URL encoding and produce complete, encoded links after it.
- Full suites run in CI and must pass on the public head before merge. Deployed routes remain a separate publication check.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated: Codex implemented navigation projection, native interface copy and accessible video labels. Independent technical and interface-copy review is required on the public head.

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

### Checklist

- [x] Focused checks exercise the changed user paths.
- [ ] Full CI passes on the public head.
- [ ] Fresh technical and interface-copy reviews have no findings.
- [x] Generated README regions come from the existing generator.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Guard automatic session operations with a durable deployment latch

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

* Generate the deployment session latch schema

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

* Session admission validates complete Keeper storage metadata

ClickHouse engine_full includes each primary key. Match the actual storage clause while refusing wrong paths and keys, and classify automatic document-search fallbacks. Regenerate schema references and pin the new setting and error contracts.

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

* Session admission preserves request context and attests positive writes

Scope query tags through proof cleanup and reject positive writes on a backend that was not validated. Reuse strict Boolean claim validation and isolate the MCP refusal phase so both entry points remain within their size limits.

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

* Admission heartbeat and lease checks follow real callbacks

Assert repair precedes the holder read. Control only the lease test clocks and renewal wakes so healthy renewals cross the original expiry without assuming a prompt wall-clock schedule; keep the half-TTL cancellation policy unchanged.

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

* Regenerate analyzer shapes for the composed latch schema

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

---------

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

### 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):

Add a pure translation reconciliation API that retains authenticated completed requests across English edits and plans affected or unfinished ranges within the request bound.

### Why

Planning every request again from current English changes the cuts of completed work. A partial run also needs to distinguish completed replies from original units that have no completion. The reconciler takes a complete authenticated original-unit manifest, preserves whole completed payloads and exact separator ownership, and returns current scoped dispositions or explicit conflicts.

Headerless table gaps use the existing bounded planner with their complete source context. Changed-input corrections carry bounded ASCII feedback in the canonical SYSTEM, without replaying an old-input assistant response. Empty feedback preserves the existing SYSTEM and initial message.

### Scope and risk

This adds a pure planning API, contextual request splitting, initial-feedback construction and architecture documentation. The caller remains responsible for authenticating original plans, completion statuses, selected receipts and refusals. A metadata digest or missing cache file cannot establish that a completion is absent. The API does not resolve replies, admit provider calls or publish translations.

Repeated or unsafe mappings return conflicts. Replacing a completed whole-page unit and assigning unproven cuts among several unmatched original units remain unsupported. Every resolved or generated unit needs current-context validation, followed by whole-page invariants and semantic/completeness review. The main risk is incorrect source-range or separator ownership; focused regressions check exact reconstruction and preserved completed payloads.

### Compatibility, rollout and rollback

- Wire: no operation or field changes. The translation Python API gains reconciliation helpers, optional source context on `chunks.split`, and optional `initial_feedback` on `translate_text`.
- Operator steps: none. Consumers opt into the pure API; this PR adds no CLI, generation loop, dependency or execution controls. Default model, provider settings and spending code are unchanged.
- Rollback: reverting removes these APIs and their documentation. There are no migrations or stored-data changes to undo.

### Tests

The focused Python run passed 66 cases: reconciliation, canonical initial feedback and three existing default splitter regressions. It covers partial completion, mixed empty/LF separators, headerless table tails, source insertions/deletions, ambiguous or unsafe ranges, refusal, fault coalescing, request bounds and rejection before provider calls.

```sh
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=. python -m pytest --noconftest -o addopts='' -q \
  tests/unit/test_i18n_reconcile.py \
  tests/unit/test_i18n_initial_feedback.py \
  tests/unit/test_i18n_request_bounds.py::test_one_large_section_splits_at_complete_table_rows \
  tests/unit/test_i18n_request_bounds.py::test_a_short_multibyte_page_still_obeys_the_byte_bound \
  tests/unit/test_i18n_request_bounds.py::test_slices_keep_code_html_and_anchor_heading_pairs_together
```

Targeted Ruff and whitespace checks pass. The writing checker validates the architecture text and this description. Broad local suites were not run; full PR CI and independent review remain required before merge. No provider calls were made.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated: Codex wrote the implementation and tests, checked source-range and request-payload assertions, and ran the focused checks above. Maintainer review remains required.

- [ ] 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`). Not applicable: no generated surfaces changed.
- [ ] A new migration is additive and numbered after the latest on `main`; no merged migration is edited. Not applicable: no migrations changed.
- [ ] 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. Not applicable: no plugin files changed.
- [ ] The frontend builds (`npm --prefix frontend run build`) and its tests pass, if `frontend/` changed. Not applicable: no frontend files changed.
- [x] Docs under `docs/` describe the system as it now is, and this description names any operator steps and wire changes.
- [x] 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`).
- [x] Commits are signed off (`git commit -s`), as CONTRIBUTING.md asks.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
### Changelog category (leave one):

- CI Fix or Improvement (changelog entry is not required)

### 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):

Not required.

### Why

The Docker smoke verifies compiler indexes and restart persistence. Code-linked memory integration tests exercise handlers in process, so they do not check a packaged server returning a lesson's changed state over MCP after its source is reindexed. Extend the existing smoke with that round trip.

### Scope and risk

The existing Python fixture saves a lesson over MCP, waits for the link worker to mark it fresh, commits an expression change, and waits for the ingest and link workers to report the new commit and changed link. The lifecycle also waits for the scheduled Python compiler worker to publish that commit. Restart verification reads the changed link again, then deletes that smoke memory and checks its absence.

The installed environment template enables scheduled ingest. Before the first boot, the smoke explicitly sets `LOOM_CODE_INGEST_ENABLED=false` in its disposable environment so its initial seed and compiler checks finish before scheduled ingest starts. It then sets the same switch to `true` and recreates its existing server service. Scheduled compiler flags retain their existing installed values; this change does not disable them during the initial seed. Worker intervals, memory settling, product defaults, compiler checks and the 45-minute CI job timeout are unchanged. Each lifecycle invocation has one shared 1,020-second bound at the default worker intervals. Waiting for the normal Python compiler cadence can add about nine to ten minutes to CI; both architecture jobs must establish that the complete smoke fits its existing timeout. The status endpoint can return a cached repository head after the link has changed. The smoke polls until that endpoint also reports the exact edited commit, within the same lifecycle deadline. The other language fixtures retain their existing checks. A failed smoke still tears down its own Compose stack and volumes.

The installed smoke configuration uses single-user mode, a local embedder and the fake LLM. These assertions check transport, indexing, link states and persistence; they do not measure model quality or authenticated-client behavior.

### Compatibility, rollout and rollback

- Wire: none.
- Operator steps: none. The ingest switch is set only in the disposable smoke environment.
- Rollback: reverting removes the added smoke checks; no deployed data or schema changes are involved.

### Tests

- Ruff 0.16.9 lint and format checks pass for both changed scripts.
- The prose checker and `git diff --check` pass.
- A focused extracted environment-updater check verifies the explicit false-to-true phase configuration and source ordering. Fifteen earlier tiny extracted-helper checks cover MCP response errors, saved-value and namespace checks, fresh and changed states, exact commit checks and source compilation. They do not start a server or run a native smoke.
- Nine focused checks run the extracted status poller with inert MCP responses. The previous poller passes five and fails four; the corrected poller passes all nine. The checks cover transient cached heads, a permanently stale head reaching the existing deadline, and rejection of incorrect link commits, symbol paths and included lesson states.
- The previous native amd64 run returned the fresh link, then failed when the status endpoint returned an older cached head immediately after the scheduled Python compiler applied the edit. This corrects the smoke observation; it does not increase timeouts or change the status cache.
- No local server, database, Docker, browser or provider test ran. Full current-head PR CI passes, including both existing Docker Quickstart architecture jobs. The packaged checks pass the fresh link, committed source edit, exact changed commit, restart readback and exact-key deletion assertions.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated (an agent wrote most of the diff): Codex; checked against the existing smoke, worker configuration, MCP contract and code-link integration test.

- [x] I can explain every line of this diff and how it interacts with the rest of Loom.

### Checklist

- [x] `make format-check`, `make lint`, `make typecheck` and `make test-unit` pass in GitHub CI, including the integration and native image checks. Only the focused checks above ran locally.
- [ ] 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`). Not applicable: no generated source changed.
- [ ] A new migration is additive and numbered after the latest on `main`; no merged migration is edited. Not applicable.
- [ ] 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. Not applicable.
- [ ] The frontend builds (`npm --prefix frontend run build`) and its tests pass, if `frontend/` changed. Not applicable.
- [x] Docs under `docs/` describe the system as it now is, and this description names any operator steps and wire changes. No documentation source changed.
- [x] 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`).
- [x] Commits are signed off (`git commit -s`), as CONTRIBUTING.md asks.
* Draft metric definitions from query history and search gaps

Keep generated drafts private until an administrator publishes their content. Register opt-in read-only query-history sources and bound generation by privacy thresholds and namespace caps.

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

* Allow an isolated name for mixed-version checks

Use the requested container name for both creation and cleanup. A failed creation leaves any existing container untouched.

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

* Pin query-history setting defaults

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

* Query-history settings distinguish cadence from deadlines

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

* Describe definition draft operations and review reads

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

* Document retained definition heads during draft recovery

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

* Show complete definition drafts before publication

Reviewers can inspect the full body and evidence before promoting a definition. Describe private draft destinations and authenticated approval attribution.

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

* Keep definition support counts in memory lineage

Private definition drafts retain a supporting-account count without storing identities. Both exact lineage paths use that count while ordinary and assistant-rule candidates keep their existing accounting.

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

* Fence private definition decisions against erasure

Private queue writes retain their proposal time and share a bounded writer lease with namespace deletion. Check erasure under that lease and retain uncertain sends so a delayed decision or model completion cannot restore erased evidence.

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

* Fence private publication and source registry erasure

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

* Expect retained writer fences in namespace erasure traces

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

* Allocate query-history migration after mirrored erasure

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

* Require private draft cleanup before older readers serve

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

* Keep gap input out of stored draft evidence

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

* Regenerate statement shapes on the composed schema

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

* Keep definition review tests within their type contracts

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

* Complete definition drafting contracts and Library composition

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

* Search readable issues and pull requests with loom_search

Resolve authorized tracker targets before narrowing capture consent and searching the other planes. Keep duplicate verdicts for scoped defect reports and leave memory and knowledge ranking unchanged for general tracker matches.

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

* Unified search descriptions include readable issues and pull requests

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

* Refresh persisted tracker links before discovery

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

* Describe tracker search results and tag scope

Empty duplicate verdicts remain useful evidence, while tag filters apply to memory and knowledge rather than tracker matches.

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

* Add named-user cost caps and inbox budget warnings

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

* Include the user budget migration in the schema journal inventory

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

* User budgets cover synthesis and scoped warning streams

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

* Name budget source entry points and invariants

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

* Define user-budget activation and rollback boundaries

Older replicas neither preserve user policy nor protect private warnings. Activate after the fleet upgrade and settle and remove warning events before a maintenance rollback, then restore saved policy on upgrade.

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

* Allocate user budgets after query-history registrations

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

* Reuse the shared writer fence for budget warnings

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

* Number the budget upgrade rule after mirror erasure

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

* Curation rollout names the existing absence precondition

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

* Source push notifications request bounded document sync

Bind provider hints to the current source generation, verify provider proof, and keep polling as the recovery path. Fence sealed setup and sync hints against namespace erasure.

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

* Allocate source push migration after query history and budgets

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

* Compose push erasure fences with user budget delivery

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

* Regenerate the composed source push schema and statement corpus

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

* Document source push entry points and lifecycle invariants

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

* Push setup SDK summaries contain complete sentences

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

* Keep push retirement available and restrict callbacks to held orgs

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

* Allocate source push after user cost budgets

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

* Keep push erasure traces aligned with authority order

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

* Pin source push table ownership and replacement rows

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

* Format the unified search argument table

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

* Keep tracker search regression fixtures on the planned call path

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

* Use the configured test target for tracker ASGI requests

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

* Regenerate schema for user cost budgets

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

* Record the official source push schema artifact

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

* Align user budget contracts with checked synthesis

Carry warning identity columns through task event reads and register the warning pipeline. Preserve named-user budget assertions while updating checked-search fixtures and their explicit keyword contracts, and regenerate the SDK surface and statement catalog.

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

* Regenerate schema and statement catalog for user budgets

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

* Register source push provenance and scope contracts

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

* Test marked namespace spend through the shared budget snapshot

The native marked-spend check uses the same rolling spend read as budget
status and admission, including when the namespace has no cost cap.

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

* Bound leased sends by the received server clock

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

* Withhold exact user spend from budget status and warnings

Named-user cap verdicts and warning thresholds count all ledger spend.
Status reveals exact user spend only to a platform admin without namespace
role restrictions; user warnings always redact the amount for recipients.

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

* Test the push notification action in the source menu

Keep the exact admin menu assertion aligned with the supported source actions.

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

* Keep push maintenance on its connected client and configured deadlines

Carry the connected store through registry resealing and its lifecycle fences. Keep timeout defaults in the configuration catalog, and align source contracts and generated snapshots.

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

* Scope push registry keys and callback lookups by namespace

Namespace name checks must not scan every retained source registration in an organization. Keep callback lookups and maintenance cursors on the same physical key prefix.

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

* Generate the namespace-keyed push registry schema

Record the official schema and statement catalog for namespace-scoped push lookups.

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

* Keep push renewal deadlines inside the lease work window

The renewal lease permits work for forty percent of its lifetime. Reject provider and cleanup budgets that exceed that window while retaining the existing defaults and lease policy.

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

* Generate the combined mirror and push schema

Record the namespace-keyed registry and deployment latch in one official schema.

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

* Round-trip callback organizations through query encoding

A permitted slash in an organization must not become a callback path separator.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Related: #764
Related: #794
Related: #797

### Changelog category (leave one):

- Documentation

### Why

Readers can open more documentation in Simplified Chinese, Japanese, Korean, Brazilian Portuguese and Spanish. English remains canonical. Included translation bodies have complete source-bound semantic reviews. Versions held for semantic or language-completeness defects remain excluded.

### Scope and risk

This change publishes 307 generated pages and preserves 150 validated pages as pending until their link dependencies can activate. The maintained data-only importer rejected 44 other candidates; those versions are excluded. Current English source blobs, model and ownership stamps, protected source text, code, links, anchors and both table layouts must validate before staging. Dependency-safe activation determines which pages are published.

Missing translations continue to open the named English page or an available native landing. Existing stale translations retain their notices. Rejected versions, unreviewed outputs and pages with provider refusals remain excluded. This batch does not claim complete translation coverage or enable recurring paid automation.

The site records anchors from rendered page HTML. Raw Markdown code literals such as `<script>` can otherwise hide later real anchors from the build validator. This preserves the generated Markdown and rendered HTML, while genuinely missing and code-only anchors still fail validation.

### Compatibility, rollout and rollback

- Wire: none.
- Operator steps: none.
- Rollback: reverting removes the added generated pages and rendered-anchor inventory hook. English documentation remains available.

### Tests

- The maintained importer validates the selected generated data against current English and activates only pages whose link dependencies remain valid.
- Independent complete paired-prose reviews bind the included translation bodies to their exact English sources. Current-source and active-hold checks exclude invalid versions.
- Three focused rendered-anchor cases fail before the hook and pass afterward. Actual Spanish and Korean page rendering now recognizes all four existing anchors without changing HTML; genuinely absent and code-only anchor controls still warn. Targeted Ruff and formatting checks pass.
- Full suites and the strict documentation build run in CI and must pass before merge. Deployed routes, native navigation, metadata and sitemap coverage remain separate publication checks.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated: machine-generated translations were selected and imported by Codex. Independent source-bound semantic, technical and content reviews cover the final public change.

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

### Checklist

- [x] Generated data passes the maintained import and activation rules.
- [x] English remains canonical and incomplete coverage stays explicit.
- [ ] Fresh technical and content reviews have no findings on the public head.
- [ ] Full CI passes on the public head.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Code-linked memory guide links the packaged MCP checks

Link the packaged worker and restart checks beside the handler regression, with their authentication and model-quality limits.

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

* Separate the packaged check evidence paragraph

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

* Name the Loom service in the restart check

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

---------

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

### 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):

Translation planning can use a smaller request byte limit while preserving completed translations as whole units.

### Why

A truncated translation reply can require smaller requests for unfinished source ranges. The maintained planner accepts an explicit byte limit so the caller can refine those ranges without splitting or paying again for completed units. The default remains 16384 bytes with identical existing cuts.

### Scope and risk

Adds the optional keyword `bounded_new_request_bytes` to `chunks.split` and `reconcile_completed_units`. It accepts integers from 1 through 16384, excluding booleans, before early returns. Every prospective new request uses that limit. A changed or faulty completed unit stays whole or returns a conflict; valid completed units remain whole even above the limit.

The caller still authenticates historical requests, completions, refusals, subsequent ledger entries and the current plan before admitting work. A smaller limit does not establish that evidence or guarantee a complete reply. No provider, financial admission, serialization, model or execution policy changes.

### Compatibility, rollout and rollback

- Wire: none. Both Python APIs gain an optional keyword with the existing default behavior.
- Operator steps: none.
- Rollback: reverting removes the optional keyword; callers must omit it before rollback. No stored-data migration.

### Tests

- 36 directly related cases failed before the change. After the fix, 84 focused cases passed, including default equivalence, UTF-8 limits, table boundaries, completed reuse, whole-unit conflicts and invalid limits.
- An authenticated source-only planning proof retains both completed units and the complete original manifest. The 8192-byte plan uses requests no larger than 8162 bytes; default serialized plans exactly match the prior proof. No provider call.
- Targeted Ruff, formatting, prose and whitespace checks pass. Full suites run in CI and must pass before merge.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated: Codex implemented the planner option and regressions. Independent technical and content reviews cover the final public head.

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

### Checklist

- [x] Existing default plans and completed-unit protection are preserved.
- [x] Focused regressions and formatting checks pass.
- [ ] Fresh technical and content reviews have no findings on the public head.
- [ ] Full CI passes on the public head.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Coding-agent primers explain repository tags for saved lessons

Manual memory writes need the repository tag to resolve code links from a personal namespace. Scope the guidance to facts about the current repository so other facts keep their own scope.

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

* Renew the reviewed primer source hashes

The repository-tag wording changes these reviewed body-builder files without changing request construction. Renew only their source pins after auditing the sender paths; keep exception entries and the guard unchanged.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Private event storage preserves ordinary event analysis

Keep the ordinary physical ledger and its scoped columns usable by both serving builds. Fence new private writes, drain prepared inserts on every declared writer and refuse existing contamination before granting analyst access. Schema generation and final validation follow this checkpoint.

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

* Generate the private event schema and SQL corpus

Use the official empty-store migration replay for the private event table, ordinary CHECK and derived view changes. Record the journal and rendered SQL shapes with their source definitions.

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

* Align private event checks with their physical stores

Keep native writer attestation on the selected database release and preserve isolation, retention, export privacy and analyzer controls across both event tables.

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

* Pin ledger scope and window before each physical event read

Keep scope and time pruning inside both union branches without depending on predicate pushdown through the typed mask. Preserve the existing native read-row bound and all output restrictions.

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

* Generate the schema with branch-local ledger bounds

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

* Check private source billing in its physical ledger

Preserve identity and exact charge assertions and also prove the ordinary ledger stays empty.

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

* Preserve budget and window contracts across both event streams

Distinguish explicit source projections from eligibility filters, keep ordinary held witnesses ordinary, and assert both physical retention targets and every branch-local time window.

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

* Analyst grants require direct writer policy observations

Bind complete native policy catalogs and negative event checks to one-shot writer sessions. Refuse unchecked SQL files and apply the analyst boundary through live checks.

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

* Native policy controls hide data without authorizing analyst grants

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

* Private event migration follows the deployment protection latch

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

* Native observer fixtures use the actual query and privilege APIs

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

* Analyst setup documents and checks authoritative writer visibility

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

* Generated schema and observer controls match composed storage

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

* Observe canonical native policies without extractor dependencies

Use the supported HTTP logging control, preserve typed observer results, and accept native default permissiveness without relaxing visibility proofs. Exercise installed policies through a second grant-bearing provisioning pass.

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

* Respect read-only query logging during policy observation

Observer requests contain fixed storage proofs and receive policy bodies only as response data. Preserve the logging profile while keeping query truncation and formatted-query suppression.

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

* Regenerate schema after source notification composition

Replay the merged source-notification migration before private event storage from an empty database. Update the schema reference and statement corpus from the composed sources.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Index normalized table rows while preserving first-match offsets and unmatched row order. Use prefix maximum ends for protected-line lookups.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
### Changelog category (leave one):

- Documentation (changelog entry is not required)

### Changelog entry

Publish twelve reviewed documentation translations, correct one Korean translation and retain fourteen additional generated pages as pending data.

### Why

Verified translations can publish once their translated link destinations exist. Four pages move unchanged from pending storage, and eight additional pages join them. A model-generated Korean replacement preserves the meaning of qualified names. Other translations wait for their dependencies or updated English sources.

The lifecycle checker parses the same English fallback source for each link. Each link-validation or repair pass reuses a derived body only when the source path and freshly read text match. This removes repeated parsing while retaining file checks, current reads and parser failures for every link.

### Scope and risk

Generated Markdown across the five configured translation languages, plus the existing fallback helper and focused regression tests. The import validates source stamps, model, banners, protected content and dependency closure. Every changed body has an independent complete semantic and native-language review. Two CLI translations retain their original source stamps in pending storage because the English reference changed. Pending pages have no website routes.

Derived-body reuse is limited to one invocation. Changed text reparses; deleted or symlinked sources still fail the existing checks. No cache crosses invocations, and links without fragments still parse their source.

### Compatibility, rollout and rollback

- Wire and settings: none.
- Operator steps: none. The documentation deployment publishes the available pages after merge. Automatic paid translation runner configuration remains separate.
- Rollback: reverting restores the replaced translation and four pending paths, removes added generated data and returns fallback validation to per-link parsing.

### Tests

- Maintained provider-free imports and the exact-baseline Korean replacement completed with protected-content and dependency validation. Three invalid input pages were rejected and remain excluded.
- Focused validation of the initial twenty changed bodies: eighteen pass current source and protected-content checks; two stale CLI bodies pass generated ownership checks and remain pending. The subsequent six-page import and Korean replacement pass the maintained current-source checks.
- Twelve focused lifecycle cases: two fail before the parsing change and all twelve pass after it. They cover reuse across different anchors, invocation boundaries, changed text, deletion, symlinks and parser errors with and without fragments.
- Exact generated bytes, source blobs, independent review receipts and active semantic exclusions checked for every changed body.
- Ruff, Ruff format and `git diff --check`: pass.
- Full unit, integration and strict documentation checks run in PR CI and must pass before merge. No heavy local suite ran. A previous CI unit shard exceeded its job limit; no whole-check speedup or timeout resolution is claimed before current-head CI completes.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated (an agent wrote most of the diff): Codex prepared the lifecycle change and generated-data imports, and checked their validation results and independent reviews. Translation prose comes from the approved translation model.

- [x] I can explain every line of this diff and how it interacts with the rest of Loom.

### Checklist

- [ ] Required full checks pass in CI before merge.
- [x] Generated translations retain their exact model output; no translated prose is edited by hand.
- [x] No migration, SDK, plugin, frontend or runtime interface changes.
- [x] English remains canonical and pending coverage remains explicit.
- [x] Public text contains no private evidence or deployment details.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Assistant answers bind mirror admission and private accounting

Fix mirror admission before model work so a later source activation cannot widen an ordinary answer. Mark private output first and retain required stream accounting through owned cancellation cleanup; SDKs require terminal completion.

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

* Assistant reads mirror registration through the knowledge app

Keep the registration-only admission lookup within the package contract while preserving the conservative privacy boundary.

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

* Marked operation successes retain their privacy flag

Attach the server-owned mark after typed output serialization and keep it through structured and text protocol unwrapping.

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

* Inactive mirror fixtures require an unmarked ordinary response

Active registrations mark responses before ACL filtering. Compare inactive responses with the same content and no flag; keep active and stale-evidence expectations intact.

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

* Inactive mirror reads match pre-registration responses

Capture ordinary responses before registration so inactive-source assertions retain complete JSON, download bytes and header comparisons without removing privacy metadata from expected values.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
* Draft metric definitions from query history and search gaps

Keep generated drafts private until an administrator publishes their content. Register opt-in read-only query-history sources and bound generation by privacy thresholds and namespace caps.

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

* Allow an isolated name for mixed-version checks

Use the requested container name for both creation and cleanup. A failed creation leaves any existing container untouched.

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

* Pin query-history setting defaults

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

* Query-history settings distinguish cadence from deadlines

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

* Describe definition draft operations and review reads

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

* Document retained definition heads during draft recovery

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

* Show complete definition drafts before publication

Reviewers can inspect the full body and evidence before promoting a definition. Describe private draft destinations and authenticated approval attribution.

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

* Keep definition support counts in memory lineage

Private definition drafts retain a supporting-account count without storing identities. Both exact lineage paths use that count while ordinary and assistant-rule candidates keep their existing accounting.

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

* Fence private definition decisions against erasure

Private queue writes retain their proposal time and share a bounded writer lease with namespace deletion. Check erasure under that lease and retain uncertain sends so a delayed decision or model completion cannot restore erased evidence.

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

* Fence private publication and source registry erasure

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

* Expect retained writer fences in namespace erasure traces

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

* Allocate query-history migration after mirrored erasure

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

* Require private draft cleanup before older readers serve

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

* Keep gap input out of stored draft evidence

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

* Regenerate statement shapes on the composed schema

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

* Keep definition review tests within their type contracts

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

* Complete definition drafting contracts and Library composition

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

* Search readable issues and pull requests with loom_search

Resolve authorized tracker targets before narrowing capture consent and searching the other planes. Keep duplicate verdicts for scoped defect reports and leave memory and knowledge ranking unchanged for general tracker matches.

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

* Unified search descriptions include readable issues and pull requests

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

* Refresh persisted tracker links before discovery

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

* Describe tracker search results and tag scope

Empty duplicate verdicts remain useful evidence, while tag filters apply to memory and knowledge rather than tracker matches.

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

* Add named-user cost caps and inbox budget warnings

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

* Include the user budget migration in the schema journal inventory

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

* User budgets cover synthesis and scoped warning streams

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

* Name budget source entry points and invariants

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

* Define user-budget activation and rollback boundaries

Older replicas neither preserve user policy nor protect private warnings. Activate after the fleet upgrade and settle and remove warning events before a maintenance rollback, then restore saved policy on upgrade.

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

* Allocate user budgets after query-history registrations

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

* Reuse the shared writer fence for budget warnings

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

* Number the budget upgrade rule after mirror erasure

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

* Curation rollout names the existing absence precondition

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

* Source push notifications request bounded document sync

Bind provider hints to the current source generation, verify provider proof, and keep polling as the recovery path. Fence sealed setup and sync hints against namespace erasure.

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

* Allocate source push migration after query history and budgets

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

* Compose push erasure fences with user budget delivery

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

* Regenerate the composed source push schema and statement corpus

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

* Document source push entry points and lifecycle invariants

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

* Push setup SDK summaries contain complete sentences

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

* Keep push retirement available and restrict callbacks to held orgs

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

* Allocate source push after user cost budgets

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

* Keep push erasure traces aligned with authority order

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

* Define the team-owned GitHub feed record and bounded readers

Keep copied content in the team's record database and retain read-only serving credentials. Provider scans fail on partial pages and preserve incomplete timestamp boundaries.

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

* Import GitHub activity into a separately owned tracker record

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

* Tracker feeds preserve publication cursors and repository identity

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

* Publish feed changes in cursor order across repositories

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

* Fence feed publication reads on supported storage

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

* Test feed publication privacy against lagged repository metadata

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

* Feed publications retain privacy across replica lag

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

* Feed UUID privacy accepts the contract integer type

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

* Pin source push table ownership and replacement rows

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

* Format the unified search argument table

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

* Keep tracker search regression fixtures on the planned call path

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

* Use the configured test target for tracker ASGI requests

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

* Regenerate schema for user cost budgets

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

* Record the official source push schema artifact

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

* Align user budget contracts with checked synthesis

Carry warning identity columns through task event reads and register the warning pipeline. Preserve named-user budget assertions while updating checked-search fixtures and their explicit keyword contracts, and regenerate the SDK surface and statement catalog.

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

* Keep receiving-clock deadlines within the writer lease

Anchor the sampled server timestamp at response receipt so asymmetric request latency cannot extend a leased send. Cover asymmetric and symmetric clock delays without changing lease durations, send bounds or server guards.

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

* Regenerate schema and statement catalog for user budgets

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

* Register source push provenance and scope contracts

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

* Register the GitHub feed pipeline actor

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

* Test marked namespace spend through the shared budget snapshot

The native marked-spend check uses the same rolling spend read as budget
status and admission, including when the namespace has no cost cap.

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

* Bound leased sends by the received server clock

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

* Withhold exact user spend from budget status and warnings

Named-user cap verdicts and warning thresholds count all ledger spend.
Status reveals exact user spend only to a platform admin without namespace
role restrictions; user warnings always redact the amount for recipients.

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

* Test the push notification action in the source menu

Keep the exact admin menu assertion aligned with the supported source actions.

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

* Keep push maintenance on its connected client and configured deadlines

Carry the connected store through registry resealing and its lifecycle fences. Keep timeout defaults in the configuration catalog, and align source contracts and generated snapshots.

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

* Scope push registry keys and callback lookups by namespace

Namespace name checks must not scan every retained source registration in an organization. Keep callback lookups and maintenance cursors on the same physical key prefix.

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

* Generate the namespace-keyed push registry schema

Record the official schema and statement catalog for namespace-scoped push lookups.

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

* Keep push renewal deadlines inside the lease work window

The renewal lease permits work for forty percent of its lifetime. Reject provider and cleanup budgets that exceed that window while retaining the existing defaults and lease policy.

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

* Keep tracker control versions ahead of persisted state

Clock rollback must not discard an acknowledged visibility, credential or cursor update.

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

* Generate the combined mirror and push schema

Record the namespace-keyed registry and deployment latch in one official schema.

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

* Round-trip callback organizations through query encoding

A permitted slash in an organization must not become a callback path separator.

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

* Gate tracker feed connections through deployment admission

Check the deployment authority and held organization before record work, keep external metadata separate, and close the Postgres pool on exit. Classify fixed CLI and privacy bounds without changing their values.

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

* Translation checks avoid repeated row and interval scans

Index normalized table rows while preserving first-match offsets and unmatched row order. Use prefix maximum ends for protected-line lookups.

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

* English fallback checks reuse destination bodies

Parse each anchored destination once per validation or repair pass. Check fragmentless destinations without reading their bodies.

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

* Coalescer burst regression controls its window clock

The test assumes five submissions share a window, but a busy runner can
advance the real loop clock between them. Use the manual clock and flush
explicitly so every existing request and verdict assertion tests that premise.

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

* Recall Lab reuses settled scores while editing a query

Draft query edits rebuilt the score table before the debounced search ran.
Reuse the table until its result, loading or opening context changes, while
keeping query cancellation and immediate clearing unchanged.

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

---------

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
### Changelog category (leave one):

- Documentation (changelog entry is not required)

### Changelog entry

Publish eighteen reviewed documentation translations: adapter architecture pages in all five translation languages, Japanese tracker guidance and Spanish and Korean working-memory references.

### Why

These generated pages have complete semantic and native-language reviews and available translated link destinations. Publishing them makes the adapter boundaries, tracker contract and working-memory operations available through the existing native documentation navigation.

### Scope and risk

Generated Markdown only. Each imported page retains its exact model output, source blob, configured model and bilingual authority notice. The maintained producer validates protected content and link dependencies before publication. Existing pending pages keep their generated bytes and source stamps. English remains canonical, and incomplete or stale coverage remains explicit.

### Compatibility, rollout and rollback

- Wire and settings: none.
- Operator steps: none. The documentation deployment publishes the available pages after merge. Automatic paid translation runner configuration remains separate.
- Rollback: reverting removes these added documentation pages.

### Tests

- Maintained provider-free imports accepted all eighteen reviewed pages, with current-source invariants and dependency closure checks. Existing published pages remain unchanged.
- Exact generated bytes, source blobs, complete independent semantic and native-language review receipts and active semantic exclusions checked for every added body.
- `git diff --check`: pass.
- Full unit, integration and strict documentation checks run in PR CI and must pass before merge. No heavy local suite ran.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated (an agent wrote most of the diff): Codex prepared the generated-data imports and checked the validation results and independent reviews. Translation prose comes from the approved translation model.

- [x] I can explain every line of this diff and how it interacts with the rest of Loom.

### Checklist

- [ ] Required full checks pass in CI before merge.
- [x] Generated translations retain their exact model output; no translated prose is edited by hand.
- [x] No migration, SDK, plugin, frontend or runtime interface changes.
- [x] English remains canonical and pending coverage remains explicit.
- [x] Public text contains no private evidence or deployment details.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
### Changelog category (leave one):

- Bug Fix

### Changelog entry

Original-unit reconciliation permits correction of a faulty completed whole-page translation when the prepared English input is unchanged.

### Why

The single-unit guard rejects a valid same-input correction before the existing correction planner can retain its completed reference and confirmed faults. Restricting the whole-page replacement refusal to changed input lets unchanged requests use the established correction path.

### Scope and risk

One planner condition changes. The correction retains the authentic original unit, manifest digest, fault identifiers and current source context. The existing byte bound applies to the complete request. Changed whole-page inputs, invalid provenance, unknown faults and pair refusals retain their existing conflicts. English documentation already describes same-input correction and remains unchanged.

### Compatibility, rollout and rollback

- Wire and settings: none. The existing pure planning API accepts the same arguments.
- Operator steps: none. This change makes no provider call or automatic paid-runner configuration change.
- Rollback: reverting restores the refusal for faulty completed whole-page inputs.

### Tests

- Fifteen small focused checks pass, including an authenticated frozen same-input case that fails before the fix.
- Regression controls cover fault coalescing, unchanged-input provenance and context, exact byte bounds, changed whole-page inputs, inserted prose, invalid or missing completion references and pair refusal.
- Ruff, format, prose and `git diff --check` pass.
- Full unit, integration and coverage checks run in PR CI and must pass before merge. No heavy local suite ran.

### AI assistance in the code (leave one; writing this description with AI is fine):

- AI-generated (an agent wrote most of the diff): Codex diagnosed the planner refusal, changed its condition and wrote the focused regressions.

- [x] I can explain every line of this diff and how it interacts with the rest of Loom.

### Checklist

- [ ] Required full checks pass in CI before merge.
- [x] Completed-unit provenance, changed-input refusal and request byte bounds remain enforced.
- [x] No generated translation, provider, prompt, model or budget changes.
- [x] No migration, SDK, plugin, frontend or runtime interface changes.
- [x] Public text contains no private evidence or deployment details.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep the release version pins while incorporating the merged source, generated clients and documentation. Every other file retains main's contents.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep token-cache time separate from model-call policy freshness. Exercise token rotation under an explicit customer and controlled process clock so stale policy cannot mask the expected 401 behavior.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Bind the marked work bag to the serialization check so later event tests cannot inherit it.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit c315568)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 requested a review from PedroTadim November 18, 2026 12:18
@zlareb1
zlareb1 merged commit ad64a7d into release/prepare-1.3.0 Nov 18, 2026
45 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 18, 2026
6 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.

2 participants