On the 2-vCPU production VM a small ingest after a large import hit the 60 s
script timeout: the write committed, but post-commit indexing kept embedding
the tenant's backlog while Ollama was busy, so the client saw an error.
- Provider/store calls in web requests wait at most EmbeddingTimeoutMs (10 s);
recall/search/context fall back to lexical instead of stalling
- Emb_AfterWrite stops starting batches after EmbeddingWriteBudgetMs (8 s) and
leaves rows pending (no attempt used) for the embed-worker
- The CLI worker (scripts/embed.asp) still waits up to 60 s per call
- .gitignore: all .amk*.env files (production and local KB settings)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One JSON access-log line per API response (request id, action, status,
duration, tenant/principal; never bodies, queries or keys); ApiAccessLog
setting turns it off
- A caller's X-Request-Id (8-64 safe chars) is kept for correlation
- GET /api/v1/metrics: Prometheus text with request counters and a latency
histogram per action, plus memory/candidate/job/embedding/retrieval/feedback
counts; needs AMK_METRICS_TOKEN (compose .env), 404 while unset
- scripts/ops.sh: migrate/provision/embed/backup/verify/restore on Linux
- AGENTS.md: the knowledge base lives on the production server; the local
container is for tests only
- Tests: observability.sh (25); all eight suites pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docker-compose: ollama (nomic-embed-text) and qdrant services.
- core/lib.Embeddings.asp: Ollama and Qdrant clients, embedding_index
bookkeeping (pending/indexed/failed/delete with model, dimensions and
revision), Ranker_Class with reciprocal rank fusion of lexical and vector
ranks. Falls back to lexical with a warning when the provider is off/down.
- Write paths mark rows inside their transaction and index after commit
without failing the write; forget, purge and new document revisions remove
points. scripts\embed.cmd status|run|reindex catches up or rebuilds.
- /recall, /search and /context use the shared ranker and report strategy.
- Lexical queries drop common English stopwords; fix AscW sign so characters
U+8000..U+FFFF are kept as word characters.
- Migration create_embedding_index_table; tests/phase3-semantic.sh (30
checks); OpenAPI, README and AGENTS.md updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>