Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/rules/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ paths:
- `Annotated[T, LIVE]` makes a field take a runtime override (`server/settings/_live.py`): only for a field read at call time, never captured at boot or used as a calibration fallback (`test_live_settings.py`, which pins the LIVE set).
- A changed default is a `DefaultChange` in `server/settings/_history.py`, with the release and the reason (`test_settings_defaults.py`).
- Regenerate the reference, the settings-file schema and the settings-file template: `python -m scripts.codegen.settings_reference`, `python -m scripts.codegen.settings_schema` and `python -m scripts.codegen.settings_example` (`loom.example.yaml`).
- The Helm chart, the operator guides, the compose files and `deploy/standalone/env.example` name settings by hand: a rename or removal changes every `git grep -nw -e LOOM_<FIELD> -e <field>` hit that names this setting (the lowercase name is the settings file's key: the chart's `settingsFile`, CI). Leave generated output to its generator: `loom.example.yaml`, the generated pages and regions under `docs/reference/` (`configuration.md`, `operations/`, the `BEGIN GENERATED` regions) and the root `llms.txt` come from `settings_reference` and `docs_reference`, and the copies in `integrations/codex-plugin/` from `agent_plugin_sync`; rerun each one whose output names the setting.
- The Helm chart, the operator guides, the compose files and `deploy/standalone/env.example` name settings by hand: a rename or removal changes every `git grep -nw -e LOOM_<FIELD> -e <field>` hit that names this setting (the lowercase name is the settings file's key: the chart's `settingsFile`, CI). Leave generated output to its generator: `loom.example.yaml`, the generated pages and regions under `docs/reference/` (`configuration.md`, `operations/`, the `BEGIN GENERATED` regions) come from `settings_reference` and `docs_reference`, and the copies in `integrations/codex-plugin/` from `agent_plugin_sync`; rerun each one whose output names the setting.
2 changes: 1 addition & 1 deletion .claude/rules/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ paths:
- A pass that reaches ClickHouse retries a transient failure within its pass budget rather than waiting for the next interval.
- A worker whose written orgs come only from a log table (`LOG_TABLES` in `server/cli/cell_scan.py`) writes a log table too: its table joins `LOG_TABLES`, so the first attach never places an org a caller only typed.
- An intended change to the enabled set, order, cadence or deadline updates the snapshot: `LOOM_UPDATE_WORKER_SNAPSHOT=1 .venv/bin/python -m pytest tests/unit/test_worker_registry_snapshot.py`.
- Two copies can briefly overlap (a lease handover, an `on` process, two colours during a deploy): a pass is harmless when it runs twice at once — idempotent writes, leased claims, cursors in the store ([where it runs](../../docs/development/adding-a-worker.md#5-understand-where-it-runs)).
- Two copies can briefly overlap (a lease handover, an `on` process, two colours during a deploy): a pass is harmless when it runs twice at once — idempotent writes, leased claims, cursors in the store ([where it runs](../../docs/development/adding-a-worker.md)).
- Guide: [adding-a-worker](../../docs/development/adding-a-worker.md).
54 changes: 3 additions & 51 deletions .github/workflows/docs-site.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: docs site

# Publishes legacy redirects and submits changed site URLs after production deploys.
# Submits changed production documentation URLs after deployment.
on:
push:
branches: [main]
Expand All @@ -25,54 +25,6 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
name: build
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pages: read # Read the base URL used by the legacy Markdown copies.
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Install the site builder
run: |
python -m pip install --require-hashes --no-deps --only-binary=:all: -r scripts/docs_site/requirements.txt
- if: github.ref == 'refs/heads/main' && vars.DOCS_SITE_ENABLED == 'true'
name: Read the legacy Pages URL
id: pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Build legacy documentation redirects
env:
LOOM_LEGACY_DOCS_URL: ${{ steps.pages.outputs.base_url || 'https://loom.clickhouse.com/docs' }}/
run: |
mkdocs build --strict
python -m scripts.docs_site.redirect_pages site "$LOOM_LEGACY_DOCS_URL"
- if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site

deploy:
name: deploy
if: github.ref == 'refs/heads/main' && vars.DOCS_SITE_ENABLED == 'true'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write # Deploy the built Pages artifact.
id-token: write # Authenticate the Pages deployment.
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1

indexnow:
Comment thread
zlareb1 marked this conversation as resolved.
Resolved
name: indexnow
if: github.ref == 'refs/heads/main'
Expand All @@ -95,8 +47,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
# Legacy redirect publication has its own result. Only a successful IndexNow
# job advances the comparison point so the next run covers a failed submission.
# Only a successful IndexNow job advances the comparison point so the next run
# covers a failed submission.
base=
page=1
while [[ -z "$base" ]]; do
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
- "README.md"
- "docs/**"
- "scripts/i18n/**"
- "scripts/docs_site/messages.py"
- "scripts/docs_site/indexnow.py"
- "scripts/docs_site/paths.py"
- ".github/workflows/i18n.yml"
schedule:
- cron: "37 */6 * * *"
Expand Down Expand Up @@ -106,7 +103,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
actions: write # Dispatch the docs deployment after merge.
actions: write # Read validating CI and dispatch IndexNow after the translation merge.
contents: write # Write the validated squash merge to main.
pull-requests: write # Squash-merge the validated translation pull request.
steps:
Expand All @@ -118,10 +115,15 @@ jobs:
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Install the site builder
- name: Install the translation parser
run: |
python -m pip install --require-hashes --no-deps --only-binary=:all: -r scripts/docs_site/requirements.txt
- name: Merge the successful exact head and publish the site
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22.19"
- name: Install the documentation builder
run: npm ci --prefix docs
- name: Merge the successful exact head
env:
GH_TOKEN: ${{ github.token }}
LOOM_I18N_LANGUAGES: ${{ vars.LOOM_I18N_LANGUAGES }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Results are specific to the tested workloads.

Both modes support the same Loom features, including configured LLMs and embeddings.
Single-user is not a reduced-feature edition. You can also
[switch an existing installation without deleting its data](./docs/getting-started/quickstart.md#2-open-the-dashboard);
[switch an existing installation without deleting its data](./docs/getting-started/quickstart.md);
grant new accounts access to the existing namespaces.

To try it with nothing installed, open it in a codespace:
Expand Down
2 changes: 1 addition & 1 deletion docs/benchmarks/methodology.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ key-less provider makes `/v1/health` report `degraded` before you spend a run.
| Evaluation reads | `measurement_fields()` sends `auto_touch: false` / `reinforce: false`; `--credit` opts in; on a namespace read before, pass `reinforcement_weight: 0` or use fresh rows |
| Fresh namespaces | One throwaway namespace per item or conversation, erased at the end |
| Warm-up | `search_latency.py --warm 1` discards the first call per query, so embedding-cache misses do not count as retrieval |
| Token lifetime | Mint a token that outlives the run ([running](./running.md#2-mint-a-token-that-outlives-the-run)) |
| Token lifetime | Mint a token that outlives the run ([running](./running.md)) |

### Bench namespaces

Expand Down
32 changes: 16 additions & 16 deletions docs/development/documentation-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ nothing is close enough. This page explains each leg, how the rank is computed,
which settings move it.
```

`llms.txt` lists the first sentence of that paragraph for the page, and the documentation site uses it as the page's search description. Then, where they apply: the user-visible behaviour, the interfaces (operations, CLI, settings), how it works, limits and failure modes, and "Related" links. Architecture pages add **Source entry points** (paths and symbols) and **Invariants**.
The documentation site uses the first sentence of that paragraph as the page's search description and generates `llms.txt` from it. Then, where they apply: the user-visible behaviour, the interfaces (operations, CLI, settings), how it works, limits and failure modes, and "Related" links. Architecture pages add **Source entry points** (paths and symbols) and **Invariants**.

## Prerequisites

Expand Down Expand Up @@ -82,21 +82,22 @@ Use these spellings everywhere; the [glossary](../glossary.md) defines them.

## Generated pages

These pages are rendered from the code. Edit the source, then run the generator. `make lint` runs each with `--check`, so a stale page fails CI.
These pages are generated from the code or documentation source. Edit the source, then run the generator. `make lint` runs each with `--check`, so a stale page fails CI.

| Page | Source | Generator |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [reference/configuration.md](../reference/configuration.md) | comments above fields in `server/settings/` | `python scripts/codegen/settings_reference.py` |
| [reference/operations.md](../reference/operations.md) | `server.operations.registry.ALL_OPERATIONS` | `python scripts/codegen/docs_reference.py` |
| [`llms.txt`](https://github.com/ClickHouse/loom/blob/main/llms.txt) (repository root) | every page's title and the first sentence of its opening paragraph | `python scripts/codegen/docs_reference.py` |
| `reference/operations/<group>.md` (one per group) | the op input/output models and the comments above their fields | `python scripts/codegen/docs_reference.py` |
| [reference/workers.md](../reference/workers.md) | `server/workers/registry.py` (`_WORKERS`) | `python scripts/codegen/docs_reference.py` |
| [reference/cli.md](../reference/cli.md) | the `loom` parser snapshot `tests/unit/snapshots/cli_tree.json` | `python scripts/codegen/docs_reference.py` |
| [reference/errors.md](../reference/errors.md) | `server/core/errors.py` | `python scripts/codegen/docs_reference.py` |
| [reference/status.md](../reference/status.md) | op `maturity` and the boolean settings of `server/settings/catalog.py` that load false | `python scripts/codegen/docs_reference.py` |
| [reference/schema.md](../reference/schema.md) | `schemas/schema.sql` | `python scripts/codegen/docs_reference.py` |
| Page | Source | Generator |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [reference/configuration.md](../reference/configuration.md) | comments above fields in `server/settings/` | `python scripts/codegen/settings_reference.py` |
| [reference/operations.md](../reference/operations.md) | `server.operations.registry.ALL_OPERATIONS` | `python scripts/codegen/docs_reference.py` |
| `llms.txt` (documentation site) | the docs' page titles and opening paragraphs | Blume site build |
| `reference/operations/<group>.md` (one per group) | the op input/output models and the comments above their fields | `python scripts/codegen/docs_reference.py` |
| [reference/workers.md](../reference/workers.md) | `server/workers/registry.py` (`_WORKERS`) | `python scripts/codegen/docs_reference.py` |
| [reference/cli.md](../reference/cli.md) | the `loom` parser snapshot `tests/unit/snapshots/cli_tree.json` | `python scripts/codegen/docs_reference.py` |
| [reference/errors.md](../reference/errors.md) | `server/core/errors.py` | `python scripts/codegen/docs_reference.py` |
| [reference/status.md](../reference/status.md) | op `maturity` and the boolean settings of `server/settings/catalog.py` that load false | `python scripts/codegen/docs_reference.py` |
| [reference/schema.md](../reference/schema.md) | `schemas/schema.sql` | `python scripts/codegen/docs_reference.py` |

On the documentation site, `scripts/docs_site/hooks.py` serves each page's Markdown copy beside the page, at its URL plus `index.html.md` and, for a section index, at `<folder>.md`, named by a `<link rel="alternate" type="text/markdown">` tag on the page; `llms.txt` with its links pointing at those copies; `llms-full.txt` (the pages that say what Loom is and how to start); and the repository's `llms-install.md`.
On the documentation site, Blume serves each page's Markdown copy beside the page and
Comment thread
zlareb1 marked this conversation as resolved.
Resolved
publishes `llms.txt` and `llms-full.txt`. `llms-install.md` remains in the repository.

The site publishes generated pages from `i18n/<language>/docs/` under `/<language>/`. English is the canonical default. Each page keeps its docs-relative path under `/<language>/`, so the homepage and use-case index have distinct routes. The English homepage links to each available translated homepage, or to its translated use-case index when the homepage is unavailable. Each translated page links to its English source and to the available equivalent translations. A notice marks translations whose source blob differs from the current English page. Translation generation stays in `scripts/i18n/translate.py`; the site build does not call a translation provider.

Expand All @@ -110,6 +111,5 @@ The SDK op tables (`sdk/python/loom/ops.py`, `sdk/typescript/src/generated/ops.t
make format # Prettier formats the Markdown, ruff its Python blocks
uv run pytest tests/unit/test_doc_links.py tests/unit/test_public_copy.py -q
python scripts/codegen/docs_reference.py --check
pip install --require-hashes --no-deps --only-binary=:all: -r scripts/docs_site/requirements.txt # once, in a virtualenv
mkdocs build --strict # the docs site build CI runs
npm --prefix docs run build # builds the deployed documentation site
```
2 changes: 1 addition & 1 deletion docs/development/extending-loom.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ flowchart LR

- **The code is the registry.** Transports iterate `ALL_OPERATIONS`, the supervisor iterates `_WORKERS`, and the settings reference is generated from `server/settings/`. Each registry has a snapshot or census test that fails until you regenerate it.
- **Generated files.** `make lint` runs every generator with `--check`: the SDK op tables (`scripts/codegen/sdk_py_gen.py`, `sdk_ts_gen.py`), the reach manifest (`op_reach_census.py`), the reference pages (`docs_reference.py`, `settings_reference.py`) and the Codex plugin copies (`agent_plugin_sync.py`). See [code generation](code-generation.md).
- **Maturity.** A new op declares `maturity="experimental"` unless it replaces a stable one ([adding an operation](adding-an-operation.md#5-check-reach-and-maturity)).
- **Maturity.** A new op declares `maturity="experimental"` unless it replaces a stable one ([adding an operation](adding-an-operation.md)).
- **Measurement.** A change to ranking, extraction or a provider default runs the relevant bench before and after ([performance tuning](../guides/performance-tuning.md#measure-first)).
- **Foundational shapes are not extension points.** The engine (ClickHouse), the identity tuple, per-row content-hash audit and the five belief-revision operations change only with a design rationale in the PR and in the architecture docs ([system overview](../architecture/system-overview.md)).

Expand Down
Loading
Loading