Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
78398da
fix(backfill): dedicated embed-backfill arm and a time budget for the…
DamieMoon Oct 9, 2026
cd3efce
docs(backfill): name the tracking issue by its URL
DamieMoon Oct 9, 2026
e0f9a7d
test(config): raise the duration-key drift guard to 47
DamieMoon Oct 9, 2026
2005bfd
fix(backfill): the arm passes the iterated tenant's scope window to t…
GottZ Oct 22, 2026
e038176
fix(backfill): sync_budget=0 and interval=0 restore the pre-PR query …
GottZ Oct 22, 2026
3af9130
fix(backfill): the pick skips blocks no eligible embed backend can serve
GottZ Oct 22, 2026
acc5141
fix(backfill): the arm goes on at once after parking an oversize block
GottZ Oct 22, 2026
ff5c5be
fix(backfill): a hot change of embed_backfill.interval applies within…
GottZ Oct 22, 2026
ce7f37c
test(backfill): pin that Run starts the embed-backfill arm without Dream
GottZ Oct 22, 2026
a77c598
docs(backfill): align the arm and budget docs with the hardened behavior
GottZ Oct 22, 2026
91e1b38
docs(contributors): credit Damien Moon for PR #46
GottZ Oct 22, 2026
1b876ce
feat(backends): anthropic wire protocol constant, validation and Migr…
DamieMoon Oct 10, 2026
9446324
feat(llm): native Anthropic Messages API wire, non-streaming
DamieMoon Oct 10, 2026
ddbd78c
feat(llm): Anthropic SSE streaming with tool use for the chat harness
DamieMoon Oct 10, 2026
d143434
feat(backends): anthropic probe, seed, init wizard and UI enum
DamieMoon Oct 10, 2026
a8c306f
fix(chat): carry model_map params.effort onto the web-chat stream path
DamieMoon Oct 10, 2026
a6d26db
fix(llm): anthropic stream replays thinking, repairs orphans, caches …
DamieMoon Oct 10, 2026
c348e71
fix(backends): wizard rejects a bad context window and asks for the e…
DamieMoon Oct 10, 2026
077d950
docs(anthropic): review follow-ups across api, operations, architectu…
DamieMoon Oct 10, 2026
c4bdc83
test(llm): env-gated live smoke of the anthropic wire against api.ant…
DamieMoon Oct 11, 2026
544d236
test(backends): pin Migration 155's protocol CHECK on a real PostgreSQL
DamieMoon Oct 11, 2026
253e4d2
fix(llm): state the thinking-replay rule as the reference's, not as a…
DamieMoon Oct 11, 2026
e01262d
docs(llm): wording nits from the pre-push review of the thinking-repl…
DamieMoon Oct 11, 2026
848c330
fix(chat): anthropic closing call keeps the tools array with tool_cho…
GottZ Oct 22, 2026
57a1a8e
fix(llm): anthropic max_tokens carries a thinking reserve per effort …
GottZ Oct 22, 2026
3843068
fix(backends): anthropic rows reject carrier keys the Messages API ca…
GottZ Oct 22, 2026
211359f
fix(llm): anthropic wire never builds a whitespace-only text block
GottZ Oct 22, 2026
6c6babb
docs(anthropic): version comment, shared header set for the probe, ne…
GottZ Oct 22, 2026
bb96a66
test(llm): the live smoke fails when the 1-token probe is rejected
GottZ Oct 22, 2026
d0f8dd6
fix(llm): anthropic tool loop replays the turn in the API's block order
GottZ Oct 22, 2026
7edbb29
docs(contributors): credit Damien Moon for PR #47
GottZ Oct 22, 2026
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
27 changes: 27 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,33 @@ else's environment — that led to a fix landing in the repository.
hardcoded `~/.claude/settings.json` that ignored `CLAUDE_CONFIG_DIR`. A/B/A
probe-script reproduction isolating schema-vs-path, root-cause to the exact
functions, and a verified fix delivered as a pull request.
- **Damien Moon** ([@DamieMoon](https://github.com/DamieMoon)) — PR
[#46](https://github.com/GottZ/ctx/pull/46): on a CPU embed backend one
large block turned every following `ctx query` into a 500 after the
client's 120 s deadline — the background backfill only ran inside the
dream loop (off by default), and the query path's inline backfill had a
count cap but no time budget, so the slow block ate the caller's whole
deadline and was memoized as a backend outage. Server and llama.cpp logs,
a live before/after on the affected host, and the shipped fix: a
dedicated embed-backfill arm that runs regardless of Dream, a wall-clock
`sync_budget` for the query path, and a `caller_timeout` memo class that
hands an overrunning block to the arm. Hardened with the arm staying
inside the iterated tenant's scope window, opt-outs that restore the
pre-PR paths, a pick that skips blocks no trusted backend can serve,
no idle wait after a parked block, hot interval changes, and a test
that pins the arm's wiring into `Run`. The review of this PR also
surfaced a cross-tenant egress path in the existing dream-loop backfill,
fixed separately in v5.23.1. Also PR
[#47](https://github.com/GottZ/ctx/pull/47): a third wire protocol,
`anthropic` — the native Messages API with prompt caching on the stable
system prefix, effort control, SSE streaming with tool use for the web
chat, Migration 155, probe, seed and wizard support — so a hosted-Claude
install no longer needs a sampling-stripping sidecar in front of the
OpenAI-compatible layer. Hardened with a closing call that keeps the tool
definitions under `tool_choice: none`, a per-effort thinking reserve on
`max_tokens`, validation of keys the Messages API rejects, no
whitespace-only text blocks, and a tool-loop replay in the API's block
order.
- **TurgutKural** ([@TurgutKural](https://github.com/TurgutKural)) — PR
[#9](https://github.com/GottZ/ctx/pull/9): `/health` reported every cloud
inference backend as down. The probe demanded HTTP 200 on `GET /`, which only
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Running the server (Go daemon + PostgreSQL 18 + pgvector) is `docker compose up

> **Upgrading from v4? Reach v4.38.0 first.** v5.0.0 removes the `CTX_{CHAT,CHAT_FALLBACK,EMBED,DREAM,DREAM_EMBED,RERANK}_*` connection variables: backends are configured in the pool (`ctx backends`) and nowhere else. **v4.38.0 is the last release that still reads those variables**, and one boot on it carries a `.env`-only configuration into the pool for you, then names every variable and leftover settings row you still have. Going straight from an older v4 to v5 is not fatal down to v4.19.0 — the env bridge is gone by then and you re-enter your topology by hand with `ctx backends seed` — but **below v4.19.0 it is a hard stop**: v5 folds migrations 001–113 into a single baseline and refuses a database that never applied 113. Migration path and rollback notes: [operations](docs/operations.md#migration-133-the-backend-tuple-rows-are-deleted--and-the-upgrade-hop-that-has-to-come-first).

**Models:** the tested reference stack is qwen3.6:27b for chat/synthesis/dream/digest, Qwen3-Embedding-8B (1024-dim, CPU-sized) for embeddings, and a bge-reranker-v2-m3 cross-encoder sidecar for rerank — but ctx is engine-agnostic: any OpenAI-compatible or Ollama API works, models are per-backend configuration. CPU-only setups work; a GPU shortens chat latency. Details: [Models & hardware](docs/operations.md#models--hardware).
**Models:** the tested reference stack is qwen3.6:27b for chat/synthesis/dream/digest, Qwen3-Embedding-8B (1024-dim, CPU-sized) for embeddings, and a bge-reranker-v2-m3 cross-encoder sidecar for rerank — but ctx is engine-agnostic: any OpenAI-compatible or Ollama API works, and the chat-class roles can run on the native Anthropic Messages API (`protocol: "anthropic"`); models are per-backend configuration. CPU-only setups work; a GPU shortens chat latency. Details: [Models & hardware](docs/operations.md#models--hardware).

## How LLMs use ctx

Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,10 @@ services:
# ── status.* (1) ──
CTX_STATUS_CHANNEL_PROBE_INTERVAL: ${CTX_STATUS_CHANNEL_PROBE_INTERVAL:-}

# ── embed_backfill.* (4) ──
# ── embed_backfill.* (6) ──
CTX_EMBED_BACKFILL_SYNC_CAP: ${CTX_EMBED_BACKFILL_SYNC_CAP:-}
CTX_EMBED_BACKFILL_SYNC_BUDGET: ${CTX_EMBED_BACKFILL_SYNC_BUDGET:-}
CTX_EMBED_BACKFILL_INTERVAL: ${CTX_EMBED_BACKFILL_INTERVAL:-}
CTX_EMBED_BACKFILL_MAX_TOKENS: ${CTX_EMBED_BACKFILL_MAX_TOKENS:-}
CTX_EMBED_BACKFILL_BACKOFF_BASE: ${CTX_EMBED_BACKFILL_BACKOFF_BASE:-}
CTX_EMBED_BACKFILL_BACKOFF_CAP: ${CTX_EMBED_BACKFILL_BACKOFF_CAP:-}
Expand Down
Loading
Loading