Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
399 changes: 366 additions & 33 deletions .env.example

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions .env.example.minimal
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ MAX_VISITS_PER_NODE=1
# Extra bounded repair calls per facts unit, driven by machine-found
# violations. Fires even at MAX_VISITS_PER_NODE=1, so a facts unit costs up to
# two provider calls by default. Set 0 for exactly one call per unit.
FACTS_LLM_REPAIR_VISITS=1

# Concurrent content-unit workers. Bounded in practice by LLM_MAX_INFLIGHT
# above; raising this alone will not make a rate-limited run faster.
Expand Down Expand Up @@ -148,7 +147,7 @@ AGG_EMBEDDING_MODEL=sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
#EMBEDDING_DIMENSION=384

# How much schema each unit is shown. The two knobs that actually move recall.
#VECTOR_STORE_TOP_K=20
#VECTOR_STORE_TOP_K=40
#VECTOR_STORE_INDUCED_SUBGRAPH_MAX_TOTAL_TRIPLES=1200

# Drop and rebuild the partition on startup. Required after any change to the
Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ jobs:
with:
version: "0.10.12"
enable-cache: true
# `ty check ontocast test` is a whole-program check, so every extra
# whose code it walks has to be importable here: `server` (FastAPI app
# + CLI), `documents` (docling-core types), `qdrant` and `graph`.
# Syncing `dev` alone -- correct before the dependency tiering moved
# those packages out of the base install -- made ty fail on ~40
# unresolved imports.
#
# This deliberately stops short of `--all-extras` (8.8 GB vs 633 MB;
# torch, docling/easyocr, lancedb, pygraphviz) because the heavy tier
# is instead whitelisted in `[tool.ty.analysis] allowed-unresolved-imports`
# in pyproject.toml. A new unresolved-import failure here means an
# extra crossed that line: either add it below, or whitelist it there.
- name: Install dependencies (extras that ty type-checks)
run: uv sync --extra dev --extra server --extra documents --extra qdrant --extra graph --no-install-project
# `setup-uv`'s own cache covers uv's package cache, not the hook
# environments, which live in ~/.cache/pre-commit. Without this step
# every run rebuilt them from scratch and re-resolved each hook's
# dependencies, so an unchanged repository could go red on a transitive
# release. Keying on the config hash means a hook or pin change rebuilds
# and everything else reuses.
- name: Cache hook environments
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
# This job is lint and formatting only, so it needs nothing but the
# `dev` extra. Type checking runs in `tests.yml`, whose `unit` job
# already installs every extra -- a whole-program check gets better
# answers where the whole program is actually importable.
- name: Install dependencies
run: uv sync --extra dev --no-install-project
- name: Run pre-commit
run: uv run pre-commit run --all-files
env:
SKIP: ty
10 changes: 10 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ jobs:
enable-cache: true
- name: Install dependencies
run: uv sync --all-extras
# `ty check ontocast test` is a whole-program check, so it belongs where
# the whole program is installed. Under a partial install the optional
# tier has to be whitelisted as unresolved, which types those modules as
# `Any` and silently stops ty checking any call into them; here every
# extra is already present for the test run, so the check costs one step
# and no extra install. One matrix leg is enough -- the source is the
# same on both, and 3.13 only runs on main.
- name: Type check
if: matrix.python-version == '3.12'
run: uv run ty check ontocast test
# No .env exists in a clean checkout; pytest-dotenv no-ops on a missing
# file, and integration tests self-skip when their service is
# unreachable, so this runs offline.
Expand Down
22 changes: 16 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,25 @@ repos:
# uv.lock is excluded: it is generated by `uv lock` in uv's own format, so
# reformatting it here made every dependency change fail CI and then be
# rewritten by the next uv run.
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.16.0
hooks:
- id: pretty-format-toml
args: [--autofix]
exclude: ^uv\.lock$
#
# `toml-sort` is the only TOML formatter here, and that is the point.
# `pretty-format-toml` from language-formatters-pre-commit-hooks used to run
# alongside it, but that hook is a thin wrapper around toml-sort -- so the
# suite was running one formatter twice, through two independently resolved
# copies of it. They drifted apart: toml-sort 0.25.0 swapped its engine from
# tomlkit to tomlrt, which writes inline tables as `{ k = v }` where tomlkit
# writes `{k = v}`. With the wrapper on a fresh resolve and this hook pinned
# by `rev`, each one reverted the other's spacing on the `authors` table,
# every run, forever. A single formatter cannot disagree with itself.
#
# tomlkit is pinned because `rev` does not pin it: pre-commit resolves a
# hook's dependencies when it builds the environment, so a months-old cached
# environment and a fresh CI one can format differently from identical config
# -- which is how this passed locally while failing in CI. Bump deliberately.
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.3
hooks:
- id: toml-sort
args: [-ia]
exclude: ^uv\.lock$
additional_dependencies: [tomlkit==0.15.1]
Loading
Loading