diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index ba16dd7..81aa45f 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -12,6 +12,18 @@ clone: steps: - name: test image: python:3.12-slim + # The woodpecker ns LimitRange defaults containers to a 256Mi memory limit. + # `uv sync` + mypy over fastapi/pydantic/sqlalchemy needs far more, so the + # step was OOM-killed (exit 137) on every run since the 2026-05-07 Forgejo + # switch — repo never built. Pin explicit memory so it never OOMs again. + backend_options: + kubernetes: + resources: + requests: + cpu: 500m + memory: 1Gi + limits: + memory: 2Gi commands: - pip install --no-cache-dir uv - uv sync --all-extras @@ -23,6 +35,15 @@ steps: image: woodpeckerci/plugin-docker-buildx depends_on: - test + # buildx + image export also exceeds the 256Mi ns default; give it room. + backend_options: + kubernetes: + resources: + requests: + cpu: 500m + memory: 1Gi + limits: + memory: 2Gi settings: # Phase 4 of forgejo-registry-consolidation 2026-05-07 — Forgejo only. # The DockerHub mirror stays as the public-facing release target via diff --git a/README.md b/README.md index b147e6b..b47bc98 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,10 @@ LIMIT $3 - `sort_by="relevance"` — `ORDER BY ts_rank(search_vector, query) DESC` - `sort_by="recency"` — `ORDER BY created_at DESC` +**Result limit:** `limit` defaults to **30** — recall returns a small top-N of the most relevant matches, not the whole store. The ceiling is 10000 for callers that explicitly opt into more. + +**OR-broadening fallback:** the query above is an AND-match (`plainto_tsquery` requires every query word to be present). When it returns fewer than `limit` rows and the query has more than one word, recall widens to an OR-match (`to_tsquery` joining the words with `|`) to fill the result set. Those broadened rows are ordered by `ts_rank` relevance (as in `sort_by="relevance"`) and must clear a minimum-rank floor (`OR_BROADEN_MIN_RANK = 0.01`) — a memory that merely contains one query word incidentally is dropped as noise rather than padding the results. + ### Semantic Expansion at Store Time When Claude stores a memory via `memory_store`, it generates an `expanded_keywords` field — at least 5 space-separated semantically related terms. For example, storing "User prefers Svelte for frontends" might produce: